/* =========================================================
   Pendidikan Indonesia — Design System
   Editorial sejarah modern. Tenang, hangat, intelektual.
   ========================================================= */

:root {
  --navy: #12263A;
  --ivory: #F7F2E8;
  --parchment: #E9DFC9;
  --red: #9B413B;
  --gold: #B5904A;
  --charcoal: #25313A;
  --gray: #E7E7E2;
  --white: #FFFFFF;

  --font-serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "PT Serif", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --max-content: 760px;
  --max-wide: 1160px;

  --radius: 6px;
  --shadow-soft: 0 2px 14px rgba(18, 38, 58, 0.08);
  --shadow-medium: 0 6px 28px rgba(18, 38, 58, 0.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--charcoal);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-serif);
  color: var(--navy);
  line-height: 1.25;
  font-weight: 700;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2rem, 4.2vw, 2.9rem); }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1.2em; }

a { color: var(--red); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--navy); }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

img { max-width: 100%; height: auto; display: block; }

ul, ol { padding-left: 1.4em; }
li { margin-bottom: 0.5em; }

.container { max-width: var(--max-wide); margin: 0 auto; padding: 0 24px; }
.content-narrow { max-width: var(--max-content); margin: 0 auto; }

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy);
  color: var(--white);
  padding: 12px 20px;
  z-index: 1000;
  border-radius: 0 0 6px 0;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

/* =========================
   Header
   ========================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 242, 232, 0.94);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--parchment);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}
.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1.15;
}
.brand-name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--navy);
}
.brand-sub {
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--charcoal);
  text-transform: uppercase;
  opacity: 0.72;
}
.brand:hover .brand-name { color: var(--red); }

.main-nav { display: none; }
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 22px;
  margin: 0;
  padding: 0;
}
.main-nav a {
  color: var(--charcoal);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 600;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover, .main-nav a[aria-current="page"] {
  color: var(--red);
  border-bottom-color: var(--gold);
}
@media (min-width: 980px) {
  .main-nav { display: block; }
  .nav-toggle, .mobile-nav { display: none; }
}

.header-actions { display: flex; align-items: center; gap: 10px; }
.search-btn, .nav-toggle {
  background: none;
  border: 1px solid var(--parchment);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--navy);
  cursor: pointer;
}
.search-btn:hover, .nav-toggle:hover { background: var(--parchment); }

@media (min-width: 980px) { .nav-toggle { display: none; } }

.mobile-nav {
  display: none;
  border-top: 1px solid var(--parchment);
  background: var(--ivory);
}
.mobile-nav.open { display: block; }
.mobile-nav ul { list-style: none; margin: 0; padding: 10px 24px 18px; }
.mobile-nav a {
  display: block;
  padding: 10px 0;
  color: var(--charcoal);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid var(--gray);
}
@media (min-width: 980px) { .mobile-nav { display: none !important; } }

/* =========================
   Hero
   ========================= */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--navy) 0%, #1a3652 60%, var(--navy) 100%);
  color: var(--ivory);
  padding: 72px 0 84px;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 82% 18%, rgba(181,144,74,0.22), transparent 45%),
                     radial-gradient(circle at 12% 90%, rgba(155,65,59,0.22), transparent 40%);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 780px; }
.hero-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 14px;
}
.hero h1 { color: var(--white); margin-bottom: 0.5em; }
.hero p.lead {
  font-size: 1.15rem;
  color: var(--parchment);
  max-width: 640px;
  margin-bottom: 1.8em;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
}
.btn-primary { background: var(--gold); color: var(--navy); }
.btn-primary:hover { background: #c9a35e; color: var(--navy); }
.btn-outline { background: transparent; border-color: rgba(247,242,232,0.55); color: var(--ivory); }
.btn-outline:hover { border-color: var(--ivory); background: rgba(247,242,232,0.08); }

/* Page header (non-hero, for interior pages) */
.page-header {
  background: var(--navy);
  color: var(--ivory);
  padding: 44px 0 52px;
}
.page-header h1 { color: var(--white); margin-bottom: 0.3em; }
.page-header .lead { color: var(--parchment); max-width: 680px; margin: 0; }
.page-header .eyebrow { color: var(--gold); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; }

/* =========================
   Sections & cards
   ========================= */
section.block { padding: 56px 0; }
section.block.alt { background: var(--parchment); }
.block-head { max-width: 680px; margin-bottom: 32px; }
.block-head .kicker { color: var(--red); font-weight: 700; text-transform: uppercase; font-size: 0.78rem; letter-spacing: 0.06em; }
.block-head p { color: var(--charcoal); opacity: 0.85; }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .grid-3 { grid-template-columns: 1fr 1fr 1fr; } }

.card {
  background: var(--white);
  border: 1px solid var(--parchment);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-soft);
}
.card-media { aspect-ratio: 3/2; background: var(--parchment); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.card-cat { color: var(--red); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.card h3 { font-size: 1.12rem; margin-bottom: 0.4em; }
.card h3 a { color: var(--navy); text-decoration: none; }
.card h3 a:hover { color: var(--red); }
.card p { font-size: 0.95rem; opacity: 0.86; margin-bottom: 0.8em; }
.card-meta { margin-top: auto; font-size: 0.78rem; opacity: 0.65; }

/* =========================
   Timeline
   ========================= */
.timeline { position: relative; margin-top: 20px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--parchment);
}
.timeline-item { position: relative; padding: 4px 0 32px 60px; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--ivory);
  box-shadow: 0 0 0 2px var(--parchment);
}
.timeline-item .period { color: var(--red); font-weight: 700; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.timeline-item h3 { margin-bottom: 0.3em; }
.timeline-item .summary { opacity: 0.88; }
.timeline-item details { margin-top: 10px; }
.timeline-item summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.timeline-item .detail-body { padding-top: 10px; font-size: 0.95rem; }
.timeline-item .detail-body ul { margin-top: 6px; }
.timeline-item .related { margin-top: 10px; font-size: 0.9rem; }

/* =========================
   Article
   ========================= */
.breadcrumb {
  font-size: 0.82rem;
  color: var(--charcoal);
  opacity: 0.75;
  margin-bottom: 18px;
}
.breadcrumb a { color: var(--charcoal); text-decoration: none; }
.breadcrumb a:hover { color: var(--red); text-decoration: underline; }
.breadcrumb .sep { margin: 0 6px; opacity: 0.6; }

.article-header { padding: 40px 0 8px; }
.article-cat {
  display: inline-block;
  background: var(--parchment);
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 3px;
  margin-bottom: 14px;
}
.article-header h1 { margin-bottom: 0.4em; }
.article-summary { font-size: 1.1rem; color: var(--charcoal); opacity: 0.88; margin-bottom: 1.2em; }
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 0.85rem;
  color: var(--charcoal);
  opacity: 0.75;
  border-top: 1px solid var(--parchment);
  border-bottom: 1px solid var(--parchment);
  padding: 12px 0;
  margin-bottom: 28px;
}

.archive-badge {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 3px;
  margin-bottom: 14px;
}
.notice-box {
  background: var(--parchment);
  border-left: 4px solid var(--red);
  padding: 16px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.95rem;
  margin: 0 0 28px;
}
.notice-box strong { color: var(--red); }

.editorial-note {
  background: var(--gray);
  border-left: 4px solid var(--gold);
  padding: 14px 18px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.92rem;
  margin: 0 0 28px;
}

article.article-body { padding: 8px 0 40px; }
.article-body .content-narrow > * + * { margin-top: 0; }

.toc {
  background: var(--white);
  border: 1px solid var(--parchment);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 0 0 32px;
}
.toc summary { font-weight: 700; color: var(--navy); cursor: pointer; font-family: var(--font-serif); font-size: 1.05rem; }
.toc ol { margin: 12px 0 0; padding-left: 1.2em; font-size: 0.94rem; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

.summary-table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 0.93rem; }
.summary-table th, .summary-table td {
  text-align: left;
  padding: 10px 14px;
  border: 1px solid var(--parchment);
  vertical-align: top;
}
.summary-table th { background: var(--navy); color: var(--ivory); font-family: var(--font-serif); }
.summary-table tr:nth-child(even) td { background: var(--parchment); }

.fact-box {
  background: var(--white);
  border: 1px solid var(--parchment);
  border-left: 5px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 22px;
  margin: 26px 0;
}
.fact-box h4 { margin-bottom: 0.5em; color: var(--navy); }
.fact-box ul { margin: 0; padding-left: 1.2em; }

.why-matters {
  background: var(--navy);
  color: var(--ivory);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 30px 0;
}
.why-matters h4 { color: var(--gold); margin-bottom: 0.5em; }
.why-matters p { margin: 0; opacity: 0.94; }

.faq-item { border-bottom: 1px solid var(--parchment); padding: 14px 0; }
.faq-item summary { font-weight: 700; color: var(--navy); cursor: pointer; }
.faq-item .a { padding-top: 10px; font-size: 0.95rem; }

.source-list { font-size: 0.92rem; }
.source-list li { margin-bottom: 8px; }

.correction-box {
  background: var(--white);
  border: 1px dashed var(--gold);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 26px 0;
  font-size: 0.9rem;
}

.article-tools {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 24px 0;
}
.tool-btn {
  background: var(--white);
  border: 1px solid var(--parchment);
  color: var(--navy);
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.tool-btn:hover { background: var(--parchment); }

.related-block { border-top: 1px solid var(--parchment); padding: 32px 0 8px; }

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: var(--navy);
  color: var(--ivory);
  border: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: var(--shadow-medium);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 90;
}
.back-to-top.visible { display: flex; }

/* =========================
   Search overlay
   ========================= */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 38, 58, 0.72);
  z-index: 200;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 8vh 20px;
}
.search-overlay.open { display: flex; }
.search-panel {
  background: var(--ivory);
  border-radius: var(--radius);
  max-width: 620px;
  width: 100%;
  padding: 20px;
  box-shadow: var(--shadow-medium);
  max-height: 78vh;
  display: flex;
  flex-direction: column;
}
.search-panel input[type="search"] {
  width: 100%;
  padding: 12px 14px;
  font-size: 1.05rem;
  border: 2px solid var(--parchment);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  background: var(--white);
  color: var(--charcoal);
}
.search-panel input[type="search"]:focus { border-color: var(--gold); outline: none; }
.search-close {
  background: none;
  border: none;
  color: var(--charcoal);
  font-size: 0.9rem;
  cursor: pointer;
  align-self: flex-end;
  margin-bottom: 8px;
  padding: 4px 8px;
}
.search-results { margin-top: 14px; overflow-y: auto; }
.search-results a {
  display: block;
  padding: 10px 8px;
  text-decoration: none;
  border-bottom: 1px solid var(--parchment);
}
.search-results a:hover, .search-results a:focus-visible { background: var(--parchment); }
.search-results .r-title { color: var(--navy); font-weight: 700; }
.search-results .r-cat { color: var(--red); font-size: 0.75rem; text-transform: uppercase; font-weight: 700; }
.search-empty { padding: 14px 8px; opacity: 0.7; font-size: 0.92rem; }

/* =========================
   Newsletter (visual only)
   ========================= */
.newsletter {
  background: var(--parchment);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
}
.newsletter h2 { margin-bottom: 0.3em; }
.newsletter p { max-width: 520px; margin: 0 auto 1.4em; opacity: 0.88; }
.newsletter-form { display: flex; gap: 10px; max-width: 420px; margin: 0 auto; flex-wrap: wrap; justify-content: center; }
.newsletter-form input[type="email"] {
  flex: 1;
  min-width: 200px;
  padding: 12px 14px;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  font-family: var(--font-sans);
}
.newsletter-note { font-size: 0.8rem; opacity: 0.65; margin-top: 10px; }

/* =========================
   404
   ========================= */
.error-page { padding: 80px 0; text-align: center; }
.error-page .code { font-family: var(--font-serif); font-size: 5rem; color: var(--gold); margin-bottom: 0; line-height: 1; }
.error-links { display: grid; gap: 12px; max-width: 420px; margin: 30px auto 0; text-align: left; }
.error-links a {
  display: block;
  background: var(--white);
  border: 1px solid var(--parchment);
  border-radius: var(--radius);
  padding: 12px 16px;
  text-decoration: none;
  color: var(--navy);
  font-weight: 600;
}
.error-links a:hover { border-color: var(--gold); background: var(--parchment); }

/* =========================
   Footer
   ========================= */
.site-footer {
  background: var(--navy);
  color: var(--parchment);
  padding: 52px 0 28px;
  margin-top: 60px;
}
.footer-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
  margin-bottom: 32px;
}
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.footer-grid h3 { color: var(--white); font-size: 1.05rem; margin-bottom: 0.7em; }
.footer-brand p { opacity: 0.8; font-size: 0.92rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: var(--parchment); text-decoration: none; font-size: 0.92rem; opacity: 0.88; }
.footer-grid a:hover { opacity: 1; text-decoration: underline; color: var(--white); }
.footer-disclaimer {
  border-top: 1px solid rgba(247,242,232,0.18);
  padding-top: 20px;
  font-size: 0.82rem;
  opacity: 0.75;
  max-width: 780px;
}
.footer-bottom {
  margin-top: 16px;
  font-size: 0.8rem;
  opacity: 0.6;
}

/* Utility */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
