/* 기본 리셋 및 폰트 설정 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 모달 스타일 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
}

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

.back-btn {
    cursor: pointer;
    color: #666;
}

.notification-settings .setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.notification-settings .setting-item:last-child {
    border-bottom: none;
}

.notification-settings h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.notification-settings p {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

/* 스위치 스타일 */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* 헤더 스타일 */
.header {
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    width: 100%;
}

.header-container {
    max-width: 100vw;
    margin: 0 auto;
    padding: 0 20px;
}

/* 상단 헤더 바 (3분할 구조) */
.header-top {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 15px 20px;
    min-height: 70px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 좌측: 햄버거 메뉴 */
.header-left {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.hamburger-menu {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.hamburger-menu:hover {
    background-color: #f5f5f5;
}

.hamburger-icon {
    font-size: 20px;
    color: #333;
    display: block;
    line-height: 1;
}

/* 중앙: 로고 */
.header-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo a {
    display: block;
    line-height: 1;
}

.logo img {
    height: 40px;
    width: auto;
    display: block;
}

/* 우측: LOGIN/JOIN/검색 */
.header-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
}

.auth-links {
    display: flex;
    gap: 15px;
    align-items: center;
}

.auth-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.auth-link:hover {
    background-color: #f5f5f5;
    color: #007bff;
}

.search-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    color: #333;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background-color: #f5f5f5;
    color: #007bff;
}

/* 하단: 네비게이션 메뉴 */
.header-bottom {
    border-top: 1px solid #f0f0f0;
    padding: 0;
    width: 100%;
}

.main-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: block;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    padding: 18px 30px;
    transition: all 0.3s ease;
    position: relative;
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.nav-menu a:hover {
    color: #007bff;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #007bff;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-menu a:hover::after {
    width: 80%;
}

/* 모바일 사이드 메뉴 */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background-color: #fff;
    z-index: 1000;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.mobile-sidebar.active {
    left: 0;
}

.sidebar-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.sidebar-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
    padding: 5px;
    line-height: 1;
}

.sidebar-nav {
    padding: 20px 0;
}

.sidebar-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-nav li {
    border-bottom: 1px solid #f0f0f0;
}

.sidebar-nav a {
    display: block;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    padding: 15px 20px;
    transition: all 0.3s ease;
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.sidebar-nav a:hover {
    background-color: #f5f5f5;
    color: #007bff;
}

/* 사이드 메뉴 오버레이 */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 기존 헤더 스타일 제거 */
.header-content {
    display: none;
}

.header-actions {
    display: none;
}

.search-box {
    display: none;
}

.cart {
    display: none;
}

.auth-buttons {
    display: none;
}

.login-btn, .join-btn {
    display: none;
}

.mobile-menu-btn {
    display: none;
}

/* 공통 히어로 섹션 (index 페이지 제외) */
.common-hero-section {
    position: relative;
    padding: 80px 0 40px;
    background-color: #1a1a2e;
    color: white;
    overflow: hidden;
    min-height: 300px;
    display: flex;
    align-items: center;
}

/* 페이지별 히어로 배경 이미지 */
.hero-background-products {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/products/hero_product.png');
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
    z-index: 1;
}

.hero-background-service {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/service/hero_service.png');
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
    z-index: 1;
}

.hero-background-contact {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/contact/hero_contact.png');
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
    z-index: 1;
}

.hero-background-qna {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/qna/hero_qna.png');
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
    z-index: 1;
}

.hero-background-usecase {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/usecase/hero_usecase.png');
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
    z-index: 1;
}

.common-hero-section .container {
    position: relative;
    z-index: 2;
}

.common-hero-content {
    max-width: 800px;
    margin: 0;
    text-align: left;
}

.common-hero-text h1 {
    font-size: 42px;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.2;
}

.common-hero-text p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
}

/* 푸터 */
.footer {
    background-color: #333;
    color: #ccc;
    padding: 40px 0;
    text-align: center;
}

.footer-content p {
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.6;
}

/* 반응형 */
@media (max-width: 1024px) {
    /* 헤더 반응형 */
    .header-top {
        padding: 12px 0;
        min-height: 60px;
    }
    
    .logo img {
        height: 36px;
    }
    
    .nav-menu a {
        padding: 15px 25px;
        font-size: 14px;
    }
    
    .auth-link {
        font-size: 13px;
        padding: 6px 10px;
    }
    
    .search-btn {
        padding: 6px;
    }
    
    .search-btn svg {
        width: 18px;
        height: 18px;
    }
    .common-hero-section {
        padding: 70px 0 35px;
        min-height: 280px;
    }
    
    .common-hero-text h1 {
        font-size: 36px;
        margin-bottom: 16px;
    }
    
    .common-hero-text p {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .common-hero-section {
        padding: 60px 0 30px;
        min-height: 250px;
    }
    
    .common-hero-text h1 {
        font-size: 28px;
        margin-bottom: 14px;
        text-align: left;
    }
    
    .common-hero-text p {
        font-size: 15px;
        text-align: left;
    }
    
    .common-hero-content {
        text-align: left;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .common-hero-section {
        padding: 50px 0 25px;
        min-height: 200px;
    }
    
    .common-hero-text h1 {
        font-size: 24px;
        margin-bottom: 12px;
        text-align: left;
    }
    
    .common-hero-text p {
        font-size: 14px;
        text-align: left;
    }

    .footer {
        padding: 30px 0;
    }
    
    .footer-content p {
        font-size: 12px;
    }
}
