/*
Theme Name: Korea Issue
Theme URI: https://korea-issue.kr
Author: Korea Issue
Description: Clean responsive information blog theme for Korea Issue.
Version: 1.2.2
Text Domain: korea-issue
*/
:root{--blue:#1769ff;--navy:#12213d;--muted:#667085;--line:#e7edf5;--bg:#f6f8fc;--white:#fff;--radius:16px;--shadow:0 6px 24px rgba(24,48,84,.07)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--navy);font-family:Pretendard,"Noto Sans KR",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;line-height:1.65}a{color:inherit;text-decoration:none}img{max-width:100%;height:auto;display:block}.container{width:min(1180px,calc(100% - 40px));margin:auto}.site-header{background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:50}.header-inner{min-height:76px;display:flex;align-items:center;gap:34px}.brand{font-size:27px;font-weight:850;letter-spacing:-1.2px;white-space:nowrap}.brand span{color:var(--blue)}.brand small{display:block;font-size:10px;color:#8490a3;letter-spacing:-.2px;margin-top:-6px}.main-nav{display:flex;gap:27px;font-size:14px;font-weight:700;flex:1;justify-content:center}.main-nav a:hover{color:var(--blue)}.header-search{width:270px;display:flex;background:#f3f6fb;border-radius:30px;overflow:hidden}.header-search input{border:0;background:transparent;padding:12px 16px;width:100%;outline:none}.header-search button,.search-box button{border:0;background:var(--blue);color:#fff;padding:0 17px;cursor:pointer}.hero{padding:28px 0 8px}.hero-grid{display:grid;grid-template-columns:1.8fr 1fr;gap:14px}.hero-main,.hero-small{position:relative;border-radius:var(--radius);overflow:hidden;background:#1f3150;min-height:350px;box-shadow:var(--shadow)}.hero-stack{display:grid;gap:14px}.hero-small{min-height:168px}.hero-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.hero-main:after,.hero-small:after{content:"";position:absolute;inset:0;background:linear-gradient(0deg,rgba(7,20,42,.9),rgba(7,20,42,.08) 70%)}.hero-copy{position:absolute;z-index:2;left:28px;right:28px;bottom:24px;color:#fff}.hero-copy h1{font-size:32px;line-height:1.28;margin:9px 0}.hero-small .hero-copy{left:18px;bottom:15px}.hero-small h2{font-size:17px;line-height:1.35;margin:7px 0}.tag{display:inline-block;padding:5px 10px;border-radius:20px;background:var(--blue);color:#fff;font-size:12px;font-weight:750}.meta{font-size:12px;color:#dce5f2}.side-panel,.card,.rank-panel,.article-shell{background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}.side-panel{padding:20px}.side-panel h3{margin:0 0 12px}.search-box{display:flex;border:1px solid var(--line);border-radius:10px;overflow:hidden}.search-box input{width:100%;border:0;padding:13px;outline:none}.keyword-list{display:flex;flex-wrap:wrap;gap:8px;margin-top:18px}.keyword-list a{background:#f1f5fb;padding:7px 10px;border-radius:20px;font-size:12px}.category-strip{display:grid;grid-template-columns:repeat(6,1fr);gap:12px;margin:4px auto 28px}.category-item{background:#fff;border:1px solid var(--line);border-radius:14px;padding:16px;box-shadow:var(--shadow);font-size:13px}.category-item strong{display:block;font-size:14px;margin-bottom:3px}.category-item span{color:var(--muted);font-size:11px}.content-grid{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:24px;padding-bottom:45px}.section-title{display:flex;align-items:center;justify-content:space-between;margin:0 0 16px}.section-title h2{margin:0;font-size:24px}.section-title h2:before{content:"";display:inline-block;width:4px;height:24px;background:var(--blue);border-radius:4px;margin-right:10px;vertical-align:-3px}.post-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.card{overflow:hidden}.card-thumb{aspect-ratio:16/9;background:#eaf0f8;object-fit:cover;width:100%}.card-body{padding:15px}.card .category{font-size:11px;color:var(--blue);font-weight:750}.card h3{font-size:16px;line-height:1.45;margin:5px 0 10px}.card-foot{display:flex;justify-content:space-between;color:#7a8799;font-size:11px}.rank-panel{padding:20px}.rank-panel h3{margin-top:0}.rank-item{display:grid;grid-template-columns:30px 72px 1fr;gap:10px;align-items:center;padding:10px 0;border-bottom:1px solid var(--line)}.rank-item:last-child{border-bottom:0}.rank-num{width:25px;height:25px;border-radius:50%;background:var(--blue);color:#fff;display:grid;place-items:center;font-size:12px;font-weight:800}.rank-thumb{width:72px;height:48px;border-radius:7px;object-fit:cover;background:#edf2f8}.rank-item h4{font-size:12px;line-height:1.35;margin:0}.archive-header{padding:42px 0 20px}.archive-header h1{margin:0;font-size:32px}.archive-header p{color:var(--muted)}.archive-grid{padding-bottom:50px}.article-wrap{width:min(900px,calc(100% - 40px));margin:36px auto 60px}.article-shell{padding:clamp(24px,5vw,54px)}.article-category{color:var(--blue);font-weight:800;font-size:13px}.article-title{font-size:clamp(30px,5vw,46px);line-height:1.25;letter-spacing:-1.5px;margin:10px 0}.article-meta{color:var(--muted);font-size:13px;padding-bottom:22px;border-bottom:1px solid var(--line)}.article-thumb{margin:28px 0;border-radius:14px;width:100%}.entry-content{font-size:17px;color:#25324a}.entry-content h2{font-size:27px;margin-top:44px}.entry-content h3{font-size:21px;margin-top:32px}.entry-content a{color:var(--blue);text-decoration:underline}.entry-content img{border-radius:12px}.site-footer{background:#fff;border-top:1px solid var(--line);padding:30px 0}.footer-inner{display:flex;align-items:center;justify-content:space-between;gap:20px;color:#667085;font-size:12px}.footer-links{display:flex;gap:20px}.pagination{margin-top:24px}.nav-links{display:flex;gap:8px}.page-numbers{background:#fff;border:1px solid var(--line);padding:7px 12px;border-radius:8px}.page-numbers.current{background:var(--blue);color:#fff}.empty{background:#fff;border-radius:14px;padding:30px}.menu-toggle{display:none;border:0;background:none;font-size:24px}
@media(max-width:980px){.header-search{display:none}.hero-grid{grid-template-columns:1.6fr 1fr}.side-panel{grid-column:1/-1}.category-strip{grid-template-columns:repeat(3,1fr)}.content-grid{grid-template-columns:1fr}.post-grid{grid-template-columns:repeat(2,1fr)}.rank-panel{display:none}}
@media(max-width:700px){.container{width:min(100% - 24px,1180px)}.header-inner{min-height:64px}.brand{font-size:23px}.menu-toggle{display:block;margin-left:auto}.main-nav{display:none;position:absolute;left:0;right:0;top:64px;background:#fff;padding:18px 24px;flex-direction:column;gap:14px;border-bottom:1px solid var(--line)}.main-nav.open{display:flex}.hero-grid{grid-template-columns:1fr}.hero-main{min-height:380px}.hero-stack{grid-template-columns:1fr 1fr}.hero-small{min-height:180px}.hero-copy h1{font-size:27px}.category-strip{grid-template-columns:repeat(2,1fr)}.post-grid{grid-template-columns:1fr}.footer-inner{align-items:flex-start;flex-direction:column}.footer-links{flex-wrap:wrap}.article-wrap{width:min(100% - 24px,900px)}.article-shell{padding:24px 20px}}
@media(max-width:480px){.hero-stack{grid-template-columns:1fr}.hero-small{min-height:190px}.category-strip{grid-template-columns:1fr 1fr}.category-item{padding:13px}.hero-copy{left:20px;right:20px}.hero-copy h1{font-size:24px}}

/* v1.1: dynamic categories + thumbnail-safe featured layout */
.hero-grid{align-items:start}
.hero-primary{min-width:0}
.hero-main,.hero-small{display:block;position:relative;min-height:0;background:#fff;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow)}
.hero-main:after,.hero-small:after{display:none}
.hero-media{position:static;width:100%;object-fit:cover;background:#eaf0f8}
.hero-main .hero-media{aspect-ratio:16/9}
.hero-small .hero-media{aspect-ratio:16/8.4}
.hero-text{position:static;color:var(--navy);padding:18px 20px 20px}
.hero-main .hero-text{padding:20px 24px 23px}
.hero-text h1{font-size:27px;line-height:1.32;margin:9px 0 8px;letter-spacing:-.6px}
.hero-text p{margin:0 0 12px;color:var(--muted);font-size:14px}
.hero-small .hero-text{padding:14px 16px 16px}
.hero-small h2{font-size:16px;line-height:1.42;margin:7px 0 9px}
.hero-text .meta{color:#7a8799}
.keyword-title{margin-top:24px!important}
.category-strip{grid-template-columns:repeat(6,minmax(0,1fr))}
.category-item{min-height:82px}
@media(max-width:980px){.hero-main .hero-media{aspect-ratio:16/9}.hero-small .hero-media{aspect-ratio:16/9}}
@media(max-width:700px){.hero-main,.hero-small{min-height:0}.hero-text h1{font-size:23px}.hero-stack{grid-template-columns:1fr 1fr}}
@media(max-width:480px){.hero-stack{grid-template-columns:1fr}.hero-small{min-height:0}}

/* HERO - final desktop layout */
@media (min-width:981px) {
    .hero-grid {
        align-items:stretch;
    }

    .hero-primary {
        display:flex;
        min-width:0;
    }

    .hero-main {
        width:100%;
        height:auto;
        overflow:hidden;
    }

    .hero-main .hero-media {
        width:100%;
        aspect-ratio:16/9;
        height:auto;
        object-fit:cover;
    }

    .hero-stack {
        height:auto;
        display:grid;
        grid-template-rows:repeat(2, minmax(0, 1fr));
        gap:14px;
        align-self:stretch;
    }

    .hero-small {
        height:100%;
        min-height:0;
        display:flex;
        flex-direction:column;
        overflow:hidden;
    }

    .hero-small .hero-media {
        width:100%;
        aspect-ratio:16/9;
        height:auto;
        object-fit:cover;
        flex:none;
    }

    .hero-small .hero-text {
        padding:11px 14px 12px;
        display:flex;
        flex-direction:column;
        flex:1;
        min-height:0;
    }

    .hero-small .tag {
        align-self:flex-start;
        flex:none;
    }

    .hero-small h2 {
        font-size:15px;
        line-height:1.4;
        margin:6px 0;
        display:-webkit-box;
        -webkit-line-clamp:2;
        -webkit-box-orient:vertical;
        overflow:hidden;
    }

    .hero-small .meta {
        margin-top:auto;
        padding-top:3px;
        flex:none;
    }
}

/* =========================================
   2. 최신 글 카드
   이미지 / 카테고리 / 제목 / 날짜 라인 통일
   ========================================= */

.post-grid {
    align-items:stretch;
}

.post-grid .card {
    display:flex;
    flex-direction:column;
    height:100%;
}

.post-grid .card-thumb {
    width:100%;
    aspect-ratio:16/9;
    object-fit:cover;
    flex:none;
}

.post-grid .card-body {
    display:flex;
    flex-direction:column;
    flex:1;
    padding:15px;
}

/* 카테고리 영역 높이 통일 */
.post-grid .card .category {
    display:block;
    min-height:18px;
}

/* 제목은 항상 최대 2줄 공간 확보 */
.post-grid .card h3 {
    font-size:16px;
    line-height:1.45;
    margin:5px 0 10px;

    min-height:46.4px;

    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
}

/* 날짜/조회수는 무조건 카드 맨 아래 */
.post-grid .card-foot {
    margin-top:auto;
    padding-top:3px;
}


/* =========================================
   3. 주간 인기글
   썸네일 비율 유지 + 잘림 최소화
   ========================================= */


/* ===== Weekly Popular TOP 5 ===== */

.popular-section {
    margin-top: 16px;
    margin-bottom: 55px;
}

.popular-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* 카드 */
.popular-grid .rank-item {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    padding: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
}

/* 썸네일 */
.popular-grid .rank-thumb {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: #f5f7fa;
    border-radius: 0;
}

/* 카드 내용 */
.popular-grid .rank-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    padding: 12px;
}

/* 번호 + 제목 */
.popular-grid .rank-title {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
}

/* 순위 번호 */
.popular-grid .rank-num {
    position: static;
    flex: 0 0 23px;
    width: 23px;
    height: 23px;
    margin: 0;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

/* 제목 */
.popular-grid .rank-title h4 {
    flex: 1;
    min-width: 0;
    margin: 1px 0 0;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 750;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 날짜 / 조회수 */
.popular-grid .card-foot {
    margin-top: auto;
    padding-top: 12px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 10px;
    color: #7a8799;
}

/* 태블릿 */
@media (max-width: 1000px) {
    .popular-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* 모바일 */
@media (max-width: 700px) {
    .popular-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .popular-grid {
        grid-template-columns: 1fr;
    }
}


/* 인기글 번호 - 첫 줄에만 배치 */
.popular-grid .rank-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;

    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    font-weight: 750;
}

.popular-grid .rank-title .rank-num {
    display: inline-flex;
    vertical-align: middle;

    width: 23px;
    height: 23px;
    margin-right: 7px;

    align-items: center;
    justify-content: center;

    border-radius: 50%;
    background: var(--blue);
    color: #fff;

    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}


/* =========================================
   Korea Issue - Article tables
   ========================================= */

.entry-content table {
    width: 100%;
    margin: 24px 0 28px;
    border-collapse: collapse;
    border-spacing: 0;
    font-size: 15px;
    line-height: 1.6;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
}

.entry-content thead {
    background: #f3f6fb;
}

.entry-content th,
.entry-content td {
    padding: 13px 15px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.entry-content th {
    font-weight: 750;
    color: var(--navy);
    white-space: nowrap;
}

.entry-content th:last-child,
.entry-content td:last-child {
    border-right: 0;
}

.entry-content tbody tr:last-child td {
    border-bottom: 0;
}

.entry-content tbody tr:hover {
    background: #fafcff;
}

/* =========================================
   Korea Issue - Mobile article tables v2
   ========================================= */

@media (max-width: 700px) {

    /* 기본: 2열 정도의 작은 표는 화면 폭에 맞춤 */
    .entry-content table {
        display: table;
        width: 100%;
        font-size: 14px;
    }

    .entry-content th,
    .entry-content td {
        min-width: 0;
        padding: 11px 12px;
    }

    /* 3열 이상인 표는 내용을 억지로 찌그러뜨리지 않음 */
    .entry-content table:has(tr > :nth-child(3)) {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    .entry-content table:has(tr > :nth-child(3)) th,
    .entry-content table:has(tr > :nth-child(3)) td {
        min-width: 120px;
        white-space: nowrap;
    }
}

/* SVG site logo */
.brand-logo {
    width: 210px;
    height: auto;
    display: block;
}

@media (max-width: 700px) {
    .brand-logo {
        width: 180px;
    }
}
