.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(14px);
    background: rgba(255,255,255,.84);
    border-bottom: 1px solid rgba(191,208,234,.7);
}

.topbar {
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.brand {
    display: grid;
    gap: 2px;
    flex: 0 0 auto;
}

.brand-title {
    font-family: 'Cinzel', serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--blue);
}

.brand-tag {
    font-size: 14px;
    color: var(--text-3);
}

.main-nav,
.account-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.main-nav {
    justify-content: center;
    flex: 1 1 auto;
}

.account-actions {
    justify-content: flex-end;
    flex: 0 0 auto;
}

.nav-link,
.nav-dropdown > .btn,
.nav-dropdown > .nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-2);
    border: 1px solid transparent;
}

.nav-link:hover,
.nav-dropdown:hover > .nav-link,
.nav-dropdown:hover > .btn,
.nav-dropdown:focus-within > .nav-link,
.nav-dropdown:focus-within > .btn,
.nav-dropdown.is-active > .nav-link,
.nav-dropdown.is-active > .btn,
.nav-link.active {
    background: linear-gradient(180deg, #f7fbff, #eaf2ff);
    color: var(--blue);
    border-color: var(--line);
}

.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 230px;
    padding: 10px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.98);
    box-shadow: var(--shadow-1);
    display: grid;
    gap: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.dropdown-menu-right {
    left: auto;
    right: 0;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 12px;
    color: var(--text-2);
    font-size: 14px;
    font-weight: 700;
}

.dropdown-menu a:hover,
.dropdown-menu a.active {
    background: linear-gradient(180deg, #f7fbff, #eaf2ff);
    color: var(--blue);
}

.logout-form {
    margin: 0;
}

.site-footer {
    margin-top: 40px;
    border-top: 1px solid rgba(191,208,234,.7);
    background: rgba(255,255,255,.55);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr .7fr .7fr;
    gap: 28px;
    padding: 28px 0 44px;
}

.footer-title {
    font-family: 'Cinzel', serif;
    font-size: 22px;
    color: var(--navy);
}

.footer-copy {
    margin-top: 8px;
    max-width: 560px;
}

.footer-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-3);
    font-weight: 800;
    margin-bottom: 8px;
}

.footer-links {
    display: grid;
    gap: 10px;
}

.footer-links a {
    color: var(--text-2);
    font-weight: 700;
}

@media (max-width: 1260px) {
    .topbar {
        flex-wrap: wrap;
        justify-content: center;
        padding: 14px 0;
    }

    .brand,
    .main-nav,
    .account-actions {
        width: 100%;
    }

    .brand {
        justify-items: center;
    }

    .main-nav,
    .account-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (max-width: 760px) {
    .main-nav,
    .account-actions {
        gap: 8px;
    }

    .nav-link,
    .nav-dropdown > .btn,
    .nav-dropdown > .nav-link {
        min-height: 40px;
        padding: 0 14px;
        font-size: 13px;
    }

    .dropdown-menu,
    .dropdown-menu-right {
        left: 50%;
        right: auto;
        transform: translate(-50%, 8px);
        min-width: min(280px, calc(100vw - 32px));
    }

    .nav-dropdown:hover .dropdown-menu,
    .nav-dropdown:focus-within .dropdown-menu {
        transform: translate(-50%, 0);
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}
