/* ========================================
   헤더 - 투명→고정 스타일
======================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

/* ========================================
   로고
======================================== */

.site-branding {
    flex-shrink: 0;
}

.logo-link {
    text-decoration: none;
    transition: opacity 0.3s;
}

.logo-link:hover {
    opacity: 0.8;
}

.logo-text {
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -1px;
    transition: color 0.3s;
}

.site-header.scrolled .logo-text {
    color: #1a1a1a;
}

/* ========================================
   메인 메뉴 (중앙)
======================================== */

.main-nav {
    display: flex;
    align-items: center;
    gap: 48px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
    letter-spacing: -0.3px;
    position: relative;
}

.nav-link:hover {
    color: #ffffff;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: #3b82f6;
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

.site-header.scrolled .nav-link {
    color: #4a5568;
}

.site-header.scrolled .nav-link:hover {
    color: #1a1a1a;
}

/* ========================================
   우측 액션 버튼
======================================== */

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

.search-toggle {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-toggle:hover {
    color: #ffffff;
}

.site-header.scrolled .search-toggle {
    color: #4a5568;
}

.site-header.scrolled .search-toggle:hover {
    color: #1a1a1a;
}

.login-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    transition: all 0.3s;
}

.login-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
}

.site-header.scrolled .login-link {
    color: #4a5568;
    border-color: #e2e8f0;
}

.site-header.scrolled .login-link:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
    color: #1a1a1a;
}

/* ========================================
   모바일 메뉴 버튼
======================================== */

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #ffffff;
    transition: all 0.3s;
}

.site-header.scrolled .mobile-menu-toggle span {
    background: #1a1a1a;
}

/* ========================================
   반응형 (태블릿)
======================================== */

@media (max-width: 1024px) {
    .header-container {
        padding: 0 30px;
    }

    .main-nav {
        gap: 32px;
    }
}

/* ========================================
   반응형 (모바일)
======================================== */

@media (max-width: 768px) {
    .header-container {
        padding: 0 20px;
    }

    .header-inner {
        height: 70px;
    }

    .main-nav {
        display: none;
    }

    .header-actions {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .logo-text {
        font-size: 1.4rem;
    }
}

/* ========================================
   모바일 메뉴 오버레이
======================================== */

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 320px;
    height: 100vh;
    background: #ffffff;
    z-index: 2000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: none;
    flex-direction: column;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
}

/* 모바일에서만 표시 */
@media (max-width: 768px) {
    .mobile-menu-overlay {
        display: flex;
    }
}

.mobile-menu-overlay.active {
    transform: translateX(0);
}

/* 배경 오버레이 */
body.mobile-menu-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    animation: fadeIn 0.3s ease;
}

body.mobile-menu-open {
    overflow: hidden;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 모바일 메뉴 헤더 */
.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
}

.mobile-menu-logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: -1px;
}

.mobile-menu-close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #4a5568;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.mobile-menu-close:hover {
    background: #f7fafc;
    color: #1a1a1a;
}

/* 모바일 메뉴 네비게이션 */
.mobile-menu-nav {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    border-radius: 12px;
    transition: all 0.2s;
}

.mobile-nav-link:hover {
    background: #f7fafc;
    color: #3b82f6;
}

.mobile-nav-link svg {
    color: #64748b;
    transition: color 0.2s;
}

.mobile-nav-link:hover svg {
    color: #3b82f6;
}

/* 모바일 메뉴 푸터 */
.mobile-menu-footer {
    padding: 24px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.mobile-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    background: #3b82f6;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 10px;
    transition: background 0.2s;
    margin-bottom: 16px;
}

.mobile-login-btn:hover {
    background: #2563eb;
}

.mobile-contact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
}

.mobile-contact span {
    color: #64748b;
}

.mobile-contact a {
    color: #1a1a1a;
    font-weight: 600;
    text-decoration: none;
}

/* 햄버거 버튼 애니메이션 */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

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

