/* AIR & SPACE Korea shared public header */
@font-face {
    font-family: 'Inter';
    src: url('fonts/Inter/Inter-VariableFont_opsz,wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

header {
    background-color: var(--header-bg);
    color: var(--header-text);
    width: 100%;
    border-bottom: 1px solid var(--border-color, #2a2a2a);
    position: relative;
    z-index: 100;
}

header .header-inner {
    width: 100%;
    margin: 0;
    position: relative;
}

header .brand-bar {
    padding: 30px 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

header .logo-wrapper {
    text-align: center;
}

header .logo {
    font-family: 'Inter', sans-serif;
    font-size: 3.2rem;
    font-weight: 300;
    font-style: italic;
    line-height: 1;
    letter-spacing: -1px;
    text-decoration: none;
    text-transform: uppercase;
    color: var(--header-text);
    display: inline-block;
}

header .logo span {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 300;
    font-style: italic;
    letter-spacing: 0.5px;
    color: #888;
    margin-left: 12px;
    text-transform: none;
    display: inline-block;
    transform: translateY(-4px);
}

header .utility-icons {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 20px;
}

header .header-beta {
    position: absolute;
    right: max(20px, calc((100vw - min(100vw, var(--content-width))) / 2 + 20px));
    bottom: 2px;
    color: rgba(255, 255, 255, 0.92);
    font-family: 'Inter', 'Noto Sans KR', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1;
    white-space: nowrap;
    pointer-events: none;
}

header .icon-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

header .icon-btn:hover {
    opacity: 1;
}

header .icon-svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

header .nav-bar {
    border-top: 1px solid transparent;
    padding-bottom: 15px;
    width: 100%;
    display: flex;
    justify-content: center;
}

header .nav-container {
    width: 100%;
    max-width: var(--header-content-width, 1200px);
    padding: 0 20px;
    box-sizing: border-box;
    display: flex;
    justify-content: flex-start;
    position: relative;
}

header .nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: clamp(24px, 3vw, 42px);
    flex-wrap: nowrap;
    line-height: 20px;
}

header .menu-btn {
    display: inline;
    background: transparent;
    border: none;
    color: var(--nav-text-color);
    font-family: 'Inter', sans-serif;
    /* Keep every page aligned with the home page even if its root font size changes. */
    font-size: 15.2px;
    font-weight: 600;
    line-height: normal;
    /* Halve the marker-to-label gap while preserving the menu's total height. */
    padding: 7.5px 0 27.5px;
    cursor: pointer;
    transition: color 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    text-decoration: none;
}

header .menu-btn:hover,
header .menu-btn.active {
    color: var(--accent-color);
}

header .menu-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-color);
    opacity: 0;
    transition: opacity 0.2s;
}

header .menu-btn:hover::before,
header .menu-btn.active::before {
    opacity: 1;
}

header .nav-item {
    position: relative;
}

header .dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 15px);
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    background-color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 10px 0;
    flex-direction: column;
    animation: fadeIn 0.2s;
}

header .dropdown::before {
    content: '';
    position: absolute;
    left: -1px;
    right: -1px;
    top: -16px;
    height: 16px;
}

header .nav-item:hover .dropdown,
header .nav-item:focus-within .dropdown {
    display: flex;
}

header .dropdown a {
    padding: 10px 20px;
    color: #1a1a1a;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

header .dropdown a:hover {
    background-color: #f5f5f5;
    color: var(--accent-color);
}

header .menu-btn:focus-visible,
header .icon-btn:focus-visible,
.mobile-menu-trigger:focus-visible,
.offcanvas-close:focus-visible,
.accordion-btn:focus-visible,
.offcanvas-link:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 4px;
}

.mobile-menu-trigger {
    display: none;
    position: absolute;
    left: 12px;
    top: 50%;
    width: 42px;
    height: 42px;
    padding: 10px;
    border: 0;
    background: transparent;
    color: #fff;
    transform: translateY(-50%);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.mobile-menu-trigger span {
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
}

.offcanvas {
    position: fixed;
    top: 0;
    left: -400px;
    width: 350px;
    height: 100%;
    background-color: #fff;
    z-index: 10000;
    transition: left 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
}

.offcanvas.open {
    left: 0;
}

.offcanvas-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.offcanvas-overlay.show {
    opacity: 1;
    visibility: visible;
}

.offcanvas-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.offcanvas-header .logo {
    font-family: 'Inter', sans-serif;
    font-size: 1.8rem;
    font-weight: 300;
    font-style: italic;
    line-height: 1;
    letter-spacing: -1px;
    text-decoration: none;
    text-transform: uppercase;
    color: #1a1a1a;
}

.offcanvas-header .logo span {
    font-size: 0.8rem;
    color: #888;
    margin-left: 6px;
}

.offcanvas-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #1a1a1a;
    padding: 0;
    line-height: 1;
}

.offcanvas-close:focus-visible,
.accordion-btn:focus-visible,
.offcanvas-link:focus-visible {
    outline-color: var(--accent-color);
}

.offcanvas-body {
    padding: 20px;
    flex-grow: 1;
}

.offcanvas-nav,
.accordion-content {
    list-style: none;
    margin: 0;
}

.offcanvas-nav {
    padding: 0;
}

.accordion-item {
    border-bottom: 1px solid #f0f0f0;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.offcanvas-link {
    text-decoration: none;
    color: #1a1a1a;
    font-family: 'Inter', 'Noto Sans KR', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    text-transform: uppercase;
    transition: color 0.3s;
}

.offcanvas-link:hover {
    color: var(--accent-color);
}

.accordion-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-btn {
    transform: rotate(45deg);
    color: var(--accent-color);
}

.accordion-content {
    padding: 0 0 15px 15px;
    display: none;
}

.accordion-item.active .accordion-content {
    display: block;
}

.accordion-content li {
    padding: 8px 0;
}

.accordion-content a {
    text-decoration: none;
    color: #666;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 1.05rem;
}

.accordion-content a:hover {
    color: var(--accent-color);
}

.offcanvas-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    background-color: #fafafa;
}

.offcanvas-util-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.offcanvas-util-links a {
    text-decoration: none;
    color: #1a1a1a;
    font-size: 0.9rem;
    font-weight: 600;
}

.offcanvas-social {
    display: flex;
    gap: 15px;
}

.offcanvas-social a {
    color: #666;
    font-size: 1.2rem;
    text-decoration: none;
}

@media (max-width: 820px) {
    header .brand-bar {
        min-height: 72px;
        padding: 10px 58px;
        box-sizing: border-box;
    }

    header .logo-wrapper {
        width: 100%;
        flex: none;
    }

    header .logo {
        font-size: clamp(1.8rem, 8vw, 2.35rem);
        white-space: nowrap;
    }

    header .logo span {
        margin-left: 7px;
        font-size: 0.78rem;
    }

    header .utility-icons {
        right: 12px;
        top: 50%;
        margin: 0;
        padding: 0;
        transform: translateY(-50%);
    }

    header .header-beta,
    header .nav-bar {
        display: none;
    }

    .mobile-menu-trigger {
        display: inline-flex;
    }

    .offcanvas {
        width: min(88vw, 360px);
        max-width: 360px;
    }
}
