/* Shared VATROC site navigation and footer */

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

:root {
    --site-background-overlay: rgba(11, 15, 25, 0.7);
    --site-text-primary: #f8fafc;
    --site-text-secondary: #cbd5e1;
    --site-text-muted: #94a3b8;
    --site-accent: #38bdf8;
}

/* Keep native form controls visually consistent without crowding their labels. */
select:not([multiple]) {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 2.75rem !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    background-size: 1rem 1rem;
}

input[type="checkbox"] {
    width: 1.125rem;
    height: 1.125rem;
    flex: 0 0 auto;
    margin-left: 0;
    margin-right: 0;
    accent-color: #0ea5e9;
    vertical-align: middle;
}

.staff-management-summary > td {
    vertical-align: middle;
}

.staff-management-summary.is-expanded > td {
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
    vertical-align: middle;
}

.staff-management-summary.is-expanded button[aria-expanded="true"] {
    max-width: none;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
}

.staff-management-summary.is-expanded .staff-management-breakable {
    overflow-wrap: anywhere;
}

.site-disclosure-panel {
    transform-origin: top;
    overflow: clip;
    will-change: height, opacity;
}

body[data-current-page="our-story"],
body[data-current-page="privacy"],
body[data-current-page="pilot-briefing"],
body[data-current-page="gate-finder"] {
    --site-background-overlay: rgba(11, 15, 25, 0.78);
}

.site-logo {
    height: clamp(52px, 4vw, 58px);
    width: auto;
    object-fit: contain;
}

.site-nav {
    background: rgba(2, 6, 23, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(56, 189, 248, 0.22);
    position: sticky;
    top: 0;
    z-index: 50;
}

.site-flightsim-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    color: #fbbf24;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    line-height: 1.4;
    text-align: center;
}

.site-flightsim-notice::before,
.site-flightsim-notice::after {
    content: "";
    width: min(5rem, 12vw);
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.65));
}

.site-flightsim-notice::after {
    transform: rotate(180deg);
}

.site-flightsim-notice-header {
    max-width: 80rem;
    margin: 0 auto;
    padding-top: 0.55rem;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.site-flightsim-notice-footer {
    margin: 0;
}

.site-footer-bottom {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
}

.site-footer-bottom > :last-child {
    justify-self: end;
}

@media (max-width: 640px) {
    .site-footer-bottom {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 0.85rem;
        text-align: center;
    }

    .site-footer-bottom > :last-child {
        justify-self: center;
    }
}

.site-nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    gap: 0.4rem;
    color: var(--site-text-secondary);
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.035em;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.25s ease;
}

.site-primary-navigation {
    align-items: center;
    gap: clamp(1.25rem, 2.15vw, 2rem);
}

.site-dropdown-chevron {
    width: 0.75rem;
    height: 0.75rem;
    transition: transform 0.2s ease;
}

.site-dropdown:hover .site-dropdown-chevron,
.site-dropdown.is-open .site-dropdown-chevron {
    transform: rotate(180deg);
}

.site-nav-link::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: #38bdf8;
    transition: width 0.25s ease;
}

.site-nav-link:hover,
.site-nav-link:focus-visible {
    color: #7dd3fc;
    transform: translateY(-3px);
    outline: none;
}

.site-nav-link:hover::after,
.site-nav-link:focus-visible::after,
body[data-current-page="home"] .site-nav-link[data-nav="home"]::after,
body[data-current-page="atc-roster"] .site-nav-link[data-nav="controller"]::after,
body[data-current-page="join-atc"] .site-nav-link[data-nav="controller"]::after,
body[data-current-page="apply"] .site-nav-link[data-nav="controller"]::after,
body[data-current-page="our-story"] .site-nav-link[data-nav="about"]::after,
body[data-current-page="staff"] .site-nav-link[data-nav="about"]::after,
body[data-current-page="privacy"] .site-nav-link[data-nav="about"]::after,
body[data-current-page="pilot-briefing"] .site-nav-link[data-nav="pilot"]::after,
body[data-current-page="gate-finder"] .site-nav-link[data-nav="pilot"]::after,
body[data-current-page="account"] .site-nav-link[data-nav="account"]::after {
    width: 100%;
}

body[data-current-page="home"] .site-nav-link[data-nav="home"],
body[data-current-page="atc-roster"] .site-nav-link[data-nav="controller"],
body[data-current-page="join-atc"] .site-nav-link[data-nav="controller"],
body[data-current-page="apply"] .site-nav-link[data-nav="controller"],
body[data-current-page="our-story"] .site-nav-link[data-nav="about"],
body[data-current-page="staff"] .site-nav-link[data-nav="about"],
body[data-current-page="privacy"] .site-nav-link[data-nav="about"],
body[data-current-page="pilot-briefing"] .site-nav-link[data-nav="pilot"],
body[data-current-page="gate-finder"] .site-nav-link[data-nav="pilot"],
body[data-current-page="account"] .site-nav-link[data-nav="account"] {
    color: #ffffff;
}

.site-dropdown {
    position: relative;
}

.site-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 12px;
    width: 220px;
    padding: 8px 0;
    background: rgba(15, 23, 42, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    z-index: 100;
}

.site-dropdown-menu::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 0;
    width: 100%;
    height: 12px;
}

.site-dropdown:hover .site-dropdown-menu,
.site-dropdown.is-open .site-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.site-dropdown-item {
    display: block;
    padding: 10px 16px;
    color: #cbd5e1;
    font-size: 0.8125rem;
    line-height: 1.45;
    transition: padding-left 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.site-dropdown-item:hover,
.site-dropdown-item:focus-visible {
    padding-left: 20px;
    color: #7dd3fc;
    background: rgba(56, 189, 248, 0.1);
    outline: none;
}

body[data-current-page="our-story"] .site-dropdown-item[data-page-link="our-story"],
body[data-current-page="atc-roster"] .site-dropdown-item[data-page-link="atc-roster"],
body[data-current-page="join-atc"] .site-dropdown-item[data-page-link="join-atc"],
body[data-current-page="staff"] .site-dropdown-item[data-page-link="staff"],
body[data-current-page="privacy"] .site-dropdown-item[data-page-link="privacy"],
body[data-current-page="pilot-briefing"] .site-dropdown-item[data-page-link="pilot-briefing"],
body[data-current-page="gate-finder"] .site-dropdown-item[data-page-link="gate-finder"] {
    color: #7dd3fc;
    background: rgba(56, 189, 248, 0.08);
}

.site-page-title {
    color: var(--site-text-primary);
    font-size: clamp(2.25rem, 4vw, 3.25rem) !important;
    line-height: 1.05;
    letter-spacing: -0.035em !important;
    text-wrap: balance;
}

.site-page-title.site-page-title-compact {
    font-size: clamp(2rem, 3.2vw, 2.625rem) !important;
    letter-spacing: -0.025em !important;
}

.site-page-eyebrow {
    color: #7dd3fc !important;
    font-size: 0.6875rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.18em !important;
}

.site-page-lead {
    color: var(--site-text-muted) !important;
    font-size: 0.9375rem;
    line-height: 1.65;
}

.home-brand-title {
    color: #ffffff;
    font-size: clamp(3rem, 4.7vw, 3.75rem) !important;
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -0.065em !important;
}

.home-brand-subtitle {
    margin-top: 0.75rem;
    color: #94a3b8;
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(0.7rem, 1.1vw, 0.875rem);
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1.5;
}

.home-sync-status {
    margin-top: 1.625rem;
}

.glass-card h2,
.glass-card h3 {
    text-wrap: balance;
}

.glass-card > p,
.glass-card header + p {
    color: var(--site-text-muted);
}

.site-social-btn {
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    background-color: #162032;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.18);
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

.site-social-btn:hover,
.site-social-btn:focus-visible {
    color: #7dd3fc;
    background-color: #1e293b;
    border-color: rgba(56, 189, 248, 0.4);
    transform: scale(1.12);
    outline: none;
}

.site-footer {
    color: #94a3b8;
    background: rgba(2, 6, 23, 0.88);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer-description-zh {
    color: #a8b4c7;
    font-size: 0.875rem;
    line-height: 1.75;
    white-space: nowrap;
}

.site-footer-description-en {
    color: #64748b;
    font-size: 0.75rem;
    line-height: 1.65;
}

.site-partners-title {
    display: flex;
    align-items: baseline;
    gap: 0.65rem;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.site-partners-title-en {
    color: #64748b;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.site-partner-card {
    min-height: 64px;
    padding: 0.6rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 41, 59, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 4px 14px rgba(0, 0, 0, 0.22);
    transition: transform 0.25s ease, border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.site-partner-card:hover,
.site-partner-card:focus-visible {
    transform: translateY(-3px);
    border-color: rgba(56, 189, 248, 0.65);
    background: rgba(51, 65, 85, 0.94);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 8px 22px rgba(14, 165, 233, 0.16);
    outline: none;
}

.site-partner-logo {
    max-height: 48px;
    max-width: 100%;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.9)) drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}


.site-sync-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    border: 1px solid currentColor;
    border-radius: 9999px;
    background: rgba(56, 189, 248, 0.08);
    color: #38bdf8;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1;
    text-transform: uppercase;
}

.site-sync-dot {
    width: 0.5rem;
    height: 0.5rem;
    flex: 0 0 auto;
    border-radius: 9999px;
    background: currentColor;
}

.site-sync-status[data-state="syncing"],
.site-sync-status[data-state="live"] {
    animation: site-sync-pulse 1.8s ease-in-out infinite;
}

.site-sync-status[data-state="live"] {
    background: rgba(52, 211, 153, 0.1);
    color: #34d399;
}

.site-sync-status[data-state="partial"],
.site-sync-status[data-state="stale"],
.site-sync-status[data-state="fallback"] {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
}

.site-sync-status[data-state="error"] {
    background: rgba(248, 113, 113, 0.1);
    color: #f87171;
}

@keyframes site-sync-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.65; }
}
