/*
Theme Name: Kilas Publik News
Description: Tema portal berita yang padat dan cepat: headline besar, daftar berita terbaru, terpopuler bernomor, dan kanal per kategori. Nama, logo, dan warna diatur dari Customizer.
Version: 1.4.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: wartakita
*/

:root {
	--wk-accent: #002870;
	--wk-accent-dark: #001e54;
	--wk-accent2: #e00008;
	--wk-ink: #1b1d22;
	--wk-muted: #6b7280;
	--wk-line: #e6e8ec;
	--wk-bg: #f4f5f7;
	--wk-card: #fff;
	--wk-radius: 8px;
	--wk-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--wk-font); color: var(--wk-ink); background: var(--wk-bg); line-height: 1.5; font-size: 16px; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--wk-accent); }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
ul { margin: 0; padding: 0; list-style: none; }
button, input { font: inherit; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wk-container { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* ---------- Header ---------- */
.wk-topbar { background: #fff; border-bottom: 1px solid var(--wk-line); font-size: 12px; color: var(--wk-muted); }
.wk-topbar .wk-container { display: flex; justify-content: space-between; padding-top: 6px; padding-bottom: 6px; }
.wk-header { background: #fff; }
.wk-header .wk-container { display: flex; align-items: center; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.wk-logo { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; color: var(--wk-accent); line-height: 1; flex-shrink: 0; }
.wk-logo:hover { color: var(--wk-accent-dark); }
.wk-logo img { height: 56px; width: auto; }
.wk-search { margin-left: auto; display: flex; flex: 0 1 340px; }
.wk-search input[type="search"] { flex: 1; min-width: 0; border: 1px solid var(--wk-line); border-right: 0; border-radius: 999px 0 0 999px; padding: 9px 16px; background: var(--wk-bg); outline: none; }
.wk-search input[type="search"]:focus { border-color: var(--wk-accent); background: #fff; }
.wk-search button { border: 0; background: var(--wk-accent); color: #fff; padding: 0 18px; border-radius: 0 999px 999px 0; cursor: pointer; font-weight: 600; }
.wk-search button:hover { background: var(--wk-accent-dark); }
.wk-icon-btn { display: none; border: 0; background: none; padding: 8px; cursor: pointer; color: var(--wk-ink); }
.wk-icon-btn svg { display: block; width: 24px; height: 24px; }

.wk-nav { background: var(--wk-accent); border-bottom: 3px solid var(--wk-accent2); position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 6px rgba(0, 0, 0, .12); }
.admin-bar .wk-nav { top: 32px; }
.wk-nav ul { display: flex; overflow-x: auto; scrollbar-width: none; }
.wk-nav ul::-webkit-scrollbar { display: none; }
.wk-nav li { flex-shrink: 0; }
.wk-nav a { display: block; padding: 11px 14px; color: #fff; font-weight: 600; font-size: 14px; white-space: nowrap; }
.wk-nav a:hover { background: var(--wk-accent-dark); color: #fff; }
.wk-nav .current-menu-item > a, .wk-nav .current-cat > a { background: var(--wk-accent2); color: #fff; }
.wk-nav .sub-menu { display: none; }

/* ---------- Ticker ---------- */
.wk-ticker { background: #fff; border-bottom: 1px solid var(--wk-line); font-size: 14px; }
.wk-ticker .wk-container { display: flex; align-items: center; gap: 12px; padding-top: 8px; padding-bottom: 8px; }
.wk-ticker-label { background: var(--wk-accent2); color: #fff; font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; padding: 3px 8px; border-radius: 4px; flex-shrink: 0; }
.wk-ticker-list { position: relative; flex: 1; height: 21px; overflow: hidden; }
.wk-ticker-list a { position: absolute; inset: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transform: translateY(100%); transition: all .4s; font-weight: 500; }
.wk-ticker-list a.is-active { opacity: 1; transform: none; }

/* ---------- Layout ---------- */
.wk-main { padding: 20px 0 40px; }
.wk-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.wk-box { background: var(--wk-card); border-radius: var(--wk-radius); padding: 16px; margin-bottom: 20px; }
.wk-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--wk-line); position: relative; }
.wk-heading::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 56px; height: 2px; background: var(--wk-accent2); }
.wk-heading h2, .wk-heading h1 { font-size: 18px; font-weight: 800; }
.wk-heading a.wk-more { font-size: 13px; color: var(--wk-accent); font-weight: 600; }
.wk-label { color: var(--wk-accent); font-weight: 700; font-size: 12px; }
.wk-meta { font-size: 12px; color: var(--wk-muted); }
.wk-meta .wk-label::after { content: "•"; color: var(--wk-muted); margin: 0 6px; font-weight: 400; }

.wk-thumb { display: block; background: #dfe3ea linear-gradient(135deg, #dfe3ea, #c9cfda); border-radius: 6px; overflow: hidden; aspect-ratio: 16 / 9; }
.wk-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.wk-thumb img.wk-thumb-logo { object-fit: contain; padding: 10% 12%; background: #eef1f6; }
a:hover .wk-thumb img, .wk-thumb:hover img { transform: scale(1.04); }

/* ---------- Hero ---------- */
.wk-hero-main { position: relative; display: block; border-radius: var(--wk-radius); overflow: hidden; color: #fff; }
.wk-hero-main .wk-thumb { border-radius: 0; }
.wk-hero-main::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, rgba(0, 0, 0, .85)); }
.wk-hero-text { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px; z-index: 1; }
.wk-hero-text .wk-label { background: var(--wk-accent2); color: #fff; padding: 3px 8px; border-radius: 4px; display: inline-block; margin-bottom: 8px; }
.wk-hero-text h2 { font-size: 28px; font-weight: 800; }
.wk-hero-main:hover { color: #fff; }
.wk-hero-main:hover h2 { text-decoration: underline; }
.wk-hero-sub { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 14px; }
.wk-hero-sub h3 { font-size: 14px; font-weight: 700; margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Feed ---------- */
.wk-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--wk-line); }
.wk-item:first-child { padding-top: 0; }
.wk-item:last-child { border-bottom: 0; padding-bottom: 0; }
.wk-item .wk-thumb { width: 200px; flex-shrink: 0; }
.wk-item-body { min-width: 0; flex: 1; }
.wk-item h3 { font-size: 18px; font-weight: 700; margin: 4px 0 6px; }
.wk-item p { margin: 0; font-size: 14px; color: #4b5563; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wk-loadmore { display: block; width: 100%; margin-top: 16px; padding: 12px; border: 1px solid var(--wk-accent); color: var(--wk-accent); background: #fff; border-radius: 999px; font-weight: 700; cursor: pointer; text-align: center; }
.wk-loadmore:hover { background: var(--wk-accent); color: #fff; }
.wk-loadmore[disabled] { opacity: .6; cursor: wait; }

/* ---------- Kanal (category sections) ---------- */
.wk-kanal-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; }
.wk-kanal-lead h3 { font-size: 20px; font-weight: 800; margin: 10px 0 6px; }
.wk-kanal-list li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--wk-line); }
.wk-kanal-list li:first-child { padding-top: 0; }
.wk-kanal-list li:last-child { border-bottom: 0; }
.wk-kanal-list .wk-thumb { width: 96px; flex-shrink: 0; aspect-ratio: 4 / 3; }
.wk-kanal-list h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }

/* ---------- Sidebar ---------- */
.wk-sidebar { position: sticky; top: 60px; }
.wk-popular { counter-reset: wk-pop; margin: 0; padding: 0; list-style: none; }
.wk-popular li { counter-increment: wk-pop; display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--wk-line); }
.wk-popular li:first-child { padding-top: 0; }
.wk-popular li:last-child { border-bottom: 0; padding-bottom: 0; }
.wk-popular li::before { content: "#" counter(wk-pop); font-size: 26px; font-weight: 800; color: var(--wk-accent2); line-height: 1; min-width: 38px; font-style: italic; }
.wk-popular h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.wk-widget .wk-widget-title { font-size: 18px; font-weight: 800; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 2px solid var(--wk-line); }
.wk-widget ul li { padding: 8px 0; border-bottom: 1px solid var(--wk-line); }
.wk-widget ul li:last-child { border-bottom: 0; }

/* ---------- Single ---------- */
.wk-breadcrumb { font-size: 13px; color: var(--wk-muted); margin-bottom: 12px; }
.wk-breadcrumb a { color: var(--wk-accent); font-weight: 600; }
.wk-breadcrumb span { margin: 0 6px; }
.wk-article-title { font-size: 32px; font-weight: 800; letter-spacing: -0.3px; margin-bottom: 12px; }
.wk-article-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--wk-line); }
.wk-author { font-size: 14px; }
.wk-author strong { color: var(--wk-accent); }
.wk-author time { display: block; color: var(--wk-muted); font-size: 13px; }
.wk-share { display: flex; gap: 8px; }
.wk-share a, .wk-share button { display: inline-flex; align-items: center; justify-content: center; height: 34px; min-width: 34px; padding: 0 12px; border-radius: 999px; border: 0; color: #fff; font-size: 12px; font-weight: 700; cursor: pointer; background: #4b5563; }
.wk-share .wk-wa { background: #1faa59; }
.wk-share .wk-fb { background: #1b63d8; }
.wk-share .wk-x { background: #111; }
.wk-share a:hover, .wk-share button:hover { opacity: .85; color: #fff; }
.wk-figure { margin: 0 0 18px; }
.wk-figure img { width: 100%; border-radius: var(--wk-radius); }
.wk-figure figcaption { font-size: 13px; color: var(--wk-muted); margin-top: 6px; }
.wk-content { font-size: 18px; line-height: 1.75; overflow-wrap: break-word; }
.wk-content p { margin: 0 0 1.2em; }
.wk-content h2 { font-size: 24px; margin: 1.4em 0 .6em; }
.wk-content h3 { font-size: 20px; margin: 1.3em 0 .5em; }
.wk-content a { color: var(--wk-accent); font-weight: 600; }
.wk-content a:hover { text-decoration: underline; }
.wk-content ul, .wk-content ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.wk-content ul { list-style: disc; }
.wk-content blockquote { margin: 1.4em 0; padding: 4px 0 4px 18px; border-left: 4px solid var(--wk-accent); font-style: italic; color: #374151; }
.wk-content img, .wk-content figure { border-radius: 6px; max-width: 100%; }
.wk-content figure { margin: 1.4em 0; }
.wk-content figcaption { font-size: 13px; color: var(--wk-muted); }
.wk-content table { width: 100%; border-collapse: collapse; margin-bottom: 1.2em; font-size: 15px; }
.wk-content th, .wk-content td { border: 1px solid var(--wk-line); padding: 8px 10px; text-align: left; }
.wk-content iframe { max-width: 100%; }
.wk-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.wk-tags a { background: var(--wk-bg); border: 1px solid var(--wk-line); padding: 5px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.wk-tags a:hover { border-color: var(--wk-accent); }
.wk-related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.wk-related h3 { font-size: 15px; font-weight: 700; margin-top: 8px; }

/* ---------- Comments ---------- */
.wk-comments ol { list-style: none; margin: 0; padding: 0; }
.wk-comments .comment-body { padding: 12px 0; border-bottom: 1px solid var(--wk-line); font-size: 15px; }
.wk-comments .children { padding-left: 24px; }
.wk-comments .avatar { float: left; border-radius: 50%; margin-right: 10px; }
.wk-comments .comment-metadata { font-size: 12px; color: var(--wk-muted); }
.wk-comments textarea, .wk-comments input[type="text"], .wk-comments input[type="email"], .wk-comments input[type="url"] { width: 100%; border: 1px solid var(--wk-line); border-radius: 6px; padding: 10px; }
.wk-comments .submit { background: var(--wk-accent); color: #fff; border: 0; padding: 10px 22px; border-radius: 999px; font-weight: 700; cursor: pointer; }

/* ---------- Pagination, 404 ---------- */
.wk-pagination { margin-top: 18px; text-align: center; }
.wk-pagination .page-numbers { display: inline-block; min-width: 36px; padding: 7px 10px; margin: 2px; border-radius: 6px; background: #fff; border: 1px solid var(--wk-line); font-weight: 600; font-size: 14px; }
.wk-pagination .current { background: var(--wk-accent); border-color: var(--wk-accent); color: #fff; }
.wk-empty { text-align: center; padding: 40px 16px; }
.wk-empty h1 { font-size: 26px; margin-bottom: 8px; }
.wk-empty .wk-search { margin: 18px auto 0; max-width: 420px; }

/* ---------- Footer ---------- */
.wk-footer { background: #0b1226; border-top: 4px solid var(--wk-accent2); color: #c7ccd4; padding: 32px 0 20px; font-size: 14px; }
.wk-footer a:hover { color: #fff; }
.wk-footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 28px; }
.wk-footer .wk-logo { color: #fff; display: inline-block; margin-bottom: 10px; }
.wk-footer .wk-logo img { background: #fff; padding: 8px 12px; border-radius: 8px; height: 64px; }
.wk-footer h4 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 10px; }
.wk-footer li { padding: 4px 0; }
.wk-footer-cats { columns: 2; }
.wk-copy { border-top: 1px solid #2a2f37; margin-top: 24px; padding-top: 16px; font-size: 13px; color: #8a919c; text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
	.wk-layout { grid-template-columns: minmax(0, 1fr); }
	.wk-sidebar { position: static; }
}
@media (max-width: 782px) {
	.admin-bar .wk-nav { top: 46px; }
}
@media (max-width: 640px) {
	.admin-bar .wk-nav { top: 0; }
	.wk-topbar { display: none; }
	.wk-header .wk-container { padding-top: 8px; padding-bottom: 8px; gap: 8px; }
	.wk-logo { font-size: 24px; }
	.wk-logo img { height: 38px; }
	.wk-icon-btn { display: block; margin-left: auto; }
	.wk-search { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; padding: 10px 16px; flex-basis: auto; box-shadow: 0 6px 10px rgba(0, 0, 0, .08); z-index: 60; }
	.wk-header { position: relative; }
	.wk-header.is-search-open .wk-search { display: flex; }
	.wk-main { padding-top: 12px; }
	.wk-container { padding: 0 12px; }
	.wk-box { padding: 14px 12px; margin-bottom: 12px; }
	.wk-hero-text { padding: 14px; }
	.wk-hero-text h2 { font-size: 20px; }
	.wk-hero-sub { display: flex; overflow-x: auto; scrollbar-width: none; margin-right: -12px; padding-right: 12px; }
	.wk-hero-sub::-webkit-scrollbar { display: none; }
	.wk-hero-sub > a { flex: 0 0 44%; }
	.wk-item .wk-thumb { width: 112px; aspect-ratio: 4 / 3; order: 2; }
	.wk-item h3 { font-size: 15px; }
	.wk-item p { display: none; }
	.wk-kanal-grid { grid-template-columns: 1fr; }
	.wk-article-title { font-size: 24px; }
	.wk-content { font-size: 17px; }
	.wk-related { grid-template-columns: repeat(2, 1fr); }
	.wk-footer-grid { grid-template-columns: 1fr; gap: 20px; }
}

/* ---------- Slide headline ---------- */
.wk-slider { position: relative; border-radius: var(--wk-radius); overflow: hidden; aspect-ratio: 16 / 9; background: #dfe3ea; }
.wk-slider .wk-slide { position: absolute; inset: 0; border-radius: 0; opacity: 0; visibility: hidden; transition: opacity .6s, visibility .6s; }
.wk-slider .wk-slide.is-active { opacity: 1; visibility: visible; }
.wk-slider .wk-slide .wk-thumb { height: 100%; aspect-ratio: auto; }
.wk-slider .wk-hero-text { padding-bottom: 34px; }
.wk-slider-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .45); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.wk-slider-nav:hover { background: var(--wk-accent2); }
.wk-slider-prev { left: 12px; }
.wk-slider-next { right: 12px; }
.wk-slider-dots { position: absolute; left: 20px; bottom: 14px; z-index: 3; display: flex; gap: 6px; }
.wk-slider-dots button { width: 22px; height: 4px; padding: 0; border: 0; border-radius: 2px; background: rgba(255, 255, 255, .5); cursor: pointer; }
.wk-slider-dots button.is-active { background: var(--wk-accent2); }
@media (max-width: 640px) {
	.wk-slider { aspect-ratio: 4 / 3; }
	.wk-slider-nav { width: 32px; height: 32px; font-size: 20px; }
	.wk-slider-dots { left: 14px; bottom: 10px; }
}
