/* === navbar.css — Fixed navbar, dropdowns, search overlay === */

/* ── Base ────────────────────────────────────────────────── */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    background: rgba(26, 92, 107, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    padding: 0 48px;
    justify-content: space-between;
    z-index: 1000;
    transition:
        transform 0.3s ease,
        background 0.3s ease;
}

#navbar.is-scrolled {
    background: var(--teal-dk);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}
#navbar.is-hidden {
    transform: translateY(-100%);
}

/* ── Logo ────────────────────────────────────────────────── */
.nav-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-right: 28px;
    text-decoration: none;
}

.nav-logo__img {
    height: 48px;
    width: auto;
    display: block;
    object-fit: contain;
}

/* ── Nav links ───────────────────────────────────────────── */
.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    flex: 1;
    justify-content: space-evenly;
    flex: 1;
    margin: 0 24px;
}

.nav-links > li {
    position: relative;
}

.nav-links > li > a {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #f2f2f2;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 8px 11px;
    border-radius: 4px;
    white-space: nowrap;
    text-decoration: none;
    transition: background 0.2s;
}

.nav-links > li > a:hover,
.nav-links > li.active > a {
    background: rgba(255, 255, 255, 0.12);
}

/* Chevron */
.chevron {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-right: 2px solid rgba(255, 255, 255, 0.7);
    border-bottom: 2px solid rgba(255, 255, 255, 0.7);
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.2s;
    flex-shrink: 0;
}

.nav-links > li:hover > a .chevron {
    transform: rotate(-135deg) translateY(2px);
}

/* ── Dropdown ────────────────────────────────────────────── */
.dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: var(--teal-dk);
    border-radius: 6px;
    min-width: 210px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    z-index: 200;
    border-top: 3px solid var(--orange);
    list-style: none;
}

.nav-links > li:hover .dropdown,
.nav-links > li:focus-within .dropdown {
    display: block;
    animation: dropIn 0.17s ease forwards;
}

@keyframes dropIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown li a {
    display: block;
    padding: 11px 20px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition:
        background 0.15s,
        color 0.15s,
        padding-left 0.15s;
}

.dropdown li:last-child a {
    border-bottom: none;
}
.dropdown li a:hover,
.dropdown li a.is-active {
    background: var(--orange);
    color: #f2f2f2;
    padding-left: 26px;
}

/* ── Search button ───────────────────────────────────────── */
.nav-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 7px;
    border: 1.5px solid #ff5f1a;
    border-radius: 30px;
    padding: 9px 20px;
    color: #f2f2f2;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    flex-shrink: 0;
    background: transparent;
    cursor: pointer;
    transition:
        border-color 0.2s,
        background 0.2s;
}

.nav-search:hover {
    border-color: #ff5f1a;
    background: rgba(255, 255, 255, 0.1);
}
.nav-search svg {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
}

/* ── Search overlay ──────────────────────────────────────── */
.search-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(14, 61, 73, 0.97);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
}

.search-overlay.is-open {
    display: flex;
}

.search-overlay form {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    width: min(600px, 90vw);
}

.search-overlay input[type="search"] {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.45);
    color: #f2f2f2;
    font-size: 2rem;
    font-family: var(--font);
    padding: 12px 4px;
    outline: none;
    transition: border-color 0.2s;
}

.search-overlay input[type="search"]:focus {
    border-bottom-color: #f2f2f2;
}
.search-overlay input[type="search"]::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.search-submit {
    background: var(--orange);
    color: #f2f2f2;
    border: none;
    border-radius: 4px;
    padding: 10px 28px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s;
}

.search-submit:hover {
    background: #cf4515;
}

.search-close {
    position: absolute;
    top: 28px;
    right: 36px;
    font-size: 2.2rem;
    line-height: 1;
    color: rgba(255, 255, 255, 0.6);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}

.search-close:hover {
    color: #f2f2f2;
}

/* ── Hamburger ───────────────────────────────────────────── */
.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 6px;
    margin-left: 12px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #f2f2f2;
    border-radius: 2px;
    transition:
        transform 0.3s,
        opacity 0.3s;
}

.nav-hamburger.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-hamburger.is-active span:nth-child(2) {
    opacity: 0;
}
.nav-hamburger.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1100px) {
    .nav-links > li > a {
        font-size: 0.82rem;
        padding: 8px 7px;
    }
}

@media (max-width: 900px) {
    .nav-hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: var(--nav-h);
        left: 0;
        right: 0;
        background: var(--teal-dk);
        flex-direction: column;
        align-items: stretch;
        padding: 12px 0;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    }

    .nav-links.is-mobile-open {
        display: flex;
    }

    .nav-links > li > a {
        padding: 14px 24px;
        border-radius: 0;
        font-size: 0.85rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .dropdown {
        position: static;
        box-shadow: none;
        border-radius: 0;
        border-top: none;
        background: rgba(0, 0, 0, 0.2);
        padding-left: 16px;
    }

    .nav-links > li:hover .dropdown {
        display: none;
    }
    .nav-links > li.is-open .dropdown {
        display: block;
    }
}
