/*
Theme Name: Charios
Theme URI: https://charios.id
Author: Charios.id
Author URI: https://charios.id
Description: Tema portal berita untuk Charios.id — Mengawal Fakta Menuju Masa Depan. Beranda dengan headline, berita terbaru, terpopuler, blok rubrik, dan opini; halaman artikel dengan tombol bagikan, profil penulis, dan berita terkait.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: charios
*/

:root {
	--accent: #9B1B1F;
	--ink: #161616;
	--text: #4A4744;
	--muted: #5E5A56;
	--line: #E2E0DD;
	--line-2: #DAD6D1;
	--band: #F3F2F0;
	--ph: #DDD9D4;
	--on-dark: #E8E6E3;
	--on-dark-muted: #BDB8B2;
	--font-display: "Playfair Display", Georgia, serif;
	--font-serif: "Source Serif 4", Georgia, serif;
	--font-sans: "Libre Franklin", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: var(--font-sans);
	font-size: 16px;
	line-height: 1.5;
	color: var(--ink);
	background: #fff;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
button { font: inherit; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap; border: 0;
}
.skip-link:focus {
	position: fixed !important;
	top: 8px; left: 8px;
	width: auto; height: auto;
	clip: auto; margin: 0;
	padding: 12px 16px;
	background: #fff; color: var(--ink);
	z-index: 1000; font-weight: 700;
}

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- Top bar ---------- */
.topbar { background: var(--ink); color: var(--on-dark); font-size: 12px; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; min-height: 36px; }
.topbar ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; flex-wrap: wrap; }
.topbar a:hover { color: #fff; text-decoration: underline; }

/* ---------- Masthead ---------- */
.masthead .wrap { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-top: 24px; padding-bottom: 20px; }
.brand { display: flex; align-items: center; gap: 16px; min-width: 0; }
.brand-logo { width: 76px; height: 76px; object-fit: contain; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.brand-name { font-family: var(--font-display); font-weight: 900; font-size: 44px; line-height: 1; letter-spacing: .01em; text-transform: uppercase; color: var(--ink); }
.brand-name span { color: var(--accent); }
.brand-tagline { font-size: 11px; font-weight: 600; letter-spacing: .32em; text-transform: uppercase; color: var(--text); }

.search-form { display: flex; gap: 10px; }
.search-field {
	width: 240px; height: 44px;
	border: 1px solid #CFCBC6; border-radius: 6px;
	padding: 0 14px; font: inherit; font-size: 14px; color: var(--ink); background: #fff;
}
.search-submit, .icon-btn {
	width: 44px; height: 44px; flex-shrink: 0;
	border: 0; border-radius: 6px;
	display: inline-flex; align-items: center; justify-content: center;
	cursor: pointer;
}
.search-submit { background: var(--accent); color: #fff; }
.icon-btn { background: transparent; color: var(--ink); }
.mobile-actions { display: none; gap: 2px; }

/* ---------- Main navigation ---------- */
.mainnav { border-top: 1px solid var(--line); border-bottom: 3px solid var(--accent); background: #fff; }
.mainnav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.mainnav ul::-webkit-scrollbar { display: none; }
.mainnav a { display: block; padding: 16px 12px; font-size: 14px; font-weight: 600; }
.mainnav .current-menu-item > a,
.mainnav .current-menu-parent > a,
.mainnav .current-cat > a,
.mainnav .current-cat-parent > a { color: var(--accent); }
.mainnav .sub-menu, .mainnav .children { display: none; }

/* ---------- Ticker ---------- */
.ticker .wrap { display: flex; align-items: center; gap: 14px; padding-top: 14px; padding-bottom: 14px; }
.ticker-label { background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .12em; padding: 6px 10px; border-radius: 3px; flex-shrink: 0; }
.ticker-viewport { overflow: hidden; flex: 1; min-width: 0; }
.ticker-track { display: inline-flex; gap: 48px; white-space: nowrap; animation: charios-ticker 45s linear infinite; font-size: 14px; font-weight: 500; }
.ticker-viewport:hover .ticker-track,
.ticker-viewport:focus-within .ticker-track { animation-play-state: paused; }
@keyframes charios-ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
	.ticker-track { animation: none; }
	.ticker-viewport { overflow-x: auto; }
	.ticker-track [aria-hidden="true"] { display: none; }
}

/* ---------- Shared bits ---------- */
.kicker { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.kicker:hover { text-decoration: underline; }
.card-meta { margin: 0; font-size: 12px; color: var(--muted); }
.thumb {
	display: flex; align-items: center; justify-content: center;
	aspect-ratio: 16 / 9; background: var(--ph);
	border-radius: 4px; overflow: hidden;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb img.ph-emblem { width: 26%; height: auto; opacity: .22; object-fit: contain; }
.thumb.r-3x2 { aspect-ratio: 3 / 2; }

.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 2px solid var(--ink); padding-bottom: 10px; margin-bottom: 8px; }
.sec-title { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 26px; line-height: 1.2; }
.sec-more { font-size: 13px; font-weight: 600; color: var(--accent); }
.empty-note { color: var(--muted); font-size: 14px; }

.btn-outline {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 48px; padding: 0 28px;
	border: 2px solid var(--ink); border-radius: 6px;
	font-size: 14px; font-weight: 700;
}
.btn-outline:hover { background: var(--ink); color: #fff; }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 32px; padding-top: 8px; padding-bottom: 40px; }
.hero-main { display: flex; flex-direction: column; gap: 16px; }
.hero-body { display: flex; flex-direction: column; gap: 10px; }
.hero-title { margin: 0; font-family: var(--font-serif); font-weight: 700; font-size: 38px; line-height: 1.15; }
.hero-excerpt { margin: 0; font-size: 16px; line-height: 1.6; color: var(--text); }
.hero-side { display: flex; flex-direction: column; gap: 20px; }
.hero-sub { display: flex; flex-direction: column; gap: 8px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.hero-sub:last-child { border-bottom: 0; padding-bottom: 0; }
.hero-sub .thumb { margin-bottom: 2px; }
.hero-sub-title { margin: 0; font-family: var(--font-serif); font-weight: 700; font-size: 18px; line-height: 1.35; }
.hero-sub.has-thumb .hero-sub-title { font-size: 20px; line-height: 1.3; }

/* ---------- Ads ---------- */
.ad-slot { margin: 0 auto; text-align: center; }
.ad-leaderboard { max-width: 970px; padding-bottom: 40px; }
.ad-placeholder {
	display: flex; align-items: center; justify-content: center; text-align: center;
	min-height: 90px; padding: 12px;
	border: 1px dashed #B8B3AD; border-radius: 4px;
	font-size: 12px; font-weight: 600; color: var(--muted);
}
.ad-sidebar .ad-placeholder { aspect-ratio: 6 / 5; }

/* ---------- Latest + sidebar ---------- */
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 48px; padding-bottom: 56px; }
.card-row { display: flex; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.card-row .thumb { width: 200px; flex-shrink: 0; align-self: flex-start; }
.card-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.card-title { margin: 0; font-family: var(--font-serif); font-weight: 700; font-size: 20px; line-height: 1.3; }
.card-excerpt { margin: 0; font-size: 14px; line-height: 1.55; color: var(--text); }
.load-more { display: flex; justify-content: center; margin-top: 24px; }

.sidebar { display: flex; flex-direction: column; gap: 32px; }
.widget { font-size: 15px; }
.widget-title { margin: 0 0 12px; font-family: var(--font-display); font-weight: 800; font-size: 22px; border-bottom: 2px solid var(--ink); padding-bottom: 8px; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 8px 0; border-bottom: 1px solid var(--line); }

.popular-list { list-style: none; margin: 0; padding: 0; counter-reset: popular; }
.popular-list li { counter-increment: popular; display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.popular-list li:last-child { border-bottom: 0; }
.popular-list li::before {
	content: counter(popular);
	font-family: var(--font-display); font-weight: 900; font-size: 32px; line-height: 1;
	color: var(--accent); width: 28px; flex-shrink: 0;
}
.popular-list a { font-family: var(--font-serif); font-weight: 600; font-size: 16px; line-height: 1.4; }

/* ---------- Rubrik blocks ---------- */
.band { background: var(--band); padding: 48px 0; }
.cols3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; }
.rubrik-row { padding-top: 52px; padding-bottom: 56px; }
.rubrik { display: flex; flex-direction: column; gap: 14px; }
.rubrik .sec-head { margin-bottom: 0; padding-bottom: 8px; }
.rubrik .sec-title { font-size: 22px; }
.card-stack { display: flex; flex-direction: column; gap: 10px; }
.card-stack-title { margin: 0; font-family: var(--font-serif); font-weight: 700; font-size: 19px; line-height: 1.3; }
.rubrik-more { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.rubrik-more li { padding-top: 12px; border-top: 1px solid var(--line-2); }
.rubrik-more a { font-family: var(--font-serif); font-weight: 600; font-size: 15px; line-height: 1.4; }

/* ---------- Opini ---------- */
.opini-band { background: var(--ink); color: #fff; padding: 52px 0; }
.opini-band .wrap { display: flex; flex-direction: column; gap: 28px; }
.opini-band .sec-head { border-bottom-color: var(--accent); margin-bottom: 0; }
.opini-band .sec-title { font-size: 28px; }
.opini-band .sec-more { color: var(--on-dark); }
.opini-band a:hover { color: #fff; text-decoration: underline; }
.opini-card { display: flex; flex-direction: column; gap: 14px; }
.opini-author { display: flex; align-items: center; gap: 12px; }
.opini-author img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.opini-author-name { display: block; font-size: 14px; font-weight: 700; }
.opini-author-role { display: block; font-size: 12px; color: var(--on-dark-muted); }
.opini-title { margin: 0; font-family: var(--font-serif); font-weight: 700; font-size: 20px; line-height: 1.35; }

/* ---------- Article ---------- */
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; padding-top: 32px; padding-bottom: 56px; }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--text); }
.breadcrumb span[aria-hidden] { margin: 0 6px; }
.article-title { margin: 10px 0 14px; font-family: var(--font-serif); font-weight: 700; font-size: 40px; line-height: 1.15; }
.article-dek { margin: 0 0 18px; font-size: 19px; line-height: 1.55; color: var(--text); }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.article-meta strong { color: var(--ink); }
.share { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.share-label { font-size: 13px; font-weight: 700; align-self: center; margin-right: 4px; }
.share a, .share button {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 40px; padding: 0 14px;
	border: 1px solid var(--line); border-radius: 20px;
	background: #fff; color: var(--ink);
	font-size: 13px; font-weight: 600; cursor: pointer;
}
.share a:hover, .share button:hover { border-color: var(--accent); color: var(--accent); }
.featured { margin: 0 0 28px; }
.featured img { width: 100%; border-radius: 4px; }
.featured figcaption, .entry-content figcaption, .wp-caption-text { margin-top: 8px; font-size: 13px; line-height: 1.5; color: var(--muted); font-family: var(--font-sans); }

.entry-content { font-family: var(--font-serif); font-size: 19px; line-height: 1.75; max-width: 720px; }
.entry-content > * { margin-top: 0; margin-bottom: 1.2em; }
.entry-content h2, .entry-content h3, .entry-content h4 { font-family: var(--font-serif); line-height: 1.3; margin-top: 1.6em; margin-bottom: .6em; }
.entry-content h2 { font-size: 26px; }
.entry-content h3 { font-size: 22px; }
.entry-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.entry-content blockquote { margin-left: 0; margin-right: 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--accent); font-style: italic; color: var(--text); }
.entry-content img { border-radius: 4px; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content table { width: 100%; border-collapse: collapse; font-family: var(--font-sans); font-size: 15px; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.alignwide, .alignfull { max-width: 100%; }
.aligncenter { margin-left: auto; margin-right: auto; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0; }
.tags a { padding: 8px 14px; background: var(--band); border-radius: 16px; font-size: 13px; font-weight: 600; }
.author-box { display: flex; gap: 16px; margin: 32px 0; padding: 20px; background: var(--band); border-radius: 6px; }
.author-box img { width: 72px; height: 72px; border-radius: 50%; flex-shrink: 0; }
.author-box-name { margin: 0 0 6px; font-size: 16px; font-weight: 700; }
.author-box p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text); }
.related { margin-top: 40px; }
.related .cols3 { gap: 24px; margin-top: 16px; }
.related .card-stack-title { font-size: 17px; }

/* ---------- Archive & pages ---------- */
.archive-head { padding-bottom: 8px; border-bottom: 2px solid var(--ink); margin-bottom: 4px; }
.archive-title { margin: 0 0 8px; font-family: var(--font-display); font-weight: 800; font-size: 40px; line-height: 1.15; }
.archive-desc { color: var(--text); font-size: 15px; }
.archive-desc p { margin: 0 0 10px; }
.subcats { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 14px; padding: 0; list-style: none; }
.subcats a { display: inline-block; padding: 8px 14px; border-radius: 20px; background: var(--band); font-size: 13px; font-weight: 600; }
.page-title { margin: 0 0 20px; font-family: var(--font-display); font-weight: 800; font-size: 40px; line-height: 1.15; }
.page-narrow { max-width: 760px; margin: 0 auto; padding-top: 40px; padding-bottom: 64px; }

.nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 32px; }
.page-numbers { min-width: 44px; height: 44px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 6px; font-weight: 600; font-size: 14px; }
.page-numbers.current { background: var(--ink); color: #fff; border-color: var(--ink); }
.page-numbers.dots { border: 0; }

/* ---------- Comments ---------- */
.comments { margin-top: 40px; }
.comment-list { list-style: none; padding: 0; margin: 16px 0; }
.comment-list .comment { padding: 16px 0; border-bottom: 1px solid var(--line); }
.comment-list .children { list-style: none; padding-left: 24px; }
.comment-author { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; }
.comment-author img { border-radius: 50%; }
.comment-metadata { font-size: 12px; color: var(--muted); margin: 4px 0 8px; }
.comment-content { font-size: 15px; line-height: 1.6; }
.comment-form label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: 10px 12px; border: 1px solid #CFCBC6; border-radius: 6px; font: inherit; font-size: 15px;
}
.comment-form .submit { min-height: 44px; padding: 0 22px; border: 0; border-radius: 6px; background: var(--accent); color: #fff; font-weight: 700; cursor: pointer; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--on-dark); border-top: 4px solid var(--accent); }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; padding-top: 48px; padding-bottom: 36px; }
.footer-brand { display: flex; flex-direction: column; gap: 14px; }
.footer-logo { display: flex; align-items: center; gap: 12px; }
.footer-logo img { width: 56px; height: 56px; object-fit: contain; }
.footer-logo span { font-family: var(--font-display); font-weight: 900; font-size: 28px; color: #fff; text-transform: uppercase; }
.footer-tagline { font-size: 11px; font-weight: 600; letter-spacing: .28em; text-transform: uppercase; color: var(--on-dark-muted); }
.footer-address { margin: 0; font-size: 14px; line-height: 1.6; font-style: normal; }
.footer-head { margin: 0 0 12px; font-family: var(--font-sans); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #fff; }
.footer-cats, .footer-links, .social-links { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.footer-cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.social-links { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.footer-bottom { border-top: 1px solid #3A3836; padding-top: 18px; padding-bottom: 24px; font-size: 12px; color: var(--on-dark-muted); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.hero, .split, .cols3, .content-layout, .footer-grid { grid-template-columns: minmax(0, 1fr); }
	.hero { gap: 24px; }
	.split, .content-layout { gap: 40px; }
	.brand-logo { width: 52px; height: 52px; }
	.brand-name { font-size: 30px; }
	.brand-tagline { font-size: 9px; letter-spacing: .22em; }
	.masthead .wrap { padding-top: 12px; padding-bottom: 12px; gap: 12px; }
	.masthead .search-form { display: none; }
	.mobile-actions { display: flex; }
	.search-open .masthead .wrap { flex-wrap: wrap; }
	.search-open .masthead .search-form { display: flex; width: 100%; order: 3; }
	.search-open .masthead .search-field { flex: 1; width: auto; }
	.nav-open .mainnav ul { flex-direction: column; white-space: normal; }
	.nav-open .mainnav a { border-bottom: 1px solid var(--line); }
}
@media (max-width: 600px) {
	.wrap { padding: 0 16px; }
	.topbar .menu { display: none; }
	.brand { gap: 10px; }
	.brand-logo { width: 44px; height: 44px; }
	.brand-name { font-size: 24px; }
	.brand-tagline { font-size: 7px; letter-spacing: .2em; }
	.hero-title { font-size: 26px; line-height: 1.2; }
	.card-row { gap: 12px; padding: 14px 0; }
	.card-row .thumb { width: 104px; }
	.card-title { font-size: 16px; line-height: 1.35; }
	.card-row .card-excerpt { display: none; }
	.article-title { font-size: 28px; }
	.article-dek { font-size: 17px; }
	.entry-content { font-size: 18px; }
	.archive-title, .page-title { font-size: 30px; }
	.band, .opini-band { padding: 32px 0; }
	.rubrik-row { padding-top: 32px; padding-bottom: 40px; }
}
