/* Shared site layout: header, navigation and footer */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(90deg, rgba(3, 7, 18, 0.92), rgba(12, 18, 40, 0.86)),
        radial-gradient(circle at 20% 0%, rgba(103, 232, 249, 0.08), transparent 34%),
        radial-gradient(circle at 78% 0%, rgba(102, 126, 234, 0.12), transparent 32%);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.site-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 86px;
    padding: 0 2rem;
}

.site-logo a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 170px;
    min-height: 62px;
    padding: 0.25rem 0;
    text-decoration: none;
}

.site-logo img {
    display: block;
    width: 168px;
    height: 58px;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 12px 24px rgba(56, 189, 248, 0.16));
}

.site-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    width: 44px;
    height: 42px;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 8px;
    background: rgba(255,255,255,0.055);
    color: #fff;
    cursor: pointer;
}

.site-menu-toggle span {
    display: block;
    width: 19px;
    height: 2px;
    border-radius: 999px;
    background: #dbeafe;
    transition: transform 0.22s ease, opacity 0.22s ease, background 0.22s ease;
}

.site-menu-toggle:focus,
.site-menu-toggle:hover {
    outline: none;
    border-color: rgba(103,232,249,0.38);
    background: rgba(103,232,249,0.1);
}

.site-menu-toggle:focus-visible {
    box-shadow: 0 0 0 3px rgba(103,232,249,0.18);
}

.site-nav {
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.site-nav::-webkit-scrollbar {
    display: none;
}

.site-nav-list {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 0.45rem;
    width: max-content;
    min-width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav-list a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 40px;
    padding: 0 0.78rem;
    border: 1px solid transparent;
    border-radius: 8px;
    color: rgba(255,255,255,0.68);
    font-size: 0.94rem;
    font-weight: 750;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.22s ease, border-color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.site-nav-list a i {
    color: rgba(167, 180, 255, 0.82);
    font-size: 0.92rem;
    transition: color 0.22s ease;
}

.site-nav-list a:hover,
.site-nav-list a.active {
    border-color: rgba(102, 126, 234, 0.28);
    color: #eef2ff;
    background: rgba(102, 126, 234, 0.11);
    transform: translateY(-1px);
}

.site-nav-list a:hover i,
.site-nav-list a.active i {
    color: #8ea2ff;
}

.site-nav-list .login-link {
    border-color: rgba(255, 255, 255, 0.1);
    color: #dbeafe;
    background: rgba(255,255,255,0.045);
}

.site-nav-list .nav-admin-link {
    border: 1px solid rgba(102, 126, 234, 0.34);
    border-radius: 999px;
    color: #9fb0ff;
    background: rgba(102, 126, 234, 0.12);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.site-nav-list .nav-admin-link:hover {
    border-color: rgba(102, 126, 234, 0.52);
    color: #dbe3ff;
    background: rgba(102, 126, 234, 0.18);
}

.site-nav-list .nav-contact-link {
    border: 1px solid rgba(103, 232, 249, 0.28);
    border-radius: 8px;
    background: rgba(103, 232, 249, 0.09);
    color: #dcfbff;
}

.site-nav-list .nav-contact-link:hover,
.site-nav-list .nav-contact-link.active {
    border-color: rgba(103, 232, 249, 0.52);
    background: rgba(103, 232, 249, 0.14);
    color: #67e8f9;
}

.site-user-menu {
    position: relative;
    padding: 0;
    margin-left: 0.35rem;
}

.site-user-details {
    position: relative;
}

.site-user-details summary {
    list-style: none;
}

.site-user-details summary::-webkit-details-marker {
    display: none;
}

.site-user-menu .user-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 40px;
    padding: 0 0.85rem;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    background: rgba(255,255,255,0.055);
    color: rgba(255,255,255,0.84);
    font-weight: 750;
    white-space: nowrap;
    cursor: pointer;
    outline: none;
    user-select: none;
}

.site-user-menu .user-pill:focus,
.site-user-menu .user-pill:hover {
    border-color: rgba(103,232,249,0.36);
    background: rgba(103,232,249,0.08);
    color: #fff;
}

.site-user-menu .user-dropdown {
    position: fixed;
    top: 72px;
    right: max(16px, calc((100vw - 1400px) / 2 + 24px));
    display: none;
    min-width: 220px;
    padding: 0.45rem;
    overflow: visible;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    background: rgba(12, 18, 32, 0.96);
    backdrop-filter: blur(16px);
    box-shadow: 0 18px 48px rgba(0,0,0,0.48);
}

.site-user-menu .user-dropdown::before {
    display: none;
    content: none;
}

.site-user-menu:hover .user-dropdown,
.site-user-menu:focus-within .user-dropdown,
.site-user-details[open] .user-dropdown,
.site-user-menu.is-user-open .user-dropdown {
    display: block;
}

.site-user-details[open] .user-pill,
.site-user-menu.is-user-open .user-pill {
    border-color: rgba(103,232,249,0.42);
    background: rgba(103,232,249,0.1);
    color: #fff;
}

.site-user-menu .user-dropdown a {
    display: flex;
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 8px;
    border-bottom: 0;
}

.site-user-menu .user-dropdown a:hover {
    background: rgba(255,255,255,0.05);
}

.site-user-menu .danger-link {
    color: #f87171;
}

.site-footer {
    margin-top: 5rem;
}

.site-footer .footer-container {
    max-width: 1400px;
    margin: 0 auto;
}

.site-footer .footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.site-footer .footer-links a {
    color: rgba(255,255,255,0.58);
    text-decoration: none;
    transition: 0.25s;
}

.site-footer .footer-links a:hover,
.site-footer .footer-links a.active {
    color: #fff;
}

.site-footer .footer-socials {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.site-footer .footer-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    color: rgba(255,255,255,0.66);
    background: rgba(255,255,255,0.04);
    text-decoration: none;
    transition: 0.25s;
}

.site-footer .footer-socials a:hover {
    border-color: rgba(102, 126, 234, 0.42);
    color: #fff;
    background: rgba(102, 126, 234, 0.14);
}

@media (max-width: 980px) {
    .site-navbar {
        height: auto;
        min-height: 78px;
        gap: 0.8rem;
        padding: 0.55rem 1rem 0.7rem;
    }

    .site-logo img {
        width: 146px;
        height: 52px;
    }

    .site-logo a {
        min-width: 148px;
        min-height: 54px;
    }

    .site-nav {
        flex: 1 1 auto;
        overflow-x: visible;
    }

    .site-nav-list {
        justify-content: flex-start;
        flex-wrap: wrap;
        width: 100%;
        min-width: 0;
        gap: 0.4rem;
        padding-bottom: 0.1rem;
    }

    .site-nav-list a,
    .site-user-menu .user-pill {
        min-height: 38px;
        padding: 0 0.7rem;
        font-size: 0.88rem;
    }

    .site-user-menu .user-dropdown {
        position: absolute;
        top: calc(100% + 0.45rem);
        right: 0;
        left: auto;
        transform: none;
    }
}

@media (max-width: 760px) {
    .site-header {
        position: sticky;
    }

    .site-navbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 0.45rem 0.75rem;
        min-height: 64px;
        padding: 0.42rem 0.9rem;
    }

    .site-logo {
        width: auto;
        display: flex;
        justify-content: flex-start;
    }

    .site-logo a {
        min-width: 0;
        min-height: 48px;
        justify-content: flex-start;
    }

    .site-logo img {
        width: 132px;
        height: 46px;
    }

    .site-menu-toggle {
        display: inline-flex;
    }

    .site-header.is-menu-open .site-menu-toggle span:first-child {
        transform: translateY(7px) rotate(45deg);
        background: #67e8f9;
    }

    .site-header.is-menu-open .site-menu-toggle span:nth-child(2) {
        opacity: 0;
    }

    .site-header.is-menu-open .site-menu-toggle span:last-child {
        transform: translateY(-7px) rotate(-45deg);
        background: #67e8f9;
    }

    .site-nav {
        grid-column: 1 / -1;
        width: 100%;
        flex-basis: auto;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        padding: 0;
        pointer-events: none;
        visibility: hidden;
        transition: max-height 0.25s ease, opacity 0.2s ease, padding 0.2s ease, visibility 0.2s ease;
    }

    .site-header.is-menu-open .site-nav {
        max-height: calc(100vh - 74px);
        max-height: min(76dvh, calc(100dvh - 74px));
        opacity: 1;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 0.5rem 0 0.3rem;
        pointer-events: auto;
        visibility: visible;
        -webkit-overflow-scrolling: touch;
    }

    .site-nav-list {
        width: 100%;
        min-width: 0;
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0.45rem;
        padding-top: 0.55rem;
        border-top: 1px solid rgba(255,255,255,0.08);
    }

    .site-nav-list li {
        width: 100%;
    }

    .site-nav-list a {
        width: 100%;
        justify-content: flex-start;
        min-height: 42px;
        padding: 0 0.9rem;
        font-size: 0.9rem;
        flex: none;
    }

    .site-nav-list .nav-contact-link,
    .site-user-menu .user-pill {
        min-height: 42px;
    }

    .site-user-menu {
        order: -10;
        width: 100%;
        margin-left: 0;
    }

    .site-user-details {
        width: 100%;
    }

    .site-user-menu .user-pill {
        width: 100%;
        justify-content: space-between;
        border-color: rgba(103,232,249,0.24);
        background: rgba(103,232,249,0.08);
    }

    .site-user-menu .user-dropdown {
        position: static;
        display: none;
        width: 100%;
        min-width: 0;
        margin-top: 0.45rem;
        border-radius: 8px;
        background: rgba(3, 7, 18, 0.52);
        transform: none;
    }

    .site-user-details[open] .user-dropdown,
    .site-user-menu.is-user-open .user-dropdown {
        display: block;
    }
}
