/* ==========================================================================
   NahlMedia Edu - Halaman Donasi & Dukungan (donasi.css)
   Inisiatif Pembelajaran Terbuka & Mandiri untuk Seluruh Anak Indonesia
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg-base: #bae6fd;
  --bg-gradient-top: #dbeafe;
  --bg-gradient-bottom: #93c5fd;
  --brand-primary: #0284c7;
  --brand-primary-dark: #0369a1;
  --brand-honey: #f59e0b;
  --brand-honey-hover: #d97706;
  --text-main: #0c4a6e;
  --text-muted: #0369a1;
  --card-radius: 24px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background-color: var(--bg-base);
  background-image: 
    radial-gradient(circle at 10% 15%, rgba(254, 240, 138, 0.7) 0%, transparent 40%),
    radial-gradient(circle at 90% 20%, rgba(167, 243, 208, 0.65) 0%, transparent 45%),
    linear-gradient(180deg, var(--bg-gradient-top) 0%, var(--bg-base) 50%, var(--bg-gradient-bottom) 100%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  position: relative;
}

.honeycomb-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath fill='%230284c7' d='M28 66L0 50L0 16L28 0L56 16L56 50L28 66ZM28 97L0 81L0 66L28 82L56 66L56 81L28 97Z'/%3E%3C/svg%3E");
  background-size: 56px 97px;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

/* Header */
.donasi-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 14px 0;
  background: rgba(174, 225, 196, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 16px rgba(6, 78, 59, 0.04);
}

.donasi-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.donasi-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn-back-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 9999px;
  background: #ffffff;
  color: #065f46;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(6, 78, 59, 0.1);
  transition: all 0.2s ease;
}

.btn-back-home:hover {
  background: #f8fafc;
  transform: translateX(-3px);
}

/* Hero Section Donasi */
.donasi-hero-section {
  text-align: center;
  padding: 44px 0 28px 0;
}

.hero-badge-wrapper {
  margin-bottom: 14px;
}

.hero-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 20px;
  background: rgba(255, 255, 255, 0.55);
  border: 1.2px solid rgba(255, 255, 255, 0.8);
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #064e3b;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(6, 78, 59, 0.06);
}

.donasi-hero-title {
  font-size: clamp(2rem, 4vw, 2.85rem);
  font-weight: 900;
  color: #052417;
  letter-spacing: -0.6px;
  line-height: 1.25;
  margin-bottom: 14px;
}

.donasi-hero-subtitle {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: var(--text-muted);
  max-width: 760px;
  margin: 0 auto 36px auto;
  line-height: 1.6;
}

/* Main Grid Layout */
.donasi-content-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 32px;
  margin-bottom: 56px;
}

/* Left Card: Donation Form */
.donation-box-card {
  background: rgba(255, 255, 255, 0.75);
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 28px;
  padding: 36px 34px;
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 40px -10px rgba(6, 78, 59, 0.12), 0 0 24px rgba(245, 158, 11, 0.15);
}

.donation-type-toggle {
  display: flex;
  background: #e2e8f0;
  border-radius: 9999px;
  padding: 4px;
  margin-bottom: 24px;
}

.type-toggle-btn {
  flex: 1;
  padding: 10px;
  border-radius: 9999px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
}

.type-toggle-btn.active {
  background: #ffffff;
  color: #065f46;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

/* Nominal Cards Grid */
.nominal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.nominal-btn {
  padding: 16px 18px;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nominal-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-2px);
}

.nominal-btn.active {
  background: #ecfdf5;
  border-color: #10b981;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.2);
}

.nominal-amount {
  font-size: 1.25rem;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: 0.3px;
}

.nominal-btn.active .nominal-amount {
  color: #065f46;
}

/* Custom Input */
.custom-amount-wrapper {
  margin-bottom: 24px;
}

.custom-amount-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
}

.custom-amount-input-box {
  position: relative;
  display: flex;
  align-items: center;
}

.currency-prefix {
  position: absolute;
  left: 16px;
  font-weight: 800;
  color: #64748b;
}

.custom-amount-input {
  width: 100%;
  padding: 12px 16px 12px 46px;
  border-radius: 14px;
  border: 2px solid #cbd5e1;
  background: #ffffff;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  outline: none;
  transition: all 0.2s ease;
}

.custom-amount-input:focus {
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

/* Impact Calculator Notice */
.impact-calculator-box {
  background: linear-gradient(135deg, #ecfdf5 0%, #fef3c7 100%);
  border: 1.5px solid #a7f3d0;
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.impact-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.impact-text h5 {
  font-size: 0.95rem;
  font-weight: 800;
  color: #064e3b;
  margin-bottom: 2px;
}

.impact-text p {
  font-size: 0.85rem;
  color: #047857;
  line-height: 1.4;
}

/* Form Donor Inputs */
.donor-inputs-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.donor-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.donor-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1e293b;
}

.donor-input {
  padding: 11px 14px;
  border-radius: 12px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
}

.donor-input:focus {
  border-color: #059669;
}

/* CTA Donate Button */
.btn-submit-donation {
  width: 100%;
  padding: 15px;
  border-radius: 9999px;
  border: none;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-submit-donation:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(245, 158, 11, 0.5);
}

/* Right Card: Why Donate & Transparency */
.why-donate-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.info-card-block {
  background: rgba(255, 255, 255, 0.65);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 24px;
  padding: 26px 28px;
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 24px rgba(6, 78, 59, 0.06);
}

.info-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #062b1b;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pillars-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pillar-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.pillar-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #ecfdf5;
  color: #059669;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.pillar-item h6 {
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 2px;
}

.pillar-item p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Transparency Pie Bar */
.allocation-bar {
  display: flex;
  height: 16px;
  border-radius: 9999px;
  overflow: hidden;
  margin: 14px 0 12px 0;
}

.alloc-sim { width: 55%; background: #059669; }
.alloc-srv { width: 30%; background: #f59e0b; }
.alloc-out { width: 15%; background: #38bdf8; }

.alloc-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.78rem;
  color: #475569;
}

.alloc-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot.green { background: #059669; }
.dot.yellow { background: #f59e0b; }
.dot.blue { background: #38bdf8; }

/* Institutional & CSR Section */
.csr-banner-section {
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.95) 0%, rgba(5, 150, 105, 0.9) 100%);
  color: #ffffff;
  border-radius: 28px;
  padding: 40px 44px;
  box-shadow: 0 20px 40px rgba(6, 78, 59, 0.25);
  margin-bottom: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}

.csr-text-info {
  max-width: 650px;
}

.csr-tag {
  background: rgba(254, 240, 138, 0.25);
  color: #fef08a;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 10px;
}

.csr-title {
  font-size: 1.6rem;
  font-weight: 900;
  margin-bottom: 8px;
  line-height: 1.3;
}

.csr-desc {
  font-size: 0.95rem;
  color: #d1fae5;
  line-height: 1.55;
}

.btn-contact-csr {
  padding: 13px 28px;
  border-radius: 9999px;
  background: #ffffff;
  color: #065f46;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-contact-csr:hover {
  background: #fef08a;
  transform: translateY(-2px);
}

/* QRIS Modal Simulator */
.qris-modal-card {
  max-width: 500px;
  text-align: center;
  padding: 28px 22px;
  max-height: 90vh;
  overflow-y: auto;
  scrollbar-width: thin;
}

.qris-modal-card::-webkit-scrollbar {
  width: 6px;
}

.qris-modal-card::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

.qris-card-wrapper {
  margin: 4px 0 14px 0;
}

.qris-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.74rem;
  font-weight: 800;
  color: #065f46;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 5px 14px;
  border-radius: 9999px;
  margin-bottom: 12px;
}

.qris-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

.qris-box {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 20px;
  padding: 14px;
  margin: 0 auto 12px auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  max-width: 330px;
}

.qris-img-container {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  border: 1px solid #f1f5f9;
}

.qris-image {
  width: 100%;
  max-width: 290px;
  height: auto;
  aspect-ratio: 830 / 1024;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.qris-meta-card {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #e2e8f0;
  text-align: left;
}

.qris-merchant-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95rem;
  color: #064e3b;
  font-weight: 900;
  letter-spacing: 0.3px;
  margin-bottom: 6px;
}

.qris-check-icon {
  background: #10b981;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 900;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.qris-nmid-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  padding: 6px 10px;
  border-radius: 8px;
  margin-bottom: 6px;
  border: 1px solid #f1f5f9;
}

.qris-nmid-label {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 700;
}

.qris-nmid-code {
  font-size: 0.82rem;
  font-family: monospace;
  font-weight: 800;
  color: #0f172a;
}

.btn-copy-nmid {
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  color: #065f46;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-copy-nmid:hover {
  background: #ecfdf5;
  border-color: #10b981;
}

.qris-amount-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 0 6px;
}

.qris-amount-label {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 600;
}

.qris-amount-val {
  font-size: 1.18rem;
  font-weight: 900;
  color: #059669;
}

.qris-action-bar {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 0 auto 12px auto;
  max-width: 330px;
}

.btn-qris-action {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-qris-download {
  background: #10b981;
  color: #ffffff;
  border: 1px solid #059669;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.btn-qris-download:hover {
  background: #059669;
  transform: translateY(-1px);
}

.btn-qris-view {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.btn-qris-view:hover {
  background: #e2e8f0;
  transform: translateY(-1px);
}

.qris-guide-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  text-align: left;
  margin-bottom: 12px;
}

.qris-guide-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: #0f172a;
  margin-bottom: 6px;
}

.qris-guide-steps {
  margin: 0;
  padding-left: 18px;
  font-size: 0.77rem;
  color: #475569;
  line-height: 1.48;
}

.qris-guide-steps li {
  margin-bottom: 4px;
}

/* Responsive */
@media (max-width: 900px) {
  .donasi-content-layout {
    grid-template-columns: 1fr;
  }
  .csr-banner-section {
    padding: 28px 24px;
    flex-direction: column;
    align-items: flex-start;
  }
  .btn-contact-csr {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 640px) {
  html, body {
    overflow-x: hidden;
  }

  body {
    padding-bottom: 84px !important;
  }

  .donasi-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 56px !important;
    max-height: 56px !important;
    padding: 0 !important;
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(14px);
    border-bottom: 1.5px solid #eef2f6 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
  }

  .donasi-header .container,
  .donasi-nav {
    height: 100% !important;
    padding: 0 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
  }

  .donasi-nav .brand {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .donasi-nav .brand-name {
    font-size: 0.98rem;
    font-weight: 900;
  }

  .donasi-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .donasi-nav-pendukung {
    display: none !important; /* Hide redundant button on mobile (present in dock) */
  }

  .btn-text-nav {
    display: none !important;
  }

  .btn-back-home {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
  }

  .btn-sound-toggle {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nominal-grid {
    grid-template-columns: 1fr;
  }
  .donor-inputs-row {
    grid-template-columns: 1fr;
  }
  .donation-box-card {
    padding: 24px 18px;
  }

  .mobile-bottom-dock {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 68px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(14px);
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)) 4px;
    z-index: 9999;
  }

  .dock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 700;
    flex: 1;
    height: 100%;
    transition: all 0.2s ease;
    gap: 1px;
  }

  .dock-icon {
    font-size: 1.15rem;
    line-height: 1;
  }

  .dock-label {
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
  }

  .dock-item.active {
    color: #059669;
  }

  .dock-pill {
    background: #d1fae5;
    padding: 2px 14px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1px;
  }

  .dock-item:active {
    transform: scale(0.95);
  }
}
