/**
 * Skyline Track Services - Custom Stylesheet
 */

:root {
    --primary-color: #1e40af;
    --primary-hover: #1d4ed8;
    --primary-dark: #0f172a;
    --secondary-color: #3b82f6;
    --accent-color: #06b6d4;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-bg: #0b1120;
    --card-border: #e2e8f0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #334155;
    background-color: #f8fafc;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Navbar */
.navbar-brand {
    font-weight: 800;
    letter-spacing: -0.5px;
    font-size: 1.35rem;
}

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    color: #fff;
    margin-right: 8px;
}

.nav-link {
    font-weight: 500;
    color: #475569 !important;
    padding: 0.5rem 1rem !important;
    transition: color 0.2s ease;
}

.nav-link:hover, .nav-link.active {
    color: #2563eb !important;
}

/* Hero Slider with Ken Burns Effect */
.hero-slider-section {
    position: relative;
    overflow: hidden;
    background: #09132b;
}

.hero-carousel {
    position: relative;
    width: 100%;
    min-height: 520px;
}

.hero-carousel .carousel-item {
    min-height: 520px;
    height: 520px;
    position: relative;
    overflow: hidden;
    background-color: #09132b;
}

.kenburns-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    transform: scale(1);
    will-change: transform;
}

/* Ken Burns Keyframe Animations */
@keyframes kenburns-1 {
    0% {
        transform: scale(1) translate(0, 0);
    }
    100% {
        transform: scale(1.15) translate(-1.5%, -1%);
    }
}

@keyframes kenburns-2 {
    0% {
        transform: scale(1.15) translate(1.5%, 1%);
    }
    100% {
        transform: scale(1) translate(0, 0);
    }
}

@keyframes kenburns-3 {
    0% {
        transform: scale(1) translate(0, 0);
    }
    100% {
        transform: scale(1.18) translate(1%, -1.5%);
    }
}

.carousel-item.active .kenburns-effect-1 {
    animation: kenburns-1 12s ease-out forwards;
}

.carousel-item.active .kenburns-effect-2 {
    animation: kenburns-2 12s ease-out forwards;
}

.carousel-item.active .kenburns-effect-3 {
    animation: kenburns-3 12s ease-out forwards;
}

.hero-slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(9, 19, 43, 0.76) 0%, rgba(11, 24, 60, 0.88) 100%);
    z-index: 2;
}

.hero-slide-overlay::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.5;
}

.hero-slide-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: #ffffff;
    padding-top: 40px;
    padding-bottom: 70px;
}

/* Carousel Control Customization */
.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    top: 45%;
    transform: translateY(-50%);
    opacity: 0.7;
    transition: all 0.3s ease;
    z-index: 5;
}

.hero-carousel .carousel-control-prev { left: 24px; }
.hero-carousel .carousel-control-next { right: 24px; }

.hero-carousel .carousel-control-prev:hover,
.hero-carousel .carousel-control-next:hover {
    background: #2563eb;
    opacity: 1;
}

.hero-carousel .carousel-indicators {
    bottom: 60px;
    z-index: 5;
}

.hero-carousel .carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 5px;
    background-color: rgba(255, 255, 255, 0.4);
    border: none;
    transition: all 0.3s ease;
}

.hero-carousel .carousel-indicators .active {
    background-color: #2563eb;
    width: 28px;
    border-radius: 6px;
}

/* Page Hero Banner with Image & Dark Gradient Overlay */
.page-hero {
    position: relative;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    overflow: hidden;
    padding: 72px 0;
    color: #ffffff;
}

.page-hero-sm {
    padding: 46px 0;
}

.page-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(9, 19, 43, 0.90) 0%, rgba(15, 23, 42, 0.85) 100%);
    z-index: 1;
}

.page-hero .container {
    position: relative;
    z-index: 2;
}

/* Tracking Input Box */
.tracking-hero-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 35px -10px rgba(15, 23, 42, 0.25);
    padding: 28px;
    margin-top: -50px;
    position: relative;
    z-index: 10;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.tracking-input-group {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
    background: #fff;
}

.tracking-input-group:focus-within {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.tracking-input-group input {
    border: none !important;
    box-shadow: none !important;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 14px 18px;
}

.tracking-input-group .btn {
    border-radius: 0;
    padding: 0 28px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Map Section */
#routeMap {
    height: 480px;
    width: 100%;
    border-radius: 12px;
    z-index: 1;
}

.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.leaflet-popup-content {
    font-family: inherit;
    font-size: 13px;
    line-height: 1.4;
    margin: 12px 14px;
}

/* Custom Map Marker Pulse for Current Location */
.pulsing-marker {
    display: block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 0 rgba(239, 68, 68, 0.7);
    animation: pulse-ring 1.8s infinite;
}

@keyframes pulse-ring {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        box-shadow: 0 0 0 16px rgba(239, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* Timeline Components */
.shipment-timeline {
    position: relative;
    padding-left: 28px;
}

.shipment-timeline::before {
    content: '';
    position: absolute;
    left: 9px;
    top: 6px;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
}

.timeline-item {
    position: relative;
    padding-bottom: 24px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item .timeline-dot {
    position: absolute;
    left: -28px;
    top: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid #94a3b8;
    z-index: 2;
    transition: all 0.2s ease;
}

.timeline-item.active .timeline-dot {
    border-color: #2563eb;
    background: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

.timeline-item.latest .timeline-dot {
    border-color: #ef4444;
    background: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2);
}

/* Shipment Stepper Progress Bar */
.shipment-progress-bar {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: 30px 0 20px;
}

.shipment-progress-bar::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 20px;
    right: 20px;
    height: 4px;
    background: #e2e8f0;
    z-index: 1;
}

.shipment-progress-bar .progress-line-fill {
    position: absolute;
    top: 18px;
    left: 20px;
    height: 4px;
    background: #2563eb;
    z-index: 2;
    transition: width 0.4s ease;
}

.progress-step {
    position: relative;
    z-index: 3;
    text-align: center;
    width: 70px;
}

.progress-step .step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f1f5f9;
    border: 3px solid #cbd5e1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.progress-step.completed .step-circle {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.progress-step.current .step-circle {
    background: #fff;
    border-color: #2563eb;
    color: #2563eb;
    box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.2);
}

.progress-step .step-label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
}

.progress-step.completed .step-label,
.progress-step.current .step-label {
    color: #0f172a;
    font-weight: 700;
}

/* Feature Cards */
.feature-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 28px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
}

.feature-icon-wrapper {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 20px;
    background: #eff6ff;
    color: #2563eb;
}

/* Service Cards with Images */
.service-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 35px -8px rgba(15, 23, 42, 0.12);
}

.service-card-image-wrapper {
    position: relative;
    height: 210px;
    overflow: hidden;
    background-color: #09132b;
}

.service-card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover .service-card-image-wrapper img {
    transform: scale(1.08);
}

.service-card-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(9, 19, 43, 0.15) 0%, rgba(9, 19, 43, 0.55) 100%);
}

.service-card-icon-floating {
    position: absolute;
    bottom: -20px;
    left: 22px;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #2563eb;
    z-index: 3;
}

.service-card-body {
    padding: 30px 22px 22px 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Barcode Display */
.barcode-box {
    font-family: 'Libre Barcode 39', monospace, sans-serif;
    font-size: 42px;
    letter-spacing: 4px;
    line-height: 1;
    padding: 10px 0;
    color: #000;
}

/* Admin Sidebar */
.admin-sidebar {
    width: 260px;
    min-height: 100vh;
    background: #0f172a;
    color: #94a3b8;
    flex-shrink: 0;
}

.admin-sidebar .nav-link {
    color: #94a3b8 !important;
    padding: 12px 18px !important;
    border-radius: 8px;
    margin-bottom: 4px;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.admin-sidebar .nav-link i {
    width: 24px;
    font-size: 16px;
    margin-right: 10px;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: #1e293b;
    color: #ffffff !important;
}

.admin-content {
    flex: 1;
    background: #f8fafc;
    min-height: 100vh;
    padding: 30px;
}

/* Print Styles */
@media print {
    .no-print, header, footer, .admin-sidebar, .btn, .navbar {
        display: none !important;
    }
    body, .admin-content {
        background: #fff !important;
        padding: 0 !important;
        margin: 0 !important;
    }
}

/* Quick Hub Coordinate Preset Widget */
.quick-hub-widget {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
}

.hub-item {
    transition: background-color 0.15s ease, color 0.15s ease;
    cursor: pointer;
}

.hub-item:hover {
    background-color: #eff6ff !important;
}

.hub-item:hover .text-dark {
    color: #1e40af !important;
}

.hub-dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.hub-dropdown-menu::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.hub-dropdown-menu::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.hub-dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
