/* ===========================
   Site Header
   =========================== */

.site-header {
    background-color: var(--color-black);
    position: sticky;
    top: 0;
    z-index: 500;
    transition: box-shadow 0.3s ease;
}

.site-header.is-scrolled {
    box-shadow: 0 2px 24px rgba(0, 0, 0, 0.5);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    height: 76px;
    display: flex;
    align-items: center;
    gap: 40px;
}

/* ===========================
   Logo
   =========================== */

.site-logo {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.site-logo img {
    height: 52px;
    width: auto;
    display: block;
}

.site-name {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-white);
    letter-spacing: -0.01em;
}

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

.nav-primary {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu > li > a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 400;
    color: var(--color-white);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.nav-menu > li > a:hover,
.nav-menu > li.current-menu-item > a,
.nav-menu > li.current-menu-ancestor > a {
    color: var(--color-white);
}

/* Dropdown chevron */
.nav-menu > li.menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    width: 8px;
    height: 5px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5' fill='none'%3E%3Cpath d='M1 1L4 4L7 1' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.2s ease;
}

.nav-menu > li.menu-item-has-children:hover > a::after {
    transform: rotate(180deg);
}

/* Dropdown submenu */
.nav-menu .menu-item-has-children {
    position: relative;
}

.nav-menu .sub-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 220px;
    background: var(--color-black);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 6px;
    list-style: none;
    margin: 0;
    z-index: 100;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.nav-menu .menu-item-has-children:hover > .sub-menu {
    display: block;
}

/* Invisible bridge fills the gap so mouse doesn't lose hover */
.nav-menu .sub-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 8px;
}

.nav-menu .sub-menu a {
    display: block;
    padding: 9px 14px;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-menu .sub-menu a:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--color-white);
}

/* ===========================
   Header Actions
   =========================== */

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.header-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    color: var(--color-white);
    background-color: var(--color-primary);
    border-radius: 50px;
    border: none;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.header-cta:hover {
    background-color: var(--color-primary);
    transform: translateY(-1px);
}

/* ===========================
   Hamburger Toggle
   =========================== */

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 0;
    background: none;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.menu-toggle:hover {
    border-color: rgba(255, 255, 255, 0.5);
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 1.5px;
    background-color: var(--color-white);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

body.menu-open .menu-toggle span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

body.menu-open .menu-toggle span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

body.menu-open .menu-toggle span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* ===========================
   Mobile Menu Drawer
   =========================== */

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 92vw;
    height: 100vh;
    background: var(--color-black);
    z-index: 600;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.is-open {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

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

.mobile-menu-site-name {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-white);
}

.menu-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 8px;
    color: var(--color-white);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.menu-close:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.mobile-nav {
    flex: 1;
    padding: 10px 12px;
}

.mobile-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-menu > li > a {
    display: block;
    padding: 11px 16px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    border-radius: 8px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.mobile-nav-menu > li > a:hover,
.mobile-nav-menu .current-menu-item > a {
    color: var(--color-white);
    background-color: rgba(255, 255, 255, 0.07);
}

.mobile-nav-menu .menu-item-has-children {
    position: relative;
}

.submenu-toggle {
    position: absolute;
    right: 12px;
    top: 6px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 8px;
    color: var(--color-white);
    cursor: pointer;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, transform 0.25s ease;
}

.submenu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.14);
}

.mobile-nav-menu .menu-item-has-children.is-open > .submenu-toggle {
    transform: rotate(180deg);
}

.mobile-nav-menu .sub-menu {
    display: none;
    list-style: none;
    margin: 0 0 4px;
    padding: 0 0 0 12px;
}

.mobile-nav-menu .menu-item-has-children.is-open > .sub-menu {
    display: block;
}

.mobile-nav-menu .sub-menu a {
    display: block;
    padding: 9px 14px;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 1px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.mobile-nav-menu .sub-menu a:hover {
    color: var(--color-white);
    background-color: rgba(255, 255, 255, 0.07);
}

.mobile-menu-footer {
    padding: 16px 20px 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
}

.mobile-cta {
    display: block;
    width: 100%;
    text-align: center;
    padding: 13px 24px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-white);
    background-color: var(--color-primary);
    border-radius: 50px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.mobile-cta:hover {
    background-color: var(--color-primary);
}

.mobile-phone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 16px;
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 50px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.mobile-phone:hover {
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--color-white);
}

.mobile-email {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    transition: color 0.2s ease;
}

.mobile-email:hover {
    color: rgba(255, 255, 255, 0.7);
}

/* ===========================
   Overlay
   =========================== */

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 590;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.menu-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

body.menu-open {
    overflow: hidden;
}

/* ===========================
   Responsive — Tablet (≤1024px)
   =========================== */

@media (max-width: 1024px) {
    .nav-primary {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .header-actions {
        margin-left: auto;
    }
}

/* ===========================
   Responsive — Mobile (≤768px)
   =========================== */

@media (max-width: 768px) {
    .header-inner {
        padding: 0 20px;
        height: 64px;
        gap: 12px;
    }

    .site-logo img {
        height: 42px;
    }

    .header-actions .header-cta {
        display: none;
    }
}
