/*
Theme Name: 정담문화신문
Theme URI: https://jdculturenews.com/
Author: 비랜딩 (blanding.kr)
Author URI: https://blanding.kr/
Description: 정담문화신문 전용 경량 뉴스 테마. 워드프레스 메뉴와 카테고리를 기반으로 작동합니다.
Version: 1.0.2
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: jdculture-news
*/

:root {
    --ink: #151515;
    --muted: #6a6a66;
    --line: #deddd8;
    --paper: #ffffff;
    --soft: #f4f3ef;
    --soft-deep: #e9e7e1;
    --footer: #0b0b0b;
    --container: 1280px;
    --header-height: 92px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "Noto Sans KR", "Malgun Gothic", sans-serif; font-size: 16px; line-height: 1.65; letter-spacing: -.012em; word-break: keep-all; }
body.menu-open { overflow: hidden; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }

.skip-link { position: fixed; z-index: 10000; left: 20px; top: -100px; padding: 10px 16px; color: #fff; background: #000; }
.skip-link:focus { top: 20px; }

.site-header { position: relative; z-index: 1000; height: var(--header-height); background: rgba(255,255,255,.98); border-bottom: 1px solid #ecebe7; }
.site-header-inner { width: min(calc(100% - 64px), var(--container)); height: 100%; margin: 0 auto; display: grid; grid-template-columns: minmax(220px,1fr) auto; align-items: center; gap: 36px; }
.site-brand { display: inline-flex; align-items: center; width: fit-content; font-size: 30px; font-weight: 700; letter-spacing: -.055em; line-height: 1; }
.site-brand img { width: auto; max-width: 260px; max-height: 56px; object-fit: contain; }
.primary-navigation { justify-self: end; }
.site-menu, .site-menu ul { margin: 0; padding: 0; list-style: none; }
.site-menu { display: flex; align-items: center; gap: 34px; }
.site-menu > li { position: relative; }
.site-menu > li > a { position: relative; display: block; padding: 33px 0 31px; font-size: 15px; font-weight: 500; white-space: nowrap; }
.site-menu > li > a::after { content: ""; position: absolute; right: 0; bottom: 24px; left: 0; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: right; transition: transform .22s ease; }
.site-menu > li:hover > a::after, .site-menu > li.current-menu-item > a::after, .site-menu > li.current-menu-ancestor > a::after, .site-menu > li > a:focus-visible::after { transform: scaleX(1); transform-origin: left; }
.site-menu .sub-menu { position: absolute; left: -18px; top: calc(100% - 12px); min-width: 190px; padding: 12px 0; color: #fff; background: var(--ink); box-shadow: 0 14px 34px rgba(0,0,0,.15); opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s, transform .2s, visibility .2s; }
.site-menu > li:last-child > .sub-menu { right: 0; left: auto; }
.site-menu .sub-menu a { display: block; padding: 9px 18px; font-size: 14px; white-space: nowrap; }
.site-menu .sub-menu a:hover, .site-menu .sub-menu a:focus-visible { background: rgba(255,255,255,.1); }
.site-menu li:hover > .sub-menu, .site-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.menu-toggle { display: none; }

.site-main { min-height: 60vh; }
.content-wrap { width: min(calc(100% - 64px), var(--container)); margin: 0 auto; }

.home-hero { min-height: 540px; display: grid; place-items: center; text-align: center; background-image: linear-gradient(rgba(255,255,255,.52),rgba(255,255,255,.52)), var(--hero-image); background-position: center; background-size: cover; }
.home-hero-inner { width: min(calc(100% - 40px), 1180px); padding: 72px 20px; }
.hero-kicker { margin: 0 0 18px; color: #474743; font-size: 12px; font-weight: 700; letter-spacing: .22em; }
.home-hero h1 { margin: 0; font-size: 46px; font-weight: 700; line-height: 1.22; letter-spacing: -.045em; }
.home-hero h1::after { content: ""; display: block; width: 62px; height: 2px; margin: 24px auto 25px; background: var(--ink); }
.home-hero p:last-child { margin: 0; font-size: 21px; font-weight: 500; line-height: 1.8; letter-spacing: -.025em; }

.news-section { padding: 116px 0 124px; }
.news-section-alt { background: var(--soft); }
.section-heading { margin-bottom: 42px; display: flex; align-items: end; justify-content: space-between; gap: 30px; border-bottom: 1px solid var(--ink); }
.section-heading > div { padding-bottom: 22px; }
.section-heading p { margin: 0 0 7px; color: var(--muted); font-size: 13px; font-weight: 500; }
.section-heading h2 { margin: 0; font-size: 34px; font-weight: 700; line-height: 1.25; letter-spacing: -.045em; }
.section-heading > a { margin-bottom: 23px; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.section-heading > a span { transition: transform .2s; }
.section-heading > a:hover span, .section-heading > a:focus-visible span { transform: translateX(4px); }

.post-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 38px; }
.post-card { min-width: 0; }
.post-card-link { display: block; height: 100%; }
.post-card-media { position: relative; overflow: hidden; aspect-ratio: 3 / 2; background: var(--soft-deep); }
.post-card-media img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .45s cubic-bezier(.2,.75,.3,1); }
.post-card-media.is-empty { display: grid; place-items: center; background: linear-gradient(135deg,#ebe9e3,#d9d6ce); }
.post-card-media.is-empty span { max-width: 75%; color: #6e6b64; font-size: 14px; font-weight: 600; text-align: center; }
.post-card-link:hover .post-card-media img, .post-card-link:focus-visible .post-card-media img { transform: scale(1.035); }
.post-card-body { padding-top: 19px; }
.post-card-category { margin: 0 0 9px; color: var(--muted); font-size: 13px; }
.post-card h3 { margin: 0; font-size: 19px; font-weight: 600; line-height: 1.48; letter-spacing: -.025em; }
.post-card time { margin-top: 14px; display: block; color: #767672; font-family: Arial,sans-serif; font-size: 13px; letter-spacing: .01em; }
.empty-state { margin: 0; padding: 70px 0; color: var(--muted); text-align: center; }

.archive-hero, .page-hero { padding: 92px 0 58px; background: var(--soft); border-bottom: 1px solid var(--line); }
.archive-hero p, .page-hero p { margin: 0 0 8px; color: var(--muted); font-size: 13px; letter-spacing: .08em; }
.archive-hero h1, .page-hero h1 { margin: 0; font-size: 44px; line-height: 1.25; letter-spacing: -.05em; }
.archive-content { padding: 74px 0 110px; }
.archive-content .post-grid { row-gap: 58px; }
.pagination { margin-top: 64px; display: flex; justify-content: center; }
.pagination .nav-links { display: flex; gap: 4px; }
.pagination a, .pagination span { min-width: 42px; height: 42px; padding: 0 12px; display: grid; place-items: center; border: 1px solid var(--line); font-size: 14px; }
.pagination .current { color: #fff; background: var(--ink); border-color: var(--ink); }

.article-wrap { width: min(calc(100% - 64px), 860px); margin: 0 auto; padding: 86px 0 120px; }
.article-header { margin-bottom: 52px; padding-bottom: 34px; border-bottom: 1px solid var(--line); }
.article-header .article-category { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.article-header h1 { margin: 0; font-size: 46px; font-weight: 700; line-height: 1.3; letter-spacing: -.045em; }
.article-header time { margin-top: 22px; display: block; color: var(--muted); font-family: Arial,sans-serif; font-size: 13px; }
.article-content { font-size: 17px; line-height: 1.85; }
.article-content > *:first-child { margin-top: 0; }
.article-content h2, .article-content h3 { margin: 2.2em 0 .8em; line-height: 1.4; letter-spacing: -.03em; }
.article-content p { margin: 0 0 1.35em; }
.article-content img { display: block; margin: 32px auto; }
.article-content iframe { max-width: 100%; }
.article-content a { text-decoration: underline; text-underline-offset: 3px; }

.page-content { width: min(calc(100% - 64px), 1120px); margin: 0 auto; padding: 70px 0 110px; }
.page-content > *:first-child { margin-top: 0; }
.page-content .kboard-default-button-small, .page-content .kboard-default-button-medium, .page-content .kboard-default-button-large { border-radius: 0 !important; }

.site-footer { color: #e7e7e7; background: var(--footer); }
.footer-inner { width: min(calc(100% - 64px), var(--container)); margin: 0 auto; padding: 58px 0 48px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 80px; }
.footer-identity strong { margin-bottom: 18px; display: block; color: #fff; font-size: 21px; }
.footer-inner p { margin: 5px 0; color: #c9c9c9; font-size: 13px; line-height: 1.75; }
.footer-inner p span { margin: 0 5px; color: #777; }
.footer-meta { align-self: end; }
.footer-links { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { font-size: 13px; font-weight: 600; }
.footer-links a:hover, .footer-links a:focus-visible { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom { min-height: 66px; padding: 0 max(32px,calc((100vw - var(--container))/2)); display: flex; align-items: center; justify-content: space-between; gap: 20px; background: #242424; }
.footer-bottom p { margin: 0; color: #bdbdbd; font-size: 12px; }
.back-to-top { width: 68px; height: 38px; border: 1px solid #444; color: #fff; background: #050505; font-size: 12px; font-weight: 700; cursor: pointer; }

@media (max-width: 1100px) {
    .site-header-inner { width: calc(100% - 40px); gap: 24px; }
    .site-menu { gap: 20px; }
    .site-menu > li > a { font-size: 14px; }
    .content-wrap, .footer-inner { width: calc(100% - 48px); }
}

@media (max-width: 1100px) {
    :root { --header-height: 72px; }
    body { font-size: 15px; }
    .site-header-inner { grid-template-columns: 1fr auto; }
    .site-brand { font-size: 24px; }
    .menu-toggle { position: relative; width: 42px; height: 42px; padding: 9px; display: flex; flex-direction: column; justify-content: center; gap: 5px; border: 0; background: transparent; cursor: pointer; }
    .menu-toggle span { width: 24px; height: 2px; display: block; background: var(--ink); transition: transform .2s, opacity .2s; }
    .menu-toggle b { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
    .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
    .primary-navigation { position: fixed; z-index: 999; inset: var(--header-height) 0 0; padding: 28px 24px 60px; overflow-y: auto; color: #fff; background: rgba(15,15,15,.98); opacity: 0; visibility: hidden; transform: translateY(-10px); transition: opacity .22s, transform .22s, visibility .22s; }
    .primary-navigation.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
    .site-menu { display: block; }
    .site-menu > li { border-bottom: 1px solid rgba(255,255,255,.14); }
    .site-menu > li > a { padding: 18px 2px; color: #fff; font-size: 20px; }
    .site-menu > li > a::after { display: none; }
    .site-menu .sub-menu { position: static; min-width: 0; padding: 0 0 14px 16px; display: block; color: #d0d0d0; background: transparent; box-shadow: none; opacity: 1; visibility: visible; transform: none; }
    .site-menu .sub-menu a { padding: 7px 0; font-size: 15px; }

    .home-hero { min-height: 470px; }
    .home-hero h1 { font-size: 38px; }
    .home-hero p:last-child { font-size: 17px; }
    .news-section { padding: 84px 0 92px; }
    .post-grid { gap: 24px; }
    .post-card h3 { font-size: 17px; }
    .article-header h1 { font-size: 38px; }
    .footer-inner { grid-template-columns: 1fr; gap: 30px; }
    .footer-meta { align-self: auto; }
}

@media (max-width: 620px) {
    .site-header-inner { width: calc(100% - 28px); }
    .content-wrap, .footer-inner, .page-content, .article-wrap { width: calc(100% - 32px); }
    .home-hero { min-height: 430px; }
    .home-hero-inner { padding: 54px 10px; }
    .hero-kicker { margin-bottom: 14px; font-size: 10px; }
    .home-hero h1 { font-size: 31px; line-height: 1.3; }
    .home-hero h1::after { margin: 20px auto; }
    .home-hero p:last-child { font-size: 15px; line-height: 1.75; }
    .home-hero p:last-child br { display: none; }
    .news-section { padding: 68px 0 76px; }
    .section-heading { margin-bottom: 28px; align-items: end; }
    .section-heading > div { padding-bottom: 16px; }
    .section-heading p { margin-bottom: 4px; font-size: 11px; }
    .section-heading h2 { font-size: 26px; }
    .section-heading > a { margin-bottom: 16px; font-size: 12px; white-space: nowrap; }
    .post-grid { grid-template-columns: 1fr; gap: 42px; }
    .post-card-body { padding-top: 15px; }
    .post-card h3 { font-size: 18px; }
    .archive-hero, .page-hero { padding: 64px 0 42px; }
    .archive-hero h1, .page-hero h1 { font-size: 32px; }
    .archive-content { padding: 52px 0 80px; }
    .article-wrap { padding: 58px 0 80px; }
    .article-header { margin-bottom: 36px; }
    .article-header h1 { font-size: 31px; }
    .article-content { font-size: 16px; }
    .page-content { padding: 48px 0 80px; overflow-x: auto; }
    .footer-inner { padding: 44px 0 36px; }
    .footer-bottom { padding: 14px 16px; align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
