/**
 * Site header: nav bar, mega-menu (Fields dropdown), Products dropdown, language switcher, mobile hamburger + drawer.
 */

/* Homepage only: .site-header floats over the hero instead of reserving 72px of page
   space, which was pushing the 100vh hero below the viewport. */
body.home .page-layout {
    padding-top: 0;
}

/* Clickable Cards System */
.clickable-card {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.clickable-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 35px rgba(15, 99, 161, 0.18);
}

.clickable-card:active {
    transform: scale(0.98) !important;
}

/* Premium Scroll-Sensitive Navigation Bar Styling */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-h);
    background: linear-gradient(180deg, rgba(245, 250, 255, 0.94) 0%, rgba(230, 242, 252, 0.88) 100%);
    /* var(--rect-blue-1) tint with transparency */
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    border-bottom: 1px solid var(--border-soft);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 4px 18px rgba(15, 99, 161, 0.07);
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
    box-sizing: border-box;
}

.site-header.header-hidden {
    transform: translateY(-100%);
}

.nav-container {
    max-width: 1280px;
    height: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
    }
}

.logo-link {
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-logo {
    height: 84px;
    width: auto;
    max-width: 240px;
    /* The logo file has wide transparent margins. A box shaped like the artwork itself
       (404x185 of the 640x386 file) plus object-fit: cover trims the empty space above
       and below, so the letters render larger without making the header taller. */
    aspect-ratio: 404 / 185;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Phones/tablets: shorter header, logo scaled to fit it. Must come after .nav-logo. */
@media (max-width: 768px) {
    :root {
        --header-h: 86px;
    }
    .nav-logo {
        height: 70px;
    }
}

.nav-menu {
    height: 100%;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    height: 100%;
    align-items: center;
    gap: 2rem;
}

.nav-list li {
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
}

.nav-item {
    font-family: var(--vosges-font-body);
    font-size: 17px;
    font-weight: 500;
    color: #0F2C4C;
    text-decoration: none;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    height: 100%;
    transition: color 0.2s ease;
}

.nav-item:hover,
.nav-item.active {
    color: var(--rect-blue-4);
}

.arrow-icon {
    transition: transform 0.2s ease;
}

.nav-item.active .arrow-icon {
    transform: rotate(180deg);
}

.nav-dropdown-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* Dropdown/Mega-Menu Panel Base */
.dropdown-panel {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #FFFFFF;
    border: 1px solid #D1E4F5;
    box-shadow: 0 10px 30px rgba(15, 44, 76, 0.1);
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    z-index: 1001;
}

.dropdown-panel.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

/* Standard Dropdown */
.standard-dropdown {
    width: 200px;
    padding: 0.5rem 0;
}

/* Language Dropdown (Right-aligned container & clean buttons) */
.lang-dropdown {
    left: auto !important;
    right: 0 !important;
    transform: translateY(10px) !important;
    min-width: 90px !important;
    width: 90px !important;
    padding: 0.4rem 0 !important;
}

.lang-dropdown.active {
    transform: translateY(0) !important;
}

.lang-option {
    display: block;
    width: 100%;
    padding: 0.6rem 0.8rem;
    font-family: var(--vosges-font-body);
    font-size: 15px;
    font-weight: 600;
    color: #0F2C4C;
    background: none;
    border: none;
    cursor: pointer;
    text-align: center;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.lang-option:hover {
    background-color: var(--rect-blue-1);
    color: var(--rect-blue-4);
}

.dropdown-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dropdown-link {
    display: block;
    padding: 0.8rem 1.2rem;
    color: #0F2C4C;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-link:hover {
    background-color: var(--rect-blue-1);
    color: var(--rect-blue-4);
}

/* Mega Menu (Les Domaines) — 3 columns, up to 9 Field Cards */
.mega-menu {
    width: 760px;
    padding: 1.5rem;
}

.mega-menu-content {
    display: flex;
    gap: 1.5rem;
}

.mega-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mega-divider {
    width: 1px;
    background-color: #BCD6ED;
    align-self: stretch;
}

.mega-view-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #D1E4F5;
    font-size: 14px;
    font-weight: 600;
    color: var(--rect-blue-4);
    text-decoration: none;
    transition: color 0.2s ease;
}

.mega-view-all:hover {
    color: var(--rect-blue-3);
}

.dropdown-divider {
    height: 1px;
    background-color: #BCD6ED;
    margin: 0.5rem 1rem;
    list-style: none;
    display: block;
}

.field-mega-link {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0.6rem 1rem;
    box-sizing: border-box;
    border-radius: 4px;
    border-inline-start: 3px solid transparent;
    transition: border-inline-start-color 0.2s ease, padding-inline-start 0.2s ease, background-color 0.2s ease;
    text-decoration: none;
}

.field-mega-link:hover {
    border-inline-start-color: var(--rect-blue-3); /* Sleek accent bar */
    padding-inline-start: 1.25rem; /* Subtle text push */
    background-color: var(--rect-blue-1);
}

.field-link-title {
    font-size: 14px;
    font-weight: 600;
    color: #0F2C4C;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.field-link-title::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 2px;
    background-color: var(--rect-blue-3);
    transition: background-color 0.2s ease, width 0.2s ease;
    flex-shrink: 0;
}

.field-mega-link:hover .field-link-title::before {
    background-color: var(--rect-blue-4);
    width: 14px; /* Dash expands slightly on hover */
}

.field-mega-link:hover .field-link-title {
    color: var(--rect-blue-4);
}

.field-link-desc {
    font-size: 12px;
    color: #4A6A8A;
    margin-top: 2px;
}

.domain-tab-btn {
    text-align: start;
    background: none;
    border: none;
    padding: 0.8rem 1rem;
    font-family: var(--vosges-font-body);
    font-size: 14px;
    font-weight: 600;
    color: #4A6A8A;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s ease, color 0.2s ease;
}

.domain-tab-btn:hover,
.domain-tab-btn.active {
    background-color: var(--rect-blue-1);
    color: var(--rect-blue-4);
}

.domain-content {
    display: none;
}

.domain-content.active {
    display: block;
}

.domain-content h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 16px;
    color: #0F2C4C;
}

.domain-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #4A6A8A;
}

/* Language Switcher */
.nav-right {
    display: flex;
    align-items: center;
}

.language-switcher {
    display: flex;
    align-items: center;
    gap: 4px;
}

.lang-btn {
    background: none;
    border: none;
    font-family: var(--vosges-font-body);
    font-size: 13px;
    font-weight: 600;
    color: #4A6A8A;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.2s, background-color 0.2s;
}

.lang-btn:hover,
.lang-btn.active {
    color: var(--rect-blue-4);
    background-color: rgba(15, 99, 161, 0.08);
}

.lang-divider {
    color: #D1E4F5;
    font-size: 12px;
}

/* ==========================================================================
   High-Taste Mobile Navbar & Slide-Over Drawer System
   ========================================================================== */
.mobile-nav-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 5px;
    z-index: 1002;
}

.hamburger-bar {
    width: 24px;
    height: 2px;
    background-color: #0F63A1;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(1, 10, 20, 0.65);
    backdrop-filter: blur(8px);
    z-index: 1005;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s ease;
}

.mobile-nav-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-drawer {
    position: fixed;
    top: 0;
    inset-inline-end: 0;
    width: 82%;
    max-width: 340px;
    height: 100vh;
    background: rgba(3, 19, 37, 0.96);
    border-inline-start: 1px solid rgba(45, 153, 235, 0.25);
    backdrop-filter: blur(20px);
    z-index: 1010;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 1.5rem 1.8rem 2.5rem 1.8rem;
    box-sizing: border-box;
    transform: translateX(105%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-nav-drawer.is-open {
    transform: translateX(0);
}

.mobile-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-drawer-logo {
    height: 64px;
    width: auto;
}

.mobile-drawer-close {
    /* SVG X instead of &times; — the text glyph sat visibly off-center. */
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-drawer-links {
    list-style: none;
    padding: 1.5rem 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.mobile-link {
    font-size: 1.15rem;
    font-weight: 700;
    color: #CBD5E1;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: color 0.2s ease;
}

.mobile-link:hover, .mobile-link.active {
    color: #00E5FF;
}

/* Hamburger takes over at tablet widths too — mega-menu triggers don't fit and
   dropdowns rely on hover anyway. */
@media (max-width: 1024px) {
    .nav-menu {
        display: none !important;
    }
    .mobile-nav-toggle {
        display: flex !important;
    }
}

/* ==========================================================================
   SUPER CATALYZER PRODUCT PAGE (page-product-super-catalyzer.php)
   Shared by each vosges/sc-* block's edit.js/save.js/render.php.
   ========================================================================== */
.sc-page-layout {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    /* .page-layout already reserves 72px of top padding to clear the fixed header. */
    padding: 32px 1rem 60px 1rem;
    box-sizing: border-box;
}
