.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(251, 254, 255, 0.96);
    border-bottom: 1px solid var(--pp-line);
    box-shadow: 0 10px 24px rgba(18, 43, 86, 0.04);
}

.header-shell {
    display: grid;
    width: min(1320px, calc(100% - 36px));
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: clamp(22px, 2.4vw, 36px);
    min-height: 84px;
}

.brand {
    display: inline-flex;
    align-items: center;
}

.brand-logo {
    display: block;
    width: clamp(166px, 18vw, 230px);
    height: auto;
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(22px, 2.2vw, 30px);
    min-width: 0;
}

.menu-toggle-input,
.menu-toggle-button {
    display: none;
}

.nav-group {
    position: relative;
    padding: 8px 0;
}

.nav-link {
    position: relative;
    padding: 10px 6px;
    border: 0;
    background: transparent;
    color: rgba(13, 27, 52, 0.82);
    font: inherit;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.nav-parent {
    padding-right: 20px;
}

.nav-link::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 2px;
    left: 0;
    height: 2px;
    border-radius: 999px;
    background: transparent;
    transform: scaleX(0.3);
    transition: transform 0.18s ease, background 0.18s ease;
}

.nav-link:hover,
.nav-link.is-active,
.nav-group.is-active > .nav-link {
    color: var(--pp-blue);
}

.nav-link:hover::after,
.nav-link.is-active::after,
.nav-group.is-active > .nav-link::after {
    background: var(--pp-gradient);
    transform: scaleX(1);
}

.nav-parent::before {
    content: "";
    position: absolute;
    top: 50%;
    right: 6px;
    width: 6px;
    height: 6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    opacity: 0.58;
    transform: translateY(-64%) rotate(45deg);
}

.nav-group::after {
    content: "";
    position: absolute;
    top: 100%;
    right: -18px;
    left: -18px;
    height: 14px;
}

.nav-dropdown {
    position: absolute;
    top: calc(100% + 2px);
    left: 50%;
    display: grid;
    min-width: 250px;
    padding: 10px;
    border: 1px solid rgba(91, 126, 178, 0.2);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 24px 54px rgba(18, 43, 86, 0.14);
    opacity: 0;
    pointer-events: auto;
    transform: translate(-50%, -8px);
    transition:
        opacity 0.18s ease 0.34s,
        transform 0.18s ease 0.34s,
        visibility 0s linear 0.52s;
    visibility: hidden;
}

.nav-group:hover .nav-dropdown {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
    transition-delay: 0s;
    visibility: visible;
}

.nav-dropdown-link {
    padding: 11px 13px;
    border-radius: 14px;
    color: var(--pp-ink);
    font-weight: 600;
    white-space: nowrap;
}

.nav-dropdown-link:hover,
.nav-dropdown-link:focus {
    color: var(--pp-blue);
    background: linear-gradient(90deg, rgba(106, 214, 247, 0.18), rgba(65, 136, 245, 0.12));
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logout-form {
    margin: 0;
}

.header-actions .logout-form {
    display: flex;
}

.site-main {
    padding: 0 0 40px;
}

.site-footer {
    margin-top: 58px;
    padding: 34px 0 44px;
    color: var(--pp-muted);
    font-size: 0.92rem;
    border-top: 1px solid rgba(91, 126, 178, 0.16);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(220px, 0.9fr) minmax(280px, 1.3fr) minmax(210px, 0.8fr);
    gap: 28px;
    align-items: start;
}

.site-footer strong {
    color: var(--pp-ink);
    font-size: 0.9rem;
}

.site-footer a {
    color: var(--pp-blue);
    font-weight: 600;
}

.site-footer a:hover,
.site-footer a:focus {
    color: var(--pp-magenta);
}

.footer-brand {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: center;
}

.footer-brand img {
    display: block;
    width: 54px;
    height: 54px;
}

.footer-brand p,
.footer-contact span {
    margin: 4px 0 0;
}

.footer-links,
.footer-contact {
    display: grid;
    gap: 7px;
    padding-left: 28px;
    border-left: 1px solid rgba(91, 126, 178, 0.12);
}

.footer-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.footer-links strong {
    grid-column: 1 / -1;
}

.footer-contact {
    gap: 6px;
}

@media (max-width: 680px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-links,
    .footer-contact {
        padding-top: 18px;
        padding-left: 0;
        border-top: 1px solid rgba(91, 126, 178, 0.12);
        border-left: 0;
    }
}
