/* Header Styles */
.header {
    background-color: #ffffff;
    padding: 30px 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 60px;
}

.logo {
    font-size: 28px;
    font-weight: 900;
    color: #1A2D4F;
    letter-spacing: -0.5px;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.logo:hover {
    opacity: 0.7;
}

.nav-menu {
    display: flex;
    gap: 40px;
}

.nav-item {
    text-decoration: none !important;
    color: #666;
    font-size: 18px;
    font-weight: 500;
    transition: color 0.3s ease;
    border: none;
    outline: none;
}

.nav-item:link,
.nav-item:visited {
    text-decoration: none !important;
    color: #666;
}

.nav-item:hover {
    color: #1a3353;
    text-decoration: none !important;
}

.nav-item.active {
    color: #254681 !important;
    font-weight: 700;
    text-decoration: none !important;
}

.nav-item.active:visited {
    color: #254681 !important;
    text-decoration: none !important;
}

.nav-item:focus {
    outline: none;
    text-decoration: none !important;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-right > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mypage-link {
    text-decoration: none !important;
    color: #666;
    font-size: 18px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.mypage-link:link,
.mypage-link:visited {
    text-decoration: none !important;
    color: #666;
}

.mypage-link:hover {
    color: #1a3353;
    text-decoration: none !important;
}

.mypage-link:focus {
    outline: none;
    text-decoration: none !important;
}

.user-name {
    color: #333;
    font-size: 16px;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background-color: transparent;
    border: none;
    border-radius: 4px;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background-color: #f8f8f8;
    color: #333;
}

.logout-btn:focus {
    outline: none;
}

.logout-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.hamburger-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 88px;
    right: 0;
    width: 250px;
    height: calc(100vh - 88px);
    background-color: #ffffff;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 99;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mobile-nav-item {
    text-decoration: none !important;
    color: #666;
    font-size: 18px;
    font-weight: 500;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-nav-item.active {
    color: #254681 !important;
    font-weight: 700;
}

.mobile-user-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-user-name {
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

.mobile-logout-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px;
    background-color: #f8f8f8;
    border: none;
    border-radius: 4px;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    justify-content: center;
}

.mobile-logout-btn .logout-icon {
    width: 16px;
    height: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        padding: 35px 20px;
        justify-content: center;
        position: relative;
    }

    .header-left {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .logo {
        /* 모바일에서는 header-left가 중앙 정렬을 담당 */
    }

    .desktop-nav,
    .desktop-header-right {
        display: none !important;
    }

    .mobile-menu-btn {
        display: block;
        position: absolute;
        right: 20px;
    }

    .mobile-menu {
        display: block;
    }
}

/* 초소형 모바일 (Z폴드 외부 화면, 구형 iPhone) */
@media (max-width: 400px) {
    .mobile-menu {
        width: 85%;
        max-width: 300px;
    }

    .header-left {
        gap: 20px;
    }

    .logo {
        font-size: 20px;
    }

    .header {
        padding: 15px 10px;
    }
}