/* ═══════════════════════════════════════════════════
   BUKU TAJWID — Ngaji Yuk
   ═══════════════════════════════════════════════════ */

/* ── Page Header ─────────────────────────────────── */
.tajwid-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--card-bg, #fff);
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  position: sticky;
  top: 0;
  z-index: 10;
}
.tajwid-header h2 {
  font-size: 1em;
  font-weight: 800;
  color: var(--text-primary, #1e293b);
  margin: 0;
  flex: 1;
  text-align: center;
}
.tajwid-header .back-button {
  width: 36px; height: 36px;
  background: var(--bg-secondary, #f8fafc);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary, #64748b);
  cursor: pointer; transition: all 0.15s;
  flex-shrink: 0;
}
.tajwid-header .back-button:hover {
  background: #dbeafe; color: #2563eb; border-color: #93c5fd;
}

/* ── Intro Banner ─────────────────────────────────── */
.tajwid-intro {
  margin: 14px 14px 0;
  padding: 14px 16px;
  background: linear-gradient(135deg, #1e3a5f, #0f3460);
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fff;
}
.tajwid-intro-icon {
  width: 48px; height: 48px;
  background: rgba(255,215,0,0.15);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3em;
  color: #ffd700;
  flex-shrink: 0;
}
.tajwid-intro-text h4 {
  font-size: 0.9em; font-weight: 800;
  margin: 0 0 4px; color: #fff;
}
.tajwid-intro-text p {
  font-size: 0.75em; color: rgba(255,255,255,0.7);
  margin: 0; line-height: 1.5;
}

/* ── Stats Bar ───────────────────────────────────── */
.tajwid-stats {
  display: flex;
  gap: 8px;
  padding: 12px 14px 0;
}
.tajwid-stat-chip {
  flex: 1;
  padding: 8px 10px;
  background: var(--bg-secondary, #f8fafc);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 10px;
  text-align: center;
}
.tajwid-stat-chip strong {
  display: block;
  font-size: 1.1em; font-weight: 800;
  color: var(--text-primary, #1e293b);
}
.tajwid-stat-chip span {
  font-size: 0.68em; color: var(--text-secondary, #94a3b8);
}

/* ── Search ──────────────────────────────────────── */
.tajwid-search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 14px 8px;
  padding: 11px 14px;
  background: var(--bg-secondary, #f8fafc);
  border: 1.5px solid var(--border-color, #e2e8f0);
  border-radius: 14px;
  transition: border-color 0.2s;
}
.tajwid-search-wrap:focus-within {
  border-color: #2563eb;
  background: #f0f7ff;
}
.tajwid-search-wrap > i.fa-search { color: #94a3b8; font-size: 0.9em; }
.tajwid-search-wrap input {
  flex: 1; border: none; background: transparent;
  font-size: 0.9em; color: var(--text-primary, #1e293b); outline: none;
}
.tajwid-search-wrap input::placeholder { color: #cbd5e1; }
.tajwid-search-clear {
  display: none;
  align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer;
  color: #94a3b8; padding: 0; font-size: 1em;
}
.tajwid-search-clear:hover { color: #64748b; }

/* ── Filter Chips ────────────────────────────────── */
.tajwid-filters {
  display: flex;
  gap: 7px;
  padding: 0 14px 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tajwid-filters::-webkit-scrollbar { display: none; }

.tajwid-filter-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--border-color, #e2e8f0);
  background: var(--bg-secondary, #f8fafc);
  color: var(--text-secondary, #64748b);
  font-size: 0.78em;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s;
  flex-shrink: 0;
}
.tajwid-filter-btn:hover {
  border-color: #2563eb; color: #2563eb;
}
.tajwid-filter-btn.active {
  background: #1e3a5f;
  border-color: transparent;
  color: #ffd700;
  box-shadow: 0 3px 10px rgba(30,58,95,0.3);
}
.tajwid-filter-btn i { font-size: 0.85em; }

/* ── List Container ──────────────────────────────── */
#tajwidPage .page-content {
  padding: 0;
}
.tajwid-list {
  padding: 0 14px 100px;
}

/* ── Section Header ──────────────────────────────── */
.tajwid-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 0 10px;
}
.tajwid-section-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85em;
  flex-shrink: 0;
}
.tajwid-section-header > span:nth-child(2) {
  font-size: 0.78em;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-secondary, #64748b);
  flex: 1;
}
.tajwid-section-count {
  font-size: 0.72em;
  font-weight: 700;
  padding: 2px 8px;
  background: var(--bg-secondary, #f1f5f9);
  border-radius: 10px;
  color: var(--text-secondary, #64748b);
}

/* ── Card ────────────────────────────────────────── */
.tajwid-card {
  border: 1.5px solid var(--border-color, #e2e8f0);
  border-radius: 16px;
  margin-bottom: 9px;
  background: var(--card-bg, #fff);
  overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.tajwid-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.07);
}
.tajwid-card.open {
  border-color: #2563eb;
  box-shadow: 0 4px 20px rgba(37,99,235,0.12);
}

/* Card Header (clickable) */
.tajwid-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  cursor: pointer;
  transition: background 0.15s;
}
.tajwid-card-header:active { background: var(--bg-secondary, #f8fafc); }

.tajwid-card-icon {
  width: 40px; height: 40px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1em;
  flex-shrink: 0;
}
.tajwid-card-title {
  flex: 1; min-width: 0;
}
.tajwid-card-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.9em;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
  margin-bottom: 3px;
}
.tajwid-badge {
  font-size: 0.68em;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}
.tajwid-card-arab {
  font-size: 0.8em;
  color: var(--text-secondary, #94a3b8);
  font-family: 'Traditional Arabic', serif;
  direction: rtl;
}
.tajwid-card-chevron {
  color: #cbd5e1;
  font-size: 0.85em;
  transition: transform 0.25s;
  flex-shrink: 0;
}
.tajwid-card-chevron.rotate { transform: rotate(180deg); color: #2563eb; }

/* ── Detail Expanded ─────────────────────────────── */
.tajwid-card-detail {
  padding: 0 14px 16px;
  border-top: 1px solid var(--border-color, #f1f5f9);
  animation: tajwidSlideDown 0.22s ease;
}
@keyframes tajwidSlideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tajwid-detail-section {
  margin-top: 14px;
}
.tajwid-detail-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72em;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #2563eb;
  margin-bottom: 6px;
}
.tajwid-detail-label i { font-size: 0.9em; }
.tajwid-detail-text {
  font-size: 0.85em;
  color: var(--text-primary, #374151);
  line-height: 1.7;
  margin: 0;
}

/* Huruf badges */
.tajwid-huruf-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tajwid-huruf-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px; height: 34px;
  padding: 0 8px;
  background: #1e3a5f;
  color: #ffd700;
  border-radius: 8px;
  font-family: 'Traditional Arabic', 'Arabic Typesetting', serif;
  font-size: 1.1em;
  font-weight: 700;
}

/* Contoh */
.tajwid-contoh-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tajwid-contoh-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg-secondary, #f8fafc);
  border-radius: 10px;
  border: 1px solid var(--border-color, #e2e8f0);
}
.tajwid-contoh-arab {
  font-family: 'Traditional Arabic', serif;
  font-size: 1.15em;
  color: var(--text-primary, #1e293b);
  direction: rtl;
}
.tajwid-contoh-latin {
  font-size: 0.78em;
  color: var(--text-secondary, #64748b);
  font-style: italic;
}

/* Tips box */
.tajwid-tips-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #fefce8, #fef9c3);
  border: 1px solid #fde68a;
  border-radius: 12px;
  font-size: 0.82em;
  color: #92400e;
  line-height: 1.6;
}
.tajwid-tips-box i {
  color: #d97706;
  font-size: 1em;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── Search Result Info ───────────────────────────── */
.tajwid-search-result-info {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 4px 12px;
  font-size: 0.78em;
  color: var(--text-secondary, #64748b);
  font-weight: 600;
}

/* ── Empty State ─────────────────────────────────── */
.tajwid-empty {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-secondary, #94a3b8);
}
.tajwid-empty i {
  font-size: 2.5em;
  margin-bottom: 14px;
  display: block;
  color: #cbd5e1;
}
.tajwid-empty p {
  font-size: 0.9em;
  margin: 0 0 16px;
}
.tajwid-empty button {
  padding: 8px 20px;
  background: #1e3a5f;
  color: #ffd700;
  border: none;
  border-radius: 10px;
  font-size: 0.85em;
  font-weight: 700;
  cursor: pointer;
}

/* ── Dark Mode ───────────────────────────────────── */
body.dark-mode .tajwid-card { background: #1e293b; border-color: #334155; }
body.dark-mode .tajwid-card.open { border-color: #3b82f6; }
body.dark-mode .tajwid-card-name { color: #f1f5f9; }
body.dark-mode .tajwid-detail-text { color: #cbd5e1; }
body.dark-mode .tajwid-intro { background: linear-gradient(135deg, #0f1f3d, #091528); }
body.dark-mode .tajwid-contoh-item { background: #0f172a; border-color: #334155; }
body.dark-mode .tajwid-contoh-arab { color: #f1f5f9; }
body.dark-mode .tajwid-search-wrap { background: #0f172a; border-color: #334155; }
body.dark-mode .tajwid-search-wrap:focus-within { border-color: #3b82f6; background: #0c1a3a; }
body.dark-mode .tajwid-search-wrap input { color: #f1f5f9; }
body.dark-mode .tajwid-filter-btn { background: #334155; border-color: #475569; color: #94a3b8; }
body.dark-mode .tajwid-filter-btn.active { background: #1e3a5f; color: #ffd700; }
body.dark-mode .tajwid-stat-chip { background: #0f172a; border-color: #334155; }
body.dark-mode .tajwid-stat-chip strong { color: #f1f5f9; }
body.dark-mode .tajwid-section-count { background: #334155; color: #94a3b8; }
body.dark-mode .tajwid-card-detail { border-top-color: #334155; }
body.dark-mode .tajwid-tips-box { background: #1c1500; border-color: #3d2e00; color: #d97706; }
body.dark-mode .tajwid-header { background: #1e293b; border-bottom-color: #334155; }
body.dark-mode .tajwid-header h2 { color: #f1f5f9; }
body.dark-mode .tajwid-header .back-button { background: #334155; border-color: #475569; color: #94a3b8; }
