/* ===== Tokens ===== */
:root {
  --font-display: "Playfair Display", serif;
  --font-arabic: "Amiri", serif;
  --font-body: "Inter", sans-serif;

  --radius: 14px;
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.12);
}

body[data-mode="dewasa"] {
  --primary: #0f3d2e;
  --primary-dark: #0a2b20;
  --accent: #d9a441;
  --accent-soft: #f0d38a;
  --surface: #fbf8f0;
  --ink: #16281f;
}

body[data-mode="anak"] {
  --primary: #d9a441;
  --primary-dark: #b8842a;
  --accent: #0f3d2e;
  --accent-soft: #efd9a0;
  --surface: #fbf8f0;
  --ink: #2b2412;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  font-family: var(--font-body);
  background: var(--surface);
  color: var(--ink);
  transition: background 0.3s ease;
}
a {
  text-decoration: none;
  color: inherit;
}
button {
  font-family: inherit;
  cursor: pointer;
}

/* ===== Info Bar (Kelompok/Dosen) ===== */
.infobar {
  background: #000;
  color: #fff;
  font-size: 12.5px;
  padding: 8px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  white-space: nowrap;
  overflow-x: auto;
}
.infobar strong {
  color: #d9a441;
  font-weight: 700;
}

/* ===== Splash Screen ===== */
.splash {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 60px 20px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(
      180deg,
      rgba(6, 20, 14, 0.55) 0%,
      rgba(6, 20, 14, 0.85) 100%
    ),
    var(--primary);
  background-image:
    linear-gradient(
      180deg,
      rgba(6, 20, 14, 0.55) 0%,
      rgba(6, 20, 14, 0.85) 100%
    ),
    url("assets/images/Background_Beranda_Dewasa.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.splash.hidden {
  display: none;
}
.app-wrapper.hidden {
  display: none;
}
.splash-card {
  background: rgba(80, 92, 40, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 44px 48px;
  max-width: 520px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(2px);
}
.splash-icon {
  font-size: 44px;
  margin-bottom: 6px;
}
.splash-title {
  font-family: var(--font-display);
  color: #fff;
  font-size: 26px;
  letter-spacing: 3px;
  margin: 0 0 26px;
}
.splash-info {
  text-align: left;
  color: #fff;
  font-size: 14.5px;
  line-height: 1.9;
  margin-bottom: 30px;
}
.splash-info p {
  margin: 0 0 10px;
}
.splash-info .hl {
  color: var(--accent-soft, #f0d38a);
  font-weight: 600;
}
.splash-btn {
  width: 100%;
  background: var(--primary-dark);
  color: #fff;
  border: none;
  padding: 16px;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 18px;
}
.splash-btn:hover {
  filter: brightness(1.15);
}
.splash-footer {
  color: rgba(255, 255, 255, 0.85);
  font-size: 13.5px;
  font-weight: 500;
}
.splash-credit {
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

/* ===== Site footer ===== */
.site-footer {
  text-align: center;
  padding: 18px 20px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
}
body[data-mode="anak"] .site-footer {
  color: var(--primary-dark);
}

/* ===== Topbar ===== */
.topbar {
  background: var(--primary);
  transition: background 0.3s ease;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-icon {
  font-size: 22px;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent-soft);
  font-size: 20px;
}
.main-nav {
  display: flex;
  gap: 28px;
}
.nav-link {
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
  font-size: 15px;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s;
}
body[data-mode="anak"] .nav-link {
  color: rgba(30, 20, 0, 0.6);
}
.nav-link.active {
  color: var(--accent-soft);
  border-color: var(--accent-soft);
}
body[data-mode="anak"] .nav-link.active {
  color: var(--primary-dark);
  border-color: var(--primary-dark);
}

.mode-switch {
  position: relative;
}
.mode-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  color: var(--accent-soft);
  padding: 9px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
}
body[data-mode="anak"] .mode-btn {
  border-color: rgba(30, 20, 0, 0.35);
  color: var(--primary-dark);
}
.mode-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--primary);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  min-width: 160px;
  display: none;
  flex-direction: column;
}
.mode-menu.open {
  display: flex;
}
.mode-option {
  background: none;
  border: none;
  text-align: left;
  padding: 12px 18px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  font-weight: 500;
}
body[data-mode="anak"] .mode-option {
  color: rgba(30, 20, 0, 0.75);
}
.mode-option:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* ===== Hero (Beranda) ===== */
.hero {
  background: var(--primary);
  position: relative;
  overflow: hidden;
  padding: 90px 32px 120px;
  transition: background 0.3s ease;
}
.hero--dewasa {
  background-image:
    linear-gradient(
      180deg,
      rgba(6, 20, 14, 0.55) 0%,
      rgba(6, 20, 14, 0.85) 100%
    ),
    url("assets/images/Background_Beranda_Dewasa.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
/* ===== Latar Belakang Khusus Beranda Anak ===== */
body[data-mode="anak"] .hero {
  background-image:
    linear-gradient(
      180deg,
      rgba(251, 248, 240, 0.2) 0%,
      /* Efek overlay lembut agar teks tetap terbaca */ rgba(251, 248, 240, 0.5)
        100%
    ),
    url("assets/images/Background beranda anak.png"); /* Sesuaikan path folder gambar Anda */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 40px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: 46px;
  line-height: 1.15;
  margin: 0 0 18px;
  color: #fff;
}
body[data-mode="anak"] .hero h1 {
  color: var(--primary-dark);
}
.hero h1 .accent {
  color: var(--accent-soft);
  font-style: italic;
}
body[data-mode="anak"] .hero h1 .accent {
  color: #fff;
}
.hero p {
  font-size: 16px;
  line-height: 1.7;
  max-width: 460px;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 30px;
}
body[data-mode="anak"] .hero p {
  color: rgba(40, 28, 0, 0.7);
}
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 15px;
  padding: 15px 26px;
  border-radius: 10px;
  border: none;
}
body[data-mode="anak"] .cta-btn {
  background: var(--primary-dark);
  color: #fff;
}
.cta-btn:hover {
  filter: brightness(1.08);
}

.hero-figure {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 18px;
  position: relative;
  align-self: end;
  padding-top: 40px;
}
.mosque-frame {
  width: 230px;
  height: 320px;
  border: 3px solid var(--accent-soft);
  border-radius: 120px 120px 8px 8px;
  background: linear-gradient(180deg, #0c1a3a 0%, #d98d3d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 90px;
  box-shadow: var(--shadow-soft);
  flex-shrink: 0;
}
.hero-person {
  height: 320px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.4));
  position: relative;
  z-index: 2;
}
.mosque-frame-img {
  width: 200px;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(var(--shadow-soft));
  position: relative;
  z-index: 1;
}

/* ===== Layout with sidebar (Daftar Gerakan) ===== */
.layout {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 76px);
}
.sidebar {
  background: var(--primary);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.side-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
  font-size: 15px;
}
body[data-mode="anak"] .side-link {
  color: rgba(30, 20, 0, 0.7);
}
.side-link.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
body[data-mode="anak"] .side-link.active {
  background: rgba(255, 255, 255, 0.35);
  color: var(--primary-dark);
}
.side-quote {
  margin-top: auto;
  border: 1px solid var(--accent-soft);
  border-radius: 12px;
  padding: 18px;
  color: var(--accent-soft);
}
body[data-mode="anak"] .side-quote {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}
.side-quote .arabic {
  font-family: var(--font-arabic);
  font-size: 19px;
  text-align: right;
  line-height: 1.8;
  margin-bottom: 10px;
}
.side-quote p {
  font-size: 12.5px;
  line-height: 1.6;
  margin: 0;
  opacity: 0.9;
}

.content {
  padding: 36px 40px;
}
.content h1 {
  font-family: var(--font-display);
  font-size: 30px;
  margin: 0 0 6px;
}
.content .subtitle {
  color: #7a7a72;
  margin: 0 0 22px;
  font-size: 14.5px;
}

.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 26px;
}
.tab-btn {
  padding: 10px 22px;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  font-size: 14px;
  background: var(--accent-soft);
  color: var(--ink);
}
.tab-btn.active {
  background: var(--primary);
  color: #fff;
}
body[data-mode="anak"] .tab-btn.active {
  color: #fff;
}

/* Grid of gerakan cards */
.gerakan-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}
.gerakan-card {
  background: #fff;
  border: 1px solid #ece6d8;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}
.gerakan-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}
.gerakan-num {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 700;
}
.gerakan-thumb {
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4f0e4;
  font-size: 54px;
  overflow: hidden;
}
.gerakan-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.gerakan-name {
  padding: 10px 12px 14px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

/* ===== Detail Gerakan ===== */
.detail-layout {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 70px 1fr;
  min-height: calc(100vh - 76px);
}
.stepper {
  background: var(--primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 0;
  gap: 14px;
}
.step-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12.5px;
  font-weight: 600;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
}
.step-dot.active {
  background: var(--accent-soft);
  color: var(--primary-dark);
  border-color: var(--accent-soft);
}
.step-dot.done {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.detail-content {
  padding: 36px 46px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 14px;
}
.detail-content h1 {
  font-family: var(--font-display);
  font-size: 30px;
  margin: 0 0 24px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 28px;
  align-items: start;
}
.detail-figure {
  background: #f4f0e4;
  border-radius: 12px;
  height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 100px;
  position: relative;
  overflow: hidden;
}
.detail-figure-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.play-overlay .circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.detail-card {
  background: #fff;
  border: 1px solid #ece6d8;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}
.detail-tabs {
  display: flex;
  border-bottom: 1px solid #ece6d8;
}
.dtab {
  flex: 1;
  text-align: center;
  padding: 14px;
  font-weight: 600;
  font-size: 14px;
  color: #8a8477;
  border-bottom: 2px solid transparent;
  background: #f7f3e8;
}
.dtab.active {
  color: var(--primary);
  border-color: var(--primary);
  background: #fff;
}
.dtab-body {
  padding: 22px 24px;
}
.field-label {
  font-size: 12.5px;
  font-weight: 700;
  color: #8a8477;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 6px;
}
.field-value.arabic {
  font-family: var(--font-arabic);
  font-size: 22px;
  text-align: right;
  line-height: 2;
}
.field-value {
  font-size: 14.5px;
  line-height: 1.6;
  margin-bottom: 18px;
}
.audio-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.audio-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.audio-track {
  flex: 1;
  height: 5px;
  background: #ece6d8;
  border-radius: 3px;
  position: relative;
}
.audio-progress {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 30%;
  background: var(--accent);
  border-radius: 3px;
}
.audio-time {
  font-size: 12px;
  color: #8a8477;
  white-space: nowrap;
}

.progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 18px;
  font-size: 13.5px;
  color: #8a8477;
}
.progress-dots {
  display: flex;
  gap: 6px;
}
.pdot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ddd6c4;
}
.pdot.done {
  background: var(--primary);
}
.pdot.current {
  background: var(--accent);
}

.actions-row {
  display: flex;
  gap: 14px;
}
.btn {
  flex: 1;
  padding: 14px;
  border-radius: 10px;
  border: none;
  font-weight: 700;
  font-size: 14.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-outline {
  background: #fff;
  border: 1.5px solid #ddd6c4;
  color: var(--ink);
  flex: 0.6;
}
.btn-secondary {
  background: var(--accent-soft);
  color: var(--primary-dark);
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .topbar-inner {
    padding: 14px 18px;
  }
  .main-nav {
    display: none;
  }
  .hero-inner {
    grid-template-columns: 1fr;
  }
  .hero h1 {
    font-size: 34px;
  }
  .hero-person {
    height: 240px;
  }
  .mosque-frame-img {
    width: 150px;
    margin-left: -28px;
  }
  .layout,
  .detail-layout {
    grid-template-columns: 1fr;
  }
  .sidebar,
  .stepper {
    flex-direction: row;
    overflow-x: auto;
  }
  .side-quote {
    display: none;
  }
  .gerakan-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .content,
  .detail-content {
    padding: 24px;
  }
}
