/* Komponen tambahan situs publik (dulu @layer components di resources/css/app.css).
 * Utilitas Tailwind dari Play CDN dimuat sesudahnya sehingga tetap menang. Lihat 99-keputusan #34. */

/* Komponen yang di mockup ditulis di <style> inline halaman (list-berita.html, dll.). */
mark { background: #cbf7e6; color: inherit; border-radius: 3px; padding: 0 1px; }

.chip { display: inline-flex; align-items: center; gap: .45rem; height: 36px; padding: 0 .8rem; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; font-size: 13.5px; font-weight: 700; color: var(--ink-soft); white-space: nowrap;
  transition: border-color .15s, background-color .15s, color .15s; }
.chip:hover { border-color: #c9d6dc; color: var(--brand); }
.chip[aria-current="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip .count { font-size: 11.5px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.chip[aria-current="true"] .count { color: #a8f0d4; }

/* galeri.html: chip filter lebih tinggi, kartu album, masonry foto */
.chip-lg { height: 38px; padding: 0 .95rem; border-color: #cdd8dd; }
.chip-lg:hover { border-color: var(--brand); }
.album[aria-current="true"] { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.masonry { column-count: 1; column-gap: 14px; }
@media (min-width: 560px) { .masonry { column-count: 2; } }
@media (min-width: 1024px) { .masonry { column-count: 3; column-gap: 18px; } }
.masonry > li { break-inside: avoid; margin-bottom: 14px; }
@media (min-width: 1024px) { .masonry > li { margin-bottom: 18px; } }
.tile { position: relative; display: block; width: 100%; overflow: hidden; border-radius: 10px; background: #dfe8eb; text-align: left; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.tile:hover img, .tile:focus-visible img { transform: scale(1.03); }
.tile-cap { position: absolute; inset: auto 0 0 0; padding: 2.4rem .95rem .85rem; background: linear-gradient(to top, rgba(4,29,44,.86), rgba(4,29,44,0));
  color: #fff; opacity: 0; transform: translateY(6px); transition: opacity .2s var(--ease), transform .2s var(--ease); }
.tile:hover .tile-cap, .tile:focus-visible .tile-cap { opacity: 1; transform: none; }
@media (hover: none) { .tile-cap { opacity: 1; transform: none; } }
.tile:focus-visible { outline: 3px solid var(--leaf); outline-offset: 3px; }

.side-title { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); }
.side-row { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: .75rem; padding: .55rem 0;
  font-size: 14px; font-weight: 600; color: var(--ink-soft); text-align: left; transition: color .15s; }
.side-row:hover, .side-row[aria-current="true"] { color: var(--brand); }
.side-row[aria-current="true"] { font-weight: 800; }

.page-btn { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 .6rem; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.page-btn:hover:not(:disabled):not([aria-disabled="true"]) { border-color: var(--brand); color: var(--brand); }
.page-btn[aria-current="page"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* Halaman masuk (dari <style> inline mockup/login.html; .check diganti .login-check agar tidak bentrok dengan admin.css). */
.brand-photo { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; opacity: .14; filter: grayscale(1); mix-blend-mode: luminosity; }
.login-check { width: 18px; height: 18px; accent-color: var(--brand); }
.spin { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Halaman baca berita (dari <style> inline mockup/baca-berita.html). */
.breadcrumb--dark { color: var(--muted); }
.breadcrumb--dark a:hover { color: var(--brand); }
.breadcrumb--dark span[aria-hidden] { color: #b6c3c9; }
.prose-article h2 { scroll-margin-top: 96px; }
.prose-article blockquote footer { margin-top: .6em; font-size: 14px; font-weight: 500; color: var(--muted); }
.prose-article .lead { font-size: 1.1em; color: var(--ink); }
.prose-article img { border-radius: var(--radius); height: auto; }
.prose-article iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border-radius: var(--radius); }
.toc-link { display: block; border-left: 2px solid var(--line); padding: .35rem 0 .35rem .9rem; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); transition: color .15s, border-color .15s; }
.toc-link:hover { color: var(--brand); }
.toc-link[aria-current="true"] { border-color: var(--leaf); color: var(--brand); font-weight: 800; }
.share-btn { display: inline-flex; align-items: center; gap: .5rem; height: 38px; padding: 0 .85rem; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; font-size: 13px; font-weight: 700; color: var(--ink-soft); transition: border-color .15s, color .15s; }
.share-btn:hover { border-color: var(--brand); color: var(--brand); }
.share-btn svg { width: 16px; height: 16px; }

/* =========================================================================
   Beranda redesain 2026 (docs/rencana-redesain, ANALISIS-HALAMAN hal 05–09)
   ========================================================================= */

/* Hero: foto dipotong miring (tepi kiri ±15% lebih condong di atas) + garis hijau tebal di tepi miring */
.hero-photo__stripe { clip-path: polygon(15% 0, 100% 0, 100% 100%, 0 100%); }
.hero-photo__img { clip-path: polygon(calc(15% + 16px) 0, 100% 0, 100% 100%, 16px 100%); }

/* Chip nominal donasi: outline radius 12, terpilih berisi biru */
.amount-chip { display: inline-grid; place-items: center; min-height: 52px; padding: 0 .3rem; border-radius: var(--r-btn); white-space: nowrap;
  border: 1.5px solid var(--control); background: #fff; font-size: 15px; font-weight: 700; color: var(--ink);
  font-variant-numeric: tabular-nums; transition: border-color .15s, background-color .15s, color .15s; }
.amount-chip:hover { border-color: var(--brand); }
.amount-chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
@media (min-width: 640px) { .amount-chip { min-height: 56px; font-size: 16px; } }

/* Sakelar (donasi rutin) */
.toggle { position: relative; flex-shrink: 0; width: 48px; height: 28px; border-radius: 999px; border: 1.5px solid var(--control); background: #fff; transition: background-color .2s, border-color .2s; }
.toggle::after { content: ""; position: absolute; top: 4px; left: 4px; width: 17px; height: 17px; border-radius: 50%; background: var(--ink-soft); transition: transform .2s var(--ease), background-color .2s; }
.toggle[aria-checked="true"] { background: var(--brand); border-color: var(--brand); }
.toggle[aria-checked="true"]::after { transform: translateX(20px); background: #fff; }

/* Kolom angka bergaris atas biru */
.stat-col { border-top: 3px solid var(--brand); padding-top: 2rem; }
@media (min-width: 1024px) { .stat-col + .stat-col { border-left: 1px solid var(--line); padding-left: 2rem; } }

/* Kartu program: kepala biru berbentuk atap */
.roof-head { --roof: 22%; background: var(--brand); color: #fff; }

/* Blok tanggal agenda: hari biru + bulan hijau */
.date-block { display: inline-flex; overflow: hidden; border-radius: 10px; }
.date-block > span:first-child { display: grid; place-items: center; min-width: 64px; padding: .55rem .7rem; background: var(--brand); color: #fff; font-size: 2.1rem; line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums; }
.date-block > span:last-child { display: grid; place-items: center; padding: 0 .9rem; background: var(--leaf); color: var(--ink); font-size: 14px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }

/* Mozaik galeri beranda */
.mosaic-cap { position: absolute; inset: auto 0 0 0; padding: 3rem 1.1rem 1rem; background: linear-gradient(to top, rgba(10,27,43,.82), rgba(10,27,43,0)); color: #fff; }

/* Pita relawan hijau: bentuk rumah besar samar di kanan bawah */
.volunteer-band { position: relative; isolation: isolate; overflow: hidden; background: var(--leaf); color: var(--ink); }
.volunteer-band::after { content: ""; position: absolute; z-index: -1; right: -4%; bottom: 0; width: 46%; height: 82%;
  background: rgba(255,255,255,.14); clip-path: polygon(0 32%, 50% 0, 100% 32%, 100% 100%, 0 100%); }
.volunteer-band::before { content: ""; position: absolute; z-index: -1; right: 6%; bottom: -8%; width: 40%; height: 40%;
  border-top: 10px solid rgba(255,255,255,.18); clip-path: polygon(0 50%, 50% 0, 100% 50%, 100% 60%, 50% 10%, 0 60%); background: rgba(255,255,255,.18); }

/* Daftar berita samping: item pertama bergaris atas biru */
.news-list > * { border-top: 1px solid var(--line); }
.news-list > *:first-child { border-top: 3px solid var(--brand); }

/* =========================================================================
   Galang dana (section fundraising) & Relawan (section volunteer_form): port artefak contoh (99-keputusan #41)
   ========================================================================= */
.fund { background: var(--mist); padding: clamp(88px, 11vw, 140px) 0; }
.fund-wrap, .vol-wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 1024px) { .fund-wrap, .vol-wrap { padding: 0 32px; } }
.fund-head { display: grid; gap: 24px 64px; align-items: end; margin-bottom: 40px; }
@media (min-width: 981px) { .fund-head { grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); } }
.fund h2, .vol h2 { margin-top: 18px; font-size: clamp(32px, 4.6vw, 64px); line-height: 1.02; font-weight: 800; letter-spacing: -.03em; color: var(--ink); text-wrap: balance; }
.fund-lede, .vol-lede { font-size: clamp(16px, 1.25vw, 19px); line-height: 1.6; color: var(--ink-soft); max-width: 52ch; }
.fund-head .fund-lede { margin-bottom: 22px; }
.fund-seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.fund-seg button { min-height: 40px; padding: 8px 16px; border: 1.5px solid var(--control); border-radius: 999px; background: transparent; font-size: 14px; font-weight: 600; color: var(--ink-soft); cursor: pointer; transition: background .35s, color .35s, border-color .35s; }
.fund-seg button:hover { border-color: var(--brand); color: var(--brand); }
.fund-seg button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.fund-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 641px) { .fund-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 981px) { .fund-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
.fund-card { display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); transition: transform .6s var(--ease-out), border-color .6s; }
.fund-card:hover { transform: translateY(-4px); border-color: var(--brand-100); }
.fund-thumb { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #E7F1EE; }
.fund-thumb svg { width: 100%; height: 100%; }
.fund-cat, .fund-days { position: absolute; top: 14px; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.fund-cat { left: 14px; background: #fff; color: var(--brand); }
.fund-days { right: 14px; background: var(--brand-900); color: #fff; }
.fund-body { display: flex; flex: 1; flex-direction: column; gap: 14px; padding: 20px 20px 22px; }
.fund-body h3 { font-size: 21px; line-height: 1.2; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.fund-body p { font-size: 15px; color: var(--ink-soft); }
.fund-bar { position: relative; height: 10px; overflow: hidden; border-radius: 999px; background: #E3ECEA; }
.fund-bar i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--leaf); }
.fund-bar i.add { background: repeating-linear-gradient(-45deg, var(--brand) 0 6px, #2A78B0 6px 12px); transition: width .5s var(--ease-out), left .5s var(--ease-out); }
.fund-nums { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--ink-soft); }
.fund-nums b { display: block; font-size: 18px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.fund-nums div:last-child { text-align: right; }
.fund-cta { width: 100%; margin-top: auto; }
.fund-report { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; margin-top: 32px; padding: 22px 24px; border-radius: var(--r-card); background: #E8F2EF; }
.fund-report p { max-width: 62ch; color: var(--ink-soft); }
.fund-report b { color: var(--ink); }

/* Laci donasi (dialog) dari kanan */
dialog.fund-drawer { position: fixed; inset: 0 0 0 auto; display: block; width: min(480px, 100vw); height: 100%; max-height: 100%; margin: 0; padding: 0; overflow: auto; border: 0; background: #fff; color: var(--ink); visibility: hidden; transform: translateX(100%); transition: transform .6s var(--ease-out); }
dialog.fund-drawer[open] { visibility: visible; }
dialog.fund-drawer.in { transform: none; }
dialog.fund-drawer::backdrop { background: rgba(6,35,61,0); transition: background .6s; }
dialog.fund-drawer.in::backdrop { background: rgba(6,35,61,.45); }
.fund-dr-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); background: #fff; }
.fund-dr-head strong { font-size: 14px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); }
.fund-x { display: grid; width: 44px; height: 44px; place-items: center; border: 1.5px solid var(--control); border-radius: 50%; background: none; cursor: pointer; }
.fund-dr-body { display: grid; gap: 22px; padding: 22px; }
.fund-dr-body h3 { margin-bottom: 12px; font-size: 24px; line-height: 1.15; font-weight: 800; color: var(--ink); }
.fund-dr-body ol { display: grid; gap: 8px; margin: 0; padding-left: 20px; list-style: decimal; color: var(--ink-soft); }
.fund-preview { margin-top: 8px; font-size: 14px; color: var(--ink-soft); }
.fund-preview b { color: var(--brand); }
.fund-fld { display: grid; gap: 8px; }
.fund-fld > label, .fund-lbl { font-size: 14px; font-weight: 700; }
.fund-amts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fund-amts button { min-height: 48px; padding: 12px 6px; border: 1.5px solid var(--control); border-radius: var(--r-chip); background: none; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; transition: background .3s, border-color .3s, color .3s; }
.fund-amts button[aria-pressed="true"] { background: var(--leaf); border-color: var(--leaf); color: var(--ink); }
.fund-inp { width: 100%; min-height: 48px; padding: 12px 14px; border: 1.5px solid var(--control); border-radius: var(--r-chip); background: #fff; font: inherit; font-size: 16px; color: var(--ink); }
.fund-inp:focus { outline: 2.5px solid var(--brand); outline-offset: 1px; border-color: transparent; }
.fund-rp { position: relative; }
.fund-rp span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-weight: 700; color: var(--ink-soft); }
.fund-rp .fund-inp { padding-left: 42px; }
.fund-chk { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.fund-chk input { width: 20px; height: 20px; accent-color: var(--brand); }
.fund-err { display: none; font-size: 13px; color: #B3261E; }
.fund-fld.bad .fund-err { display: block; }
.fund-fld.bad .fund-inp { border-color: #B3261E; }
.fund-sum { display: grid; gap: 6px; padding: 16px; border-radius: var(--r-chip); background: #E8F2EF; font-size: 15px; }
.fund-sum div { display: flex; justify-content: space-between; gap: 10px; }
.fund-sum b { text-align: right; font-variant-numeric: tabular-nums; }
.fund-banks { display: grid; gap: 8px; }
.fund-banks li { display: grid; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-chip); }
.fund-banks span { font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.fund-banks b { font-size: 20px; font-weight: 800; letter-spacing: .02em; color: var(--ink); }
.fund-banks small { font-size: 13px; color: var(--ink-soft); }
.fund-dr-foot { position: sticky; bottom: 0; display: flex; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--line); background: #fff; }
.fund-dr-foot .btn { flex: 1; }

/* Relawan: pita biru, atap hijau samar ber-parallax */
.vol { position: relative; overflow: hidden; padding: clamp(88px, 11vw, 140px) 0; background: var(--brand); color: #fff; }
.vol h2 { color: #fff; }
.vol-lede { color: #CFE0EC; }
.vol .eyebrow { color: #BFE9DA; }
.vol-wrap { position: relative; display: grid; gap: clamp(32px, 6vw, 96px); align-items: start; }
@media (min-width: 981px) { .vol-wrap { grid-template-columns: minmax(0,1fr) minmax(0,1fr); } }
.vol-wrap h2 { margin: 18px 0 20px; }
.vol-roles { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.vol-roles button { min-height: 44px; padding: 10px 16px; border: 1.5px solid rgba(255,255,255,.4); border-radius: 999px; background: transparent; color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; transition: background .35s, color .35s, border-color .35s; }
.vol-roles button[aria-pressed="true"] { background: var(--leaf); border-color: var(--leaf); color: var(--ink); }
.vol-roles button:focus-visible { outline-color: #fff; }
.vol-form { display: grid; gap: 16px; padding: clamp(20px, 3vw, 30px); border-radius: var(--r-card); background: #fff; color: var(--ink); }
.vol-form h3 { font-size: 24px; font-weight: 800; color: var(--ink); }
.vol-note { font-size: 13px; color: var(--ink-soft); }
.vol-done { padding: 14px; border-radius: var(--r-chip); background: #E8F2EF; font-size: 14px; }
.vol-done a { font-weight: 700; color: var(--brand); }
.vol-roof { position: absolute; right: -6%; top: -30%; width: 46%; opacity: .08; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { dialog.fund-drawer, dialog.fund-drawer::backdrop { transition: none; } }
