@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;900&family=Noto+Sans+KR:wght@400;500;700;900&display=swap');

/* ==========================================================================
          1. Reset & Base (초기화 및 기본 설정)
          ========================================================================== */
:root {
    --brand-primary: #7e38b7; /* 미디어키워드 로고 보라색 */
    --brand-secondary: #f37036; /* 미디어키워드 로고 오렌지색 */
    --brand-gradient: linear-gradient(135deg, #7e38b7 0%, #f37036 100%);
    --text-main: #222222;
    --text-muted: #666666;
    --text-light: #999999;
    --bg-body: #ffffff;
    --bg-light: #f9f9f9;
    --border-color: #e5e5e5;
    --max-width: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', sans-serif; color: var(--text-main); background: var(--bg-body); line-height: 1.6; }
a { text-decoration: none; color: inherit; cursor: pointer; }
a:hover { color: var(--brand-primary); }
ul, ol, li { list-style: none; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }
img { max-width: 100%; height: auto; display: block; }

/* 유틸리티 (단일 파일 데모용 화면 전환 클래스) */
.page-view { display: none; }
.page-view.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ==========================================================================
   2. Layout Structure (레이아웃)
   ========================================================================== */
.site-container { width: 100%; }

/* Header */
.site-header { border-bottom: 2px solid var(--brand-primary); }
.top-bar { background-color: var(--bg-light); border-bottom: 1px solid var(--border-color); font-size: 13px; color: var(--text-muted); }
.top-bar-inner { max-width: var(--max-width); margin: 0 auto; padding: 5px 15px; display: flex; justify-content: space-between; align-items: center; }

.header-main { max-width: var(--max-width); margin: 0 auto; padding: 15px 15px; display: flex; justify-content: space-between; align-items: center; }
.logo-area img { height: 70px; }
.search-area { display: flex; border: 2px solid var(--brand-primary); border-radius: 20px; overflow: hidden; }
.search-area input { border: none; padding: 8px 15px; outline: none; width: 200px; }
.search-area button { background: var(--brand-primary); color: white; padding: 0 15px; font-weight: bold; }

/* GNB (Global Navigation Bar) */
.main-nav { background: var(--brand-primary); color: white; }
.nav-list { max-width: var(--max-width); margin: 0 auto; display: flex; }
.nav-item { flex: 1; text-align: center; }
.nav-link { display: block; padding: 15px 0; font-size: 16px; font-weight: bold; transition: background 0.2s; }
.nav-link:hover, .nav-link.active { background: var(--brand-secondary); color: white; }

/* Main Content Area */
.content-wrapper { max-width: var(--max-width); margin: 30px auto; padding: 0 15px; display: flex; gap: 30px; align-items: flex-start; }
.main-content { flex: 1; min-width: 0; } /* flex-shrink 처리 보완 */

/* Sidebar (공통 규격) */

.section_02 .txt_age { color: var(--brand-primary) !important}

/* 화면 너비가 768px 이상인 기기(태블릿, 데스크탑)에서만 적용 */
@media (min-width: 768px) {
    [class*=ad_text_r] {
        margin-bottom: 0px !important;
        border: 1px solid var(--border-color);
        padding: 20px;
        background: white;
    }
}

@media (max-width: 640px) {
    .ad_text_C {
        padding: 20px;
        margin-left: 0 !important;
        margin-right: 0 !important;
        border: 0 !important;
    }
}

.aside.view-sidebar { width: 320px; flex-shrink: 0; display: flex; flex-direction: column; gap: 20px; }
.widget-box { border: 1px solid var(--border-color); padding: 20px; background: white; }
.widget-title { font-size: 16px; font-weight: bold; border-bottom: 2px solid var(--brand-primary); padding-bottom: 10px; margin-bottom: 15px; color: var(--brand-primary); }
.widget-list li { margin-bottom: 10px; padding-bottom: 10px; font-size: 14px; }
.widget-list li:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.widget-list a { display: flex; gap: 10px; align-items: center; }
.widget-list img { width: 60px; height: 60px; object-fit: cover; border-radius: 4px; }
.widget-list .title { font-size: 16px; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 텍스트 광고 위젯 전용 (ad_text.css 영역) */
.widget-box.ad-text { border-color: var(--brand-secondary); background: #fffcfb; }
.widget-box.ad-text .widget-title { border-bottom-color: var(--brand-secondary); color: var(--brand-secondary); }
.ad-item { margin-bottom: 8px; font-weight: bold; font-size: 14px; color: #333; }
.ad-item::before { content: "▶"; color: var(--brand-secondary); margin-right: 5px; font-size: 12px; }

/* Footer */
.site-footer { background: #333333; color: #cccccc; margin-top: 50px; padding: 40px 0; font-size: 13px; }
.footer-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 15px; }
.footer-nav { margin-bottom: 20px; border-bottom: 1px solid #555; padding-bottom: 20px; }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-nav a { color: #ffffff; font-weight: bold; }
.company-info p { margin-bottom: 5px; }
.company-info span { margin-right: 15px; display: inline-block; }

/* ==========================================================================
   3. Modules & Components (페이지별 UI 구성요소)
   ========================================================================== */

/* 3-1. 메인 페이지 섹션 */
.section-header { font-size: 20px; font-weight: bold; margin-bottom: 20px; display: flex; justify-content: space-between; align-items: flex-end; }
.section-header .more { font-size: 13px; font-weight: normal; color: var(--text-muted); }

/* 최신 뉴스 (Main) */
.latest-news-wrap { display: flex; gap: 20px; margin-bottom: 40px; }
.latest-lead { flex: 2; position: relative; }
.latest-lead img { width: 100%; height: 350px; object-fit: cover; border-radius: 8px; }
.latest-lead .info { position: absolute; bottom: 0; left: 0; right: 0; padding: 20px; background: linear-gradient(transparent, rgba(0,0,0,0.8)); color: white; border-radius: 0 0 8px 8px; }
.latest-lead .info p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.latest-lead h2 { font-size: 24px; margin-bottom: 10px; }
.latest-sub { flex: 1; display: flex; flex-direction: column; gap: 15px; }
.latest-item { display: flex; gap: 10px; align-items: flex-start; }
.latest-item img { width: 100px; height: 75px; object-fit: cover; border-radius: 4px; }
.latest-item .title { font-weight: bold; font-size: 15px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* 인기 유튜브 (Main) */
.youtube-section { background: var(--bg-light); padding: 30px; border-radius: 8px; margin-bottom: 40px; }
.youtube-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.youtube-card { background: white; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.youtube-card .thumb { position: relative; padding-top: 56.25%; background: #000; }
.youtube-card .thumb::after { content: "▶"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: white; font-size: 24px; background: rgba(255,0,0,0.8); width: 40px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 8px; }
.youtube-card .info { padding: 15px; }
.youtube-card .title { font-weight: bold; font-size: 14px; margin-bottom: 5px; }

/* 지난 이슈 (Main) */
.issue-mix { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 40px; border-top: 2px solid var(--text-main); padding-top: 20px; }
.issue-card-list { display: flex; flex-direction: column; gap: 15px; }
.issue-card { display: flex; gap: 15px; }
.issue-card img { width: 120px; height: 90px; object-fit: cover; }
.issue-card .desc { font-size: 13px; color: var(--text-muted); margin-top: 5px;     display: -webkit-box;
    -webkit-line-clamp:1;
    -webkit-box-orient: vertical;
    overflow: hidden; }

/* 지난 핫 이슈 텍스트 리스트 (2줄 말줄임 처리) */
.issue-text-list ul {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.issue-text-list a {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-start;
}
.issue-text-list .title {
    font-weight: bold;
    font-size: 18px;
}
.issue-text-list .summary {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

/* 3-2. 리스트 페이지 */
.category-title { font-size: 28px; border-bottom: 3px solid var(--text-main); padding-bottom: 15px; margin-bottom: 30px; }
.article-list-wrap { display: flex; flex-direction: column; gap: 25px; }
.article-row { display: flex; gap: 20px; padding-bottom: 25px; border-bottom: 1px solid var(--border-color); }
.article-row img { width: 200px; height: 130px; object-fit: cover; border-radius: 4px; }
.article-row .content { flex: 1; }
.article-row .title { font-size: 20px; font-weight: bold; margin-bottom: 10px; }
.article-row .summary { color: var(--text-muted); font-size: 14px; margin-bottom: 10px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;}
.article-row .meta { font-size: 12px; color: var(--text-light); }

.pagination { display: flex; justify-content: center; gap: 5px; margin-top: 40px; }
.page-btn { padding: 8px 12px; border: 1px solid var(--border-color); background: white; color: var(--text-main); }
.page-btn.active { background: var(--brand-primary); color: white; border-color: var(--brand-primary); font-weight: bold; }

/* 3-3. 상세 페이지 */
.article-view-header { border-bottom: 1px solid var(--border-color); padding-bottom: 20px; margin-bottom: 30px; }
.article-headline { font-size: 32px; font-weight: bold; line-height: 1.3; margin-bottom: 15px; }
.article-info { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--text-muted); }
.article-tools { display: flex; gap: 10px; }
.btn-tool { width: 30px; height: 30px; border: 1px solid var(--border-color); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; }
.article-body { font-size: 17px; line-height: 1.8; color: #222; margin-bottom: 50px; }
.news-image { width: 100%; border-radius: 8px; object-fit: cover; margin-bottom: 25px; }

/* 3-4. About 페이지 (통합 안내) */
.about-tabs { display: flex; border-bottom: 2px solid var(--brand-primary); margin-bottom: 30px; }
.tab-btn { padding: 15px 20px; font-size: 16px; font-weight: bold; color: var(--text-muted); background: var(--bg-light); border: 1px solid var(--border-color); border-bottom: none; margin-right: 5px; border-radius: 8px 8px 0 0; }
.tab-btn.active { background: var(--brand-primary); color: white; border-color: var(--brand-primary); }
.tab-panel { display: none; padding: 20px; background: white; border: 1px solid var(--border-color); border-top: none; line-height: 1.8; }
.tab-panel.active { display: block; animation: fadeIn 0.3s; }

.about-intro-wrap { display: flex; gap: 30px; align-items: flex-start; margin-bottom: 20px; }
.about-intro-img { flex-shrink: 0; width: 350px; }
.about-intro-img img { width: 100%; border-radius: 8px; object-fit: cover; }
.about-intro-text { flex: 1; }

.contact-box { background: var(--bg-light); padding: 30px; border-radius: 8px; text-align: center; margin-top: 20px; }
.contact-box h3 { color: var(--brand-primary); margin-bottom: 10px; }
.email-link { font-size: 20px; font-weight: bold; color: var(--brand-secondary); text-decoration: underline; }

/* ==========================================================================
   4. Responsive Design (반응형 보정)
   ========================================================================== */
@media (max-width: 991px) {
    .content-wrapper { flex-direction: column; }
    .aside.view-sidebar { width: 100%; flex-direction: row; flex-wrap: wrap; }
    .widget-box { flex: 1; min-width: 250px; }
    .latest-news-wrap { flex-direction: column; }
    .latest-lead img { height: 250px; }
    .issue-mix { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .header-main { flex-direction: column; gap: 15px; }
    .nav-list { flex-wrap: wrap; }
    .nav-item { flex: 0 0 33.33%; }
    .article-row { flex-direction: column; }
    .article-row img { width: 100%; height: auto; }
    .youtube-grid { grid-template-columns: 1fr; }
    .about-tabs { flex-wrap: wrap; }
    .tab-btn { width: 50%; margin-right: 0; border-radius: 0; }

    .article-headline { font-size: 26px;}
    .nav-link { padding: 8px 0;}

    /* 모바일에서 회사소개 이미지 레이아웃 변경 */
    .about-intro-wrap { flex-direction: column; gap: 20px; }
    .about-intro-img { width: 100%; }

    .ad_text_C li a { white-space: unset!important; }

}

/* 기본 광고 배너 */
.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;  }
@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}

