/* 모바일 헤더 전용 스타일 */
.header-mobile {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: url('/static/img/renew/header_background.png') center center;
    background-size: cover;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Top Bar */
.header-mobile-top {
    padding: 8px 0;
    backdrop-filter: blur(5px);
}

.header-mobile-top__inner {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 15px;
}

.header-mobile-top__content {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.header-mobile-top__menu {
    position: relative;
    font-size: 7px;
    color: white;
    text-decoration: none;
    padding: 4px 6px;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.header-mobile-top__menu + .header-mobile-top__menu {
    margin-left: 3px;
}

.header-mobile-top__menu + .header-mobile-top__menu::before {
    position: absolute;
    top: 50%;
    left: -3px;
    width: 3px;
    height: 3px;
    background: #adaae1;
    border-radius: 50%;
    content: '';
    transform: translateY(-50%);
}

.header-mobile-top__menu:hover {
    background: rgba(233, 236, 239, 0.8);
    color: #1a252f;
}

/* Main Header */
.header-mobile-main {
    backdrop-filter: blur(10px);
}

.header-mobile-main__inner {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.header-mobile-logo {
    flex: 1;
}

.header-mobile-logo__link {
    display: block;
    width: 400px; /* 더욱 크게 조정 */
    height: 140px; /* 높이도 비례적으로 증가 */
}

.header-mobile-logo__img {
    display: block;
    width: 80%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

/* Hamburger Menu Button */
.header-mobile-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    /* transition: background 0.2s ease; - 모바일에서 제거 */
}

/* .header-mobile-menu-btn:hover {
    background: rgba(248, 249, 250, 0.8);
} - 모바일에서 호버 효과 제거 */

/* 모바일 햄버거 버튼 터치 최적화 */
.header-mobile-menu-btn {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-width: 44px; /* iOS 권장 최소 터치 영역 */
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 터치 피드백 */
.header-mobile-menu-btn:active {
    background: rgba(248, 249, 250, 0.5);
    transform: scale(0.95);
    transition: all 0.1s ease;
}

.hamburger-line {
    width: 22px;
    height: 2px;
    background: #ffffff;
    margin: 2px 0;
    transition: all 0.3s ease;
    border-radius: 1px;
}

.header-mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.header-mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.header-mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Navigation Overlay */
.header-mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.header-mobile-nav-overlay.active {
    visibility: visible;
    opacity: 1;
}

.header-mobile-nav {
    position: absolute;
    top: 0;
    right: 0;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

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

/* Navigation Header */
.header-mobile-nav__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.header-mobile-nav__header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.header-mobile-nav__close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
}

/* Navigation Content */
.header-mobile-nav__content {
    padding: 20px 0;
}

.header-mobile-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.header-mobile-nav__item {
    border-bottom: 1px solid #f1f3f5;
}

.header-mobile-nav__link,
.header-mobile-nav__toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 15px 20px;
    color: #2c3e50;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease;
}

.header-mobile-nav__link:hover,
.header-mobile-nav__toggle:hover {
    background: #f8f9fa;
}

.toggle-icon {
    font-size: 12px;
    color: #6c757d;
    transition: transform 0.2s ease;
}

/* Submenu */
.header-mobile-nav__submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #f8f9fa;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.header-mobile-nav__submenu.active {
    max-height: 300px;
}

.header-mobile-nav__sublink {
    display: block;
    padding: 12px 20px 12px 40px;
    color: #6c757d;
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.header-mobile-nav__sublink:hover {
    background: #e9ecef;
    color: #495057;
}

/* Extra Menu */
.header-mobile-nav__extra {
    margin-top: 20px;
    padding: 0 20px;
    border-top: 1px solid #e9ecef;
    padding-top: 20px;
}

.header-mobile-nav__extra-link {
    display: block;
    padding: 12px 0;
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

/* Mobile Sitemap Modal */
.mobile-sitemap-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-sitemap-modal.show {
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 1;
}

.mobile-sitemap-modal-content {
    background-color: #fff;
    margin: 5% auto;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(-50px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-sitemap-modal.show .mobile-sitemap-modal-content {
    transform: translateY(0);
    opacity: 1;
}

.mobile-sitemap-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.mobile-sitemap-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.mobile-sitemap-header .close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
}

.mobile-sitemap-content {
    padding: 20px;
}

.mobile-sitemap-section {
    margin-bottom: 25px;
}

.mobile-sitemap-section:last-child {
    margin-bottom: 0;
}

.mobile-sitemap-section h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    padding-bottom: 8px;
    border-bottom: 2px solid #e3f2fd;
}

.mobile-sitemap-section ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-sitemap-section li {
    margin-bottom: 8px;
}

.mobile-sitemap-section a {
    display: block;
    padding: 8px 12px;
    color: #6c757d;
    text-decoration: none;
    font-size: 14px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.mobile-sitemap-section a:hover {
    background: #f8f9fa;
    color: #495057;
}

/* 반응형 조정 */
@media (max-width: 480px) {
    .header-mobile-nav {
        width: 90%;
    }
    
    .header-mobile-logo__link {
        width: 150px;
        height: 55px;
    }
    
    .header-mobile-top__menu {
        font-size: 7px;
        padding: 3px 5px;
        color: #ffffff;
    }
    
    .mobile-sitemap-modal-content {
        margin: 10% auto;
        width: 95%;
    }
}

/* 작은 화면에서의 추가 조정 */
@media (max-width: 360px) {
    .header-mobile-nav {
        width: 95%;
    }
    
    .header-mobile-top__content {
        gap: 6px;
    }
    
    .header-mobile-top__menu {
        font-size: 7px;
        padding: 2px 6px;
    }
}

/* 모바일에서 호버 효과 완전 비활성화 */
@media (max-width: 768px) {
    .header-mobile-top__menu:hover,
    .header-mobile-menu-btn:hover,
    .header-mobile-nav__link:hover,
    .header-mobile-nav__toggle:hover,
    .header-mobile-nav__sublink:hover,
    .mobile-sitemap-section a:hover {
        background-color: initial !important;
        color: initial !important;
        transform: none !important;
        background: none !important;
    }
    
    /* 햄버거 버튼 호버 효과 완전 제거 */
    .header-mobile-menu-btn:hover {
        background: none !important;
        transform: none !important;
    }
}

/* 작은 화면에서 로고 크기 조정 */
@media (max-width: 480px) {
    .header-mobile-logo__link {
        width: 300px; /* 작은 화면에서는 조금 줄임 */
        height: 75px;
    }
    
    .header-mobile-main {

    }
}

@media (max-width: 360px) {
    .header-mobile-logo__link {
        width: 250px; /* 매우 작은 화면에서는 더 줄임 */
        height: 90px;
    }
    
    .header-mobile-main {

    }
}
