/* ==========================================================================
   Reset & Base Variables
   ========================================================================== */
:root {
    --primary-color: #1a365d; /* 신뢰감 있는 네이비 */
    --secondary-color: #e2e8f0;
    --text-main: #222222;
    --text-muted: #666666;
    --border-color: #e2e8f0;
    --bg-body: #f8fafc;
    --bg-white: #ffffff;
    --container-width: 1080px;
    --font-main: 'Noto Sans KR', 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-main);
    color: var(--text-main);
    background-color: var(--bg-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.03rem;
}

a { text-decoration: none; color: inherit; transition: color 0.2s ease, opacity 0.2s ease; }
a:hover { text-decoration: none; color: var(--primary-color); }
ul, ol, li { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

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

/* ==========================================================================
   common.css (전체 공통 레이아웃 및 헤더/푸터)
   ========================================================================== */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

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

.site-logo a {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.5px;
}

.site-logo a:hover {
    text-decoration: none;
    opacity: 0.9;
}

.site-logo a img { height: 60px; }

.site-logo svg {
    width: 38px;
    height: 38px;
    fill: var(--primary-color);
}

.header-search {
    display: flex;
    border: 1px solid var(--primary-color);
    border-radius: 20px;
    overflow: hidden;
    width: 250px;
    background-color: #f1f5f9;
    transition: border-color 0.2s;
}
.header-search:focus-within {
    border-color: var(--primary-color);
    background-color: #fff;
}

.header-search input {
    border: none;
    background: transparent;
    padding: 8px 15px;
    outline: none;
    width: 100%;
    font-size: 14px;
}

.header-search button {
    padding: 0 15px;
    color: var(--bg-white);
    width: 70px;
    background-color: #1a365d;
}

/* Navigation */
.site-nav {
    background-color: var(--primary-color);
}

.nav-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-list li a {
    display: block;
    padding: 14px 18px;
    color: #f8fafc;
    font-weight: 500;
    font-size: 15px;
    transition: background-color 0.2s, color 0.2s;
}

.nav-list li a:hover, .nav-list li a.active {
    background-color: rgba(255,255,255,0.15);
    color: #ffffff;
    text-decoration: none;
}

/* Footer */
.site-footer {
    background-color: #1e293b;
    color: #cbd5e1;
    padding: 50px 0;
    margin-top: 60px;
    font-size: 13.5px;
    border-top: 4px solid var(--primary-color);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px 25px;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #334155;
}

.footer-links a {
    color: #f8fafc;
    font-weight: 500;
}
.footer-links a:hover {
    color: #38bdf8;
    text-decoration: underline;
}

.footer-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px 24px;
    line-height: 1.8;
    color: #94a3b8;
}

.footer-info strong { color: #f1f5f9; font-weight: 500; }
.footer-copyright { margin-top: 35px; text-align: center; color: #64748b; font-size: 13px; }

/* ==========================================================================
   Layout Structure (view, list, about 공통)
   ========================================================================== */
.content-wrapper {
    display: flex;
    gap: 30px;
    padding: 30px 0;
}

.main-content {
    flex: 1;
    min-width: 0; /* flex 버그 방지 */
    background-color: var(--bg-white);
    padding: 30px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
}

.aside.view-sidebar {
    width: 320px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ==========================================================================
   view.html (상세페이지 전용)
   ========================================================================== */
.article-view-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
}

.article-view-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 15px;
    word-break: keep-all;
    color: #0f172a;
}

.article-view-meta {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: var(--text-muted);
}

.article-view-body {
    font-size: 17px;
    line-height: 1.85;
    color: #334155;
    word-break: break-all;
}

.article-view-body img {
    margin: 25px auto;
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.article-view-body p {
/*    margin-bottom: 1.2em;*/
}

.article-tools {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin: 40px 0;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
}

.tool-btn {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: #f8fafc;
    font-size: 14px;
    color: var(--text-main);
    transition: all 0.2s;
}

.tool-btn:hover {
    background-color: var(--secondary-color);
    border-color: #cbd5e1;
}



/* ==========================================================================
   main.html (메인페이지 전용)
   ========================================================================== */
.main-top-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

/* --------------------------------------------------------------------------
   Slider CSS (메인 상단 슬라이드 영역 스타일)
   -------------------------------------------------------------------------- */
.main-hero-article {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05);
    height: 370px;
}

.hero-slider-wrapper {
    display: flex;
    width: 300%; /* 총 3개 슬라이드 기준 */
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-slide {
    width: 33.3333%;
    height: 100%;
    position: relative;
    flex-shrink: 0;
}

.hero-slide a {
    display: block;
    width: 100%;
    height: 100%;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.main-hero-article:hover .hero-slide img {
    transform: scale(1.02);
}

.main-hero-text {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 40px 30px 30px;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    color: #fff;
}
.main-hero-text h2 { font-size: 24px; margin-bottom: 10px; font-weight: 700; line-height: 1.4; text-shadow: 0 1px 4px rgba(0,0,0,0.5); }
.main-hero-text p { font-size: 15px; color: #cbd5e1; text-shadow: 0 1px 2px rgba(0,0,0,0.5); }

/* 슬라이더 제어 버튼 */
.slide-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    z-index: 10;
    transition: all 0.2s;
    opacity: 0;
}

.main-hero-article:hover .slide-arrow {
    opacity: 1;
}

.slide-arrow:hover {
    background: rgba(0, 0, 0, 0.7);
    scale: 1.05;
}

.slide-arrow.prev { left: 15px; }
.slide-arrow.next { right: 15px; }

/* 인디케이터 도트 */
.slide-dots {
    position: absolute;
    bottom: 25px;
    right: 30px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.slide-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.25s;
}

.slide-dot.active {
    background: #ffffff;
    transform: scale(1.3);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.main-sub-articles {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.main-sub-item {
    display: flex;
    gap: 15px;
    background: var(--bg-white);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
    align-items: center;
}
.main-sub-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.05);
}
.main-sub-item .thumb { width: 120px; height: 85px; flex-shrink: 0; }
.main-sub-item .thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px;}
.main-sub-item h3 { font-size: 15px; font-weight: 600; line-height: 1.45; color: #1e293b; }

.section-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-left: 12px;
    border-left: 4px solid var(--primary-color);
    color: #0f172a;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 40px;
}

.youtube-section {
    background-color: #0f172a;
    color: #fff;
    padding: 45px 0;
    margin: 40px 0;
}
.youtube-section .section-title { color: #fff; border-left-color: #ef4444; }
.video-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.video-item { transition: transform 0.2s; }
.video-item:hover { transform: translateY(-4px); }
.video-item:hover h4 { color: #38bdf8; }
.video-item .thumb { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 8px; margin-bottom: 12px; box-shadow: 0 4px 10px rgba(0,0,0,0.3); }
.video-item .thumb img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.video-item .thumb::after {
    content: '▶';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 44px; height: 44px;
    background: rgba(239, 68, 68, 0.9);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    padding-left: 3px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}
.video-item h4 { font-size: 14px; font-weight: 500; line-height: 1.45; color: #e2e8f0; }

.issue-card-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 40px;
}
.issue-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.25s;
}
.issue-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.06);
}
.issue-card img { width: 100%; height: 165px; object-fit: cover; }
.issue-card .info { padding: 15px; }
.issue-card .info h4 { font-size: 15px; margin-bottom: 10px; line-height: 1.45; font-weight: 600; color: #1e293b; }
.issue-card .info .date { font-size: 12px; color: var(--text-muted); }

/* ==========================================================================
   list.html (리스트페이지 전용)
   ========================================================================== */
.list-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.list-header h2 { font-size: 24px; color: #0f172a; }

.article-list { display: flex; flex-direction: column; gap: 20px; }
.article-list-item {
    display: flex;
    gap: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}
.article-list-item .thumb { width: 220px; height: 145px; flex-shrink: 0; overflow: hidden; border-radius: 8px; }
.article-list-item .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.article-list-item:hover .thumb img { transform: scale(1.05); }
.article-list-item .info { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.article-list-item .info h3 { font-size: 20px; margin-bottom: 12px; color: #0f172a; font-weight: 700; line-height: 1.35; }
.article-list-item .info p { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;}
.article-list-item .info .meta { font-size: 13px; color: #94a3b8; }

.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 40px; }
.pagination button { width: 38px; height: 38px; border: 1px solid var(--border-color); border-radius: 6px; background: var(--bg-white); font-weight: 500; transition: all 0.2s; }
.pagination button:hover { background-color: #f1f5f9; }
.pagination button.active { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }

/* ==========================================================================
   about.html (소개페이지 전용)
   ========================================================================== */
.about-hero-img { width: 100%; height: 320px; object-fit: cover; border-radius: 8px; margin-bottom: 30px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }

.about-tabs {
    display: flex;
    border-bottom: 2px solid var(--primary-color);
    flex-wrap: wrap;
    flex-direction: row;
}
.about-tab-btn {
    padding: 15px 25px;
    font-size: 15px;
    font-weight: 600;
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    border-bottom: none;
    margin-right: 5px;
    border-radius: 8px 8px 0 0;
    color: var(--text-muted);
    transition: all 0.2s;
}
.about-tab-btn:hover { background: #e2e8f0; color: #1e293b; }
.about-tab-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.about-tab-content {display: none;padding: 25px;background: var(--bg-white);border-radius: 0 0 8px 8px;line-height: 1.85;border: 1px solid var(--border-color);border-top: none;  font-size: 14px; }
.about-tab-content.active { display: block; animation: fadeIn 0.3s ease; }
.about-tab-content h3 { font-size: 22px; margin-bottom: 20px; color: var(--primary-color); border-bottom: 1px solid #e2e8f0; padding-bottom: 12px; }
.about-tab-content p { margin-bottom: 15px; color: #334155;}
.about-tab-content .contact-box { background: var(--bg-body); padding: 20px; border-radius: 8px; margin-top: 20px; border: 1px solid var(--border-color); }
.about-tab-content .contact-box strong { display: inline-block; width: 110px; color: var(--primary-color); }

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

/* ==========================================================================
   Responsive 보정
   ========================================================================== */
@media (max-width: 1024px) {
    .content-wrapper { flex-direction: column; }
    .aside.view-sidebar { width: 100%; }
    .main-top-section { grid-template-columns: 1fr; }
    .category-grid { grid-template-columns: repeat(2, 1fr); }
    .video-grid { grid-template-columns: repeat(2, 1fr); }
    .issue-card-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .header-top { flex-direction: column; height: auto; padding: 15px 0; gap: 15px; }
    .nav-list li a {padding: 10px;font-size: 14px;}
    .article-list-item { flex-direction: column; }
    .article-list-item .thumb { width: 100%; height: 210px; }
    .category-grid, .video-grid, .issue-card-list { grid-template-columns: 1fr; }
    .article-view-title { font-size: 22px; }
    .article-view-meta {  font-size: 11px; }
    .about-tabs {flex-direction: row;display: flex;margin: 0;}
    .about-tab-btn {width: 33.33%;font-size: 12px;padding: 5px;margin-right: 0;border-radius: 0;border-bottom: 1px solid var(--border-color);}
    .about-hero-img { width: 100%; height: 200px; object-fit: cover; border-radius: 8px; margin-bottom: 10px; box-shadow: 0; }
    .article-view-body { font-size: 16px; }
    
    /* 모바일 슬라이더 보정 */
    .main-hero-article {height: 360px;}
    .main-hero-text {padding: 20px 15px 35px;}
    .main-hero-text h2 { font-size: 17px; margin-bottom: 6px; }
    .main-hero-text p { font-size: 12px; }
    .slide-arrow { width: 34px; height: 34px; font-size: 15px; opacity: 1; }
    .slide-arrow.prev { left: 10px; }
    .slide-arrow.next { right: 10px; }
    .slide-dots { bottom: 15px; right: 15px; }
}


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

[class*=ad_text] h4 em { color:var(--primary-color)!important; font-style: normal; }
.ad_text_D li a:before { border-color:var(--primary-color)!important; }
