/* ===== 배너 광고 스타일 ===== */
.banner-wrapper {
    display: block;
    width: 100%;
    overflow: hidden;
}

/* 기본 배너 영역 (배너가 없을 때) */
.default-banner {
    background: #f8f8f8;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    border: 1px solid #e5e5e5;
}

.banner-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

.banner-wrapper a {
    display: block;
}

/* 기존 광고 placeholder 숨기기 */
.banner-content p,
.sidebar-ad p {
    display: none;
}

.banner-content:has(.banner-wrapper) {
    background: transparent;
    border: none;
    padding: 0;
}

.sidebar-ad:has(.banner-wrapper) {
    background: transparent;
    border: none;
    padding: 0;
    height: auto;
}

/* 배너 위치별 스타일 */
.top-banner-ad .banner-wrapper {
    max-width: 728px;
    margin: 0 auto;
}

.middle-banner-ad .banner-wrapper {
    max-width: 728px;
    margin: 20px auto;
}

.sidebar .banner-wrapper {
    max-width: 300px;
    margin: 0;
}

/* 세로 배너 기본 스타일 */
.vertical-banner {
    min-height: 600px;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    border: 1px solid #e5e5e5;
}

.vertical-banner.has-banner {
    background: transparent;
    border: none;
}

/* 반응형 */
@media (max-width: 1400px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .left-banner,
    .right-banner {
        display: none;
    }
    
    .main-section {
        max-width: 900px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .banner-wrapper img {
        max-height: 100px;
    }
    
    .sidebar .banner-wrapper {
        max-width: 100%;
    }
}/* 머니투데이 스타일 CSS */
:root {
    --primary-color: #1e3a5f;
    --secondary-color: #dc3545;
    --accent-color: #ff6b35;
    --text-color: #333;
    --text-light: #666;
    --border-color: #e1e1e1;
    --bg-gray: #f8f9fa;
    --white: #ffffff;
    --black: #000000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Malgun Gothic', '맑은 고딕', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: #fff;
}

a {
    text-decoration: none;
    color: inherit;
}

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

/* 광고 팝업 */
.ad-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.ad-popup.active {
    display: flex;
}

.ad-content {
    background: white;
    padding: 20px;
    border-radius: 5px;
    max-width: 600px;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.ad-placeholder {
    min-height: 300px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

/* 전체 화면 오버레이 팝업 */
.overlay-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.overlay-popup.active {
    display: block;
}

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

.overlay-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

.overlay-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        transform: translate(-50%, -40%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

.overlay-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 10;
    transition: all 0.3s;
}

.overlay-close:hover {
    background: var(--secondary-color);
    color: white;
    transform: rotate(90deg);
}

.overlay-ad {
    position: relative;
    overflow: hidden;
    background: #f0f0f0;
}

.overlay-ad img {
    width: 100%;
    height: 450px;
    object-fit: cover;
}

.overlay-ad-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #999;
    font-size: 36px;
    font-weight: bold;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px 40px;
    border-radius: 8px;
}

/* 기존 overlay-text, overlay-cta 스타일 제거 후 새로운 스타일 */

.overlay-footer {
    padding: 15px 20px;
    background: var(--bg-gray);
    border-top: 1px solid var(--border-color);
}

.today-close {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-color);
}

.today-close input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.today-close:hover {
    color: var(--primary-color);
}

/* 상단 띠배너 광고 - 숨김 처리 */
.top-banner-ad {
    display: none;
}

.banner-content {
    height: 90px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

/* 헤더 */
.main-header {
    background: white;
    position: relative;  /* fixed에서 relative로 변경 - 스크롤 시 따라오지 않음 */
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.header-top {
    border-bottom: 1px solid var(--border-color);
    padding: 8px 0;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-left {
    font-size: 13px;
    color: var(--text-light);
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-light);
    transition: all 0.3s;
}

.social-icon:hover {
    transform: scale(1.1);
}

.social-icon.facebook:hover {
    background: #1877f2;
    color: white;
    border-color: #1877f2;
}

.social-icon.instagram:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    color: white;
    border-color: transparent;
}

.social-icon.youtube:hover {
    background: #ff0000;
    color: white;
    border-color: #ff0000;
}

.social-icon.blog:hover {
    background: #20c997;
    color: white;
    border-color: #20c997;
}

/* 헤더 메인 */
.header-main {
    padding: 20px 0;
}

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.logo-text {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary-color);
}

.logo-sub {
    font-size: 18px;
    color: var(--accent-color);
    font-weight: normal;
}

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

.search-box {
    display: flex;
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    overflow: hidden;
}

.search-input {
    border: none;
    padding: 8px 15px;
    width: 250px;
    outline: none;
}

.search-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0 15px;
    cursor: pointer;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--primary-color);
}

/* 네비게이션 */
.main-nav {
    background: var(--primary-color);
}

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

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 15px 20px;
    color: white;
    font-weight: 500;
    transition: background 0.3s;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255,255,255,0.1);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 180px;
    list-style: none;
    padding: 0;
    z-index: 100;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s;
}

.dropdown-menu a:hover {
    background: var(--bg-gray);
    color: var(--primary-color);
}

/* 메인 컨텐츠 */
.main-content {
    padding: 30px 0;  /* 정적 헤더이므로 상단 패딩 대폭 감소 */
    min-height: 600px;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 160px 900px 160px;
    gap: 20px;
    max-width: 1240px;
    margin: 0 auto;
    align-items: start;
}

/* 좌측 세로 배너 영역 */
.left-banner {
    position: sticky;
    top: 20px;  /* 정적 헤더이므로 상단 여백만 */
    width: 160px;
}

.left-banner .vertical-banner {
    width: 160px;
    min-height: 600px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    border: 1px solid var(--border-color);
}

/* 우측 세로 배너 영역 */
.right-banner {
    position: sticky;
    top: 20px;  /* 정적 헤더이므로 상단 여백만 */
    width: 160px;
}

.right-banner .vertical-banner {
    width: 160px;
    min-height: 600px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    border: 1px solid var(--border-color);
}

/* 헤드라인 섹션 */
.headline-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.headline-main {
    margin-bottom: 20px;
}

.headline-article .article-link {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 20px;
}

.article-image {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.article-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s;
}

.headline-article:hover .article-image img {
    transform: scale(1.05);
}

.category-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--secondary-color);
    color: white;
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 3px;
}

.article-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.article-title {
    font-size: 26px;
    line-height: 1.3;
    margin-bottom: 12px;
    color: var(--text-color);
}

.headline-article:hover .article-title {
    color: var(--primary-color);
}

.article-summary {
    color: var(--text-light);
    line-height: 1.6;
}

/* 서브 헤드라인 */
.headline-sub {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.sub-headline {
    padding: 15px;
    background: var(--bg-gray);
    border-left: 3px solid var(--primary-color);
}

.sub-headline h3 {
    font-size: 14px;
    line-height: 1.4;
}

.sub-headline:hover h3 {
    color: var(--primary-color);
}

/* 뉴스 보드 (게시판 스타일) */
.news-board {
    margin-bottom: 40px;
}

/* 최신 뉴스 위 배너 광고 */
.news-top-banner {
    margin-bottom: 30px;
    text-align: center;
}

.news-top-banner .banner-wrapper {
    max-width: 728px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.section-title {
    font-size: 20px;
    color: var(--primary-color);
}

.more-link {
    color: var(--text-light);
    font-size: 14px;
    transition: color 0.3s;
}

.more-link:hover {
    color: var(--primary-color);
}

/* 뉴스 리스트 */
.news-list {
    border-top: 1px solid var(--border-color);
}

/* 중간 배너 광고 */
.middle-banner-ad {
    margin: 30px 0;
    background: var(--bg-gray);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.middle-banner-ad .banner-content {
    height: 120px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 18px;
}

.news-item {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s;
}

.news-item:hover {
    background: var(--bg-gray);
}

.news-link {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 20px;
    padding: 15px 0;
}

.news-thumb {
    overflow: hidden;
    border-radius: 5px;
}

.news-thumb img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    transition: transform 0.3s;
}

.news-item:hover .news-thumb img {
    transform: scale(1.1);
}

.news-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.news-category {
    display: inline-block;
    color: var(--secondary-color);
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 5px;
}

.news-title {
    font-size: 16px;
    line-height: 1.4;
    margin-bottom: 8px;
    color: var(--text-color);
}

.news-item:hover .news-title {
    color: var(--primary-color);
}

.news-summary {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #999;
}

/* 페이지네이션 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 30px;
}

.page-btn,
.page-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    transition: all 0.3s;
}

.page-num:hover,
.page-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-num.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 사이드바 */
.sidebar {
    position: sticky;
    top: 80px;
    height: fit-content;
}

.sidebar-section {
    background: white;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.sidebar-title {
    background: var(--primary-color);
    color: white;
    padding: 12px 15px;
    font-size: 16px;
    margin: 0;
}

/* 인기 뉴스 */
.popular-list {
    list-style: none;
    padding: 0;
}

.popular-list li {
    border-bottom: 1px solid var(--border-color);
}

.popular-list li:last-child {
    border-bottom: none;
}

.popular-list a {
    display: flex;
    align-items: flex-start;
    padding: 12px 15px;
    gap: 12px;
    transition: background 0.3s;
}

.popular-list a:hover {
    background: var(--bg-gray);
}

.popular-list .rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--secondary-color);
    color: white;
    font-size: 12px;
    font-weight: bold;
    border-radius: 3px;
    flex-shrink: 0;
}

.popular-list li:nth-child(1) .rank,
.popular-list li:nth-child(2) .rank,
.popular-list li:nth-child(3) .rank {
    background: var(--accent-color);
}

.popular-list .title {
    font-size: 14px;
    line-height: 1.4;
    color: var(--text-color);
}

.popular-list a:hover .title {
    color: var(--primary-color);
}

/* 사이드바 광고 */
.sidebar-ad {
    height: 250px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.sidebar-ad.tall {
    height: 400px;
}

/* 포토 뉴스 */
.photo-news {
    padding: 15px;
}

.photo-item {
    display: block;
    position: relative;
}

.photo-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 5px;
}

.photo-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 10px;
    font-size: 14px;
}

/* 푸터 */
.main-footer {
    background: #2c3e50;
    color: #ccc;
    padding: 40px 0;
    margin-top: 60px;
}

.footer-content {
    text-align: center;
}

.footer-logo {
    margin-bottom: 20px;
}

.footer-logo h2 {
    font-size: 24px;
    color: white;
}

.company-info {
    margin-bottom: 20px;
}

.company-info p {
    font-size: 13px;
    line-height: 1.8;
    margin-bottom: 5px;
}

.company-info strong {
    color: white;
}

.copyright {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 12px;
}

.footer-links {
    margin-bottom: 20px;
}

.footer-links a {
    color: white;
    font-size: 14px;
    margin: 0 10px;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 0.7;
}

.footer-links .divider {
    color: #666;
}