/* Berkah Cerita — mobile-first minimal CSS
 * Palette: teal-emerald (calm, warm, Indonesian)
 */

:root {
  --bg: #f7fbfa;
  --card: #ffffff;
  --text: #1c2733;
  --muted: #6b7c8c;
  --border: #e3ebe9;
  --brand: #0f766e;         /* teal-700 */
  --brand-2: #059669;       /* emerald-600 */
  --brand-soft: #d1fae5;    /* emerald-100 */
  --danger: #b91c1c;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.05);
  --shadow-md: 0 4px 20px rgba(15,23,42,.08);
  --maxw: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin: 0 0 1em; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; color: #0f172a; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.4rem; margin-top: 1.4em; }
h3 { font-size: 1.15rem; margin-top: 1.2em; }
ul, ol { padding-left: 1.4em; }
li { margin: .25em 0; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 720px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

/* Header */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 40;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 60px; gap: 12px;
}
.brand {
  display: inline-flex; align-items: center; gap: 8px;
  color: #0f172a; font-weight: 700; font-size: 1.05rem;
}
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--brand); color: #fff; font-size: .95rem;
}
.brand-name { letter-spacing: .01em; }
.brand:hover { text-decoration: none; }
.site-nav { display: flex; gap: 14px; }
.site-nav a { color: #334155; font-weight: 500; padding: 6px 4px; }
.site-nav a.is-active { color: var(--brand); }
.site-nav a:hover { color: var(--brand); text-decoration: none; }

/* Hero */
.hero {
  background: linear-gradient(160deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff;
  padding: 42px 0 44px;
  margin-bottom: 24px;
}
.hero h1 { color: #fff; font-size: 1.9rem; }
.hero .lead { color: rgba(255,255,255,.9); max-width: 640px; margin: 0 0 20px; }

/* Buttons */
.btn {
  display: inline-block; padding: 10px 18px; border-radius: var(--radius);
  background: #fff; color: var(--brand); border: 1px solid var(--border);
  font-weight: 600; text-decoration: none;
  transition: transform .06s ease, background .15s ease;
}
.btn:hover { text-decoration: none; background: #f1f5f4; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: #fff; color: var(--brand); }
.hero .btn-primary { background: #fff; color: var(--brand); }

/* Section title */
.section-title { margin: 8px 0 20px; font-size: 1.2rem; color: #0f172a; }

/* Cards grid — mobile-first, then 2 col, then 3 col */
.grid { display: grid; gap: 18px; }
.grid-cards { grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .grid-cards { grid-template-columns: 1fr 1fr 1fr; } }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card-media { display: block; aspect-ratio: 16 / 9; background: var(--brand-soft); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media-placeholder {
  display: flex; align-items: center; justify-content: center; height: 100%;
  color: var(--brand); font-size: 2.4rem;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}
.card-body { padding: 14px 16px 18px; }
.card-title { font-size: 1.1rem; margin: 0 0 6px; }
.card-title a { color: #0f172a; }
.card-title a:hover { color: var(--brand); text-decoration: none; }
.card-excerpt { margin: 6px 0 10px; color: #47535e; font-size: .95rem; }
.card-meta { font-size: .82rem; }

/* Page head + search */
.page-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 18px 0 22px; }
.search { display: flex; gap: 8px; }
.search input {
  padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: #fff; min-width: 220px; font: inherit;
}
.search input:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.search button {
  padding: 9px 14px; background: var(--brand); color: #fff; border: 0;
  border-radius: 8px; font-weight: 600; cursor: pointer;
}
.search button:hover { background: #0d5f57; }

/* Pager */
.pager { display: flex; align-items: center; justify-content: space-between; margin: 28px 0; gap: 12px; flex-wrap: wrap; }
.pager a { padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }

/* Post detail */
.post-title { font-size: 2rem; margin: 8px 0 6px; }
.post-meta { margin: 0 0 22px; font-size: .95rem; }
.breadcrumbs { margin: 18px 0 6px; }
.breadcrumbs a { color: var(--muted); }
.post-cover { margin: 12px 0 22px; }
.post-cover img { width: 100%; max-height: 520px; object-fit: cover; border-radius: var(--radius); }
.post-content { font-size: 1.05rem; }
.post-content img { border-radius: 8px; margin: 12px 0; }
.post-content blockquote {
  border-left: 4px solid var(--brand);
  padding: 6px 14px; margin: 14px 0;
  color: #334155; background: #f0fdf4; border-radius: 6px;
}

/* Tags & share */
.post-tags { margin: 24px 0 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag { background: var(--brand-soft); color: #065f46; padding: 4px 10px; border-radius: 999px; font-size: .82rem; }
.post-share { margin: 18px 0 30px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.post-share a { padding: 6px 12px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.post-notice { margin: 22px 0 8px; padding: 10px 14px; background: #f0fdf4; border: 1px solid #d1fae5; border-radius: 8px; }
.post-notice a { color: var(--brand); }

/* Legal */
.legal h1 { margin-top: 24px; }
.legal h2 { font-size: 1.15rem; margin-top: 1.6em; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: #fff; margin-top: 40px; padding: 26px 0 32px; }
.footer-inner { display: grid; gap: 16px; }
@media (min-width: 640px) { .footer-inner { grid-template-columns: 2fr 1fr; align-items: start; } }
.foot-brand .brand { margin-bottom: 4px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 14px; }
.foot-links a { color: #334155; }
.foot-copy { grid-column: 1 / -1; margin: 12px 0 0; font-size: .85rem; }

/* Admin light theme reuse */
.admin-wrap { max-width: 1080px; margin: 0 auto; padding: 20px 16px; }
