/* ==========================================================================
   공통 스타일 및 리셋, 전체 레이아웃
   ========================================================================== */

:root {
    --point-color: #df151a;
    --text-main: #111;
    --text-sub: #666;
    --border-color: #eee;
}

/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Malgun Gothic", "맑은 고딕", sans-serif; color: var(--text-main); line-height: 1.5; background-color: #fff; }
a { text-decoration: none; color: inherit; }
a:hover { text-decoration: underline; }
ul, ol, li { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
table { border-collapse: collapse; width: 100%; }

.blind { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); }

/* Layout Container */
.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ================= Header ================= */
.site-header { background-color: #fff; border-bottom: 2px solid var(--text-main); position: relative; z-index: 50; }
.header-top { display: flex; justify-content: space-between; align-items: center; padding: 10px 20px; max-width: 1080px; margin: 0 auto; font-size: 12px; color: var(--text-sub);    position: relative;
    margin-bottom: -30px; }

.header-top .left-links a, .header-top .right-links a { margin-right: 15px; }
.header-top .right-links a:last-child { margin-right: 0; }

.header-mid { display: flex; justify-content: center; align-items: center; padding: 20px 0; }
.site-logo img { height: 60px; } 

.header-bot { border-top: 1px solid var(--border-color); position: relative; }
.gnb-wrap { max-width: 1080px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 0 20px; }

/* 햄버거 버튼 (PC 숨김, 모바일 노출) */
.gnb-btn { display: none; font-size: 24px; padding: 10px 0; color: var(--text-main); }

/* 검색 버튼 */
.search-btn { padding: 10px 0; display: flex; align-items: center; }
.search-btn img { width: 22px; height: auto; transition: transform 0.2s; }
.search-btn:hover img { transform: scale(1.1); }

/* GNB 리스트 및 호버 애니메이션 */
.gnb-list { display: flex; gap: 30px; margin: 0 auto; }
.gnb-list li a { 
    display: block; 
    padding: 15px 5px; 
    font-size: 17px; 
    font-weight: 700; 
    color: var(--text-main); 
    position: relative;
    transition: color 0.3s ease;
}

/* 호버 시 밑줄 쫙 펼쳐지는 애니메이션 */
.gnb-list li a::after {
    content: '';
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--point-color);
    transition: width 0.3s ease;
}

.gnb-list li a.active, .gnb-list li a:hover { 
    color: var(--point-color); 
    text-decoration: none; 
}
.gnb-list li a.active::after, .gnb-list li a:hover::after {
    width: 100%;
}

/* ================= Search Popup Layer ================= */
.search-popup {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.search-popup.active { opacity: 1; visibility: visible; }
.search-popup-content {
    background: #fff; width: 90%; max-width: 600px;
    padding: 40px; border-radius: 8px; position: relative;
    transform: translateY(-20px); transition: transform 0.3s ease;
}
.search-popup.active .search-popup-content { transform: translateY(0); }
.search-popup-close {
    position: absolute; top: 15px; right: 20px; font-size: 24px;
    color: #999; font-weight: bold; background: none; border: none;
}
.search-popup-close:hover { color: var(--point-color); }
.search-popup-content h3 { font-size: 24px; font-weight: 800; margin-bottom: 20px; text-align: center; }
.search-input-wrap { display: flex; border: 2px solid var(--text-main); border-radius: 30px; overflow: hidden; }
.search-input-wrap input { flex: 1; padding: 15px 20px; border: none; font-size: 17px; outline: none; }
.search-input-wrap button { background: var(--text-main); color: #fff; padding: 0 30px; font-weight: bold; font-size: 17px; transition: background 0.2s; }
.search-input-wrap button:hover { background: var(--point-color); }


/* ================= Footer ================= */
.site-footer { padding: 40px 0 0 0; font-size: 13px; line-height: 1.6; color: #555; background: #fff; }
.footer-inner { display: flex; gap: 40px; align-items: flex-start; max-width: 1080px; margin: 0 auto; padding: 30px 20px 40px; border-top: 2px solid var(--text-main); }
.footer-logo img { height: 35px; } 
.footer-content { flex: 1; }
.footer-nav { display: flex; gap: 20px; margin-bottom: 15px; flex-wrap: wrap; }
.footer-nav a { font-weight: bold; color: var(--text-main); }
.footer-info { display: flex; flex-wrap: wrap; gap: 5px 20px; margin-bottom: 15px; }
.footer-info dl { display: flex; gap: 5px; }
.footer-desc { font-size: 12px; color: #888; }


/* --------------------------------------------------------------------------
   메인 페이지 스타일 (main.html)
   -------------------------------------------------------------------------- */
.main-page-wrap { padding-bottom: 40px; }

/* 1. 상단 히어로 섹션 */
.main-hero-section { max-width: 1080px; margin: 20px auto 40px; display: grid; grid-template-columns: 65% 35%; background: #222; color: #fff; }
.hero-left { position: relative; overflow: hidden; }
.hero-left img { width: 100%; height: 100%; object-fit: cover; opacity: 0.7; transition: transform 0.3s; }
.hero-left:hover img { transform: scale(1.05); }
.hero-left-text { position: absolute; bottom: 0; left: 0; width: 100%; padding: 40px; text-align: center; background: linear-gradient(transparent, rgba(0,0,0,0.9)); }
.hero-left-text h2 { font-size: 32px; font-weight: 900; line-height: 1.3; }

.hero-right { display: flex; flex-direction: column; }
.hero-right-item { padding: 25px 20px; border-bottom: 1px solid #444; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.hero-right-item:last-child { border-bottom: none; }
.hero-right-item.highlight { background: var(--point-color); }
.hero-right-item h3 { font-size: 17px; font-weight: 400; line-height: 1.4; color: #eee; }
.hero-right-item.highlight h3 { font-size: 17px; font-weight: 700; color: #fff; }

/* 2. 에디터 픽 섹션 */
.editor-pick-section { max-width: 1080px; margin: 0 auto 40px; padding: 40px 20px; background: #f9f9f9; display: flex; gap: 30px; border-top: 1px solid var(--border-color); }
.editor-pick-title { width: 160px; flex-shrink: 0; }
.editor-pick-title h2 { font-size: 24px; font-weight: 900; line-height: 1.3; }
.editor-pick-title p { font-size: 12px; color: var(--text-sub); margin-top: 10px; }
.editor-pick-grid { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.editor-item img { width: 100%; aspect-ratio: 16/10; object-fit: cover; margin-bottom: 10px; }
.editor-item h3 { font-size: 17px; font-weight: 700; line-height: 1.4; letter-spacing: -0.5px; }

/* 3. TV 섹션 */
.main-tv-section { background: #1a1a1a; padding: 40px 0; margin-bottom: 50px; color: #fff; }
.main-tv-header { max-width: 1080px; margin: 0 auto 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #333; padding: 0 20px 15px; }
.main-tv-header h2 { font-size: 22px; font-weight: 800; }
.tv-grid { max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); gap: 15px; padding: 0 20px; }
.tv-item-thumb { position: relative; margin-bottom: 12px; }
.tv-item-thumb img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.play-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 36px; height: 36px; background: var(--point-color); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; padding-left: 3px; }
.tv-item h3 { font-size: 17px; font-weight: 400; line-height: 1.4; color: #ccc; }

/* 4. 메인 리스트 & 사이드바 영역 */
.main-content-layout { max-width: 1080px; margin: 0 auto 50px; display: flex; gap: 40px; padding: 0 20px; }
.main-list-area { flex: 1; }
.main-article { display: flex; gap: 20px; padding: 25px 0; border-bottom: 1px solid var(--border-color); }
.main-article:first-child { padding-top: 0; }
.main-article-thumb { width: 200px; height: 130px; flex-shrink: 0; }
.main-article-thumb img { width: 100%; height: 100%; object-fit: cover; }
.main-article-info { flex: 1; }
.main-article-info h3 { font-size: 18px; font-weight: 800; margin-bottom: 10px; line-height: 1.4; }
.main-article-info p { font-size: 14px; color: var(--text-sub); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 10px; }
.main-article-info .meta { font-size: 12px; color: #999; }

.main-aside-area { width: 300px; flex-shrink: 0; }
.ranking-box { border: 1px solid var(--border-color); }
.ranking-box h3 { font-size: 17px; font-weight: 800; padding: 15px; border-bottom: 1px solid var(--border-color); background: #fbfbfb; }
.ranking-list { padding: 0 15px; }
.ranking-list li { display: flex; gap: 15px; align-items: center; padding: 12px 0; border-bottom: 1px dashed var(--border-color); }
.ranking-list li:last-child { border-bottom: none; }
.ranking-list .num { font-size: 18px; font-weight: 900; color: var(--text-main); font-style: italic; width: 15px; text-align: center; }
.ranking-list .tit { font-size: 14px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 5. 섹션별 뉴스 */
.section-news-section { max-width: 1080px; margin: 0 auto 50px; padding: 0 20px; }
.section-news-main-title { font-size: 22px; font-weight: 800; margin-bottom: 15px; }
.section-news-grid { border-top: 2px solid var(--point-color); padding-top: 20px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px 20px; }
.section-box { padding-bottom: 20px; border-bottom: 1px solid #eee; }
.section-box:nth-child(n+5) { border-bottom: none; padding-bottom: 0; }
.section-box-header { font-size: 17px; font-weight: 800; margin-bottom: 15px; }
.section-top-article { display: flex; gap: 12px; margin-bottom: 15px; }
.section-top-article img {width: 80px;height: 70px;object-fit: cover;flex-shrink: 0;}
.section-top-article .tit {/* font-size: 14px; */font-weight: 700;line-height: 1.4;display: -webkit-box;-webkit-line-clamp: 3;-webkit-box-orient: vertical;overflow: hidden;}
.section-list { border-top: 1px solid #eee; padding-top: 12px; }
.section-list li {margin-bottom: 8px;position: relative;padding-left: 12px;}
.section-list li::before {content: "·";position: absolute;left: 0;top: -4px;color: #999;font-weight: bold;}
.section-list li a {font-size: 14px;color: #555;display: -webkit-box;-webkit-line-clamp: 1;-webkit-box-orient: vertical;overflow: hidden;line-height: 1.4;}

/* 6. 네트워크 뉴스 */
.network-news-wrap { background: #151515; padding: 40px 0; color: #fff; }
.network-news-title { font-size: 22px; font-weight: 800; margin-bottom: 20px; color: #fff; }
.network-news-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.network-item img { width: 100%; aspect-ratio: 16/10; object-fit: cover; margin-bottom: 12px; border: 1px solid #333; }
.network-item .tit {line-height: 1.4;font-weight: 400;display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical;overflow: hidden;}

/* --------------------------------------------------------------------------
   리스트 페이지 스타일 (list.html)
   -------------------------------------------------------------------------- */
.list-hero-section { position: relative; height: 300px; margin-bottom: 50px; overflow: hidden; background: #000; }
.list-hero-section img { width: 100%; height: 100%; object-fit: cover; opacity: 0.5; }
.list-hero-title { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: #fff; font-size: 40px; font-weight: 900; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }

.list-card-container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.list-card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 25px; margin-bottom: 50px; }
.list-card { border: 1px solid var(--border-color); background: #fff; display: flex; flex-direction: column; }
.list-card-header { display: flex; justify-content: space-between; padding: 15px; font-size: 13px; font-weight: 800; color: var(--point-color); }
.list-card-thumb { width: 100%; aspect-ratio: 16/10; overflow: hidden; }
.list-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.list-card:hover .list-card-thumb img { transform: scale(1.05); }
.list-card-body { padding: 20px; flex: 1; }
.list-card-body h3 { font-size: 17px; font-weight: 800; margin-bottom: 12px; line-height: 1.4; word-break: keep-all; }
.list-card-body p { font-size: 13px; color: var(--text-sub); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.pagination { display: flex; justify-content: center; gap: 5px; margin-top: 40px; }
.pagination a, .pagination button { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid #ddd; background: #fff; font-size: 14px; color: #333; }
.pagination a:hover { background: #f9f9f9; text-decoration: none; }
.pagination .active { background: var(--text-main); color: #fff; border-color: var(--text-main); font-weight: bold; }

/* --------------------------------------------------------------------------
   뷰 페이지 스타일 (view.html)
   -------------------------------------------------------------------------- */
.content-wrapper { display: flex; gap: 40px; padding: 40px 0; }
.main-content { flex: 1; min-width: 0; }
.article-view-header { border-bottom: 2px solid var(--text-main); padding-bottom: 20px; margin-bottom: 30px; }
.article-view-title { font-size: 32px; font-weight: 800; line-height: 1.4; color: #111; margin-bottom: 15px; letter-spacing: -1px; }
.article-view-meta { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--text-sub); }
.article-view-meta .info span { margin-right: 15px; }

.article-view-body { font-size: 17px; line-height: 1.8; color: #333; padding-bottom: 40px; word-break: keep-all; }
.article-view-body img { margin: 20px auto; max-width: 100%; height: auto; display: block; }

.article-tools { display: flex; gap: 10px; justify-content: center; padding: 20px 0; border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); margin-bottom: 30px; }
.tool-btn { padding: 8px 20px; border: 1px solid #ddd; border-radius: 20px; background: #fff; font-size: 14px; transition: background 0.2s; }
.tool-btn:hover { background: #f1f1f1; }

/* --------------------------------------------------------------------------
   매체소개 (About) 페이지 스타일 (about.html)
   -------------------------------------------------------------------------- */
.about-header { text-align: center; padding: 60px 0; background-color: #f1f1f1; margin-bottom: 40px; }
.about-header h1 { font-size: 36px; font-weight: 900; margin-bottom: 10px; letter-spacing: -1px; }
.about-company-img { margin: auto}

.about-tabs { display: flex; border-bottom: 2px solid var(--text-main); margin-bottom: 40px; overflow-x: auto; }
.tab-btn { flex: 1; padding: 15px 10px; text-align: center; font-size: 17px; font-weight: 700; color: var(--text-sub); border-bottom: 4px solid transparent; min-width: 120px; }
.tab-btn.active { color: var(--text-main); border-bottom-color: var(--text-main); }

.tab-content { display: none; padding: 0 0 50px; animation: fadeIn 0.4s ease; }
.tab-content.active { display: block; }

.about-section-title { font-size: 24px; font-weight: 800; margin-bottom: 20px; padding-left: 15px; border-left: 4px solid var(--point-color); }
.about-desc-box { font-size: 17px; line-height: 1.8; color: #444; background: #f8fafc; padding: 30px; border-radius: 8px; margin-bottom: 40px; }

.contact-form { max-width: 600px; margin: 0 auto; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: bold; margin-bottom: 8px; }
.form-group input, .form-group textarea { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 4px; font-family: inherit; }
.form-group textarea { height: 150px; resize: vertical; }
.submit-btn { width: 100%; padding: 15px; background: var(--text-main); color: #fff; font-size: 17px; font-weight: bold; border-radius: 4px; }

/* ==========================================================================
   우측 사이드바 & 광고 스타일 (공통)
   ========================================================================== */
.aside.view-sidebar { width: 300px; flex-shrink: 0; display: flex; flex-direction: column; gap: 30px; }
.ad_vert { width: 100%; background: #f1f1f1; text-align: center; }
.ad_vert img { width: 100%; display: block; }

.ad_text_pic_B { border: 1px solid #e2e8f0; padding: 20px; background-color: #f8fafc; margin-top: 20px; }
.ad_text_pic_B h4 { font-size: 15px; font-weight: bold; margin-bottom: 15px; }
.ad_text_pic_B h4 em { font-style: normal; color: var(--point-color); }
.ad_text_pic_B ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.ad_text_pic_B li a { display: flex; align-items: center; gap: 10px; background: #fff; padding: 10px; border: 1px solid #e2e8f0; }
.ad_text_pic_B .thumb { width: 60px; height: 45px; flex-shrink: 0; background: #eee; }
.ad_text_pic_B .thumb img { width: 100%; height: 100%; object-fit: cover; }
.ad_text_pic_B .info .tit { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.ad_text_pic_E { border: 0 !important;}

/* ==========================================================================
   반응형 보정 (모바일)
   ========================================================================== */
@media (max-width: 768px) {
    main { letter-spacing: -0.06rem; }
    /* 헤더 햄버거 메뉴 처리 */
    .gnb-btn { display: block; }
    .gnb-list { 
        display: none; 
        flex-direction: column; 
        position: absolute; 
        top: 100%; left: 0; 
        width: 100%; 
        background: #fff; 
        border-top: 1px solid #eee; 
        box-shadow: 0 5px 10px rgba(0,0,0,0.1); 
        gap: 0;
    }
    .gnb-list.show { display: flex; }
    .gnb-list li a { padding: 15px 20px; border-bottom: 1px solid #f5f5f5; text-align: center; }
    .gnb-list li a::after { display: none; } /* 모바일에서는 호버 밑줄 제거 */
    
    .main-hero-section { grid-template-columns: 1fr; }
    .editor-pick-section { flex-direction: column; }
    .editor-pick-grid { grid-template-columns: repeat(2, 1fr); }
    .tv-grid { grid-template-columns: repeat(2, 1fr); }
    .main-content-layout { flex-direction: column; }
    .main-aside-area, .aside.view-sidebar { width: 100%; }
    .list-card-grid { grid-template-columns: repeat(2, 1fr); gap: 10px;}
    .content-wrapper { flex-direction: column; padding: 15px }
    .ad_text_pic_B ul { grid-template-columns: 1fr; }
    .section-news-grid { grid-template-columns: repeat(2, 1fr); }
    .network-news-grid { grid-template-columns: repeat(2, 1fr); }
    .article-view-title { font-size: 24px; }
    .tab-btn { flex: 1; padding: 10px 10px; text-align: center; font-size: 16px; border-bottom: 4px solid transparent; min-width:100px; }
    
    
    .header-top { display: flex; justify-content: space-between; align-items: center; padding: 10px 20px; max-width: 1080px; margin: 0 auto; font-size: 12px; color: var(--text-sub);    position: relative;
    margin-bottom: -10px; }

.site-logo img { height: 45px; } 
    .search-popup-content { padding: 40px 15px;}

    
    .list-card-body {
    padding: 15px 10px;}
    
    .header-bot { border-top:0; margin-top: -70px;
    padding-bottom: 10px; z-index: -1;
} 
    
    .header-mid {
    width: 200px;
    margin: auto;
}
    
}



/* 기본 광고 배너 */
.ad-banner { width: 100%; background-color: #161B2E; /*border: 1px solid #1e293b;*/  display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; cursor: pointer; margin: 2rem 0; padding:0; border-radius: 0;  }
@media (min-width: 768px) { .ad-banner {  } }
.ad-bg { position: absolute; inset: 0; background: linear-gradient(to right, rgba(30,58,138,0.1), transparent, rgba(30,58,138,0.1)); opacity: 0.5; }
.ad-content { position: relative; z-index: 10; text-align: center; }
.ad-label { font-size: 10px; color: #64748b; text-transform: uppercase; letter-spacing: 0.1em; font-weight: bold; display: block; margin-bottom: 0.25rem; }
.ad-text { color: #94a3b8; font-weight: 500; }
@media (min-width: 768px) { .ad-text { font-size: 1.125rem; } }
.ad-badge {position: absolute;top: 3px;right: 3px;font-weight: bold;margin: auto;display: flex;align-items: center;font-size: 10px;background: rgba(0, 0, 0, 0.1);color: #cecdcd;padding: 2px 6px;border-radius: 3px;}

/* 우측 광고배너 */
.banner_ad{position:absolute;top:2px; right:2px; width: auto !important; height: 16px; z-index:1;cursor:pointer}

