/**
 * Global Header Styles
 * =====================
 * Base header structure, navigation dropdowns, hamburger button, and mobile menu.
 * 
 * HEADER CSS ARCHITECTURE:
 * ┌─────────────────────────────────────────────────────────────────────────────┐
 * │ 1. global-header.css (this file)                                            │
 * │    - Base .site-header, .header-content, .header-logo                       │
 * │    - Desktop navigation dropdowns (.nav-dropdown-*)                         │
 * │    - Hamburger button and mobile menu (.mobile-menu-*)                      │
 * │                                                                             │
 * │ 2. navigation-header.css                                                    │
 * │    - Product sub-navigation bar (.navigation-header)                        │
 * │    - Module/product page tab navigation                                     │
 * │                                                                             │
 * │ 3. header-variants.css                                                      │
 * │    - Page-type specific overrides (.page-type-* .site-header)               │
 * │    - Blue vs white header backgrounds                                       │
 * │    - Transparent header triangles                                           │
 * │    - Mobile responsive header adjustments                                   │
 * │    - Scrolled header state (.header-scrolled)                               │
 * └─────────────────────────────────────────────────────────────────────────────┘
 * 
 * LOAD ORDER: global-header.css → navigation-header.css → header-variants.css
 */

/* ============================================
   Header Base
   ============================================ */

.site-header {
    position: relative;
    z-index: 1000;
}

.header-bar {
    width: 100%;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding: 15px 40px !important;
    width: 100% !important;
    /* Reduced from 60px to match site standard */
    max-width: 1440px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
}



/* ============================================
   Logo (Desktop and Mobile variants)
   ============================================ */

.header-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    /* margin-right: auto; Removed (Phase 7) to fix flexbox alignment consistency */
}

.header-logo a {
    display: flex;
    align-items: center;
}

.header-logo-img {
    height: 28px;
    /* Reduced from 32px */
    width: auto;
}

@media (max-width: 480px) {
    .header-logo-img {
        height: 20px;
        /* Small enough to fit with CTA */
        width: auto;
    }

    .header-cta .cta-button {
        padding: 6px 9px;
        font-size: var(--font-caption-size);
    }

    .header-content {
        padding: 10px 15px;
        /* Reduce padding to save space */
    }
}

.header-logo-img.mobile-logo {
    display: none;
}

/* Mobile-only elements (hidden on desktop) */
.mobile-only {
    display: none;
}

.header-cta {
    flex-shrink: 0;
    margin-left: auto;
}

/* ============================================
   Desktop Navigation
   ============================================ */

.header-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Dropdown Container */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: transparent;
    border: none;
    color: #FFFFFF;
    font-family: var(--font-family-base);
    font-size: var(--font-ui-size);
    font-weight: 600;
    line-height: 24px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.nav-dropdown-trigger:hover {
    color: #00A6DD;
}

.dropdown-arrow {
    transition: transform 0.2s ease;
}

.nav-dropdown.is-open .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 100;
}

.nav-dropdown.is-open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.nav-dropdown-item {
    display: block;
    padding: 12px 20px;
    color: #4A5568;
    font-family: var(--font-family-base);
    font-size: var(--font-ui-size);
    font-weight: 500;
    text-decoration: none;
    text-transform: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-dropdown-item:hover {
    background-color: #F7FAFC;
    color: #C4754C;
}

/* ============================================
   Wide Dropdown for Solutions
   ============================================ */
/* ============================================
   Wide Dropdown for Solutions
   ============================================ */
.nav-dropdown-wide .nav-dropdown-menu {
    min-width: 745px;
    /* Figma: 745px wide for Solutions */
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    padding: 24px;
    /* Gradient background matching slider cards (Active State) */
    background: linear-gradient(176.43deg, rgba(255, 255, 255, 0) 85.39%, rgba(2, 112, 158, 0.2) 103.46%), #FFFFFF;
    border-radius: 12px;
}

/* Solutions centered arrow */
.nav-dropdown-wide .nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 10px 10px 10px;
    border-style: solid;
    border-color: transparent transparent #FFFFFF transparent;
    z-index: 3;
}

.nav-dropdown-wide.is-open .nav-dropdown-menu {
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown-grouped {
    display: flex;
    justify-content: space-between;
    /* Space out columns */
    gap: 0;
    /* Handled by padding/borders */
}

.nav-dropdown-group {
    flex: 1;
    padding: 0 20px;
    /* Vertical dotted divider */
    border-right: 1px dotted #00A6DD;
    /* SmartBuild Blue dotted line */
}

.nav-dropdown-group:first-child {
    padding-left: 0;
}

.nav-dropdown-group:last-child {
    padding-right: 0;
    border-right: none;
}

.nav-dropdown-group-header {
    margin-bottom: 14px;
    padding-bottom: 0;
    border-bottom: none;
    /* Remove underline */
    text-align: left;
}

.nav-dropdown-group-logo {
    max-height: 48px;
    /* Figma: Solutions logos 48px */
    width: auto;
    display: block;
}

.nav-dropdown-group .nav-dropdown-item {
    padding: 8px 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 24px;
    letter-spacing: 0%;
    color: #006997;
    display: block;
    transition: color 0.2s;
}

.nav-dropdown-group .nav-dropdown-item:hover {
    color: #07B1E2;
    background: none;
    /* Remove background hover if present */
}

/* ============================================
   Dropdown for Resources
   ============================================ */
.nav-dropdown-resources .nav-dropdown-menu {
    min-width: 198px;
    /* Figma: 198px wide for Resources */
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    padding: 20px;
    /* Gradient background matching slider cards (Active State) */
    background: linear-gradient(176.43deg, rgba(255, 255, 255, 0) 85.39%, rgba(2, 112, 158, 0.2) 103.46%), #FFFFFF;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    /* Tighter spacing between items */
}

/* Resources centered arrow */
.nav-dropdown-resources .nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 10px 10px 10px;
    border-style: solid;
    border-color: transparent transparent #FFFFFF transparent;
    z-index: 3;
}

.nav-dropdown-resources.is-open .nav-dropdown-menu {
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown-resources .nav-dropdown-item {
    font-family: var(--font-family-base);
    font-size: var(--font-body-size);
    font-weight: 600;
    color: #006997;
    padding: 8px 0;
    display: block;
    transition: color 0.2s;
}

.nav-dropdown-resources .nav-dropdown-item:hover {
    color: #07B1E2;
    background: none;
}

/* ============================================
   Wide Dropdown for Products
   ============================================ */

.nav-dropdown-products .nav-dropdown-menu.nav-dropdown-products-menu {
    min-width: 644px;
    /* Figma: 644px wide for Products */
    left: 50%;
    transform: translateX(-35%) translateY(-10px);
    padding: 0;
    display: flex;
    /* overflow: hidden removed to show the arrow pseudo-element */
    border-radius: 12px;
}

.nav-dropdown-products.is-open .nav-dropdown-menu.nav-dropdown-products-menu {
    transform: translateX(-35%) translateY(0);
}

/* Arrow (Speech Bubble Effect) */
.nav-dropdown-products .nav-dropdown-menu.nav-dropdown-products-menu::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 35%;
    /* Aligned with trigger center due to -35% translateX offset */
    transform: translateX(-50%);
    border-width: 0 10px 10px 10px;
    border-style: solid;
    border-color: transparent transparent #FFFFFF transparent;
    /* Styled like Solutions/Resources */
    z-index: 3;
}

/* Left Column: Products */
.products-column {
    flex: 2;
    /* Takes up 2/3 space */
    background: linear-gradient(to left, #CFF4FF 0%, #E8F8FC 50%, #F8FEFF 100%);
    /* Right to left gradient */
    padding: 24px;
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    z-index: 2;
    /* Sit above bolt-ons shadow if needed */
}

/* Right Column: Bolt Ons */
.bolt-ons-column {
    flex: 1;
    /* Takes up 1/3 space */
    background: #FFFFFF;
    padding: 24px;
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
    display: flex;
    flex-direction: column;
    /* Layered left side shadow adapted from bottom-box-white-box */
    box-shadow: -9px 0 21px rgba(0, 61, 87, 0.09),
        -38px 0 38px rgba(0, 61, 87, 0.08),
        -85px 0 51px rgba(0, 61, 87, 0.04),
        -151px 0 60px rgba(0, 61, 87, 0.01);
    position: relative;
    z-index: 1;
}

/* Product Card Styling */
/* Product Card Dropdown - Adjusted Padding/Radius */
.product-card-dropdown {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 12px 20px;
    /* Reduced top padding */
    margin: 0 -20px;
    border-bottom: 2px dashed #00A6DD;
    text-decoration: none;
    transition: background-color 0.2s ease;
    border-radius: 8px 8px 0 0;
    /* Bottom corners 0 */
}

.product-card-dropdown:hover {
    background-color: rgba(0, 166, 221, 0.05);
}

.product-card-dropdown:last-child {
    border-bottom: none;
}

.product-card-header {
    margin-bottom: 0;
}

.product-card-logo {
    max-height: 33px;
    /* Figma: Products logos 33px */
    width: auto;
}

.product-card-body {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-left: 37px;
    padding-right: 0;
}

.product-card-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    /* User Spec */
    font-weight: 600;
    line-height: 24px;
    letter-spacing: 0%;
    color: #76777A;
}

.product-card-desc {
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    /* User Spec */
    font-weight: 400;
    line-height: 12px;
    letter-spacing: 0%;
    color: #939496;
}

/* Learn More Link - Removed per spec, but keeping rule to hide if present in markup */
.product-card-learn-more {
    display: none !important;
}

/* Remove .product-card-link as it's no longer used */

/* Bolt Ons Styling */
.bolt-ons-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-family-base);
    font-size: var(--font-h4-size);
    font-weight: 700;
    color: #07B1E2;
    margin-bottom: 24px;
}

.bolt-on-icon {
    width: 28px;
    height: 28px;
}

.bolt-ons-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Navigation Items (Bolt-ons) */
.bolt-on-item {
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    /* User Spec */
    font-weight: 600;
    line-height: 24px;
    letter-spacing: 0%;
    color: #006997;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

.bolt-on-item:hover {
    color: #07B1E2;
    transform: translateX(4px);
}

/* ============================================
   CTA Button (uses existing .cta-button class)
   ============================================ */

.header-nav .cta-button {
    margin-left: 20px;
}

/* ============================================
   Mobile Menu Toggle
   ============================================ */

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    order: -1;
    /* Put hamburger first on mobile */
}

.hamburger-bar {
    width: 24px;
    height: 2px;
    background-color: #FFFFFF;
    border-radius: 1px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ============================================
   Mobile Menu - Multi-Level Navigation
   ============================================ */

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #FFFFFF;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s;
    overflow: hidden;
    /* Desktop: Constrain width to look like mobile menu */
    max-width: 450px;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
}

@media (max-width: 1024px) {
    .mobile-menu {
        max-width: 100%;
        box-shadow: none;
    }
}

.mobile-menu.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Mobile Menu Levels */
.mobile-menu-level {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(100%);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.mobile-menu-level.is-active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* Only allow pointer events on levels when parent menu is open */
.mobile-menu.is-open .mobile-menu-level.is-active {
    pointer-events: auto;
}

.mobile-menu-level-1.is-active {
    transform: translateX(0);
}

/* Inner content wrapper for additional padding */
.mobile-menu-inner {
    max-width: 340px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Mobile Menu Header */
.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    margin-bottom: 12px;
    border-bottom: 1px dashed #006997;
}

/* Navigation Header Img - Fixed Max Height */
.navigation-header-logo img {
    max-height: 50px;
    width: auto;
}

.mobile-logo img {
    height: 33px;
    width: auto;
}

.mobile-menu-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    color: #006998;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.mobile-menu-close:hover {
    opacity: 0.7;
}

.mobile-menu-back {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    color: #07B1E2;
    font-family: var(--font-family-base);
    font-size: var(--font-ui-size);
    font-weight: 600;
    cursor: pointer;
}

/* Mobile Nav */
.mobile-nav {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

/* Products section with gradient background */
.mobile-products-section {
    background: linear-gradient(180deg, #F8FEFF 0%, #E8F8FC 50%, #CFF4FF 100%);
    margin: -20px -20px 0 -20px;
    padding: 20px 20px 16px 20px;
}

.mobile-nav-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 600;
    line-height: 24px;
    letter-spacing: 0%;
    color: #006998;
    margin-bottom: 12px;
}

/* Product Cards in Mobile Menu - Stacked layout (logo on top) */
.mobile-product-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 12px 0;
    border-bottom: 1px dashed #006997;
}

.mobile-products-section .mobile-product-card:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.mobile-product-logo {
    max-height: 33px;
    /* Match desktop Products logo */
    width: auto;
}

.mobile-product-info {
    width: 100%;
    box-sizing: border-box;
    padding-left: 37px;
    padding-right: 0;
}

.mobile-product-title {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 600;
    line-height: 24px;
    letter-spacing: 0%;
    color: #76777A;
    margin-bottom: 0;
}

.mobile-product-description {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 400;
    line-height: 12px;
    letter-spacing: 0%;
    color: #939496;
    margin-bottom: 0;
}

.mobile-product-card:hover {
    background: rgba(255, 255, 255, 0.5);
}

.mobile-product-link {
    display: none;
}

.mobile-nav-arrow {
    display: none;
    /* Hidden - product cards don't have arrows */
}

/* Only show arrows on product cards when needed (currently hidden) */
.mobile-product-card .mobile-nav-arrow {
    display: none;
}

/* Mobile Nav Items (Bolt Ons, Solutions, Resources) */
.mobile-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 0;
    background: transparent;
    border: none;
    border-bottom: 1px dashed #006997;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 24px;
    letter-spacing: 0%;
    color: #036A98;
    text-align: left;
    cursor: pointer;
}

.mobile-nav-item.bolt-ons {
    color: #07B1E2;
    justify-content: flex-start;
}

.mobile-nav-item.bolt-ons .mobile-nav-chevron {
    margin-left: auto;
}

.mobile-nav-item-icon {
    display: flex;
    align-items: center;
    margin-right: 12px;
    flex-shrink: 0;
    color: #07B1E2;
}

.mobile-nav-chevron {
    color: inherit;
}

/* Mobile Nav Links */
.mobile-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed #006997;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 24px;
    letter-spacing: 0%;
    color: #036A98;
    text-decoration: none;
}

.mobile-nav-link:hover {
    color: #07B1E2;
}

/* Level 2 gradient wrapper (header + product info) */
.mobile-level2-gradient {
    background: linear-gradient(180deg, #F8FEFF 0%, #E8F8FC 50%, #CFF4FF 100%);
    margin: -20px -20px 0 -20px;
    padding: 20px 20px 16px 20px;
}

/* Product Header in Level 2 */
.mobile-product-header {
    margin-bottom: 0;
    padding-bottom: 0;
}

.mobile-product-header img {
    max-height: 33px;
    /* Match desktop Products logo */
    width: auto;
    margin-bottom: 8px;
}

.mobile-product-header p {
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 400;
    line-height: 12px;
    letter-spacing: 0%;
    color: #939496;
    margin: 0;
    padding-left: 37px;
    padding-right: 0;
}

/* Section Header in Level 2 */
.mobile-section-header {
    display: flex;
    align-items: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 24px;
    letter-spacing: 0%;
    color: #036A98;
    margin-bottom: 12px;
}

/* Solutions Groups */
.mobile-solutions-group {
    margin-bottom: 14px;
    padding-bottom: 0;
    border-bottom: 1px dashed #006997;
}

.mobile-solutions-group .mobile-nav-link {
    border-bottom: none;
}

.mobile-solutions-group .mobile-nav-link:not(:last-child) {
    border-bottom: 1px dashed #006997;
}

.mobile-solutions-logo {
    max-height: 48px;
    /* Match desktop Solutions logo */
    width: auto;
    margin-bottom: 10px;
}

/* Mobile CTA - Uses existing .cta-button styles */
.mobile-nav-cta {
    margin-top: 40px;
    padding-top: 20px;
}

/* Keep CTA spaced from the lists (no force-to-bottom so it sits under Resources) */
.mobile-nav-cta {
    margin-top: 32px;
}

.mobile-nav-cta .cta-button {
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 12px 24px;
    font-size: var(--font-ui-size);
    font-weight: 700;
    border-radius: 10px;
    box-sizing: border-box;
    text-align: center;
}

/* ============================================
   Responsive
   ============================================ */



@media (max-width: 1024px) {

    /* Ensure sticky works */
    body {
        overflow-x: hidden;
    }

    .site-header {
        position: sticky;
        top: 0;
        width: 100%;
        background-color: #006997 !important;
        /* Deep Blue background matching gradient base, forced */
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        /* Subtle shadow for sticky state */
    }

    /* Orphaned properties removed */

    /* If header variant is transparent, we might need adjustments, 
       but typically mobile headers become solid or use the triangle background.
       For now, enforce white bg on sticky mobile header. */

    .header-content {
        flex-wrap: wrap;
        padding: 12px 40px;
        /* Standard: 40px padding until mobile */
        gap: 8px;
        justify-content: space-between;
    }

    .header-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
        order: 1;
        position: relative;
        width: 40px;
        height: 40px;
        z-index: 10;
        background: transparent;
    }

    /* Keep hamburger bars white by default */
    .mobile-menu-toggle .hamburger-bar {
        background-color: #FFFFFF;
    }

    /* Show mobile-only elements */
    .mobile-only {
        display: block;
    }

    /* Hide desktop logo, show mobile logo */
    .header-logo-img.desktop-logo {
        display: none;
    }

    .header-logo-img.mobile-logo {
        display: block;
    }

    /* Logo on same row */
    .header-logo {
        order: 2;
        flex: 0 0 auto;
    }

    .header-logo-img {
        height: 24px;
        width: auto;
        /* Reset width to maintain aspect ratio on mobile */
    }

    /* CTA button on mobile - right side, can shrink if needed */
    .header-cta {
        order: 4;
        margin-left: auto;
        flex-shrink: 1;
        min-width: 0;
    }

    .header-cta .cta-button {
        padding: 8px 16px;
        font-size: var(--font-caption-size);
        white-space: nowrap;
    }

    /* Spacer removed as we want a single line */
}

@media (max-width: 768px) {
    .header-content {
        padding: 12px 20px;
        /* Mobile Standard: 20px padding */
    }
}

@media (max-width: 600px) {
    .header-logo-img {
        height: 36px;
        /* Smooth transition: 40px -> 36px */
    }

    .mobile-menu-level {
        padding: 15px 20px;
    }

    .header-cta .cta-button {
        padding: 6px 12px;
        font-size: var(--font-caption-size);
    }
}

/* Smallest mobile - must come AFTER 600px to override */
@media (max-width: 480px) {
    .header-cta .cta-button {
        padding: 6px 9px;
        font-size: var(--font-caption-size);
    }
}

/* ============================================
   Desktop Scroll-Sticky Header (>1024px)
   When scrolled, the full-width header becomes sticky
   and shows the hamburger - same as the 1024px mobile style.
   ============================================ */

@media (min-width: 1025px) {
    .header-scrolled .site-header {
        position: sticky;
        top: 0;
        width: 100%;
        z-index: 1000;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
        transition: background-color 0.3s ease, box-shadow 0.3s ease;
    }

    /* Hide desktop nav, show hamburger on scroll */
    .header-scrolled .header-nav {
        display: none;
    }

    .header-scrolled .mobile-menu-toggle {
        display: flex;
        order: 1;
        position: relative;
        width: 40px;
        height: 40px;
        z-index: 10;
        background: transparent;
    }

    /* Show mobile-only CTA in the scrolled header */
    .header-scrolled .mobile-only {
        display: block;
    }

    /* Logo order matching 1024px mobile layout */
    .header-scrolled .header-logo {
        order: 2;
        flex: 0 0 auto;
    }

    /* CTA on the right */
    .header-scrolled .header-cta {
        order: 4;
        margin-left: auto;
        flex-shrink: 1;
        min-width: 0;
    }

    .header-scrolled .header-cta .cta-button {
        padding: 8px 16px;
        font-size: var(--font-caption-size);
        white-space: nowrap;
    }

    /* Switch to mobile logo on desktop scroll */
    .header-scrolled .header-logo-img.desktop-logo {
        display: none;
    }

    .header-scrolled .header-logo-img.mobile-logo {
        display: block;
        height: 24px;
        width: auto;
    }

    /* Adjust header content layout to match 1024px mobile */
    .header-scrolled .header-content {
        flex-wrap: nowrap;
        padding: 12px 40px !important;
        gap: 8px;
        justify-content: space-between;
    }
}

.mobile-logo-svg-wrapper svg {
    height: 28px;
    width: auto;
    display: block;
}