:root {
    --primary: #034ea2;
    --text-primary: #333;
    --text-secondary: #666;
    --bg-light: #f8f8f8;
    --border-light: #eaeaea;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    margin: 0;
    padding: 0;
    color: var(--text-primary);
    background-color: #fff;
}

/* 상단 메뉴 스타일 */
.top-menu {
    display: flex;
    justify-content: flex-end;
    padding: 0;
    background: white;
    border-bottom: 1px solid var(--border-light);
}

.top-menu ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.top-menu li {
    margin: 0;
}

.top-menu a {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.top-menu a:hover {
    color: var(--primary);
}

/* 카테고리 메뉴 스타일 */
.category-nav {
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    background: #fff;
}

.category-menu {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.category-menu::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.category-item {
    flex: 0 0 auto;
    padding: 15px 0;
    text-align: center;
    border-right: 1px solid var(--border-light);
    min-width: 200px;
}

.category-item:first-child {
    border-left: 1px solid var(--border-light);
    background-color: #f9f9f9;
}

.category-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 5px;
}

.category-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 메인 슬라이더 스타일 */
.main-slider {
    position: relative;
    overflow: hidden;
}

.slider-container {
    position: relative;
    height: 400px;
}

.slider-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: flex;
}

.slider-item.active {
    opacity: 1;
}

.slider-text {
    flex: 1;
    background: var(--primary);
    color: white;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.slider-text h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
}

.slider-text p {
    font-size: 16px;
    margin-bottom: 20px;
}

.slider-date {
    font-size: 14px;
    opacity: 0.8;
}

.slider-image {
    flex: 1.5;
    position: relative;
}

.slider-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.slider-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
}

.slider-arrow {
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    margin: 0 5px;
}

.slider-indicators {
    display: flex;
    margin: 0 10px;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    margin: 0 3px;
    cursor: pointer;
}

.indicator.active {
    background: white;
}

/* 섹션 스타일 */
.section {
    padding: 40px 0;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.view-all {
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
}

/* 뉴스 그리드 스타일 */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.news-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.news-image {
    height: 160px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-item:hover .news-image img {
    transform: scale(1.05);
}

.news-content {
    padding: 15px;
}

.news-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
}

.news-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    line-height: 1.4;
}

.news-date {
    font-size: 12px;
    color: #999;
}

/* 외신 섹션 스타일 */
.global-news {
    background: var(--bg-light);
}

.tab-container {
    border: 1px solid var(--border-light);
}

.tab-header {
    display: flex;
}

.tab {
    padding: 15px 25px;
    background: white;
    border-right: 1px solid var(--border-light);
    font-weight: 700;
    cursor: pointer;
}

.tab.active {
    background: var(--primary);
    color: white;
}

.tab-content {
    padding: 15px 20px;
    background: white;
}

.global-news-item {
    padding: 15px 0;
    display: flex;
    align-items: center;
}

.global-news-title {
    flex: 1;
    font-size: 16px;
    line-height: 1.4;
}

/* 동영상 섹션 스타일 */
.video-section {
    background: white;
}

.video-container {
    position: relative;
    width: 100%;
    max-height: 400px;
    overflow: hidden;
    border-radius: 8px;
}

.video-container img {
    width: 100%;
    display: block;
}

.video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    cursor: pointer;
}

/* 반응형 스타일 */
@media (max-width: 768px) {
    .slider-container {
        height: auto;
    }
    
    .slider-item {
        flex-direction: column;
        position: relative;
    }
    
    .slider-text,
    .slider-image {
        flex: none;
    }
    
    .slider-text {
        padding: 20px;
    }
    
    .slider-text h2 {
        font-size: 20px;
    }
    
    .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 576px) {
    .top-menu a {
        padding: 10px;
        font-size: 12px;
    }
    
    .category-item {
        min-width: 120px;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .slider-text h2 {
        font-size: 18px;
    }
    
    .slider-text p {
        font-size: 14px;
    }
}

/* 구독 팝업 스타일 */
.subscribe-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease-in-out;
}

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

.subscribe-popup {
    background-color: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.subscribe-overlay.active .subscribe-popup {
    transform: scale(1);
}

.subscribe-header {
    padding: 15px 20px;
    background-color: #034ea2;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.subscribe-header h3 {
    margin: 0;
    font-size: 18px;
}

.close-popup {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
}

.subscribe-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 15px;
}

#subscriber-email {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
}

.subscribe-submit-btn {
    background-color: #034ea2;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 12px 20px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: background-color 0.2s;
}

.subscribe-submit-btn:hover {
    background-color: #023b7c;
}

.subscribe-submit-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.btn-loader {
    display: none;
}

.subscribe-submit-btn.loading .btn-text {
    visibility: hidden;
}

.subscribe-submit-btn.loading .btn-loader {
    display: block;
    position: absolute;
}

#subscribe-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
}

.error-message {
    background-color: #fce4e4;
    border: 1px solid #fcc2c3;
    color: #cc0033;
}

.success-message {
    background-color: #e7f7e8;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.no-scroll {
    overflow: hidden;
}

@media (max-width: 480px) {
    .subscribe-popup {
        width: 95%;
    }
}

/* 모바일 메뉴 토글 버튼 - 기본적으로 숨김 */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
}

/* 모바일에서만 버튼 표시 */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    header nav.nav-links {
        display: none !important; /* !important로 우선 적용 */
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background-color: #1b1e23;
        box-shadow: 0 5px 10px rgba(0,0,0,0.2);
        z-index: 999;
    }
    
    header nav.nav-links.active {
        display: block !important;
    }
    
    header nav.nav-links ul {
        flex-direction: column;
        width: 100%;
        margin: 0;
        padding: 0;
    }
    
    header nav.nav-links ul li {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    header nav.nav-links ul li a {
        padding: 15px 20px;
        width: 100%;
        text-align: left;
    }
}

/* 헤더 스타일 */
header {
    background-color: #1b1e23;
    padding: 12px 0;
}

.container.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
    position: relative;
}

header nav.nav-links {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

header nav.nav-links ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

header nav.nav-links ul li a {
    display: block;
    padding: 15px 20px;
    color: #fff;
    text-decoration: none;
    transition: color 0.2s ease;
}

header nav.nav-links ul li a:hover {
    color: #ccc;
}