/* =============================================================
   DHL Clone — Master Stylesheet
   Sections:
   1. Root Variables
   2. Layer 1: Topbar
   3. Layer 2: Yellow Bar
   4. Layer 3: Secondary Nav
   5. Hero Section
   6. Overlapping Cards
   7. Split Sections
   8. Info Cards
   9. Footer
   10. Utilities
   ============================================================= */

/* 1. ROOT VARIABLES
   ============================================================= */
:root {
    --dhl-yellow:  #ffcc00;
    --dhl-red:     #d40511;
    --dhl-dark:    #1a1a1a;
    --dhl-gray:    #6c757d;
    --dhl-light:   #f5f5f5;
    --font:        'Inter', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
    overflow-x: hidden;
    width: 100%;
}
body { font-family: var(--font); margin: 0; padding: 0; }
a    { text-decoration: none; }

/* =============================================================
   2. LAYER 1 — WHITE TOPBAR (Centered location strip)
   ============================================================= */
.dhl-topbar {
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    padding: 14px 20px;
}

/* All topbar content is a single centered flex row */
.dhl-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* Large circular flag — matches DHL's big round badge */
.dhl-flag-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 2px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

/* "You are in Country" text */
.dhl-topbar-text {
    font-size: 15px;
    color: #1a1a1a;
    font-weight: 500;
    margin-left: 10px;   /* extra gap between flag and text */
}
.dhl-topbar-text strong {
    font-weight: 700;
}

/* Red pill button — "Stay on this site" */
.dhl-btn-stay {
    background-color: var(--dhl-red);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    border: none;
    border-radius: 999px;    /* fully pill-shaped */
    padding: 10px 22px;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}
.dhl-btn-stay:hover { background-color: #b0040f; }

/* "or" text */
.dhl-topbar-or {
    font-size: 14px;
    color: #555;
}

/* Outline red pill button — "Select a different country" */
.dhl-btn-select-country {
    background: transparent;
    color: var(--dhl-red);
    font-weight: 700;
    font-size: 14px;
    border: 2px solid var(--dhl-red);
    border-radius: 999px;    /* fully pill-shaped */
    padding: 9px 20px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}
.dhl-btn-select-country:hover {
    background: var(--dhl-red);
    color: #fff;
}

/* =============================================================
   3. LAYER 2 — FULL-WIDTH YELLOW BAR (Logo + Service links)
   ============================================================= */
.dhl-yellow-bar {
    background-color: var(--dhl-yellow);
    width: 100%;
}

.dhl-yellow-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 40px;
    max-width: 100%;
}

/* DHL SVG Logo */
.dhl-logo-link { display: flex; align-items: center; }
.dhl-logo-img  { 
    height: 60px; 
    width: 240px; 
    object-fit: contain; 
    object-position: left center;
    display: block; 
}

/* Right-side links on yellow bar */
.dhl-yellow-links {
    display: flex;
    align-items: center;
    gap: 28px;
}
.dhl-yellow-link {
    color: #1a1a1a;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}
.dhl-yellow-link:hover { color: var(--dhl-red); }
.dhl-yellow-link i { font-size: 13px; }

/* =============================================================
   4. LAYER 3 — WHITE SECONDARY NAV (Main navigation)
   ============================================================= */
.dhl-secondary-nav {
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.dhl-secondary-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
}

.dhl-nav-links {
    display: flex;
    align-items: center;
    gap: 0;
}

.dhl-nav-link {
    color: #1a1a1a;
    font-weight: 600;
    font-size: 14px;
    padding: 18px 18px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-bottom: 3px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
}
.dhl-nav-link:hover {
    color: var(--dhl-red);
    border-bottom-color: var(--dhl-red);
}
.dhl-nav-link i { font-size: 10px; }
.dhl-nav-logout { color: var(--dhl-red); }

/* =============================================================
   5. HERO SECTION
   ============================================================= */
.dhl-hero {
    position: relative !important;
    height: 560px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

/* Dark gradient on the left so white text is always readable */
.dhl-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 60%;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.50) 0%, rgba(0,0,0,0) 100%);
    z-index: 1;
}

/* Tracking content — vertically centered */
.dhl-hero-content {
    position: absolute;
    top: 50%;
    left: 5%;
    transform: translateY(-50%);
    z-index: 10;
    width: 520px;
    max-width: 88%;
}

/* White heading text on the hero image */
.dhl-hero-content h2 {
    font-size: 1.9rem;
    font-weight: 800;
    margin-bottom: 16px;
    color: #ffffff;
    text-shadow: 1px 2px 10px rgba(0,0,0,0.8);
    line-height: 1.2;
}

/* White tracking input card */
.dhl-tracking-box {
    background: rgba(255, 255, 255, 0.97);
    padding: 24px 28px;
    border-radius: 6px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}
.tracking-input-group {
    display: flex;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #ccc;
}
.tracking-input-group input {
    flex: 1;
    padding: 14px 16px;
    border: none;
    outline: none;
    font-size: 15px;
    font-family: var(--font);
}
.tracking-input-group button {
    background: var(--dhl-red);
    color: #fff;
    border: none;
    padding: 0 32px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font);
    border-radius: 0 4px 4px 0;
    transition: background 0.2s;
}
.tracking-input-group button:hover { background: #b0040f; }

/* =============================================================
   6. OVERLAPPING QUICK-ACTION CARDS
   ============================================================= */
.overlapping-cards {
    margin-top: -60px;
    position: relative;
    z-index: 20;
    padding: 0 40px 40px;
    background: transparent;
}
.dhl-card {
    background: #fff;
    border-radius: 6px;
    padding: 28px 24px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    height: 100%;
    transition: transform 0.25s, box-shadow 0.25s;
    border-top: 3px solid var(--dhl-yellow);
}
.dhl-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.14);
}
.dhl-card i { color: var(--dhl-red); font-size: 28px; margin-bottom: 14px; }
.dhl-card h5 { font-weight: 700; font-size: 1rem; color: #1a1a1a; }
.dhl-card p  { font-size: 0.85rem; color: #666; margin: 0; }

/* =============================================================
   7. SPLIT CONTENT SECTIONS & BANNERS
   ============================================================= */
.yellow-banner-split {
    display: flex;
    align-items: stretch;
}
.yellow-banner-split .banner-img {
    flex: 0 0 280px;
}
.yellow-banner-split .banner-content {
    flex: 1;
    padding: 40px 50px;
}

.dhl-split         { padding: 80px 40px; }
.dhl-split-yellow  { background-color: var(--dhl-yellow); }
.dhl-split-white   { background-color: #fff; }
.dhl-split-light   { background-color: var(--dhl-light); }

.dhl-split img {
    width: 100%;
    height: 100%;
    min-height: 380px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.dhl-split-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    padding: 20px 40px;
}
.dhl-split-content h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 14px;
    color: #1a1a1a;
    line-height: 1.2;
}
.dhl-split-content .lead {
    font-size: 1rem;
    color: #444;
    margin-bottom: 20px;
}
.dhl-split-content p { color: #555; }

.dhl-service-btn {
    background: var(--dhl-yellow);
    border: none;
    color: #1a1a1a;
    font-weight: 700;
    font-size: 14px;
    padding: 13px 16px;
    margin-bottom: 10px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    cursor: pointer;
    transition: background 0.2s;
}
.dhl-service-btn:hover { background: #f0c000; }
.dhl-service-btn i { font-size: 18px; color: var(--dhl-red); }

.btn-dhl-red {
    background-color: var(--dhl-red) !important;
    color: #fff !important;
    font-weight: 700;
    border: none;
    border-radius: 4px;
    padding: 14px 28px;
    font-family: var(--font);
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
    display: inline-block;
}
.btn-dhl-red:hover { background-color: #b0040f !important; color: #fff !important; }

/* =============================================================
   8. INFO CARDS (Sustainability, Innovation, etc.)
   ============================================================= */
.dhl-info-card {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.09);
    height: 100%;
    transition: transform 0.25s, box-shadow 0.25s;
}
.dhl-info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.14);
}
.dhl-info-card img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    display: block;
}
.dhl-info-card .content { padding: 22px; }
.dhl-info-card h5 {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 10px;
    color: #1a1a1a;
}
.dhl-info-card p { font-size: 0.85rem; color: #666; }

/* =============================================================
   9. FOOTER
   ============================================================= */
.dhl-footer-top {
    background: #fff;
    padding: 60px 40px;
    border-top: 1px solid #e8e8e8;
}
.dhl-footer-top h5 {
    color: var(--dhl-red);
    font-weight: 700;
    margin-bottom: 18px;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.dhl-footer-top ul { list-style: none; padding: 0; margin: 0; }
.dhl-footer-top ul li { margin-bottom: 10px; }
.dhl-footer-top ul li a { color: #444; font-size: 0.9rem; transition: color 0.2s; }
.dhl-footer-top ul li a:hover { color: var(--dhl-red); }

.dhl-footer-bottom {
    background: var(--dhl-light);
    padding: 28px 40px;
    font-size: 13px;
}
.social-icons a { color: #555; font-size: 18px; margin-right: 14px; transition: color 0.2s; }
.social-icons a:hover { color: var(--dhl-red); }
.footer-links a { color: #555; margin-right: 14px; font-size: 13px; transition: color 0.2s; }
.footer-links a:hover { color: var(--dhl-red); }

/* =============================================================
   10. MEGA MENUS
   ============================================================= */
.dhl-mega-menu {
    position: absolute;
    left: 0;
    width: 100%;
    background: #fff;
    z-index: 999999;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-top: 1px solid #eee;
}
.mega-menu-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: stretch;
    padding: 40px;
}
.mega-menu-content {
    flex: 1;
    padding-right: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.mega-menu-content h3 {
    font-size: 1.2rem;
    font-weight: 900;
    color: #000;
    text-transform: uppercase;
    margin-bottom: 20px;
}
.mega-menu-content p {
    font-size: 1.05rem;
    color: #000;
    line-height: 1.6;
    margin-bottom: 15px;
}
.mega-menu-img {
    flex: 1;
}
.mega-menu-img img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 8px;
}
.mega-btn {
    display: inline-block;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    margin-right: 15px;
}
.mega-btn-primary {
    background: var(--dhl-red);
    color: #fff;
}
.mega-btn-outline {
    background: #fff;
    color: var(--dhl-red);
    border: 1px solid var(--dhl-red);
}

/* =============================================================
   MOBILE RESPONSIVENESS
   ============================================================= */
.dhl-mobile-toggle {
    display: none;
    font-size: 24px;
    color: var(--dhl-red);
    cursor: pointer;
    padding: 10px;
}
@media (max-width: 768px) {
    /* Layer 1: Location Banner */
    .dhl-topbar-inner { 
        flex-direction: column; 
        align-items: center; 
        gap: 12px; 
        text-align: center;
        padding: 10px 0;
    }
    .dhl-topbar-flag {
        display: block;
        margin-bottom: 8px;
    }
    .dhl-topbar-text { 
        margin-left: 0; 
        margin-bottom: 10px;
    }
    .dhl-btn-stay, .dhl-btn-select-country { 
        width: 100%; 
        display: block;
    }
    .dhl-topbar-or {
        margin: 5px 0;
        display: block;
    }

    /* Layer 2: Yellow Bar & Hamburger */
    .dhl-yellow-bar-inner { padding: 12px 20px; }
    .dhl-yellow-links { display: none; /* Hide desktop links */ }
    .dhl-mobile-toggle { display: block; /* Show hamburger */ }

    /* Layer 3: Secondary Nav (Hidden by default, shown via JS) */
    .dhl-secondary-nav {
        display: none;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 99999;
        border-bottom: 3px solid var(--dhl-yellow);
    }
    .dhl-secondary-nav.mobile-active {
        display: block;
    }
    .dhl-secondary-nav-inner { 
        flex-direction: column; 
        align-items: stretch; 
        padding: 0;
    }
    .dhl-nav-links { flex-direction: column; flex-wrap: nowrap; width: 100%; }
    .dhl-nav-link { 
        padding: 16px 20px; 
        font-size: 15px; 
        border-bottom: 1px solid #eee;
        width: 100%;
        justify-content: flex-start; 
        gap: 12px;
    }
    .dhl-nav-link i.fa-chevron-down {
        margin-left: auto;
    }
    
    /* Make the mobile mega-menus display correctly when opened via JS */
    #enterprise-mega-menu, #ship-mega-menu { 
        position: static !important; 
    }
    .mega-menu-inner {
        flex-direction: column;
        padding: 20px !important;
    }
    .mega-menu-content {
        flex: 0 0 auto !important;
        padding-right: 0 !important;
        margin-bottom: 20px;
        border: none;
    }
    .mega-menu-img {
        flex: 0 0 auto !important;
        width: 100%;
        border: none;
    }
    .mega-menu-img img {
        height: 200px !important;
    }

    /* Hero Section (Track Your Shipment) */
    .dhl-hero-overlay { width: 100%; background: rgba(0,0,0,0.4); }
    .dhl-hero-content {
        left: 0;
        width: 100%;
        max-width: 100%;
        padding: 0 20px;
        text-align: center;
    }
    .dhl-hero-content h2 { font-size: 1.5rem; text-shadow: none; }
    
    .dhl-tracking-box { 
        position: static; 
        transform: none; 
        padding: 20px;
        margin-top: 20px;
    }
    
    .tracking-input-group { 
        flex-direction: column; /* Stack input and button vertically */
        border: none;
    }
    .tracking-input-group input {
        border-radius: 4px;
        border: 1px solid #ccc;
        margin-bottom: 10px;
        padding: 16px;
    }
    .tracking-input-group button {
        border-radius: 4px;
        width: 100%;
        padding: 16px;
    }

    /* Action Cards */
    .overlapping-cards { 
        padding: 0 20px 30px; 
        margin-top: -30px;
    }
    .overlapping-cards .row {
        flex-direction: column; /* Ensure cols stack */
    }
    .overlapping-cards .col-md-4 {
        margin-bottom: 15px;
        width: 100%;
    }

    /* Other Sections */
    .yellow-banner-split {
        flex-direction: column;
    }
    .yellow-banner-split .banner-img {
        flex: 1 1 100%;
        width: 100%;
        min-height: 200px;
    }
    .yellow-banner-split .banner-content {
        padding: 30px 20px !important;
    }

    .dhl-split { padding: 40px 20px; }
    .dhl-split-content { padding: 20px 0; }
    .dhl-split-content h2 { font-size: 1.6rem; }
    
    .dhl-footer-top { padding: 40px 20px; }
    .dhl-footer-bottom { padding: 20px 20px; text-align: center; }
    .footer-links { text-align: center; margin-top: 15px; }
    .footer-links a { display: block; margin-bottom: 10px; }
}
.dhl-secondary-nav.mobile-active .dhl-nav-link {
    display: block;
    padding: 18px 20px !important;
    border-bottom: 1px solid #eaeaea;
    margin: 0 !important;
    font-size: 1.1rem;
    font-weight: 500;
}
.dhl-secondary-nav.mobile-active .dhl-nav-link:last-child {
    border-bottom: none;
}
.dhl-secondary-nav.mobile-active .dhl-nav-link i:first-child {
    width: 25px;
    text-align: center;
    margin-right: 15px;
    color: #d40511;
}
.dhl-secondary-nav.mobile-active .dhl-nav-right {
    border-top: 5px solid #f2f2f2;
}
