/* ============================================================
   style.css — Tuntunan Tata Cara Sholat
   Arah desain: "Senja di Masjid" — lengkung mihrab, kisi geometris,
   dan cahaya lampu masjid saat senja sebagai identitas visual.
   ============================================================ */

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

:root {
  /* ---- Palet: langit senja indigo + cahaya lampu amber ---- */
  --night-900: #141b30;
  --night-800: #1c2540;
  --night-700: #263156;
  --night-500: #3d4d82;
  --amber-600: #c8842b;
  --amber-500: #e3a13c;
  --amber-100: #fbf1de;
  --clay-500: #d9683f;   /* aksen mode anak-anak */
  --clay-100: #fdece3;
  --paper: #fbf8f2;      /* kertas mushaf, bukan putih polos */
  --surface: #ffffff;
  --ink-900: #1b1f2c;
  --ink-600: #5a6272;
  --line: rgba(20, 27, 48, 0.08);

  /* ---- Sistem desain ---- */
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 7px;
  --arch: 999px 999px var(--radius-lg) var(--radius-lg) / 64px 64px var(--radius-lg) var(--radius-lg);
  --shadow-sm: 0 2px 10px rgba(20, 27, 48, 0.06);
  --shadow-md: 0 14px 34px rgba(20, 27, 48, 0.10);
  --shadow-glow: 0 0 0 1px rgba(227, 161, 60, 0.18), 0 12px 30px rgba(20, 27, 48, 0.12);
  --transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1000px;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-arab: 'Amiri', 'Traditional Arabic', Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink-900);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: var(--transition); }
:focus-visible { outline: 2px solid var(--amber-600); outline-offset: 3px; border-radius: 4px; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* ---------- Motif lengkung kisi (signature) ----------
   Digunakan berulang: header, hero, kartu mode, bingkai gambar.
   Kisi geometris tipis meniru anyaman ornamen masjid. */
.lattice-dark {
  background-image:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0) 0 1.5px, transparent 1.5px 34px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0) 0 1.5px, transparent 1.5px 34px);
}
.lattice-light {
  background-image:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0) 0 1.5px, transparent 1.5px 30px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0) 0 1.5px, transparent 1.5px 30px);
}

/* ---------- Header & Identitas Kelompok ---------- */
.site-header {
  position: relative;
  background: linear-gradient(155deg, var(--night-900), var(--night-700) 65%, var(--night-500));
  color: #fff;
  padding: 22px 0;
  box-shadow: 0 4px 24px rgb(255, 255, 255);
  overflow: hidden;
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
}
.site-header .container { position: relative; z-index: 1; }

.header-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
}

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50% 50% 0 0 / 62% 62% 0 0;
  background: linear-gradient(160deg, var(--amber-500), var(--amber-600));
  color: var(--night-900);
  font-size: 1.05rem;
  flex: none;
}

.identity {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 16px;
  font-size: 0.78rem;
  opacity: 0.82;
}
.identity strong { color: var(--amber-500); font-weight: 600; }

/* ---------- Hero Section (Beranda) ---------- */
.hero {
  position: relative;
  text-align: center;
  padding: 64px 0 34px;
  overflow: hidden;
}

.hero::before {
  /* siluet lengkung mihrab raksasa di belakang judul */
  content: "";
  position: absolute;
  left: 50%;
  top: -40px;
  width: min(640px, 130%);
  height: 320px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(227,161,60,0.14), transparent 72%);
  border-radius: 50% 50% 0 0 / 60% 60% 0 0;
  z-index: 0;
  pointer-events: none;
}

.hero > * { position: relative; z-index: 1; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber-600);
  background: var(--amber-100);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 600;
  color: var(--night-900);
  margin: 0 0 14px;
  line-height: 1.28;
  letter-spacing: -0.01em;
}

.hero h1 span {
  display: block;
  color: var(--amber-600);
  font-style: italic;
  font-weight: 500;
  font-size: 0.85em;
  margin-top: 4px;
}

.hero-sub {
  max-width: 620px;
  margin: 0 auto;
  color: var(--ink-600);
  font-size: 1rem;
}

/* ---------- Pilihan Mode (Beranda) ---------- */
.mode-select { padding: 26px 0 44px; text-align: center; }

.mode-select h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--night-900);
  margin-bottom: 26px;
}

.mode-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

.mode-card {
  position: relative;
  background: var(--surface);
  border-radius: var(--arch);
  box-shadow: var(--shadow-md);
  padding: 40px 24px 30px;
  text-align: center;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: var(--transition);
}

.mode-card:hover,
.mode-card:focus-visible {
  transform: translateY(-6px);
  box-shadow: var(--shadow-glow);
}

.mode-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin-bottom: 4px;
}
.mode-icon svg { width: 30px; height: 30px; }

.mode-dewasa .mode-icon { background: var(--night-800); color: var(--amber-500); }
.mode-anak .mode-icon { background: var(--clay-100); color: var(--clay-500); }

.mode-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 6px 0 8px;
  color: var(--night-900);
  font-size: 1.2rem;
}

.mode-card p {
  color: var(--ink-600);
  font-size: 0.92rem;
  margin: 0;
}

.mode-card .mode-go {
  margin-top: 16px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--amber-600);
}
.mode-dewasa .mode-go { color: var(--night-500); }

/* ---------- Grid Info Fitur ---------- */
.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 8px 0 56px;
}

.info-card {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--amber-500);
  transition: var(--transition);
}

.info-card:hover { transform: translateX(3px); box-shadow: var(--shadow-sm); }

.info-card h4 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--night-900);
  font-size: 1.05rem;
}

.info-card p { margin: 0; font-size: 0.9rem; color: var(--ink-600); }

/* ---------- Navigasi Breadcrumb ---------- */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--ink-600);
  padding: 22px 0 12px;
}
.breadcrumb a { color: var(--amber-600); font-weight: 600; }
.breadcrumb a:hover { color: var(--night-700); text-decoration: underline; }

/* ---------- Header Halaman Internal ---------- */
.page-title-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 6px 0 26px;
}

.page-title-row h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--night-900);
  margin: 0;
  font-weight: 600;
}

.badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  margin-left: 8px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.badge-dewasa { background: var(--night-800); color: var(--amber-500); }
.badge-anak { background: var(--clay-100); color: var(--clay-500); }

.mode-switch {
  display: flex;
  gap: 8px;
  background: #eef0ee;
  padding: 4px;
  border-radius: var(--radius-md);
}
.mode-switch a {
  flex: 1;
  text-align: center;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-600);
}
.mode-switch a.active {
  background: var(--surface);
  color: var(--night-900);
  box-shadow: var(--shadow-sm);
}

/* ---------- List Gerakan / Anggota ---------- */
.gerakan-list {
  list-style: none;
  margin: 0 0 54px;
  padding: 0;
  display: grid;
  gap: 12px;
}

.gerakan-item {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 15px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  border: 1px solid var(--line);
  transition: var(--transition);
  opacity: 0;
  transform: translateY(8px);
  animation: item-in 0.45s ease forwards;
}

@keyframes item-in {
  to { opacity: 1; transform: translateY(0); }
}

.gerakan-item:hover {
  transform: translateX(4px);
  background: var(--amber-100);
  border-color: rgba(227, 161, 60, 0.35);
}

.gerakan-num {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50% 50% 0 0 / 62% 62% 0 0;
  background: var(--night-800);
  color: var(--amber-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  font-weight: 700;
}

.gerakan-name { font-weight: 600; font-size: 1rem; color: var(--ink-900); }

.gerakan-arrow {
  margin-left: auto;
  color: var(--amber-600);
  font-size: 1.2rem;
  font-weight: bold;
  transition: var(--transition);
}
.gerakan-item:hover .gerakan-arrow { transform: translateX(3px); }

/* Skeleton loading (pengganti teks "Memuat...") */
.gerakan-item.skeleton,
li.loading.skeleton {
  cursor: default;
  animation: none;
  opacity: 1;
}
.skeleton-bar {
  height: 14px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--line) 25%, rgba(20,27,48,0.14) 37%, var(--line) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

li.loading {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  color: var(--ink-600);
  font-size: 0.92rem;
  border: 1px dashed var(--line);
  list-style: none;
}

/* ---------- Detail Card & Konten Sholat ---------- */
.detail-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 26px;
  margin: 10px 0 26px;
  border: 1px solid var(--line);
}

.detail-image {
  display: block;
  width: 100%;
  max-height: 380px;
  object-fit: contain;
  border-radius: var(--arch);
  background: linear-gradient(to bottom, var(--night-800), var(--night-700));
  margin-bottom: 22px;
  padding: 18px;
}

.detail-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--night-900);
  margin: 0 0 8px;
  font-weight: 600;
}

.detail-desc {
  color: var(--ink-600);
  font-size: 0.95rem;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px dashed var(--line);
}

/* Blok Bacaan Sholat Arab-Latin */
.bacaan-block {
  position: relative;
  background: var(--amber-100);
  border-left: 3px solid var(--amber-500);
  border-radius: var(--radius-sm);
  padding: 22px 22px 20px;
  margin-bottom: 16px;
}

.bacaan-arab {
  font-family: var(--font-arab);
  font-size: 2rem;
  text-align: right;
  direction: rtl;
  line-height: 2.3;
  color: var(--night-900);
  margin-bottom: 14px;
}

.bacaan-latin {
  font-style: italic;
  color: var(--amber-600);
  margin-bottom: 8px;
  font-size: 1rem;
  font-weight: 600;
}

.bacaan-terjemahan {
  color: var(--ink-600);
  font-size: 0.92rem;
  line-height: 1.5;
  margin-bottom: 12px;
}

.bacaan-sumber {
  font-size: 0.72rem;
  color: var(--amber-600);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Audio Player */
audio { width: 100%; margin-top: 12px; border-radius: var(--radius-sm); }

/* Video Section */
.video-toggle {
  margin-top: 16px;
  background: var(--night-800);
  color: var(--amber-500);
  border: none;
  padding: 13px 22px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.video-toggle:hover { background: var(--night-700); }

.video-wrap { margin-top: 18px; }
.video-wrap video {
  width: 100%;
  border-radius: var(--radius-md);
  aspect-ratio: 16/9;
  box-shadow: var(--shadow-sm);
}

/* ---------- Navigasi Kontrol / Tombol ---------- */
.nav-controls { display: flex; gap: 12px; margin-bottom: 54px; }

.btn {
  flex: 1;
  padding: 15px 16px;
  border-radius: var(--radius-md);
  border: none;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.btn-secondary { background: #fff; border: 1px solid var(--line); color: var(--ink-900); }
.btn-secondary:hover:not(:disabled) { background: var(--paper); border-color: #cbd2ce; }

.btn-primary { background: var(--amber-500); color: var(--night-900); }
.btn-primary:hover:not(:disabled) { background: var(--amber-600); color: #fff; }

.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }

.btn-primary.playing {
  background: var(--night-800);
  color: var(--amber-500);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(227,161,60,0.35); }
  70% { box-shadow: 0 0 0 10px rgba(227,161,60,0); }
  100% { box-shadow: 0 0 0 0 rgba(227,161,60,0); }
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  background: var(--night-900);
  color: #a9b3c9;
  padding: 26px 0;
  text-align: center;
  font-size: 0.8rem;
}
.site-footer::before {
  content: "";
  display: block;
  height: 3px;
  margin-bottom: 26px;
  background: linear-gradient(90deg, transparent, var(--amber-500), transparent);
}
.site-footer p { margin: 4px 0; }

/* ============================================================
   Media Queries & Responsivitas (Tablet & Desktop)
   ============================================================ */
@media (min-width: 650px) {
  .header-inner { flex-direction: row; justify-content: space-between; align-items: center; }
  .identity { justify-content: flex-end; text-align: right; }
  .mode-cards { grid-template-columns: 1fr 1fr; }
  .info-grid { grid-template-columns: repeat(3, 1fr); }
  .page-title-row { flex-direction: row; justify-content: space-between; align-items: center; }
  .mode-switch { width: 260px; }
}

@media (min-width: 1024px) {
  .hero h1 { font-size: 2.6rem; }
  .detail-card { padding: 40px; }
  .bacaan-arab { font-size: 2.2rem; }
}