/*
Theme Name: Jurnal IDN Modern
Theme URI: https://jurnalidn.com
Author: Jurnal IDN
Description: Tema portal berita modern, responsif, dan ringan untuk jurnalidn.com. Memakai berita yang sudah ada di database WordPress.
Version: 1.0.0
Requires at least: 5.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: jurnalidn-modern
*/

:root {
  --ink: #10221a;
  --muted: #55645b;
  --accent: #0b7a3e;      /* HIJAU UTAMA: ganti kode ini untuk menyamakan dengan hijau situs Anda */
  --accent-light: #6fd39b;
  --line: #dfe8e2;
  --soft: #f1f6f3;
  --thumb: #e3ece6;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--ink);
  background: #fff;
  overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.serif { font-family: 'Source Serif 4', Georgia, serif; }

/* Bar atas */
.topbar { background: var(--ink); color: #dfe5ee; font-size: 13px; }
.topbar .wrap { display: flex; justify-content: space-between; padding-top: 9px; padding-bottom: 9px; }
.topbar nav { display: flex; gap: 20px; }

/* Header */
.header { position: sticky; top: 0; z-index: 5; background: #fff; border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; padding-top: 16px; }
.brand { display: flex; flex-direction: column; line-height: 1.1; }
.brand strong { font-family: 'Source Serif 4', Georgia, serif; font-size: 30px; }
.brand strong span { color: var(--accent); }
.brand small { font-size: 12px; color: var(--muted); }
.menu { display: flex; gap: 28px; margin-top: 6px; overflow-x: auto; }
.menu a { padding: 14px 4px; font-size: 15px; font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; }
.menu a:hover, .menu a.on { border-bottom-color: var(--accent); }

/* Teks umum */
.title { font-family: 'Source Serif 4', Georgia, serif; font-weight: 700; line-height: 1.25; margin: 0; }
.cat { font-size: 13px; font-weight: 700; color: var(--accent); }
.meta { font-size: 13px; color: var(--muted); }
.story:hover .title { color: var(--accent); }
.thumb { width: 100%; object-fit: cover; border-radius: 12px; background: var(--thumb); }

/* Strip terbaru */
.ticker { background: var(--soft); border-bottom: 1px solid var(--line); }
.ticker .wrap { display: flex; align-items: center; gap: 16px; padding-top: 12px; padding-bottom: 12px; font-size: 14px; font-weight: 500; }
.badge { background: var(--accent); color: #fff; font-weight: 700; font-size: 13px; padding: 5px 10px; border-radius: 6px; flex: none; }

/* Isi halaman */
main.wrap { padding-top: 36px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 56px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 28px; }
.lead { display: flex; flex-direction: column; gap: 14px; }
.lead .thumb { aspect-ratio: 16 / 9; }
.lead .title { font-size: 36px; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.row { display: flex; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; padding-bottom: 0; }
.row .thumb { width: 120px; height: 90px; flex: none; border-radius: 10px; }
.row .title { font-size: 17px; }
.row div { display: flex; flex-direction: column; gap: 6px; }

.main { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; }
.sec-head { display: flex; align-items: center; gap: 12px; border-bottom: 2px solid var(--ink); padding-bottom: 10px; margin-bottom: 24px; }
.sec-head i { width: 10px; height: 22px; background: var(--accent); border-radius: 3px; }
.sec-head h2 { margin: 0; font-size: 20px; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.card { display: flex; flex-direction: column; gap: 10px; }
.card .thumb { aspect-ratio: 16 / 10; }
.card .title { font-size: 19px; }
.more { display: block; margin: 36px auto 0; min-height: 48px; padding: 0 32px; border-radius: 24px; border: 2px solid var(--ink); background: #fff; color: var(--ink); font: 700 15px 'Inter', sans-serif; cursor: pointer; }
.more:hover { background: var(--ink); color: #fff; }
.more:disabled { opacity: .5; cursor: default; }

.aside { background: var(--soft); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 20px; align-self: start; }
.aside h2 { margin: 0; font-size: 20px; }
.aside a { display: flex; gap: 14px; }
.aside .no { font-family: 'Source Serif 4', serif; font-weight: 700; font-size: 28px; color: var(--accent); line-height: 1; }
.aside .title { font-size: 16px; }

.status { padding: 48px 0; text-align: center; color: var(--muted); }

/* Footer */
.footer { background: var(--ink); color: #dfe5ee; }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; padding-top: 40px; padding-bottom: 24px; font-size: 14px; }
.footer .brand strong { color: #fff; font-size: 26px; }
.footer .brand strong span { color: var(--accent-light); }
.footer nav { display: flex; gap: 24px; flex-wrap: wrap; }
.copy { padding-bottom: 28px; font-size: 13px; color: #b8c2d3; }

@media (max-width: 900px) {
  .hero, .main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .cards { grid-template-columns: minmax(0, 1fr); }
  .wrap { padding-left: 16px; padding-right: 16px; }
  main.wrap { padding-top: 24px; gap: 40px; }
  .aside { padding: 20px; }
  .topbar { display: none; }
  .lead .title { font-size: 28px; }
}

/* Cegah konten melebar melebihi layar */
main.wrap > *, .hero > *, .main > *, .lead, .card, .stack, .row > div, .aside a > * { min-width: 0; }
.title { overflow-wrap: break-word; }
.ticker .wrap a { min-width: 0; }

/* ===== Tambahan khusus WordPress ===== */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.plain-list, .menu-list { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.menu { display: block; margin-top: 6px; overflow-x: auto; }
.menu-list { gap: 28px; flex-wrap: nowrap; }
.menu .current-menu-item > a, .menu .current-menu-ancestor > a, .menu .current-cat > a { border-bottom-color: var(--accent); }
.admin-bar .header { top: 32px; }
.custom-logo { max-height: 52px; width: auto; }

.search { display: flex; align-items: center; border: 1px solid #d3ddd7; border-radius: 24px; overflow: hidden; background: #fff; }
.search input { border: 0; height: 44px; padding: 0 6px 0 16px; font: 500 14px 'Inter', sans-serif; width: 200px; background: transparent; color: var(--ink); }
.search input:focus-visible { outline: none; }
.search:focus-within { border-color: var(--accent); }
.search button { width: 44px; height: 44px; border: 0; background: transparent; color: var(--ink); cursor: pointer; display: flex; align-items: center; justify-content: center; }

.sec-head .h-sec { margin: 0; font-size: 20px; }
.cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

main.wrap { padding-top: 36px; padding-bottom: 56px; }
.article { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.article.page { max-width: none; }
.article-title { font-size: 38px; }
.article-img { margin: 12px 0; }
.article-img .thumb { aspect-ratio: 16 / 9; }
.article-img figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }
.article-body { font-size: 18px; line-height: 1.75; overflow-wrap: break-word; }
.article-body p { margin: 0 0 1.2em; }
.article-body h2, .article-body h3 { font-family: 'Source Serif 4', Georgia, serif; line-height: 1.3; margin: 1.6em 0 .6em; }
.article-body a { color: var(--accent); text-decoration: underline; }
.article-body img, .article-body video, .article-body iframe { max-width: 100%; height: auto; border-radius: 8px; }
.article-body blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--accent); color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tags a { font-size: 13px; padding: 6px 12px; border-radius: 16px; background: var(--soft); }
.related { margin-top: 64px; }

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

@media (max-width: 900px) {
  .cards.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 782px) {
  .admin-bar .header { top: 46px; }
}
@media (max-width: 600px) {
  .cards.three { grid-template-columns: minmax(0, 1fr); }
  .search input { width: 110px; }
  .article-title { font-size: 28px; }
  .article-body { font-size: 17px; }
}
