/* Header Navbar - Fixed & Minimalist */
.header-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 90px;
    background-color: rgba(255, 255, 255, 0.98);
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: height 0.3s ease, background-color 0.3s ease;
}

.header-container {
    width: 100%;
    max-width: var(--site-max-width);
    margin: 0 auto;
    padding: 0 var(--page-padding);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-main);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.header-logo:hover {
    opacity: 0.7;
    transform: scale(0.98);
}

.header-logo-img {
    height: 23px;
    width: auto;
    display: block;
    cursor: pointer;
}

.header-nav-desktop {
    --nav-gap: clamp(13px, 1.97vw, 39px);
    display: flex;
    gap: var(--nav-gap);
    align-items: center;
    margin-left: auto;
}

.header-nav-desktop .search-btn {
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    margin-left: calc(var(--nav-gap) * -0.35);
    margin-right: calc(var(--nav-gap) * -0.35);
}

.header-nav-desktop a,
.header-dropdown > span {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-main);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.4s ease;
    font-weight: 400;
}

.header-nav-desktop a:hover,
.header-dropdown:hover > span {
    color: var(--text-muted);
}

.nav-link.active-page,
.header-dropdown.active-page > span {
    font-weight: 600;
    color: var(--text-main);
    opacity: 1;
}

.header-dropdown {
    position: relative;
    cursor: pointer;
    padding: 10px 0;
}

.header-submenu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: #ffffff;
    min-width: 220px;
    padding: 20px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
    z-index: 1001;
}

.header-dropdown:hover .header-submenu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.header-submenu a {
    display: block;
    padding: 10px 25px;
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 400;
    cursor: pointer;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.header-submenu a:hover {
    color: var(--text-main);
    background-color: #f9f9f9;
}

.burger-toggler {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1002;
}

.burger-animated-icon span {
    display: block;
    width: 22px;
    height: 1px;
    background-color: var(--text-main);
    transition: transform 0.4s ease, opacity 0.4s ease;
    margin-bottom: 5px;
}

.burger-animated-icon span:last-child {
    margin-bottom: 0;
}

.burger-toggler.open .burger-animated-icon span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.burger-toggler.open .burger-animated-icon span:nth-child(2) {
    opacity: 0;
}

.burger-toggler.open .burger-animated-icon span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.header-nav-mobile {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #ffffff;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.header-nav-mobile.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.header-nav-mobile .nav-link {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 400;
    margin-bottom: 30px;
}

/* The mobile SEARCH item is a <button>; strip the browser chrome
   so it reads like the other menu headings */
.header-nav-mobile .search-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.header-mobile-dropdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.header-mobile-parent {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--text-main);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-bottom: 15px;
    text-decoration: none;
}

.header-mobile-submenu {
    display: none;
    flex-direction: column;
    gap: 10px;
    text-align: center;
}

.header-mobile-submenu.show {
    display: flex;
}

.header-mobile-submenu a {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none;
}

@media (max-width: 880px) {
    .header-navbar {
        height: 70px;
        padding: 0;
    }

    .header-logo-img {
        height: 18.4px;
    }

    .header-nav-desktop {
        display: none;
    }

    .burger-toggler {
        display: flex;
    }
}

/* Theme Toggle Button */
.theme-toggle {
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    font-size: 1.2rem;
    line-height: 1;
    transition: opacity 0.3s ease, color 0.3s ease;
    margin-left: -5px;
    rotate: -155deg;
}

.theme-toggle:hover {
    opacity: 0.7;
}

.search-btn {
    rotate: 0deg;
}

