/* ============================================================================
   TRANSPARENT HEADER OVERLAY — assetslp/css/core/header-overlay.css
   WP-14c extraction (2026-07-06): these rules lived in pages/camp-final.css
   keyed on body.has-op-doormat-sticky (a doormat-era class that outlived the
   doormat). The doormat pattern is removed; the transparent header-over-hero
   treatment survives here, re-keyed to body.has-transparent-header (emitted
   by opanije_transparent_header_body_class() for camp-final.php,
   camp-final-legacy.php and classes.php). Rules are otherwise verbatim.
   ============================================================================ */

/* ==========================================================================
   IMMERSIVE HEADER - Absolute Positioned Transparent Overlay
   For the header to be truly invisible over the hero video:
   - position: absolute takes it OUT of document flow
   - Hero naturally fills from top of viewport
   - Header overlays on top with transparent background

   CRITICAL: "Nuclear Option" - Force transparent on ALL elements
   Based on research: Inner elements like navigation can retain backgrounds
   even when parent is transparent. Must explicitly set ALL children transparent.
   Reference: https://developer.mozilla.org/en-US/docs/Web/CSS/background
   ========================================================================== */

/* Ensure main content starts at very top with no gap */
body.has-transparent-header main,
body.has-transparent-header .cultural-immersion-salvador-page {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Hero container must fill from absolute top of viewport */
body.has-transparent-header #react-luxury-hero-container {
    margin-top: 0 !important;
    padding-top: 0 !important;
    position: relative;
    z-index: 1;
}

/* Override React's bg-black fallback to prevent black showing through */
body.has-transparent-header #react-luxury-hero-container > section {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Ensure html/body have no default margins creating gaps */
html {
    margin: 0 !important;
    padding: 0 !important;
}

body.has-transparent-header {
    margin: 0 !important;
    padding-top: 0 !important;
}

/* Main header container - transparent overlay */
body.has-transparent-header #site-header:not(.scrolled) {
    position: absolute !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 9999 !important; /* MAXIMUM z-index to ensure visibility */
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    border-bottom: none !important;
    border: none !important;
}

/* NUCLEAR OPTION: Force ALL inner elements transparent */
body.has-transparent-header #site-header:not(.scrolled) .content-container,
body.has-transparent-header #site-header:not(.scrolled) .main-navigation,
body.has-transparent-header #site-header:not(.scrolled) .nav-menu,
body.has-transparent-header #site-header:not(.scrolled) .nav-item,
body.has-transparent-header #site-header:not(.scrolled) .cart-item {
    background: transparent !important;
    background-color: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Remove any pseudo-elements that might have backgrounds */
body.has-transparent-header #site-header:not(.scrolled)::before,
body.has-transparent-header #site-header:not(.scrolled)::after,
body.has-transparent-header #site-header:not(.scrolled) .content-container::before,
body.has-transparent-header #site-header:not(.scrolled) .content-container::after {
    display: none !important;
    content: none !important;
}

/* Mobile menu toggle - transparent background for immersive header */
body.has-transparent-header #site-header:not(.scrolled) .mobile-menu-toggle {
    background: transparent !important;
    background-color: transparent !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

/* Nav link hover pseudo-elements - keep transparent in immersive mode */
body.has-transparent-header #site-header:not(.scrolled) .nav-link::before {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Cart link - transparent for immersive header */
body.has-transparent-header #site-header:not(.scrolled) .cart-link {
    background: transparent !important;
    background-color: transparent !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

body.has-transparent-header #site-header:not(.scrolled) .cart-link::before {
    display: none !important;
}

/* ==========================================================================
   HERO-HEADER TEXT READABILITY
   Using text-shadow approach instead of scrim overlays.
   The hero video provides natural contrast; text-shadow ensures readability.
   ========================================================================== */

/* Enhanced text-shadow for better readability on video backgrounds */
body.has-transparent-header #site-header:not(.scrolled) .logo-name,
body.has-transparent-header #site-header:not(.scrolled) .nav-link,
body.has-transparent-header #site-header:not(.scrolled) .menu-label {
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.8),
        0 2px 4px rgba(0, 0, 0, 0.6),
        0 4px 8px rgba(0, 0, 0, 0.3) !important;
}

/* Restore normal header on scroll */
body.has-transparent-header #site-header.scrolled {
    position: sticky !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(180%) !important;
    box-shadow: 0 4px 12px rgba(43, 40, 35, 0.08) !important;
    border-bottom: 1px solid #F4F3F0 !important;
}

/* White logo overlay for transparent header */
body.has-transparent-header #site-header:not(.scrolled) .logo {
    position: relative;
}

body.has-transparent-header #site-header:not(.scrolled) .logo img {
    opacity: 0 !important;
}

body.has-transparent-header #site-header:not(.scrolled) .logo::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background-image: url('https://opanije.com/wp-content/uploads/2025/12/OPANIJE-BRANCO_11zon.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

@media (max-width: 768px) {
    body.has-transparent-header #site-header:not(.scrolled) .logo::before {
        width: 42px;
        height: 42px;
    }
}

@media (max-width: 480px) {
    body.has-transparent-header #site-header:not(.scrolled) .logo::before {
        width: 38px;
        height: 38px;
    }
}

/* White text for transparent header with enhanced text-shadow for readability */
/* Maximum specificity with html prefix to override modern-header-2025.css */
html body.has-transparent-header #site-header:not(.scrolled) .logo-name,
html body.has-transparent-header #site-header:not(.scrolled) .content-container .logo .logo-name,
html body.has-transparent-header #site-header:not(.scrolled) span.logo-name {
    color: #FFFFFF !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
}

/* MOBILE: Force white logo-name on small screens */
@media (max-width: 900px) {
    html body.has-transparent-header #site-header:not(.scrolled) .logo-name,
    html body.has-transparent-header #site-header:not(.scrolled) .content-container .logo .logo-name,
    html body.has-transparent-header #site-header:not(.scrolled) span.logo-name,
    html body.has-transparent-header #site-header:not(.scrolled) a.logo .logo-name {
        color: #FFFFFF !important;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
    }
}

body.has-transparent-header #site-header:not(.scrolled) .mobile-menu-toggle {
    color: #FFFFFF !important;
}

body.has-transparent-header #site-header:not(.scrolled) .hamburger-icon i {
    background-color: #FFFFFF !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

body.has-transparent-header #site-header:not(.scrolled) .menu-label {
    color: #FFFFFF !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* White navigation links for transparent header */
body.has-transparent-header #site-header:not(.scrolled) .nav-link {
    color: #FFFFFF !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

body.has-transparent-header #site-header:not(.scrolled) .nav-link:hover,
body.has-transparent-header #site-header:not(.scrolled) .nav-link:focus {
    color: #D4A017 !important;
}

body.has-transparent-header #site-header:not(.scrolled) .nav-link.current-page {
    color: #D4A017 !important;
}

/* White cart icon */
body.has-transparent-header #site-header:not(.scrolled) .cart-link svg,
body.has-transparent-header #site-header:not(.scrolled) .cart-link i {
    color: #FFFFFF !important;
    fill: #FFFFFF !important;
}

body.has-transparent-header #site-header:not(.scrolled) .cart-count {
    background-color: #D4A017 !important;
    color: #FFFFFF !important;
}

/* Scrolled state - restore regular logo */
body.has-transparent-header #site-header.scrolled .logo img {
    opacity: 1 !important;
}

body.has-transparent-header #site-header.scrolled .logo::before {
    display: none;
}
