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

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

.site-footer {
  background: #0b2c5f;
  text-align: center;
  padding: 25px 15px;
  font-size: 15px;
  color: #e7eaed;
  font-family: "Source Serif 4", serif;
}

.footer-links {
  margin-bottom: 10px;
}

.footer-links a {
  color: #cbd5e1;
  margin: 0 10px;
  text-decoration: none;
  font-size: 13px;
}

.footer-links a:hover {
  color: #fff;
}

.footer-copy {
  opacity: 0.8;
}

/* =========================
   NAVBAR GLOBAL
========================= */
.main-navbar {
  position: relative;
  z-index: 1000;
  background: linear-gradient(135deg, #0f2a5f, #1e3a8a);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-container {
  max-width: 1100px;
  margin: auto;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand{
  text-decoration:none;
  color:inherit;
  display:flex;
  align-items:center;
  flex-shrink:0;
}

.nav-brand-glass{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:10px 14px;
  border-radius:16px;
  background:rgba(255,255,255,0.10);
  border:1px solid rgba(255,255,255,0.18);
  box-shadow:0 12px 30px rgba(0,0,0,0.22);
  backdrop-filter: blur(12px);
  box-sizing:border-box;
}

.nav-brand-icon{
  width:22px;
  height:22px;
  border-radius:8px;
}

.nav-brand-text{
  font-weight:800;
  letter-spacing:0.01em;
  white-space:nowrap;
  color:white;
  line-height:1.2;
  display:inline-flex;
  align-items:center;
}

.nav-links {
  display: flex;
  gap: 22px;
  padding:8px 10px;
  border-radius:18px;
  background:rgba(255,255,255,0.10);
  border:1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(12px);
  box-sizing:border-box;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  opacity: 0.9;
  transition: 0.2s;
}

.nav-links a:hover {
  opacity: 1;
}

.lang-dropdown {
  position: relative;
  flex-shrink: 0;
}

.main-navbar .lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.main-navbar .lang-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.main-navbar .lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 168px;
  background: #0f2a5f;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  display: none;
  z-index: 1300;
}

.main-navbar .lang-menu button {
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: none;
  color: #f1f5f9;
  text-align: left;
  font-size: 14px;
  cursor: pointer;
}

.main-navbar .lang-menu button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.main-navbar .lang-dropdown.active .lang-menu {
  display: block;
}

html[lang="ar"] .main-navbar .lang-menu {
  right: auto;
  left: 0;
}

html[lang="ar"] .main-navbar .lang-menu button {
  text-align: right;
}

.theme-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: white;
  font-size: 18px;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav-container {
    align-items: flex-start;
  }

  .nav-brand{
    width:100%;
    justify-content:center;
  }

  .nav-brand-glass{
    width:100%;
    justify-content:center;
    padding:9px 12px;
  }

  .nav-links{
    width:100%;
    display:grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap:10px;
    padding:10px 10px;
    border-radius:18px;
    background:rgba(255,255,255,0.10);
    border:1px solid rgba(255,255,255,0.18);
    backdrop-filter: blur(12px);
    box-sizing:border-box;
    overflow:hidden;
    min-width:0;
  }

  .nav-links a{
    display:flex;
    justify-content:center;
    padding:10px 8px;
    border-radius:14px;
    background: rgba(255,255,255,0.08);
    width:100%;
    min-width:0;
    box-sizing:border-box;
  }

  .lang-dropdown {
    margin: 6px auto 0;
  }

  .theme-btn{
    margin-left: 0;
    margin-right: auto;
  }
}

/* =========================
   CONTAINER
========================= */
.zakat-container {
  max-width: 1100px;
  margin: 50px auto;
  padding: 20px;
  display: grid;
  gap: 25px;
}

@media (max-width: 768px) {
  .zakat-container {
    padding: 15px 20px;
  }
}

/* =========================
   BOX ZAKAT
========================= */
.zakat-box {
  background: white;
  padding: 25px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  border: 1px solid #eef2f7;
}

.zakat-box h2 {
  margin-bottom: 15px;
  font-size: 20px;
  color: #1e3a8a;
}

/* =========================
   FORM GRID
========================= */
.zakat-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}

.zakat-box h2 {
  grid-column: span 2;
}

.zakat-box label {
  font-size: 15px;
  color: #64748b;
  margin-bottom: 3px;
}

.zakat-box input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #dbe2ea;
  background: #f8fafc;
  font-size: 15px;
  transition: 0.2s;
}

.zakat-box input:focus {
  outline: none;
  border-color: #2563eb;
  background: white;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

/* =========================
   BUTTON
========================= */
.zakat-btn {
  width: 100%;
  padding: 16px;
  border-radius: 14px;
  border: none;
  font-size: 17px;
  font-weight: bold;
  color: white;
  cursor: pointer;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  box-shadow: 0 10px 25px rgba(37,99,235,0.25);
  transition: 0.2s;
}

.zakat-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(37,99,235,0.35);
}

/* =========================
   RESULT BOX
========================= */
.zakat-result {
  background: white;
  padding: 25px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  border: 1px solid #eef2f7;
}

.zakat-result h3 {
  color: #1e3a8a;
  margin-bottom: 10px;
}

.zakat-result p {
  margin: 6px 0;
  font-size: 15px;
}

.zakat-result hr {
  margin: 15px 0;
  border: none;
  border-top: 1px solid #e5e7eb;
}

/* =========================
   MOBILE
========================= */
@media (max-width: 768px) {
  .zakat-box {
    grid-template-columns: 1fr;
  }

  .zakat-box h2 {
    grid-column: span 1;
  }

  .zakat-container {
    padding: 15px;
  }
}

body {
  background: #f1f5f9;
}

/* =========================
   DARK MODE — ZAKAT PAGE
========================= */

body.dark {
  background: #0f172a;
}

/* box utama */
body.dark .zakat-box,
body.dark .zakat-result {
  background: #0b1220;
  border: 1px solid #1e293b;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

/* judul */
body.dark .zakat-box h2,
body.dark .zakat-result h3 {
  color: #f1f5f9;
}

/* label */
body.dark .zakat-box label {
  color: #94a3b8;
}

/* input */
body.dark .zakat-box input {
  background: #020617;
  border: 1px solid #1e293b;
  color: #f1f5f9;
}

body.dark .zakat-box input:focus {
  border-color: #60a5fa;
  background: #020617;
  box-shadow: 0 0 0 3px rgba(96,165,250,0.2);
}

/* hasil teks */
body.dark .zakat-result p {
  color: #cbd5f5;
}

/* garis */
body.dark .zakat-result hr {
  border-top: 1px solid #1e293b;
}

/* tombol */
body.dark .zakat-btn {
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  box-shadow: 0 10px 25px rgba(37,99,235,0.4);
}

body.dark .zakat-btn:hover {
  box-shadow: 0 14px 30px rgba(96,165,250,0.5);
}

/* =========================
   MAZHAB CARD MODERN
========================= */

.zakat-mazhab {
  max-width: 600px;
  margin: 40px auto;
  padding: 32px 28px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.08);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* garis aksen atas */
.zakat-mazhab::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #0b2c5f, #22c55e);
}

/* judul */
.zakat-mazhab h2 {
  margin-bottom: 16px;
  font-size: 24px;
  color: #0b2c5f;
}

/* label */
.zakat-mazhab label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #374151;
}

/* select modern */
#mazhab {
  width: 100%;
  max-width: 320px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 15px;
  background: #f9fafb;
  outline: none;
  transition: 0.25s;
  margin: 0 auto;
  display: block;
}

/* efek fokus */
#mazhab:focus {
  border-color: #0b2c5f;
  background: white;
  box-shadow: 0 0 0 3px rgba(11, 44, 95, 0.15);
}

/* info mazhab */
.mazhab-info {
  margin-top: 18px;
  font-size: 14px;
  color: #4b5563;
  background: #f1f5f9;
  padding: 12px 14px;
  border-radius: 10px;
  line-height: 1.6;
}

/* =========================
   RESPONSIVE MOBILE
========================= */
@media (max-width: 768px) {
  .zakat-mazhab {
    margin: 25px 16px;
    padding: 24px 18px;
  }

  #mazhab {
    max-width: 100%;
  }
}
.zakat-info-cards {
  max-width: 1000px;
  margin: 50px auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  padding: 0 20px;
}

.info-card {
  background: linear-gradient(135deg, #0b2c5f, #1e3a8a);
  color: white;
  padding: 22px;
  border-radius: 14px;
  transition: 0.3s;
}

.info-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}


.info-card h3 {
  margin-bottom: 6px;
}

.info-card p {
  font-size: 15px;
  opacity: 0.9;
  line-height: 1.6;
}

.info-card:hover {
  transform: translateY(-4px);
}

@media (min-width: 768px) {
  .zakat-info-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* =====================
   DARK MODE
===================== */

body.dark .zakat-box {
  background: #1e293b;
  color: #f1f5f9;
  border: 1px solid rgba(56,189,248,0.35);
  box-shadow: 0 0 14px rgba(56,189,248,0.12);
}

body.dark .zakat-box input,
body.dark .zakat-box select {
  background: #0f172a;
  color: #f1f5f9;
  border: 1px solid rgba(148,163,184,0.25);
}

body.dark .zakat-box input::placeholder,
body.dark .zakat-box input::placeholder {
  color: rgba(148,163,184,0.6);
}

body.dark .mazhab-info {
  color: #cbd5e1;
}

body.dark .zakat-result {
  background: linear-gradient(135deg, #1e293b, #334155);
  color: #f8fafc;
  border: 1px solid rgba(56,189,248,0.3);
  box-shadow: 0 0 16px rgba(56,189,248,0.15);
}

body.dark .info-card {
  background: linear-gradient(135deg, #1e293b, #334155);
  border: 1px solid rgba(56,189,248,0.25);
  box-shadow: 0 0 12px rgba(56,189,248,0.1);
}

/* TAB NAV */
.zakat-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  padding: 10px;
}

.tab-btn {
  padding: 10px 14px;
  border: none;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  background: transparent;
  color: #1e3a8a;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
  width: 100%;
}

@media (max-width: 768px) {

  .zakat-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 kolom fix */
    gap: 8px;
    padding: 0;
    overflow: visible;
  }

  .tab-btn {
    width: 100%;
    min-width: 0;
    padding: 10px 8px;
    font-size: 13px;
    border-radius: 20px;
    text-align: center;
  }

}

body.dark .zakat-tabs {
  background: #1e293b;
  border: 1px solid rgba(56,189,248,0.2);
  border-radius: 12px;
}

body.dark .tab-btn {
  color: #e2e8f0;
}

body.dark .tab-btn.active {
  background: linear-gradient(135deg, #facc15, #f59e0b);
  color: #111827;
}

.tab-btn.active {
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: white;
  box-shadow: 0 8px 20px rgba(37,99,235,0.35);
}

/* TAB CONTENT */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

body.dark .tab-btn {
  background: transparent;
  color: #e2e8f0;
}

body.dark .tab-btn.active {
  background: linear-gradient(135deg, #facc15, #f59e0b);
  color: #111827;
}

.zakat-result {
  margin-top: 25px;
  background: linear-gradient(135deg, #ffffff, #f3f6ff);
  padding: 25px;
  border-radius: 18px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}

body.dark .zakat-result {
  background: linear-gradient(135deg, #1e293b, #334155);
  color: #f8fafc;
  border: 1px solid rgba(56,189,248,0.3);
}

.zakat-pay {
  margin-top: 20px;
  text-align: center;
}

.pay-btn {
  display: inline-block;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: white;
  padding: 12px 26px;
  border-radius: 30px;
  font-weight: 600;
  text-decoration: none;
  transition: 0.3s;
}

.pay-btn:hover {
  transform: translateY(-2px);
}

.zakat-history {
  margin-top: 40px;
  padding: 20px;
  background: #ffffff;
  border-radius: 18px;
}

body.dark .zakat-history {
  background: #0f172a;
}

.zakat-user {
  background: linear-gradient(135deg, #0b2c5f, #1e3a8a);
  padding: 35px 20px;
  text-align: center;
  color: white;
  max-width: 500px;     /* batasi lebar */
  margin: 40px auto;    /* tengah */
  border-radius: 18px;  /* sudut halus */
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

#user-logged-out {
  max-width: 360px;
  margin: 20px auto;
}

.zakat-user input {
  padding: 10px;
  border-radius: 10px;
  border: none;
  margin-top: 10px;
}

.zakat-user button {
  margin-top: 10px;
  padding: 10px 18px;
  border: none;
  border-radius: 20px;
  background: gold;
  font-weight: bold;
  cursor: pointer;
}

#monthly-history {
  list-style: none;
  padding: 0;
}

#monthly-history li {
  padding: 10px;
  border-bottom: 1px solid #ddd;
}

.hero-content {
  max-width: 1100px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.hero-text {
  flex: 1;
  min-width: 260px;
}

.hero-text h1 {
  font-size: 36px;
  margin-bottom: 15px;
}

.hero-text p {
  font-size: 16px;
  opacity: 0.9;
  margin-bottom: 25px;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.hero-btn {
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: bold;
  text-decoration: none;
  transition: 0.2s;
}

.hero-btn.primary {
  background: #22c55e;
  color: white;
}

.hero-btn.secondary {
  background: rgba(255,255,255,0.15);
  color: white;
}

.hero-btn:hover {
  transform: translateY(-2px);
}

/* Navbar: .logo + .nav-brand — ikon & teks sejajar horizontal */
a.logo.nav-brand {
  flex-direction: row;
  align-items: center;
  text-align: left;
  gap: 0;
  color: white;
  font-weight: bold;
}

/* Jangan pakai lebar hero (230px) untuk favicon navbar */
.logo img {
  width: 230px;
  height: auto;
  display: block;
}

a.logo.nav-brand img.nav-brand-icon {
  width: 22px;
  height: 22px;
  max-width: 22px;
  max-height: 22px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.zakat-hero {
  background: linear-gradient(135deg, #0b2c5f, #1e3a8a);
  color: white;
  padding: 80px 20px;
}



.btn-primary {
  background: #22c55e;
  color: white;
  padding: 12px 22px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
}

.btn-secondary {
  background: rgba(255,255,255,0.15);
  color: white;
  padding: 12px 22px;
  border-radius: 10px;
  text-decoration: none;
}

.zakat-stats {
  padding: 50px 20px;
  background: #f8fafc;
}

.stats-container {
  max-width: 1000px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.stat-box {
  background: white;
  padding: 25px;
  border-radius: 14px;
  text-align: center;
  box-shadow: 0 12px 30px rgba(0,0,0,0.05);
}

.stat-box h3 {
  font-size: 28px;
  color: #0b2c5f;
  margin-bottom: 6px;
}

.zakat-cta {
  padding: 70px 20px;
  background: linear-gradient(135deg, #0b2c5f, #1e3a8a);
  color: white;
  text-align: center;
}

.cta-box {
  max-width: 700px;
  margin: auto;
}

.cta-box h2 {
  font-size: 32px;
  margin-bottom: 12px;
}

.cta-box p {
  opacity: 0.9;
  margin-bottom: 25px;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.cta-primary {
  background: #22c55e;
  color: white;
  padding: 12px 26px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
}

.cta-secondary {
  background: rgba(255,255,255,0.15);
  color: white;
  padding: 12px 26px;
  border-radius: 10px;
  text-decoration: none;
}

@media (max-width: 768px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
  }

  .stats-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .zakat-info-cards {
    grid-template-columns: 1fr;
  }
}

.admin-btn {
  display: inline-block;
  padding: 6px 14px;
  background: #1e3a8a;
  color: white;
  border-radius: 20px;
  text-decoration: none;
  font-size: 13px;
}

/* =========================
   DARK MODE GLOBAL
========================= */
body.dark {
  background: #0f172a;
  color: #e5e7eb;
}

/* navbar */
body.dark .main-navbar {
  background: #020617;
  border-bottom: 1px solid #1e293b;
}

/* hero */
body.dark .zakat-hero {
  background: linear-gradient(135deg, #020617, #0f172a);
}

/* semua box */
body.dark .zakat-box,
body.dark .stat-box,
body.dark #zakat-result {
  background: #020617;
  color: #e5e7eb;
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

/* input */
body.dark input,
body.dark select {
  background: #020617;
  color: white;
  border: 1px solid #334155;
}

/* tombol */
body.dark .hero-btn.primary {
  background: #16a34a;
}

body.dark .hero-btn.secondary {
  background: transparent;
  border: 1px solid #16a34a;
  color: #16a34a;
}

/* footer */
body.dark footer {
  background: #020617;
  color: #94a3b8;
}

/* =========================
   DARK MODE GLOBAL FINAL (terangi)
========================= */
body.dark {
  background: #0f172a;
  color: #f1f5f9;
}

/* semua section */
body.dark section,
body.dark main {
  background: transparent;
}

/* navbar */
body.dark .main-navbar {
  background: #0f172a;
  border-bottom: 1px solid rgba(56,189,248,0.2);
}

/* hero */
body.dark .zakat-hero {
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

/* semua box */
body.dark .zakat-box,
body.dark .stat-box,
body.dark .zakat-result,
body.dark .zakat-history,
body.dark .zakat-pay {
  background: #1e293b;
  color: #f1f5f9;
  border: 1px solid rgba(56,189,248,0.25);
  box-shadow: 0 0 14px rgba(56,189,248,0.1);
}

/* stat-box: 4 Mazhab, Rp 2 M+, dll — override h3/p agar terang */
body.dark .zakat-stats {
  background: #0f172a;
}
body.dark .zakat-stats .stat-box h3,
body.dark .zakat-stats .stat-box p {
  color: #f1f5f9 !important;
}
body.dark .zakat-stats .stat-box h3 {
  color: #f8fafc !important;
}

/* input & select */
body.dark .zakat-box input,
body.dark .zakat-box select,
body.dark input,
body.dark select {
  background: #0f172a;
  color: #f1f5f9;
  border: 1px solid rgba(148,163,184,0.3);
}

/* tombol */
body.dark .zakat-btn,
body.dark .hero-btn.primary {
  background: #16a34a;
  color: white;
}

body.dark .hero-btn.secondary {
  background: transparent;
  border: 1px solid #16a34a;
  color: #16a34a;
}

/* footer */
body.dark footer {
  background: #020617;
  color: #94a3b8;
}

/* AUTO RTL SAAT GOOGLE SET ARAB */
html[lang="ar"] body {
  direction: rtl;
  text-align: right;
}

html[lang="ar"] .hero,
html[lang="ar"] .navbar,
html[lang="ar"] .quick-menu,
html[lang="ar"] .article-content {
  text-align: right;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}

.hero-text {
  flex: 1;
}

.hero-image {
  flex: 1;
  text-align: right;
}


.hero-image img {
  max-width: 550px;
  transform: scale(1.05);
}

* {
  box-sizing: border-box;
}

body {
  overflow-x: hidden;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.haul-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.haul-check input {
  width: auto;
}

/* Tombol */
.info-btn {
  margin-top: 8px;
  padding: 6px 12px;
  border: none;
  background: #2d6cdf;
  color: white;
  border-radius: 6px;
  cursor: pointer;
}

.info-btn:hover {
  opacity: 0.9;
}

/* ===============================
   MOBILE MODAL SCROLL FIX
================================ */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.6);

  overflow-y: auto;   /* INI PENTING */
  -webkit-overflow-scrolling: touch;
  padding: 20px 15px;
}

/* Konten */
.modal-content {
  background: white;
  width: 100%;
  max-width: 500px;
  margin: 60px auto;  /* jarak dari atas */
  padding: 22px;
  border-radius: 14px;
  position: relative;

  box-shadow: 0 25px 60px rgba(0,0,0,0.25);
}

/* Close button */
.close {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 22px;
  cursor: pointer;
}

.checkbox-group {
  margin-top: 15px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #1e3a8a; /* biru sesuai tema */
}

.disclaimer-box {
  margin-top: 20px;
  padding: 12px;
  background: #f8f9fa;
  border-left: 4px solid #0d6efd;
  border-radius: 6px;
  font-size: 13px;
   text-align: justify;
  text-justify: inter-word;
  line-height: 1.6;
  color: #444;
}

body.dark .disclaimer-box {
  background: #1e1e1e;
  color: #ccc;
  border-left-color: #4dabf7;
}

.box-section {
  margin-top: 15px;
  padding: 15px;
  border-radius: 8px;
  background: #f3f6ff;
}

body.dark .box-section {
  background: #1e2433;
}

#tab-perusahaan .zakat-box {
  display: flex;
  flex-direction: column;
}

#tab-perusahaan label {
  margin-top: 10px;
}

#tab-perusahaan input[type="number"] {
  width: 100%;
}

.haul-check {
  display: flex;
  align-items: center;   /* ini bikin sejajar vertikal */
  gap: 10px;
  margin-top: 14px;
}

.haul-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  position: relative;
  top: 1px;   /* fine tuning biar pas tengah */
}

.haul-check label {
  margin: 0;
  line-height: 1.4;
  font-size: 14px;
}

.haul-check input[type="checkbox"] {
  transform: translateY(1px);
}


/* ================= MOBILE FIX ================= */
@media (max-width: 768px) {

  /* NAV */
  .nav-container {
    flex-direction: column;
    gap: 10px;
  }

  .nav-links {
    justify-content: center;
    gap: 16px;
  }

  /* HERO */
  .hero-content {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }

  .hero-image {
    text-align: center;
  }

  .hero-image img {
    max-width: 320px;
  }

}

/* ======================================
   ABSOLUTE MOBILE STABILITY FIX
====================================== */
@media (max-width: 768px) {

  /* Kunci semua layout */
  html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    width: 100%;
    max-width: 100%;
  }

  /* Semua section full aman */
  section,
  div,
  canvas {
    max-width: 100%;
  }

  /* CTA jangan melebar */
  .zakat-cta,
  .cta-box {
    width: 100%;
    padding-left: 15px;
    padding-right: 15px;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  /* Stats grid aman */
  .stats-container {
    grid-template-columns: 1fr !important;
  }

  /* Tabs aman */
  .zakat-tabs {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Canvas dipaksa jinak */
  canvas {
    display: block;
    width: 100% !important;
    height: auto !important;
  }

}

.scroll-to-top{
  position: fixed;

  left: 18px;
  bottom: 26px;

  width: 42px;
  height: 36px;

  border: none;
  border-radius: 10px;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;

  background: linear-gradient(135deg,#ef4444,#dc2626);

  color: white;

  box-shadow:
    0 6px 16px rgba(0,0,0,0.25),
    0 3px 8px rgba(239,68,68,0.35);

  opacity: 0;
  visibility: hidden;

  transform: translateY(14px);
  transition: all 0.28s ease;

  z-index: 9999;
  pointer-events: none;

  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.scroll-to-top svg{
  width: 16px;
  height: 16px;
}

.scroll-to-top.show{
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.scroll-to-top:hover{
  transform: translateY(-2px);
  box-shadow:
    0 10px 22px rgba(0,0,0,0.3),
    0 6px 14px rgba(239,68,68,0.45);
}

.scroll-to-top:active{
  transform: scale(0.95);
}