/* ==========================================================
   DONASI DIGITAL NU BAWANG — tampilan publik
   Nuansa: hijau (utama), putih (latar), aksen gold, kartu rounded
   ========================================================== */
:root {
  --green-900: #0b3d21;
  --green-800: #10532c;
  --green-700: #166534;
  --green-600: #1b7a3f;
  --green-500: #22924c;
  --green-100: #e6f4ea;
  --green-50: #f3faf5;
  --gold-600: #b8860b;
  --gold-500: #c9a227;
  --gold-100: #fdf6e3;
  --ink: #1f2937;
  --ink-soft: #4b5563;
  --muted: #6b7280;
  --line: #e5e7eb;
  --white: #ffffff;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow-sm: 0 2px 8px rgba(16, 83, 44, .06);
  --shadow: 0 10px 30px rgba(16, 83, 44, .08);
  --shadow-lg: 0 18px 45px rgba(16, 83, 44, .12);
  --fs-base: 15.5px;
}

* { -webkit-tap-highlight-color: transparent; }

body {
  font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  font-size: var(--fs-base);
  line-height: 1.65;
  overflow-x: hidden;
}

a { color: var(--green-700); text-decoration: none; }
a:hover { color: var(--green-600); }

h1, h2, h3, h4, h5 { font-weight: 700; color: var(--green-900); line-height: 1.3; }
h1 { font-size: clamp(1.65rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.9rem); }
.text-muted-soft { color: var(--muted) !important; }
.section { padding: 64px 0; }
.section-tight { padding: 44px 0; }
.bg-soft { background: var(--green-50); }
.bg-white-soft { background: #fbfdfb; }

/* ---------- Tombol ---------- */
.btn {
  border-radius: 999px;
  font-weight: 600;
  padding: .65rem 1.4rem;
  transition: all .2s ease;
}
.btn-lg { padding: .85rem 1.9rem; font-size: 1.02rem; }
.btn-green, .btn-primary {
  background: linear-gradient(135deg, var(--green-700), var(--green-500));
  border: none; color: #fff;
  box-shadow: 0 8px 20px rgba(22, 101, 52, .22);
}
.btn-green:hover, .btn-primary:hover { background: linear-gradient(135deg, var(--green-800), var(--green-600)); color: #fff; transform: translateY(-1px); }
.btn-gold { background: linear-gradient(135deg, var(--gold-600), var(--gold-500)); border: none; color: #3b2f05; font-weight: 700; }
.btn-gold:hover { color: #3b2f05; filter: brightness(1.05); }
.btn-outline-green { border: 1.5px solid var(--green-700); color: var(--green-700); background: #fff; }
.btn-outline-green:hover { background: var(--green-700); color: #fff; }
.btn-outline-light-2 { border: 1.5px solid rgba(255,255,255,.75); color: #fff; }
.btn-outline-light-2:hover { background: #fff; color: var(--green-800); }
.btn-soft { background: var(--green-100); color: var(--green-800); border: none; }
.btn-soft:hover { background: #d7ecdd; color: var(--green-900); }
.btn-wa { background: #25d366; color: #fff; border: none; }
.btn-wa:hover { background: #1ebe5a; color: #fff; }

/* ---------- Navbar ---------- */
.navbar-app {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid var(--line);
  padding: .7rem 0;
  transition: box-shadow .25s ease;
}
.navbar-app.scrolled { box-shadow: var(--shadow-sm); }
.navbar-app .navbar-brand { font-weight: 800; color: var(--green-800); letter-spacing: .2px; display: flex; align-items: center; gap: .65rem; }
.navbar-app .navbar-brand small { display: block; font-size: .68rem; font-weight: 600; color: var(--gold-600); letter-spacing: 1.6px; text-transform: uppercase; }
.brand-logo { width: 44px; height: 44px; flex: 0 0 44px; }
.navbar-app .nav-link { color: var(--ink-soft); font-weight: 600; padding: .55rem .85rem !important; border-radius: 8px; }
.navbar-app .nav-link:hover, .navbar-app .nav-link.active { color: var(--green-700); background: var(--green-50); }
.navbar-toggler { border: none; padding: .35rem .5rem; }
.navbar-toggler:focus { box-shadow: none; }
.navbar-toggler-icon { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23166534' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.4' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); }
.navbar-mobile-panel { background: #fff; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(circle at 12% 20%, rgba(201, 162, 39, .12), transparent 45%),
    radial-gradient(circle at 88% 12%, rgba(34, 146, 76, .16), transparent 42%),
    linear-gradient(160deg, #f3faf5 0%, #ffffff 62%);
  padding: 58px 0 46px;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute; inset: auto 0 -1px 0; height: 90px;
  background: linear-gradient(180deg, rgba(255,255,255,0), #fff);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--green-100); color: var(--green-800);
  border-radius: 999px; padding: .4rem .95rem; font-size: .82rem; font-weight: 700;
}
.hero h1 { margin: 1rem 0 .8rem; }
.hero h1 span { color: var(--green-600); }
.hero-lead { color: var(--ink-soft); font-size: 1.06rem; max-width: 560px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.hero-stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 18px; min-width: 128px; box-shadow: var(--shadow-sm);
}
.hero-stat b { display: block; font-size: 1.2rem; color: var(--green-800); }
.hero-stat span { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
.hero-illustration {
  background: #fff; border-radius: 24px; box-shadow: var(--shadow-lg);
  padding: 18px; border: 1px solid rgba(22, 101, 52, .07);
}

/* ---------- Pencarian ---------- */
.search-card {
  background: #fff; border-radius: 18px; box-shadow: var(--shadow);
  padding: 14px; border: 1px solid var(--line);
}
.search-card .form-control, .search-card .form-select { border-radius: 12px; border-color: var(--line); padding: .65rem .9rem; }

/* ---------- Kartu kampanye ---------- */
.campaign-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; height: 100%; display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm); transition: transform .22s ease, box-shadow .22s ease;
}
.campaign-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.campaign-thumb { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--green-50); }
.campaign-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.campaign-card:hover .campaign-thumb img { transform: scale(1.04); }
.campaign-cat {
  position: absolute; top: 12px; left: 12px;
  background: rgba(255,255,255,.94); color: var(--green-800);
  border-radius: 999px; padding: .25rem .75rem; font-size: .74rem; font-weight: 700;
}
.campaign-verified {
  position: absolute; top: 12px; right: 12px;
  background: var(--green-700); color: #fff; border-radius: 999px;
  padding: .25rem .7rem; font-size: .72rem; font-weight: 700;
}
.campaign-body { padding: 18px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.campaign-title { font-size: 1.02rem; font-weight: 700; color: var(--green-900); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.campaign-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: .8rem; color: var(--muted); }
.progress-wrap { margin-top: auto; }
.progress { height: 9px; background: #eef2ef; border-radius: 999px; overflow: hidden; }
.progress-bar { background: linear-gradient(90deg, var(--green-600), var(--green-500)); border-radius: 999px; }
.progress-bar.gold { background: linear-gradient(90deg, var(--gold-600), var(--gold-500)); }
.campaign-amounts { display: flex; justify-content: space-between; font-size: .82rem; margin-bottom: 6px; }
.campaign-amounts b { color: var(--green-700); }
.campaign-amounts span { color: var(--muted); }
.badge-soft-success { background: #dcfce7; color: #166534; }
.badge-soft-warning { background: #fef3c7; color: #92400e; }
.badge-soft-danger { background: #fee2e2; color: #991b1b; }
.badge-soft-info { background: #dbeafe; color: #1e40af; }
.badge-soft-secondary { background: #f1f5f9; color: #475569; }
.badge { font-weight: 600; padding: .38em .7em; border-radius: 999px; }

/* ---------- Kartu umum ---------- */
.card-app { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-app.pad { padding: 22px; }
.card-title-app { font-size: 1.08rem; font-weight: 700; color: var(--green-900); margin-bottom: 14px; }
.stat-tile {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow-sm); height: 100%;
}
.stat-tile .stat-icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--green-100); color: var(--green-700); font-size: 1.25rem; margin-bottom: 12px;
}
.stat-tile .stat-value { font-size: 1.35rem; font-weight: 800; color: var(--green-900); line-height: 1.2; }
.stat-tile .stat-label { font-size: .82rem; color: var(--muted); }
.kategori-chip {
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 16px 10px; color: var(--ink-soft); font-weight: 600; font-size: .84rem;
  text-align: center; height: 100%; transition: all .2s ease;
}
.kategori-chip i { font-size: 1.4rem; color: var(--green-600); }
.kategori-chip:hover { border-color: var(--green-500); color: var(--green-800); transform: translateY(-2px); box-shadow: var(--shadow-sm); }

/* ---------- Detail kampanye ---------- */
.detail-cover { border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); background: var(--green-50); }
.detail-cover img { width: 100%; display: block; max-height: 460px; object-fit: cover; }
.gallery-thumb { border-radius: 12px; overflow: hidden; aspect-ratio: 4/3; cursor: pointer; border: 2px solid transparent; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb.active { border-color: var(--green-600); }
.donate-box {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px; position: sticky; top: 90px;
}
.detail-amount { font-size: 1.7rem; font-weight: 800; color: var(--green-700); }
.donor-row { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.donor-row:last-child { border-bottom: none; }
.donor-avatar {
  width: 42px; height: 42px; border-radius: 50%; background: var(--green-100); color: var(--green-800);
  display: grid; place-items: center; font-weight: 700; flex: 0 0 42px;
}
.komentar-item { background: var(--green-50); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 12px; }
.update-item { border-left: 3px solid var(--green-500); padding-left: 14px; margin-bottom: 20px; }

/* ---------- Form donasi ---------- */
.nominal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.nominal-option { position: relative; }
.nominal-option input { position: absolute; opacity: 0; }
.nominal-option label {
  display: block; text-align: center; padding: .85rem .5rem; border: 1.5px solid var(--line);
  border-radius: 12px; font-weight: 700; color: var(--ink-soft); cursor: pointer; background: #fff;
  transition: all .18s ease;
}
.nominal-option input:checked + label {
  border-color: var(--green-600); background: var(--green-50); color: var(--green-800);
  box-shadow: 0 6px 16px rgba(22, 101, 52, .12);
}
.payment-method { display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 10px; cursor: pointer; background: #fff; }
.payment-method input { margin: 0; }
.payment-method.selected { border-color: var(--green-600); background: var(--green-50); }
.ringkasan-box { background: var(--green-50); border: 1px dashed var(--green-500); border-radius: var(--radius-sm); padding: 16px; }
.ringkasan-box .row-line { display: flex; justify-content: space-between; padding: 4px 0; font-size: .93rem; }
.ringkasan-box .row-line.total { border-top: 1px solid rgba(22,101,52,.2); margin-top: 8px; padding-top: 10px; font-weight: 800; font-size: 1.08rem; color: var(--green-800); }

/* ---------- Bukti donasi ---------- */
.receipt {
  background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg);
  border-top: 6px solid var(--green-700); padding: 28px; max-width: 720px; margin: 0 auto;
}
.receipt-head { display: flex; gap: 16px; align-items: center; border-bottom: 1px dashed var(--line); padding-bottom: 18px; margin-bottom: 18px; }
.receipt-row { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px dashed #eef2ef; font-size: .94rem; }
.receipt-row:last-child { border-bottom: none; }
.receipt-row span:first-child { color: var(--muted); }
.receipt-row span:last-child { font-weight: 600; text-align: right; }
.receipt-total { background: var(--green-50); border-radius: 12px; padding: 16px; margin-top: 14px; display: flex; justify-content: space-between; align-items: center; }
.qr-box { text-align: center; }
.qr-box canvas, .qr-box img { max-width: 100%; height: auto; }
.status-banner { border-radius: 14px; padding: 14px 18px; font-weight: 600; display: flex; align-items: center; gap: 12px; }

/* ---------- Floating WhatsApp ---------- */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 1030;
  background: #25d366; color: #fff; width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.6rem;
  box-shadow: 0 10px 26px rgba(37, 211, 102, .45);
}
.wa-float:hover { color: #fff; transform: translateY(-2px); }
@media (max-width: 991.98px) {
  .wa-float { bottom: 86px; }
}

/* ---------- Sticky donasi bar (mobile) ---------- */
.donate-sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1020;
  background: rgba(255,255,255,.97); border-top: 1px solid var(--line);
  padding: 10px 14px; display: none; gap: 10px; align-items: center;
  box-shadow: 0 -6px 20px rgba(16,83,44,.08);
}
@media (max-width: 991.98px) { .donate-sticky.show { display: flex; } }

/* ---------- Footer ---------- */
.footer-app { background: var(--green-900); color: rgba(255,255,255,.82); padding: 52px 0 22px; }
.footer-app h6 { color: #fff; font-weight: 700; margin-bottom: 14px; }
.footer-app a { color: rgba(255,255,255,.78); display: block; padding: 5px 0; }
.footer-app a:hover { color: var(--gold-500); }
.footer-app .footer-bottom { border-top: 1px solid rgba(255,255,255,.14); margin-top: 30px; padding-top: 18px; font-size: .84rem; }
.social-btn { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.12); display: grid; place-items: center; color: #fff; }
.social-btn:hover { background: var(--gold-500); color: var(--green-900); }

/* ---------- Lain-lain ---------- */
.alert { border-radius: 12px; border: none; }
.table-app thead th { background: var(--green-50); color: var(--green-800); font-size: .82rem; text-transform: uppercase; letter-spacing: .4px; border-bottom: 1px solid var(--line); }
.table-app td { vertical-align: middle; font-size: .92rem; }
.timeline-list { list-style: none; padding: 0; margin: 0; }
.timeline-list li { position: relative; padding: 0 0 20px 26px; border-left: 2px solid var(--green-100); }
.timeline-list li:last-child { border-left-color: transparent; }
.timeline-list li::before { content: ''; position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--green-500); }
.skeleton-img { background: linear-gradient(90deg, #eef2ef, #f7faf8, #eef2ef); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.text-gold { color: var(--gold-600) !important; }
.divider { height: 1px; background: var(--line); margin: 28px 0; }
.ratio-box { border-radius: 12px; overflow: hidden; }
.pagination .page-link { color: var(--green-700); border-color: var(--line); }
.pagination .page-item.active .page-link { background: var(--green-700); border-color: var(--green-700); }
@media print {
  .no-print, .navbar-app, .footer-app, .wa-float, .donate-sticky { display: none !important; }
  body { background: #fff; }
  .receipt { box-shadow: none; border: 1px solid #ddd; }
}

/* ==========================================================
   POPUP BERANDA (pengumuman, kampanye unggulan, notifikasi donasi)
   ========================================================== */
.popup-beranda .modal-content {
  border: none;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(11, 61, 33, .28);
}
.popup-beranda .modal-body { padding: 26px 26px 18px; }
.popup-beranda .modal-footer.popup-footer {
  border-top: 1px solid var(--line);
  padding: 16px 26px 22px;
  gap: 10px;
}
.popup-cover { position: relative; background: var(--green-50); }
.popup-cover img { width: 100%; display: block; aspect-ratio: 16 / 7; object-fit: cover; }
.popup-close-float {
  position: absolute; top: 12px; right: 12px;
  background: rgba(255, 255, 255, .92) !important;
  border-radius: 50%; padding: 9px; opacity: .9;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}
.popup-close-float:hover { opacity: 1; }
.popup-kicker {
  display: inline-flex; align-items: center; gap: .45rem;
  background: var(--green-100); color: var(--green-800);
  border-radius: 999px; padding: .32rem .85rem;
  font-size: .76rem; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  margin-bottom: 12px;
}
.popup-title { font-size: clamp(1.15rem, 2.6vw, 1.55rem); margin-bottom: 10px; }
.popup-text { color: var(--ink-soft); font-size: .96rem; }
.popup-text p:last-child { margin-bottom: 0; }
.popup-progress { margin-top: 18px; background: var(--green-50); border-radius: 14px; padding: 16px; }
.popup-meta {
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  margin-top: 12px; font-size: .84rem; color: var(--muted);
}
.popup-meta i { color: var(--green-600); margin-right: .35rem; }

/* ---------- Toast notifikasi donasi ---------- */
.popup-toasts {
  position: fixed; left: 18px; bottom: 18px; z-index: 1045;
  display: flex; flex-direction: column; gap: 10px;
  max-width: min(360px, calc(100vw - 36px));
}
.popup-toast {
  display: flex; align-items: flex-start; gap: 12px;
  background: #fff; border: 1px solid var(--line);
  border-left: 4px solid var(--green-600);
  border-radius: 14px; padding: 12px 14px;
  box-shadow: 0 12px 32px rgba(11, 61, 33, .16);
  opacity: 0; transform: translateY(14px);
  transition: opacity .35s ease, transform .35s ease;
}
.popup-toast.show { opacity: 1; transform: translateY(0); }
.popup-toast-icon {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%;
  background: var(--green-100); color: var(--green-700);
  display: grid; place-items: center; font-size: .95rem;
}
.popup-toast-body { flex: 1; min-width: 0; }
.popup-toast-main { font-size: .88rem; line-height: 1.35; color: var(--ink); }
.popup-toast-sub {
  font-size: .78rem; color: var(--muted); margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.popup-toast-close {
  background: none; border: none; color: var(--muted);
  font-size: 1.15rem; line-height: 1; padding: 0 2px; cursor: pointer;
}
.popup-toast-close:hover { color: var(--ink); }

@media (max-width: 575.98px) {
  .popup-beranda .modal-body { padding: 20px 18px 14px; }
  .popup-beranda .modal-footer.popup-footer { padding: 14px 18px 18px; }
  .popup-beranda .modal-footer.popup-footer .btn { flex: 1 1 auto; }
  .popup-toasts { left: 12px; right: 12px; bottom: 80px; max-width: none; }
  .popup-cover img { aspect-ratio: 16 / 9; }
}
@media (prefers-reduced-motion: reduce) {
  .popup-toast { transition: none; }
}
