/*
Theme Name: LKT News (룩코리아타임즈)
Theme URI: https://lookkoreatimes.com/
Author: 룩코리아타임즈
Description: 경제신문형 레이아웃의 룩코리아타임즈 전용 뉴스 테마. 상단 헤드라인 + 많이 본 뉴스, 섹션별 블록, 기사 상세 페이지.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: lkt
*/

:root {
	--brand: #0a3d8f;
	--brand-dark: #072b66;
	--accent: #e60012;
	--text: #111;
	--text-2: #444;
	--muted: #888;
	--line: #d2d4d8;
	--line-mid: #a9adb3;
	--line-strong: #111;
	--bg: #fff;
	--bg-soft: #f5f6f8;
	--serif: 'Noto Serif KR', 'Nanum Myeongjo', serif;
	--sans: 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
	--wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 15px; line-height: 1.6; color: var(--text); background: var(--bg); word-break: keep-all; overflow-wrap: anywhere; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.35; }
button { font: inherit; cursor: pointer; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }

/* ---------- Top bar ---------- */
.topbar { border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.topbar-in { display: flex; justify-content: space-between; align-items: center; height: 34px; }
.util { display: flex; gap: 14px; }
.util a:hover { color: var(--brand); }

/* ---------- Masthead ---------- */
.masthead-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 20px; }
.logo { display: flex; align-items: center; gap: 14px; }
.logo:hover { text-decoration: none; }
.logo img { height: 56px; width: auto; }
.logo-mark svg { display: block; width: 54px; height: 54px; }
.logo-mark rect { fill: var(--brand); }
.logo-mark path { fill: #fff; }
.logo-mark circle { fill: var(--accent); }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-text b { font-family: var(--serif); font-weight: 900; font-size: 36px; letter-spacing: -1.5px; color: var(--text); }
.logo-text small { margin-top: 7px; font-size: 11.5px; font-weight: 700; letter-spacing: 5.4px; color: var(--brand); }
.search { display: flex; align-items: center; border: 2px solid var(--brand); border-radius: 24px; padding: 0 6px 0 16px; width: 300px; height: 42px; }
.search input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 14px; background: transparent; min-width: 0; }
.search button { border: 0; background: none; color: var(--brand); display: flex; padding: 6px; }
.menu-toggle { display: none; width: 36px; height: 36px; border: 0; background: none; padding: 8px 6px; flex-direction: column; justify-content: space-between; }
.menu-toggle span { display: block; height: 2px; background: var(--text); }

/* ---------- GNB ---------- */
.gnb { border-top: 1px solid var(--line-strong); border-bottom: 3px solid var(--line-strong); background: var(--bg); position: sticky; top: 0; z-index: 50; }
.gnb-list { display: flex; }
.gnb-list > li { position: relative; }
.gnb-list > li > a { display: block; padding: 13px 20px; font-size: 17px; font-weight: 700; letter-spacing: -0.3px; }
.gnb-list > li:first-child > a { padding-left: 0; }
.gnb-list > li > a:hover, .gnb-list > li.is-current > a, .gnb-list > li.current-menu-item > a, .gnb-list > li.current-menu-ancestor > a { color: var(--brand); text-decoration: none; }
.gnb-list > li.is-current > a::after, .gnb-list > li.current-menu-item > a::after { content: ''; position: absolute; left: 20px; right: 20px; bottom: -3px; height: 3px; background: var(--brand); }
.gnb-list > li + li > a::before { content: ''; position: absolute; left: 0; top: 50%; width: 1px; height: 12px; margin-top: -6px; background: var(--line); }
.gnb-list > li:first-child.is-current > a::after { left: 0; }
.gnb .sub-menu { display: none; position: absolute; top: 100%; left: 8px; min-width: 150px; background: var(--bg); border: 1px solid var(--line); border-top: 2px solid var(--brand); padding: 8px 0; box-shadow: 0 8px 20px rgba(0,0,0,.08); }
.gnb-list > li:hover > .sub-menu, .gnb-list > li:focus-within > .sub-menu { display: block; }
.gnb .sub-menu a { display: block; padding: 6px 18px; font-size: 14px; white-space: nowrap; }
.gnb .sub-menu a:hover { color: var(--brand); background: var(--bg-soft); text-decoration: none; }

/* ---------- Ticker ---------- */
.ticker { background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.ticker-in { display: flex; align-items: center; height: 40px; gap: 14px; overflow: hidden; }
.ticker-label { flex: none; color: var(--accent); font-size: 13px; font-weight: 900; }
.ticker-list { position: relative; flex: 1; height: 40px; }
.ticker-list li { position: absolute; inset: 0; display: flex; align-items: center; gap: 10px; opacity: 0; transform: translateY(8px); transition: opacity .35s, transform .35s; font-size: 14px; white-space: nowrap; }
.ticker-list li.on { opacity: 1; transform: none; }
.ticker-list a { overflow: hidden; text-overflow: ellipsis; }
.ticker-list time { flex: none; color: var(--muted); font-size: 12px; }

.site-main { padding: 28px 0 60px; }

/* ---------- Shared bits ---------- */
.meta { display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--muted); margin-top: 8px; }
.meta .cat { color: var(--brand); font-weight: 700; }
.thumb { display: block; overflow: hidden; background: var(--bg-soft); }
.thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .3s; }
.thumb:hover img { transform: scale(1.03); }
.headlines li { position: relative; padding: 9px 0 9px 12px; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.45; }
.headlines li:last-child { border-bottom: 0; }
.headlines li::before { content: ''; position: absolute; left: 0; top: 18px; width: 4px; height: 4px; background: var(--brand); }
.headlines a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Lead story */
.lead-title { font-family: var(--serif); font-weight: 900; letter-spacing: -0.5px; }
.lead-excerpt { margin: 10px 0 0; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lead.has-img .lead-body { padding-top: 14px; }

/* Cards */
.card-title { font-size: 16px; font-weight: 700; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card.has-img .card-title { margin-top: 10px; }
.card-excerpt { margin: 6px 0 0; font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Home: top news ---------- */
.top-news { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; padding-bottom: 32px; border-bottom: 1px solid var(--line-mid); }
.top-side, .col-side { border-left: 1px solid var(--line); padding-left: 28px; }
.top-main .lead-title { font-size: 34px; }
.top-main .lead.no-img { padding: 6px 0 24px; border-bottom: 1px solid var(--line-mid); }
.top-main .lead.no-img .lead-title { font-size: 38px; line-height: 1.3; }
.top-main .lead.no-img .lead-excerpt { font-size: 17px; -webkit-line-clamp: 3; }
.top-main .lead.has-img { display: grid; grid-template-columns: 1.35fr 1fr; gap: 24px; align-items: start; padding-bottom: 24px; border-bottom: 1px solid var(--line-mid); }
.top-main .lead.has-img .lead-body { padding-top: 0; }
.top-subs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; padding: 20px 0; border-bottom: 1px solid var(--line-mid); }
.top-subs .card { padding: 0 18px; border-left: 1px solid var(--line); }
.top-subs .card:first-child { padding-left: 0; border-left: 0; }
.top-subs .card:last-child { padding-right: 0; }
.top-more { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; padding-top: 8px; }
.top-more li:last-child { border-bottom: 1px solid var(--line); }

/* Ranking */
.side-box { margin-bottom: 32px; }
.side-title { font-size: 18px; font-weight: 900; padding: 10px 0; border-top: 3px solid var(--line-strong); border-bottom: 1px solid var(--line-mid); margin-bottom: 6px; }
.rank li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; line-height: 1.45; }
.rank .num { flex: none; width: 22px; font-family: var(--serif); font-size: 19px; font-weight: 900; color: var(--brand); line-height: 1.1; font-style: italic; }
.rank li:nth-child(-n+3) .num { color: var(--accent); }
.rank a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Two-column layout ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; margin-top: 32px; }
.col-side { position: relative; }

/* Section blocks */
.section-block { margin-bottom: 40px; }
.sec-head { display: flex; align-items: baseline; gap: 16px; border-top: 3px solid var(--line-strong); border-bottom: 1px solid var(--line-mid); padding: 12px 0; margin-bottom: 18px; }
.sec-head h2 { font-size: 22px; font-weight: 900; letter-spacing: -0.5px; }
.sec-head h2 a:hover { color: var(--brand); text-decoration: none; }
.sec-subs { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--text-2); }
.sec-subs a:hover { color: var(--brand); }
.sec-head .more { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.sec-body { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.sec-list { border-left: 1px solid var(--line); padding-left: 24px; }
.sec-lead .lead-title { font-size: 22px; }
.sec-lead .lead.no-img { background: var(--bg-soft); padding: 22px; border-left: 4px solid var(--brand); }
.sec-list .headlines li:first-child { padding-top: 0; }
.sec-list .headlines li:first-child::before { top: 9px; }

/* ---------- Archive ---------- */
.page-head { border-bottom: 3px solid var(--line-strong); padding-bottom: 14px; }
.page-head h1 { font-size: 30px; font-weight: 900; letter-spacing: -0.5px; }
.page-desc { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.page-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.page-tabs a { display: block; padding: 5px 14px; border: 1px solid var(--line); border-radius: 18px; font-size: 14px; }
.page-tabs a:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.page-tabs .on a { background: var(--brand); border-color: var(--brand); color: #fff; }
.layout:has(> .col-main > .rows) { margin-top: 0; }
.row { display: flex; gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.row-body { flex: 1; min-width: 0; }
.row-title { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; }
.row-excerpt { margin: 8px 0 0; color: var(--text-2); font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row .thumb { flex: none; width: 200px; }
.row .thumb img { aspect-ratio: 3 / 2; }
.empty { padding: 60px 0; text-align: center; color: var(--muted); }

.pagination { margin-top: 32px; }
.pagination ul { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px; }
.pagination a, .pagination span { display: block; min-width: 36px; padding: 6px 10px; text-align: center; border: 1px solid var(--line); font-size: 14px; }
.pagination a:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.pagination .current { background: var(--brand); border-color: var(--brand); color: #fff; }
.pagination .dots { border: 0; }

/* ---------- Article ---------- */
.article-head { border-bottom: 2px solid var(--line-strong); padding-bottom: 18px; }
.article-cat { display: inline-block; color: var(--brand); font-weight: 700; font-size: 14px; margin-bottom: 10px; }
.article-title { font-family: var(--serif); font-size: 34px; font-weight: 900; letter-spacing: -0.8px; line-height: 1.35; }
.article-sub { margin: 14px 0 0; padding-left: 14px; border-left: 3px solid var(--brand); color: var(--text-2); font-size: 17px; font-weight: 500; }
.article-info { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 18px; font-size: 13px; color: var(--muted); }
.article-info .byline { color: var(--text); font-weight: 700; }
.tools { display: flex; gap: 6px; margin-left: auto; }
.tools button, .tools a { border: 1px solid var(--line); background: var(--bg); padding: 4px 10px; font-size: 12px; color: var(--text-2); border-radius: 3px; }
.tools button:hover, .tools a:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.article-figure { margin: 28px 0 0; }
.article-figure figcaption { font-size: 13px; color: var(--muted); padding-top: 8px; }
.article-body { margin-top: 28px; font-size: 18px; line-height: 1.85; color: #222; }
.article-body p { margin: 0 0 1.4em; }
.article-body h2, .article-body h3 { margin: 1.6em 0 .8em; font-size: 1.15em; font-weight: 700; }
.article-body img { margin: 1.2em auto; }
.article-body a { color: var(--brand); text-decoration: underline; }
.article-body blockquote { margin: 1.6em 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--brand); color: var(--text-2); }
.article-body figure { margin: 1.6em 0; }
.article-body figcaption, .article-body .wp-caption-text { font-size: 13px; color: var(--muted); }
.article-body table { width: 100%; border-collapse: collapse; font-size: 15px; }
.article-body td, .article-body th { border: 1px solid var(--line); padding: 8px; }
.article-foot { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 32px; }
.copyright { margin: 0; font-size: 13px; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tags a { padding: 4px 12px; background: var(--bg-soft); border-radius: 16px; font-size: 13px; color: var(--text-2); }
.tags a::before { content: '#'; }
.related { margin-top: 44px; }
.related-title { font-size: 20px; font-weight: 900; padding: 10px 0; border-top: 3px solid var(--line-strong); border-bottom: 1px solid var(--line-mid); margin-bottom: 20px; }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 80px 0; }
.notfound h1 { font-size: 28px; font-weight: 900; }
.notfound p { color: var(--text-2); }
.search-inline { margin: 24px auto; }
.search-inline button { padding: 6px 12px; font-weight: 700; }
.btn { display: inline-block; padding: 10px 28px; background: var(--brand); color: #fff; border-radius: 3px; }
.btn:hover { background: var(--brand-dark); text-decoration: none; }

/* ---------- Footer ---------- */
.site-footer { background: #1b1d22; color: #a7abb3; font-size: 13px; }
.footer-sections { display: flex; flex-wrap: wrap; gap: 6px 28px; padding: 22px 0; border-bottom: 1px solid #33363d; }
.footer-sections a { color: #fff; font-weight: 700; font-size: 15px; }
.footer-links ul { display: flex; flex-wrap: wrap; gap: 6px 20px; padding: 16px 0; border-bottom: 1px solid #33363d; }
.footer-links a { color: #d6d8dc; }
.footer-info { padding: 26px 0 36px; }
.footer-logo { margin-bottom: 16px; }
.footer-logo .logo-mark svg { width: 38px; height: 38px; }
.footer-logo .logo-mark rect { fill: #fff; }
.footer-logo .logo-mark path { fill: var(--brand); }
.footer-logo { display: flex; align-items: center; gap: 10px; }
.footer-logo .logo-text b { color: #fff; font-size: 24px; }
.footer-logo .logo-text small { color: #9db4dc; font-size: 9px; letter-spacing: 3.6px; margin-top: 5px; }
.footer-info p { margin: 0 0 6px; line-height: 1.7; }
.copy { color: #6f747d; }

.to-top { position: fixed; right: 20px; bottom: 20px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--brand); color: #fff; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s; box-shadow: 0 4px 12px rgba(0,0,0,.2); z-index: 60; }
.to-top.show { opacity: 1; pointer-events: auto; }

/* ---------- WordPress core ---------- */
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.sticky, .gallery-caption, .bypostauthor { }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
	.top-news, .layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; }
	.top-side, .col-side { padding-left: 24px; }
	.top-subs { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 20px; }
	.top-subs .card:nth-child(3) { padding-left: 0; border-left: 0; }
	.gnb-list > li > a { padding: 13px 14px; font-size: 16px; }
}

@media (max-width: 820px) {
	body { font-size: 15px; }
	.wrap { padding: 0 16px; }
	.topbar .util { display: none; }
	.masthead-in { padding: 14px 16px; gap: 12px; }
	.menu-toggle { display: flex; flex: none; }
	.logo { flex: 1; display: flex; justify-content: center; }
	.logo { gap: 8px; }
	.logo img { height: 38px; }
	.logo-mark svg { width: 34px; height: 34px; }
	.logo-text b { font-size: 23px; letter-spacing: -1px; }
	.logo-text small { font-size: 7.5px; letter-spacing: 3.4px; margin-top: 4px; }
	.search { width: 40px; border: 0; padding: 0; justify-content: flex-end; }
	.search input { display: none; }
	.menu-open .search { position: absolute; left: 16px; right: 16px; top: 120px; width: auto; border: 2px solid var(--brand); padding: 0 6px 0 16px; background: var(--bg); z-index: 80; }
	.menu-open .search input { display: block; }
	.masthead { position: relative; }

	.gnb .wrap { overflow-x: auto; scrollbar-width: none; }
	.gnb .wrap::-webkit-scrollbar { display: none; }
	.gnb-list > li > a { padding: 11px 12px; font-size: 15px; white-space: nowrap; }
	.gnb .sub-menu { display: none !important; }
	.menu-open .gnb { position: static; }
	.menu-open .gnb .wrap { overflow: visible; padding-top: 64px; }
	.menu-open .gnb-list { flex-direction: column; }
	.menu-open .gnb-list > li { border-bottom: 1px solid var(--line); }
	.menu-open .gnb-list > li > a { padding: 12px 0; }
	.menu-open .gnb .sub-menu { display: flex !important; flex-wrap: wrap; gap: 4px 14px; position: static; border: 0; box-shadow: none; padding: 0 0 12px; }
	.menu-open .gnb .sub-menu a { padding: 2px 0; color: var(--text-2); }
	.gnb-list > li.is-current > a::after { left: 12px; right: 12px; }

	.top-news, .layout { grid-template-columns: minmax(0, 1fr); }
	.top-side, .col-side, .sec-list { border-left: 0; padding-left: 0; }
	.gnb-list > li + li > a::before { display: none; }
	.top-main .lead-title, .top-main .lead.no-img .lead-title { font-size: 26px; }
	.top-main .lead.has-img { grid-template-columns: 1fr; gap: 0; }
	.top-main .lead.has-img .lead-body { padding-top: 14px; }
	.top-more { grid-template-columns: 1fr; }
	.sec-body { grid-template-columns: 1fr; gap: 16px; }
	.sec-subs { display: none; }
	.row { gap: 14px; padding: 16px 0; }
	.row .thumb { width: 110px; }
	.row-title { font-size: 17px; }
	.row-excerpt { display: none; }
	.article-title { font-size: 26px; }
	.article-body { font-size: 17px; }
	.tools { margin-left: 0; width: 100%; }
	.related-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
}

@media (max-width: 480px) {
	.top-subs { grid-template-columns: 1fr; }
	.top-subs .card { padding: 0 0 14px !important; border-left: 0 !important; border-bottom: 1px solid var(--line); }
	.top-subs .card:last-child { border-bottom: 0; padding-bottom: 0 !important; }
	.ticker-list time { display: none; }
}
