/* --- Style by Fardan Azzuhri --- */
/* --- CONFIG WARNA --- */
:root {
  --bg-color: #f5f5f7;
  --text-color: #1d1d1f;
  --card-bg: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.8);
  --border-color: #d2d2d7;
  --input-bg: #e8e8ed;
  --blue-apple: #0071e3;
  --shadow-color: rgba(0, 0, 0, 0.08);
  --font-stack: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
}

[data-theme="dark"] {
  --bg-color: #000000;
  --text-color: #f5f5f7;
  --card-bg: #1c1c1e;
  --header-bg: rgba(28, 28, 30, 0.8);
  --border-color: #38383a;
  --input-bg: #2c2c2e;
  --blue-apple: #0a84ff;
  --shadow-color: rgba(0, 0, 0, 0.5);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-stack);
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.5;
  letter-spacing: -0.01em;
  padding-bottom: 60px;
}

/* --- HEADER & NAVIGASI --- */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  height: 52px;
  width: 100%;
}

.header-content {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left-group {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 30px;
}

.logo {
  font-weight: 600;
  font-size: 19px;
  color: var(--text-color);
  text-decoration: none;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  height: 100%;
  position: relative;
  top: -1px;
}

nav {
  height: 100%;
  display: flex;
  align-items: center;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 24px;
  height: 100%;
  margin: 0;
  padding: 0;
}

nav li {
  height: 100%;
  display: flex;
  align-items: center;
}

nav a {
  text-decoration: none;
  color: var(--text-color);
  font-size: 13px;
  font-weight: 400;
  opacity: 0.8;
  transition: opacity 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 2px;
}

nav a:hover,
nav a.active {
  opacity: 1;
  color: var(--blue-apple);
}

/* Menu Toggle (Mobile) */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}
.menu-toggle span {
  width: 20px;
  height: 2px;
  background-color: var(--text-color);
}

/* --- LAYOUT UTAMA --- */
.container {
  max-width: 760px;
  margin: 40px auto;
  padding: 0 20px;
}

article {
  background: var(--card-bg);
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 4px 24px var(--shadow-color);
}

h1 {
  font-size: 40px;
  line-height: 1.1;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}
h2 {
  font-size: 28px;
  margin-top: 40px;
  margin-bottom: 15px;
  font-weight: 600;
}
h3 {
  font-size: 22px;
  margin-top: 30px;
  margin-bottom: 10px;
  font-weight: 600;
}
p,
li {
  font-size: 17px;
  line-height: 1.5;
  margin-bottom: 16px;
  color: var(--text-color);
}
.meta {
  font-size: 14px;
  color: #86868b;
  margin-bottom: 30px;
  font-weight: 500;
}

/* Note Box & Button */
.note-box {
  background-color: var(--input-bg);
  color: var(--text-color);
  padding: 24px;
  border-radius: 16px;
  margin: 30px 0;
  font-size: 17px;
  text-align: center;
  font-weight: 500;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--blue-apple);
  font-weight: 500;
  font-size: 16px;
  margin-top: 10px;
  padding: 10px 20px;
  border-radius: 20px;
  transition: background 0.2s;
}
.nav-btn:hover {
  background: var(--input-bg);
}
.nav-btn svg {
  width: 18px;
  height: 18px;
}

.page-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 60px;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
}

/* Form Styles (Global) */
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 14px;
}
input,
textarea {
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: var(--input-bg);
  color: var(--text-color);
  font-size: 16px;
  font-family: inherit;
  transition: all 0.2s;
}
input:focus,
textarea:focus {
  outline: none;
  background: var(--card-bg);
  border-color: var(--blue-apple);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15);
}
.btn-submit {
  background-color: var(--blue-apple);
  color: white;
  border: none;
  padding: 16px 32px;
  border-radius: 980px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
  width: 100%;
}
.btn-submit:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-color);
  padding: 8px;
  display: flex;
  align-items: center;
}
.theme-toggle svg {
  width: 20px;
  height: 20px;
}

/* Progress Bar */
.progress-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: transparent;
}
.progress-bar {
  height: 100%;
  background: var(--blue-apple);
  width: 0%;
}

/* Back To Top */
#backToTop {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background-color: var(--header-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  padding: 12px 24px;
  border-radius: 980px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  z-index: 9999;
  opacity: 0;
}
#backToTop.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
#backToTop:hover {
  background-color: var(--card-bg);
  transform: translateX(-50%) translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .header-content {
    padding: 0 15px;
  }
  .menu-toggle {
    display: flex;
    margin-right: 15px;
  }
  nav {
    display: none;
    position: absolute;
    top: 52px;
    left: 0;
    width: 100%;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 20px;
    height: auto;
  }
  nav ul {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
    height: auto;
  }
  nav li {
    height: auto;
    width: 100%;
  }
  nav a {
    font-size: 16px;
    padding: 10px 0;
    height: auto;
    display: block;
  }
  .header-left-group {
    width: 100%;
    justify-content: space-between;
    gap: 0;
  }
  .container {
    padding: 0 15px;
    margin: 20px auto;
  }
  article {
    padding: 25px;
  }
  h1 {
    font-size: 32px;
  }
}

/* --- KHUSUS HALAMAN BIODATA --- */
.bio-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border-color);
}
.bio-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  background-color: var(--input-bg);
  border: 1px solid var(--border-color);
}
.bio-title h1 {
  font-size: 32px;
  margin-bottom: 5px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.bio-title .role {
  font-size: 18px;
  color: #86868b;
  font-weight: 500;
}
.section-title {
  font-size: 20px;
  font-weight: 600;
  margin-top: 40px;
  margin-bottom: 20px;
  color: var(--blue-apple);
  display: flex;
  align-items: center;
}
.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-color);
  margin-left: 15px;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table td {
  padding: 12px 0;
  vertical-align: top;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 17px;
}
.data-table td:first-child {
  width: 160px;
  font-weight: 500;
  color: #86868b;
}
ul.detail-list {
  padding-left: 20px;
  margin: 0;
}
ul.detail-list li {
  margin-bottom: 10px;
  line-height: 1.6;
  font-size: 17px;
}
.sub-category {
  font-weight: 600;
  margin-top: 25px;
  margin-bottom: 15px;
  color: var(--text-color);
  font-size: 18px;
}
@media (max-width: 600px) {
  .bio-header {
    flex-direction: column;
    text-align: center;
  }
  .data-table td {
    display: block;
    width: 100% !important;
    padding: 4px 0;
  }
}

/* --- KHUSUS DONASI (LAPORAN KEUANGAN) --- */
.financial-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 20px;
  margin-bottom: 25px;
}
.summary-card {
  background: var(--input-bg);
  padding: 20px;
  border-radius: 16px;
  text-align: center;
}
.summary-label {
  font-size: 14px;
  color: #666;
  margin-bottom: 5px;
}
.summary-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-color);
}
.val-green {
  color: #28a745;
}
.val-red {
  color: #dc3545;
}
.val-blue {
  color: var(--blue-apple);
}

.filter-container {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.filter-select {
  padding: 10px 15px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-color);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  flex: 1;
  min-width: 120px;
}
.table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  margin-bottom: 40px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  min-width: 600px;
}
th {
  background: var(--input-bg);
  text-align: left;
  padding: 12px 15px;
  font-weight: 600;
  color: #666;
}
td {
  padding: 12px 15px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-color);
}
tr:last-child td {
  border-bottom: none;
}
.badge {
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
}
.badge-in {
  background: #d4edda;
  color: #155724;
}
.badge-out {
  background: #f8d7da;
  color: #721c24;
}

/* --- KHUSUS KONTAK (MODAL) --- */
.custom-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(5px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}
.custom-modal-box {
  background: var(--card-bg);
  width: 90%;
  max-width: 320px;
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  transform: scale(0.9);
  animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@keyframes modalPop {
  to {
    transform: scale(1);
  }
}
.modal-icon {
  width: 50px;
  height: 50px;
  background: var(--input-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px auto;
  font-size: 24px;
}
.modal-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}
.modal-message {
  font-size: 15px;
  color: #666;
  margin-bottom: 24px;
  line-height: 1.4;
}
.modal-btn {
  background: var(--blue-apple);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  width: 100%;
  cursor: pointer;
}
.modal-btn:hover {
  opacity: 0.9;
}

/* --- SOSIAL MEDIA BUTTONS (BARU) --- */
.social-section {
  margin-top: 30px;
  text-align: center;
  border-top: 1px solid var(--border-color);
  padding-top: 30px;
}
.social-label {
  font-size: 14px;
  color: #86868b;
  margin-bottom: 15px;
  font-weight: 500;
}
.social-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.soc-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 50px;
  text-decoration: none;
  color: white;
  font-weight: 600;
  font-size: 14px;
  transition: transform 0.2s, opacity 0.2s;
  border: none;
}
.soc-btn:hover {
  transform: scale(1.05);
  opacity: 0.9;
}
.soc-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
/* Warna Brand */
.yt {
  background-color: #ff0000;
  box-shadow: 0 4px 12px rgba(255, 0, 0, 0.2);
}
.ig {
  background: linear-gradient(
    45deg,
    #f09433 0%,
    #e6683c 25%,
    #dc2743 50%,
    #cc2366 75%,
    #bc1888 100%
  );
  box-shadow: 0 4px 12px rgba(220, 39, 67, 0.2);
}
/* --- WIDGET JADWAL SHOLAT --- */
.prayer-card {
  background: var(--blue-apple);
  color: white;
  padding: 20px;
  border-radius: 16px;
  margin-top: 20px;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0, 113, 227, 0.3);
  position: relative;
  overflow: hidden;
}

/* Efek hiasan background (opsional) */
.prayer-card::before {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.prayer-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0.95;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 10px;
}

.prayer-grid {
  display: flex;
  justify-content: space-between;
  text-align: center;
  gap: 10px;
}

.prayer-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.p-label {
  font-size: 12px;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.p-time {
  font-size: 20px;
  font-weight: 700;
  font-family: monospace; /* Agar angka sejajar */
}

/* Responsif di HP */
@media (max-width: 600px) {
  .prayer-grid {
    flex-wrap: wrap;
    justify-content: center;
  }
  .prayer-item {
    min-width: 30%; /* Agar jadi 3 kolom per baris */
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 5px;
    border-radius: 8px;
  }
  .prayer-header {
    flex-direction: column;
    gap: 5px;
    text-align: center;
  }
}
/* --- TAMBAHAN UNTUK FORMULIR (JANGAN DIHAPUS) --- */
.registration-form {
  margin-top: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-color);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--input-bg);
  color: var(--text-color);
  font-family: inherit;
  font-size: 16px;
  box-sizing: border-box; /* Fix overflow */
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--blue-apple);
}

.submit-btn {
  background: var(--blue-apple);
  color: white;
  border: none;
  padding: 14px 24px;
  border-radius: 99px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.2s;
}

.submit-btn:hover {
  opacity: 0.9;
}

/* Fix dropdown arrow on dark mode/light mode */
.select-wrapper {
  position: relative;
}
/* Style Tambahan untuk Tabel Donasi Dinamis */
.badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}
.badge.masuk {
  background-color: rgba(52, 199, 89, 0.1);
  color: #34c759;
}
.badge.keluar {
  background-color: rgba(255, 59, 48, 0.1);
  color: #ff3b30;
}
/* --- STYLE HALAMAN KEGIATAN --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 30px;
}

.gallery-card {
  background: var(--card-bg);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 12px var(--shadow-color);
  transition: transform 0.3s ease;
}

.gallery-card:hover {
  transform: translateY(-5px);
}

.gallery-media {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: #eee;
}

.gallery-content {
  padding: 20px;
}

.gallery-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-color);
}

.gallery-desc {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
}

/* Label Tipe (Foto/Video) */
.media-tag {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 12px;
  backdrop-filter: blur(4px);
}
