/* ==========================================================================
   COMPONENT: Header
   Fixed header – semi‑transparent by default, solid on scroll.
   Readable logo and nav always, mobile toggle and overlay included.
   ========================================================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease;
    padding: 18px 0;
}

/* Scrolled */ 
.site-header.scrolled {
    background: rgba(0, 0, 0, 0.88);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
    padding: 14px 0;
}

/* Admin Bar Offset */
.admin-bar .site-header {
    top: 32px;
}
@media (max-width: 782px) {
    .admin-bar .site-header {
        top: 46px;
    }
}

/* Inner container */
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-branding {
    display: flex;
    align-items: center;
}

/* Custom logo image */
.custom-logo-link img {
    max-height: 44px;
    width: auto;
    height: auto;
    display: block;
}

/* Fallback text logo */
.site-logo {
    font-weight: 700;
    font-size: 1.2rem;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.015em;
    white-space: nowrap;
}
.site-logo:hover {
    color: var(--accent);
}

/* Primary navigation */
.primary-nav {
    display: flex;
    align-items: center;
}
.primary-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 8px;
}
.primary-nav li a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 8px 14px;
    border-radius: 6px;
    transition: background 0.3s, color 0.3s;
}
.primary-nav li a:hover,
.primary-nav li.current-menu-item > a,
.primary-nav li.current_page_item > a {
    background: rgba(255, 255, 255, 0.12);
    color: var(--accent);
}

/* CTA button */
.header-cta {
    display: flex;
    align-items: center;
}
.header-cta .btn {
    padding: 10px 22px;
    font-size: 0.88rem;
}

/* Hamburger toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    z-index: 1001;
    position: relative;
}
.hamburger-box {
    width: 24px;
    height: 18px;
    display: block;
    position: relative;
}
.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
    width: 24px;
    height: 2px;
    background: #fff;
    position: absolute;
    left: 0;
    top: 50%;
    margin-top: -1px;
    transition: 0.3s;
}
.hamburger-inner::before { top: -8px; content: ''; }
.hamburger-inner::after  { top: 8px;  content: ''; }

/* Active (open) state */
.menu-toggle[aria-expanded="true"] .hamburger-inner {
    background: transparent;
}
.menu-toggle[aria-expanded="true"] .hamburger-inner::before {
    transform: translateY(8px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .hamburger-inner::after {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile overlay */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0.4s;
}
.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0 0 40px;
}
.mobile-nav li {
    margin-bottom: 16px;
}
.mobile-nav a {
    color: #fff;
    font-size: 1.4rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s;
}
.mobile-nav a:hover,
.mobile-nav .current-menu-item > a {
    color: var(--accent);
}

.mobile-cta {
    margin-top: 32px;
}

/* Body scroll lock */
body.no-scroll {
    overflow: hidden;
}

/* Responsive */
@media (max-width: 1024px) {
    .primary-nav,
    .header-cta {
        display: none;
    }
    .menu-toggle {
        display: block;
    }
}

/* Prevent oversized logos on small screens */
@media (max-width: 480px) {
    .custom-logo-link img {
        max-height: 40px;
    }
}