/* 1. Standard Header Flow - No Stickiness & Normal Layout Spacing */
header.site-header, 
.ast-main-header-wrap {
    position: relative !important;
    width: 100% !important;
    background: #ffffff !important; 
    border-bottom: 1px solid #ebeeef !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04) !important;
    transform: none !important;
    top: auto !important;
    left: auto !important;
}

/* 2. Horizontal Flex Realignment (Maintains Alignment on Desktop) */
.ast-primary-header-bar .site-header-primary-section-right,
.ast-primary-header-bar .ast-builder-layout-element,
.ast-primary-header-bar .ast-custom-button-wrap,
.ast-header-custom-item {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    transform: none !important; 
    writing-mode: horizontal-tb !important; 
    clear: both !important;
    float: none !important;
    height: auto !important;
}

/* 3. Button Size Lock - Keeps Button Text Legible Without Warping */
.ast-primary-header-bar a.ast-custom-button-link,
.ast-primary-header-bar .wp-block-button__link,
.ast-header-custom-item a {
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transform: none !important;
    writing-mode: horizontal-tb !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;       
    min-width: max-content !important; 
    position: relative !important;
    top: auto !important;
    right: auto !important;
}

/* 4. Reset Global Layout Top Margins */
#page, .site-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* 5. Clean Integration for Astra's Native Mobile Hamburger Menu Toggle */
@media (max-width: 921px) {
    /* Restore normal block/flex rendering so the hamburger drawer behaves natively */
    .ast-mobile-header-wrap .ast-primary-header-bar,
    .ast-primary-header-bar {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 10px 15px !important;
    }

    /* Allows the hamburger toggle icon box to display properly on the right */
    .ast-mobile-menu-trigger-wrapper {
        display: flex !important;
        align-items: center !important;
    }

    /* Keeps individual list links inside the slide-out menu responsive and clean */
    .ast-canvas-menu-wrap a, 
    .ast-mobile-popup-inner a,
    .main-header-menu a {
        color: #1e293b !important;
        padding: 12px 20px !important;
        border-bottom: 1px solid #f1f5f9 !important;
    }
}

/* 6. Structural Theme Grid Continuity Fixes */
.single-column-fix {
    grid-template-columns: 1fr !important;
    display: flex !important;
    flex-direction: column !important;
}
.hero-grid-fix {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: 1fr !important;
}







/* Responsive Premium Floating Mobile Button */
@media (max-width: 921px) {
    /* 1. Outer Container Position */
    .custom-floating-mobile-cta {
        position: fixed !important;
        bottom: 20px !important;    /* Clean float above screen fold */
        left: 4% !important;        /* Centered safe margins */
        width: 92% !important;       /* Responsive horizontal breathing room */
        z-index: 999999 !important; 
        background: transparent !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* 2. Responsive Capsule Button Link Styling */
    .floating-cta-pill {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;        /* Crisp gap between icon and text */
        width: 100% !important;
        box-sizing: border-box !important; /* Forces padding to stay inside dimensions */
        padding: 14px 16px !important;     /* Highly balanced responsive padding */
        background: linear-gradient(135deg, #e65c00 0%, #ff7300 100%) !important; 
        color: #ffffff !important;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
        font-weight: 700 !important;
        
        /* Responsive font scaling using clamp so it naturally shrinks on narrow screens */
        font-size: clamp(11px, 3vw, 13px) !important; 
        
        text-transform: uppercase !important;
        letter-spacing: 0.8px !important; /* Slightly tighter tracking for mobile readability */
        border-radius: 50px !important; 
        text-decoration: none !important;
        box-shadow: 0 8px 20px rgba(230, 92, 0, 0.35) !important; 
        border: 1px solid rgba(255, 255, 255, 0.2) !important;    
        line-height: 1.2 !important;
        white-space: nowrap !important;
    }

    /* 3. Rocket Icon Subtle Animation */
    .cta-pulse-logo {
        font-size: 14px !important; /* Proportional icon scaling */
        animation: subtleFloat 2s ease-in-out infinite !important;
        display: inline-block !important;
        flex-shrink: 0 !important; /* Keeps icon from squishing */
    }

    @keyframes subtleFloat {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-2px); }
    }

    /* 4. Document Body Buffer Spacing */
    body {
        padding-bottom: 85px !important;
    }
}


/* Master Fix: Hide Mobile CTA on All 3 Specific Registration Slugs */
@media (max-width: 921px) {
    /* Targets body strings for athlete-registration-page, founding-program, and founders-registration-page */
    body[class*="athlete-registration"] .custom-floating-mobile-cta,
    body[class*="founders-registration"] .custom-floating-mobile-cta,
    body[class*="founding-program"] .custom-floating-mobile-cta,
    
    /* Absolute fallback wrapper kill */
    .athlete-registration-page .custom-floating-mobile-cta,
    .founders-registration-page .custom-floating-mobile-cta,
    .founding-program .custom-floating-mobile-cta {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
}

/* Make all nav links black by default */
.main-navigation a, .nav-menu a {
    color: #000000 !important;
}

/* Make the active page link green */
.current-menu-item a {
    color: #009966 !important;
    font-weight: bold;
}

/* Style the menu item as a button */
.nav-button a {
    background-color: #000000; /* Black background */
    color: #ffffff !important;  /* White text */
    padding: 10px 20px;
    border-radius: 5px;        /* Rounded corners */
    text-decoration: none;
    transition: background-color 0.3s;
}



/* Change button background to green on the Founding Program page */
.page-id-founding-program .ast-custom-button {
    background-color: #009966 !important;
    border-color: #009966 !important;
    color: #ffffff !important;
}

/* Optional: Add a hover effect */
.page-id-founding-program .ast-custom-button:hover {
    background-color: #007a52 !important;
}