/* ===============================
   DARK MODE TOGGLE BUTTON
================================ */
.darkmode-toggle {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 2001;
  background: var(--abu-bg, #f5f7fa);
  border: none;
  border-radius: 50%;
  box-shadow: 0 2px 12px rgba(30,58,95,0.10);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  outline: none;
}
.darkmode-toggle:active {
  box-shadow: 0 4px 18px rgba(30,58,95,0.18);
}
.darkmode-toggle .sun-icon {
  display: block;
  transition: transform 0.5s cubic-bezier(.5,1.5,.5,1), opacity 0.3s;
  will-change: transform, opacity;
}
.darkmode-toggle .sun-icon svg {
  width: 32px;
  height: 32px;
  display: block;
  filter: drop-shadow(0 2px 8px #ffd60044);
}
.darkmode-toggle.dark .sun-icon {
  opacity: 0;
  transform: scale(0.7) rotate(-40deg);
}
.darkmode-toggle .moon-icon {
  display: block;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.7) rotate(40deg);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(.5,1.5,.5,1), opacity 0.3s;
  will-change: transform, opacity;
  pointer-events: none;
}
.darkmode-toggle .moon-icon svg {
  width: 28px;
  height: 28px;
  display: block;
  filter: drop-shadow(0 2px 8px #ffd60044);
}
.darkmode-toggle.dark .moon-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1) rotate(0);
}

/* ===============================
   DARK MODE
================================ */
body.dark {
  background: linear-gradient(135deg, #23272f 0%, #181a20 100%) !important;
  color: #e6e6e6;
}
body.dark .section-card,
body.dark .section-card-small,
body.dark .main-warta-container,
body.dark .info-card,
body.dark .info,  
body.dark section {
  background: #23272f !important;
  color: #e6e6e6;
  box-shadow: 0 4px 24px rgba(0,0,0,0.25);
  border: 1px solid #23272f;
}
body.dark .section-card h3,
body.dark .section-card h4,
body.dark .section-header h3,
body.dark section h2 {
  color: #ffd600;
}
body.dark .icon-badge {
  background: linear-gradient(135deg, #ffd600 60%, #ffb300 100%);
  color: #23272f;
  box-shadow: 0 2px 12px #ffd60033;
}
body.dark .footer {
  background: linear-gradient(135deg, #23272f, #181a20);
  color: #ffd600;
}
body.dark .gallery-slider img,
body.dark #galleryActiveImg {
  background: #23272f;
  box-shadow: 0 2px 12px #000a;
}
body.dark .table-wrapper,
body.dark .schedule-table th,
body.dark .auto-table th {
  background: #23272f !important;
  color: #ffd600 !important;
}
body.dark .schedule-table td,
body.dark .info-card,
body.dark .info,  
body.dark .info-text,
body.dark .auto-table td {
  background: #23272f !important;
  color: #e6e6e6 !important;
}
body.dark .bottom-nav {
  background: #181a20;
  border-top: 1px solid #23272f;
}
body.dark .bottom-nav .nav-item {
  color: #ffd600;
}
body.dark .bottom-nav .nav-item.active {
  color: #fff;
}
body.dark .more-menu {
  background: #23272f;
  color: #ffd600;
}
body.dark .more-menu a {
  color: #ffd600;
}
body.dark .more-header {
  border-bottom: 1px solid #ffd60044;
}
body.dark .contact-item {
  background: #181a20;
  border-color: #23272f;
}
body.dark .contact-label {
  color: #ffd600;
}
/* ===============================
   GLOBAL RESET & SAFETY
================================ */
* {
  box-sizing: border-box;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* ===============================
   ROOT COLOR VARIABLES
================================ */
:root {
  --biru: #1e3a5f;
  --hijau: #2e7d32;
  --oranye: #ef6c00;
  --ungu: #6a1b9a;
  --toska: #00796b;
  --kuning: #fff3cd;
  --abu-bg: #f2f4f7;
}

/* ===============================
   BODY
================================ */
body {
  font-family: "Segoe UI", Arial, sans-serif;
  margin: 0;
  line-height: 1.6;
  background:
    radial-gradient(
      circle at top,
      rgba(255,200,0,0.08),
      transparent 35%
    ),
    var(--abu-bg);
}


/* ===============================
   HEADER
================================ */
.header {
  background: var(--biru);
  color: #fff;
  text-align: center;
  padding: 8px 10px;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: opacity .2s ease, box-shadow .2s ease;
}

.header.hide {
  opacity: 0;
  pointer-events: none;
}

.header h1 {
  font-size: 26px;
  margin: 0;
}

.header p {
  margin: 4px 0;
  font-size: 16px;
}

.logo {
  height: 80px;
  margin: 10px 0;
}

/* ===============================
   OVERLAY
================================ */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  display: none;
  z-index: 998;
}

.overlay.active {
  display: block;
}

/* ===============================
   CONTENT & CONTAINER
================================ */
.content {
  padding: 20px;
  width: 100%;
  margin: 0;
}

.container {
  padding: 25px;
  width: 100%;
}

/* ===============================
   SECTION
================================ */
section {
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(12px);
  padding: 22px;
  margin-bottom: 28px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.35);
  box-shadow: 0 10px 25px rgba(30,58,95,0.08);
}

section h2 {
  margin-top: 0;
  padding-left: 14px;
  border-left: 6px solid var(--biru);
  font-size: 22px;
  letter-spacing: 0.3px;
  position: relative;
}

section h2::after {
  content: "";
  position: absolute;
  left: -6px;
  top: 0;
  bottom: 0;
  width: 6px;
  filter: blur(6px);
  opacity: 0.35;
  background: inherit;
}

/* WARNA PER BAGIAN */
.ibadah h2   { border-color: var(--hijau); }
.sekolah h2  { border-color: var(--oranye); }
.kelompok h2 { border-color: var(--ungu); }
.keuangan h2 { border-color: var(--toska); }

/* ===============================
   TABLE (SAFE MOBILE)
================================ */

.table-wrapper {
  max-width: 100%;
  overflow-x: auto;
}

table {
  width: max-content;
  border-collapse: collapse;
  max-width: 100%;
}

.auto-table {
  width: max-content;
  table-layout: auto;
  border-collapse: collapse;
}

.auto-table th,
.auto-table td {
  white-space: nowrap;
}

th {
  background: linear-gradient( 135deg,  #eef3f8,  #e3ebf5);
  font-weight: 600;
  border: none;
}

td {
  border: none;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

tbody tr {
  transition: background 0.2s ease;
}

tbody tr:hover {
  background: rgba(30,58,95,0.04);
}

.right {
  text-align: right;
}

.total td {
  background: linear-gradient( 135deg,  #fff3cd,  #ffe8a3  );
  border-radius: 10px;
  font-weight: bold;
  border: none;
}


/* ===============================
   INFO BOX
================================ */
/* =========================
   TABEL DI INFORMASI 😎🔥
========================= */

.info-item table {

    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    color: white;
}

/* HEADER */
.info-item th {

    text-align: left;
    padding: 8px 10px;
    background: rgba(255, 215, 0, 0.12);
    font-weight: 600;
    white-space: nowrap;
}

/* CELL */
.info-item td {

    padding: 8px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    white-space: nowrap;
}

/* WRAPPER */
.table-wrapper {

    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* BIAR TABEL PUNYA LEBAR MINIMAL */
.table-wrapper table {

    min-width: 480px;
}

.info {
  background: #e3f2fd;
  color: #2c3e50;
  border-left: 8px solid var(--biru);
}
.info-item table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 14px;
}

.info-item th {
    text-align: left;
    padding: 6px;
    background: rgba(255,255,255,0.08);
}

.info-item td {
    padding: 6px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* =========================
   INFO PREMIUM LAYOUT 😎🔥
========================= */

.info-grid {
  color: #2c3e50;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* CARD */
.info-card {
color: #2c3e50;
    background: rgba(255,255,255,0.04);
    border-radius: 14px;
    padding: 14px 16px;
    border: 1px solid rgba(255,255,255,0.06);

    backdrop-filter: blur(6px);
    transition: 0.3s ease;
}

/* Hover halus 😎 */
.info-card:hover {

    transform: translateY(-2px);
    background: rgba(255,255,255,0.06);
}

/* Label */
.info-label {

    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 215, 0, 0.9);
    margin-bottom: 8px;
}

/* Text */
.info-text {

    font-size: 14px;
    line-height: 1.6;
    color: rgba(0, 0, 0, 0.85);
}

/* Table Card */
.table-card {

    padding-bottom: 10px;
}


/* ===============================
   FOOTER
================================ */
footer {
  background: var(--biru);
  color: #fff;
  text-align: center;
  padding: 18px;
  font-size: 14px;
}

/* ===============================
   BOTTOM NAVIGATION
================================ */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 64px;
  background: #fff;
  border-top: 1px solid #ddd;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
}

.bottom-nav .nav-item {
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: #333;
  padding: 6px 0;
  position: relative;
  transition: all .25s ease;
}

.bottom-nav .icon {
  font-size: 22px;
  display: block;
}

.bottom-nav .label {
  font-size: 12px;
}

/* =====================
   MORE MENU
===================== */
.more-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: none;
  z-index: 1100;
}

.more-menu {
  position: fixed;
  left: 0;
  right: 0;
  bottom: -100%;
  background: #fff;
  border-radius: 16px 16px 0 0;
  z-index: 1200;
  transition: bottom 0.3s ease;
  padding-bottom: env(safe-area-inset-bottom);
}

.more-menu.show {
  bottom: 0;
}

.more-overlay.show {
  display: block;
}

.more-menu a {
  display: block;
  padding: 14px 20px;
  text-decoration: none;
  color: #333;
  border-bottom: 1px solid #eee;
  font-size: 15px;
}

/* HEADER MORE MENU */
.more-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid #ddd;
  font-weight: 600;
}

.more-header button {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
}


/* ===============================
   MOBILE (HP)
================================ */
@media (max-width: 767px) {

  body {
    font-size: 16px;
    padding-bottom: 72px;
  }

  .logo {
    height: 60px;
  }

  .header h1 {
    font-size: 22px;
  }

  .content,
  .container {
    padding: 15px;
  }

  section {
    padding: 18px 15px;
  }

  section h2 {
    font-size: 20px;
  }

  th, td {
    font-size: 14px;
    padding: 8px;
  }
}

/* ===============================
   TABLET
================================ */
@media (min-width: 768px) and (max-width: 1023px) {

  body {
    padding-bottom: 80px;
  }

  .bottom-nav {
    height: 70px;
  }

  .bottom-nav .icon {
    font-size: 24px;
  }

  .bottom-nav .label {
    font-size: 14px;
  }
}

/* ===============================
   DESKTOP
================================ */
@media (min-width: 1024px) {

  body {
    padding-bottom: 0;
  }
  
 .bottom-nav {
    height: 70px
  }

  table {
    min-width: 100%;
  }
}