body {
    background: #F4F7FA;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}


.header-navbar {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    margin-bottom: 30px;
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-logo {
    display: flex;
    align-items: center;
}

.navbar-logo img {
    height: 60px;
    width: auto;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar-menu li a {
    color: #2E3A59;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.3s ease;
}

.navbar-menu li a:hover {
    color: #E1001A;
}

.navbar-menu li a.active {
    color: #E1001A;
    font-weight: 600;
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: #2E3A59;
    cursor: pointer;
}

@media(max-width: 768px) {
    .navbar-toggle {
        display: block;
    }

    .navbar-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        gap: 15px;
    }

    .navbar-menu.show {
        display: flex;
    }
}


.main-content-wrapper {
    display: flex;
    align-items: stretch;
    gap: 30px;
    padding: 40px 0;
}


.tracking-section {
    flex: 0 0 45%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tracking-card {
    background: #fafbfc;
    /* width: 100%; */
}
.tracking-card .card {
    border: 1px solid #e3e6ec !important;
    box-shadow: 0 4px 16px 0 rgba(56,65,74,0.06);
    max-width: 480px;
    margin: 0 auto;
}
.tracking-card .form-control:focus {
    box-shadow: none;
    border-color: #E1001A;
}
.tracking-card .btn:active, 
.tracking-card .btn:focus {
    box-shadow: none;
    background: #B8000E;
}


.hero-section {
    flex: 0 0 55%;
}

.hero {
    width: 100%;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    overflow: hidden;
}

.hero .carousel-inner {
    width: 100%;
}

.hero .carousel-item {
    width: 100%;
}

.hero img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* Responsive Fix */
@media(max-width: 992px) {
    .main-content-wrapper {
        flex-direction: column;
        gap: 40px;
        padding: 30px 0;
    }

    .tracking-section {
        flex: 1;
        width: 100%;
        order: 1;
    }

    .hero-section {
        flex: 1;
        width: 100%;
        order: 2;
    }

    .hero img {
        width: 100%;
        height: auto;
    }
}

@media (max-width: 576px) {
    .tracking-card .card {
        max-width: 96vw !important;
    }
    .tracking-card .card-body {
        padding: 1.2rem !important;
    }

    .hero img {
        width: 100%;
        height: auto;
    }
}


.tracking-results-wrapper {
    display: none;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    overflow: hidden;
    height: 75vh;
}


body:has(.tracking-results-wrapper.active) {
    overflow: hidden;
}


.tracking-results-wrapper.active {
    display: block;
}

.tracking-header {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.tracking-id-display {
    font-size: 1rem;
    font-weight: 700;
    color: #23272E;
}

.tracking-id-display span {
    color: #E1001A;
}

.new-search-btn {
    background: #E1001A;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.new-search-btn:hover {
    background: #B8000E;
}


.tracking-results-content {
    display: grid;
    grid-template-columns: 45% 55%;
    gap: 24px;
    height: calc(100% - 80px);
    overflow: hidden;
}

.tracking-left-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
    height: 100%;
    overflow-y: hidden;
}

.tracking-right-section {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.tracking-timeline {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    height: 100%;
    overflow-y: auto;
}



.timeline-title {
    font-size: 1rem;
    font-weight: 700;
    color: #23272E;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e3e6ec;
}

.timeline-item {
    position: relative;
    display: flex;
    gap: 10px;
    padding-bottom: 18px;
    align-items: flex-start;
    margin-right: 15px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-date-box {
    flex: 0 0 50px;
    text-align: left;
    padding-top: 1.5%;
}

.timeline-day {
    font-size: 0.6rem;
    font-weight: 700;
    color: #23272E;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 1px;
    line-height: 1.1;
}

.timeline-time {
    font-size: 0.6rem;
    font-weight: 500;
    color: #757575;
    line-height: 1.1;
}

.timeline-dot-wrapper {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 10px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 65px;
    top: 22px;
    bottom: -17px;
    width: 2px;
    background: #e3e6ec;
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #bdc3c7;
    position: relative;
    z-index: 1;
}


.timeline-item.completed .timeline-dot {
    background: #28a745;
    border-color: #28a745;
}

.timeline-item.completed .timeline-content {
    border-left-color: #28a745;
    background: #e8f5e9;
}


.timeline-item.active .timeline-dot {
    background: #28a745;
    border-color: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
}

.timeline-item.active .timeline-content {
    border-left-color: #28a745;
    background: #d4edda;
}

/* Pending milestones - Gray */
.timeline-item.pending .timeline-dot {
    background: #e9ecef;
    border-color: #bdc3c7;
}

.timeline-item.pending .timeline-content {
    border-left-color: #bdc3c7;
    background: #f8f9fa;
}

.timeline-item.pending .timeline-day,
.timeline-item.pending .timeline-time {
    color: #adb5bd;
}

.timeline-item.pending .timeline-status {
    color: #6c757d;
}

.timeline-item.pending .timeline-location {
    color: #adb5bd;
}

.timeline-content {
    flex: 1;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 5px;
    border-left: 3px solid #bdc3c7;
}

.timeline-status {
    font-size: 0.75rem;
    font-weight: 700;
    color: #23272E;
    margin-bottom: 3px;
}

.timeline-location {
    font-size: 0.68rem;
    color: #495057;
    line-height: 1.3;
}

.timeline-location strong {
    color: #23272E;
}


.tracking-timeline::-webkit-scrollbar {
    width: 8px;
}

.tracking-timeline::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.tracking-timeline::-webkit-scrollbar-thumb {
    background: #E1001A;
    border-radius: 10px;
}

.tracking-timeline::-webkit-scrollbar-thumb:hover {
    background: #B8000E;
}


.estimated-delivery-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px 28px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.estimated-delivery-title {
    font-size: 1rem;
    font-weight: 600;
    color: #5f6c7b;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.delivery-date-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.delivery-date-main {
    display: flex;
    align-items: center;
    gap: 16px;
}

.delivery-day {
    font-size: 3.5rem;
    font-weight: 800;
    color: #23272E;
    line-height: 1;
    letter-spacing: -0.02em;
}

.delivery-month-year {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.delivery-month {
    font-size: 1.1rem;
    font-weight: 600;
    color: #909dab;
    line-height: 1.2;
}

.delivery-year {
    font-size: 0.9rem;
    font-weight: 500;
    color: #909dab;
    line-height: 1.2;
}

.delivery-status-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.delivery-status-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
}




.delivery-delay-text {
    font-size: 0.85rem;
    font-weight: 500;
    color: #909dab;
    margin: 0;
}


.shipment-details {
    background: #fff;
    border-radius: 12px;
    padding: 24px 28px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    position: relative;
}

.shipment-details-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #23272E;
    margin-bottom: 16px;
    padding-bottom: 10px;
}

.shipment-info-grid {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 12px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.shipment-info-grid::-webkit-scrollbar {
    height: 8px;
}

.shipment-info-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.shipment-info-grid::-webkit-scrollbar-thumb {
    background: #E1001A;
    border-radius: 10px;
}

.shipment-info-grid::-webkit-scrollbar-thumb:hover {
    background: #B8000E;
}

.info-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 18px 20px;
    border-left: 4px solid #E1001A;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-width: 270px;
    flex-shrink: 0;
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(225, 0, 26, 0.15);
}

.info-card-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #757575;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-card-label::before {
    content: '';
    width: 5px;
    height: 5px;
    background: #E1001A;
    border-radius: 50%;
}

.info-card-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #23272E;
    margin-bottom: 4px;
}

.info-card-address {
    font-size: 0.8rem;
    color: #495057;
    line-height: 1.5;
}

@media (max-width: 992px) {
    .tracking-results-content {
        grid-template-columns: 1fr;
        height: calc(100% - 90px);
    }

    .tracking-left-section {
        order: 1;
        height: auto;
        overflow-y: hidden;
    }

    .tracking-right-section {
        order: 2;
        height: auto;
    }

    .tracking-timeline {
        height: 400px;
    }

    .tracking-results-wrapper {
        height: auto;
        max-height: none;
        overflow-y: auto;
    }

    body:has(.tracking-results-wrapper.active) {
        overflow: auto;
    }
}

@media (max-width: 768px) {
    .tracking-header {
        flex-direction: column;
        text-align: center;
        padding: 16px;
    }

    .tracking-timeline {
        padding: 16px;
        height: 350px;
    }

    .timeline-title {
        font-size: 1rem;
    }

    .timeline-item {
        gap: 8px;
        padding-bottom: 16px;
    }

    .timeline-date-box {
        flex: 0 0 48px;
    }

    .timeline-day {
        font-size: 0.55rem;
    }

    .timeline-time {
        font-size: 0.55rem;
    }

    .timeline-item::before {
        left: 62px;
        top: 8px;
        bottom: -16px;
    }

    .timeline-dot {
        width: 10px;
        height: 10px;
        border-width: 2px;
    }

    .timeline-status {
        font-size: 0.7rem;
    }

    .timeline-location {
        font-size: 0.63rem;
    }

    .timeline-content {
        padding: 6px 10px;
    }

    .shipment-details {
        padding: 16px;
    }

    .shipment-info-grid {
        gap: 14px;
    }

    .info-card {
        min-width: 240px;
        padding: 14px;
    }

    .estimated-delivery-card {
        padding: 16px;
    }

    .delivery-day {
        font-size: 3rem;
    }

    .delivery-month {
        font-size: 1rem;
    }

    .delivery-year {
        font-size: 0.85rem;
    }
}

