/*
Theme Name: YDUA
Description: Tema minimalis bernuansa merah untuk Yayasan Darah Untuk Aceh (dwibahasa ID/EN).
Version: 1.0.0
Author: Yayasan Darah Untuk Aceh
Text Domain: ydua
*/

:root {
  --red: #b3121f;
  --red-dark: #8c0d18;
  --red-soft: #fbeeee;
  --ink: #1f1a1a;
  --muted: #6a6060;
  --line: #efe3e1;
  --soft: #fcf7f6;
  --white: #fff;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(140, 13, 24, .08);
  --wrap: 1140px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--white); line-height: 1.7; font-size: 16.5px; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-dark); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1.1em; }
.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.screen-reader-text { position: absolute; left: -9999px; }

/* Language toggle: both languages are in the HTML, CSS shows one (cache-safe). */
html[data-lang="en"] .l-id { display: none !important; }
html:not([data-lang="en"]) .l-en { display: none !important; }

/* Top bar */
.topbar { background: var(--red-dark); color: #fff; font-size: .85rem; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 5px 0; flex-wrap: wrap; }
.topbar a { color: #fff; opacity: .95; }
.topbar a:hover { opacity: 1; text-decoration: underline; }
.topbar .contacts { display: flex; gap: 18px; flex-wrap: wrap; }
.lang-switch { display: inline-flex; border: 1px solid rgba(255,255,255,.45); border-radius: 999px; overflow: hidden; }
.lang-switch button { background: transparent; color: #fff; border: 0; padding: 3px 12px; font: inherit; font-weight: 700; cursor: pointer; }
.lang-switch button[aria-pressed="true"] { background: #fff; color: var(--red-dark); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 8px 0; }
.brand { display: block; width: 100px; height: 86px; overflow: hidden; transition: width .25s ease, height .25s ease; }
.brand img { display: block; height: 158px; width: auto; max-width: none; margin: -32px 0 0 -30px; transition: height .25s ease, margin .25s ease; }
.site-header.scrolled .brand { width: 58px; height: 52px; }
.site-header.scrolled .brand img { height: 91px; margin: -17px 0 0 -17px; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; align-items: center; }
.main-nav li { position: relative; }
.main-nav a { display: block; padding: 10px 13px; color: var(--ink); font-weight: 600; font-size: .95rem; border-radius: 999px; }
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current-menu-ancestor > a { color: var(--red); background: var(--red-soft); }
.main-nav .sub-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 8px; flex-direction: column; align-items: stretch; gap: 0; }
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { display: flex; }
.main-nav .menu-cta > a { background: var(--red); color: #fff; }
.main-nav .menu-cta > a:hover { background: var(--red-dark); color: #fff; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; }

/* Buttons */
.btn { display: inline-block; padding: 13px 26px; border-radius: 999px; font-weight: 700; border: 2px solid var(--red); background: var(--red); color: #fff; cursor: pointer; font-family: inherit; font-size: 1rem; transition: .2s; }
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.btn.ghost { background: transparent; color: var(--red); }
.btn.ghost:hover { background: var(--red-soft); color: var(--red-dark); }
.btn.light { background: #fff; color: var(--red); border-color: #fff; }
.btn.light:hover { background: var(--red-soft); }

/* Hero */
.hero { background: radial-gradient(1000px 420px at 85% -10%, var(--red-soft), transparent 70%), #fff; padding: 16px 0 48px; }
.hero .wrap { display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-block; color: var(--red); font-weight: 700; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; }
.hero h1 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
.hero h1 span { color: var(--red); }
.hero p.lead { font-size: 1.05rem; color: var(--muted); max-width: 560px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.stats { display: grid; gap: 14px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; box-shadow: var(--shadow); }
.stat strong { display: block; font-size: 2rem; color: var(--red); font-weight: 800; line-height: 1.1; }
.stat span { color: var(--muted); font-size: .92rem; }

/* Sections */
.section { padding: 76px 0; }
.section.soft { background: var(--soft); }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head p { color: var(--muted); }
.section-head.center { margin-inline: auto; text-align: center; }
.grid { display: grid; gap: 22px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; transition: .2s; height: 100%; }
a.card { color: inherit; display: block; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card .icon { width: 44px; height: 44px; border-radius: 12px; background: var(--red-soft); color: var(--red); display: grid; place-items: center; font-weight: 800; margin-bottom: 14px; }
.card p { color: var(--muted); margin: 0; font-size: .97rem; }
.vm { display: grid; grid-template-columns: 1fr 1.4fr; gap: 24px; }
.vision { background: var(--red); color: #fff; border-radius: var(--radius); padding: 38px; }
.vision h2, .vision .eyebrow { color: #fff; }
.vision p { font-size: 1.5rem; font-weight: 800; line-height: 1.3; margin: 0; }
.mission { border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; background: #fff; }
.mission ol { margin: 0; padding-left: 1.2em; }
.mission li { margin-bottom: .8em; color: #3b3333; }
.cta { background: var(--red); color: #fff; border-radius: 22px; padding: 48px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta h2 { color: #fff; margin: 0 0 6px; }
.cta p { margin: 0; opacity: .92; }

/* Posts */
.post-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.post-card .thumb { aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--red), var(--red-dark)); display: grid; place-items: center; color: #fff; font-weight: 800; text-align: center; padding: 16px; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .body { padding: 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card h3 { margin: 0; font-size: 1.05rem; }
.post-card h3 a { color: var(--ink); }
.post-card h3 a:hover { color: var(--red); }
.meta { font-size: .82rem; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.tag { display: inline-block; background: var(--red-soft); color: var(--red); border-radius: 999px; padding: 2px 11px; font-weight: 700; font-size: .75rem; }
.empty { border: 1px dashed var(--line); border-radius: var(--radius); padding: 28px; color: var(--muted); text-align: center; }
.source-box { border-left: 4px solid var(--red); background: var(--soft); padding: 18px 22px; border-radius: 0 12px 12px 0; margin: 28px 0; }

/* Pages */
.page-hero { background: var(--soft); border-bottom: 1px solid var(--line); padding: 48px 0 40px; }
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0; }
.page-hero .crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 8px; }
.content { padding: 52px 0 76px; }
.content .narrow { max-width: 780px; }
.content h2 { margin-top: 1.6em; }
.content h3 { margin-top: 1.4em; color: var(--red-dark); }
.content ul, .content ol { padding-left: 1.3em; }
.content li { margin-bottom: .45em; }
.content table { width: 100%; border-collapse: collapse; margin: 1em 0; }
.content th, .content td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.content th { background: var(--soft); width: 38%; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.chips a { border: 1px solid var(--line); border-radius: 999px; padding: 6px 16px; font-weight: 600; color: var(--ink); font-size: .9rem; }
.chips a.on, .chips a:hover { background: var(--red); border-color: var(--red); color: #fff; }
.pagination { margin-top: 36px; display: flex; gap: 8px; flex-wrap: wrap; }
.pagination .page-numbers { border: 1px solid var(--line); border-radius: 10px; padding: 6px 14px; color: var(--ink); }
.pagination .current { background: var(--red); border-color: var(--red); color: #fff; }

/* Contact form */
.form { display: grid; gap: 14px; max-width: 560px; }
.form label { font-weight: 600; font-size: .92rem; display: grid; gap: 6px; }
.form input, .form textarea { font: inherit; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.form input:focus, .form textarea:focus { outline: 2px solid var(--red); border-color: var(--red); }
.form .hp { position: absolute; left: -9999px; }
.notice { background: #eaf6ec; border: 1px solid #bfe3c5; color: #1d5b2a; padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; }
.notice.err { background: #fdeaea; border-color: #f2b9b9; color: #8c0d18; }

/* Footer */
.site-footer { background: #1b1414; color: #d8cccc; padding: 60px 0 0; font-size: .95rem; }
.site-footer a { color: #f0dede; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-brand img { height: 70px; background: #fff; border-radius: 12px; padding: 4px; margin-bottom: 14px; }
.footer-bottom { border-top: 1px solid #332828; margin-top: 44px; padding: 18px 0; font-size: .85rem; color: #a99a9a; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

@media (max-width: 960px) {
  .hero .wrap, .vm { grid-template-columns: 1fr; }
  .grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-toggle { display: inline-block; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); padding: 10px 20px 18px; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; }
  .main-nav .sub-menu { display: flex; position: static; border: 0; box-shadow: none; padding: 0 0 0 14px; }
  .site-header { position: relative; }
  .brand, .site-header.scrolled .brand { width: 74px; height: 66px; }
  .brand img, .site-header.scrolled .brand img { height: 119px; margin: -23px 0 0 -23px; }
}
@media (max-width: 620px) {
  .grid.cols-3, .grid.cols-2, .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 54px 0; }
  .hero { padding: 24px 0 36px; }
  .cta { padding: 30px; }
  .topbar .wrap { justify-content: center; }
}
