@charset "UTF-8";
/**
 * 헤더 & 네비게이션 스타일
 */

/* 헤더 */
.site-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 72px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 로고 */
.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    flex-shrink: 0;
}

.site-logo img {
    height: 40px;
    width: auto;
}

.site-logo span {
    font-size: var(--font-lg);
    font-weight: 700;
    letter-spacing: -0.3px;
}

/* PC 네비게이션 */
.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    position: relative;
    padding: 10px 16px;
    color: var(--text-secondary);
    font-size: var(--font-base);
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 16px;
    right: 16px;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
    transform: scaleX(0);
    transition: transform var(--transition);
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-card);
    opacity: 1;
}

.nav-link:hover::after {
    transform: scaleX(1);
}

/* 드롭다운 메뉴 */
.nav-dropdown {
    position: relative;
}

.dropdown-trigger {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.dropdown-trigger .arrow {
    font-size: 10px;
    margin-left: 4px;
    opacity: 0.6;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 160px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    box-shadow: var(--shadow-md);
    z-index: 200;
}

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

.dropdown-menu a {
    display: block;
    padding: 10px 16px;
    color: var(--text-secondary);
    font-size: var(--font-sm);
    transition: background var(--transition), color var(--transition);
}

.dropdown-menu a:hover {
    background: var(--bg-card);
    color: var(--text-primary);
    opacity: 1;
}

/* 테마 토글 스위치 */
.theme-switch {
    position: relative;
    width: 52px;
    height: 28px;
    margin-left: 12px;
    cursor: pointer;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-slider {
    position: absolute;
    inset: 0;
    background: #1e293b;
    border-radius: 14px;
    transition: background 0.3s;
}

.theme-slider::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.theme-slider .icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-size: contain;
    transition: opacity 0.3s;
}

.theme-slider .icon-sun {
    left: 6px;
    opacity: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='4' fill='%23f59e0b'/%3E%3Cpath d='M12 2v4M12 18v4M4 12H2M22 12h-2M5.6 5.6L8 8M16 16l2.4 2.4M5.6 18.4L8 16M16 8l2.4-2.4' stroke='%23f59e0b' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center;
}

.theme-slider .icon-moon {
    right: 6px;
    opacity: 1;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fcd34d'%3E%3Cpath d='M21 12.79A9 9 0 1111.21 3a7 7 0 009.79 9.79z'/%3E%3C/svg%3E") no-repeat center;
}

/* 라이트 모드 */
[data-theme="light"] .theme-slider {
    background: #f0d9b5;
}

[data-theme="light"] .theme-slider::before {
    transform: translateX(24px);
}

[data-theme="light"] .theme-slider .icon-sun {
    opacity: 1;
}

[data-theme="light"] .theme-slider .icon-moon {
    opacity: 0;
}

/* 햄버거 버튼 */
.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}

.menu-toggle:hover {
    background: var(--bg-card);
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
    transition: transform 0.3s, opacity 0.3s;
}

.menu-toggle span:nth-child(2) {
    margin: 6px 0;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* 모바일 오버레이 */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 98;
    opacity: 0;
    transition: opacity 0.3s;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.nav-overlay.active {
    opacity: 1;
}

/* 반응형 - 모바일 */
@media (max-width: 768px) {
    .header-inner {
        height: 56px;
        padding: 0 16px;
    }

    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .nav-overlay {
        display: block;
        pointer-events: none;
    }

    .nav-overlay.active {
        pointer-events: auto;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: 0;
        width: min(300px, 85vw);
        height: 100vh;
        height: 100dvh;
        background: var(--bg-secondary);
        flex-direction: column;
        align-items: stretch;
        padding: 80px 20px 32px;
        gap: 4px;
        z-index: 99;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        border-left: 1px solid var(--border);
        overflow-y: auto;
    }

    .main-nav.active {
        transform: translateX(0);
    }

    .nav-link {
        padding: 16px;
        font-size: var(--font-md);
        border-radius: var(--radius);
    }

    .nav-link::after {
        display: none;
    }

    .nav-link:hover,
    .nav-link:active {
        background: var(--bg-card);
    }

    /* 모바일 드롭다운 */
    .nav-dropdown {
        width: 100%;
    }

    .dropdown-trigger {
        width: 100%;
        text-align: left;
        justify-content: space-between;
        display: flex;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        border: none;
        box-shadow: none;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        background: var(--bg-card);
        border-radius: var(--radius);
        margin-top: 4px;
    }

    .nav-dropdown.open .dropdown-menu {
        max-height: 300px;
    }

    .dropdown-menu a {
        padding-left: 24px;
    }

    .theme-switch {
        margin: 16px auto 0;
    }
}