/**
 * Noor Azkar - Modern Islamic Design System
 * English, Arabic, and Urdu Typography
 * High Performance, Accessibility, and Serene Aesthetics
 */

/* ==========================================================================
   1. Google Fonts Import
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400&family=Cinzel:wght@600;700;800&family=Gulzar&family=Noto+Nastaliq+Urdu:wght@400;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Scheherazade+New:wght@400;600;700&display=swap');

/* ==========================================================================
   2. Design Tokens & Theme Variables
   ========================================================================== */
:root {
  /* Color Palette - Serene Emerald & Parchment */
  --primary-deep: #0f3020;
  --primary-emerald: #143d2b;
  --primary-sage: #2a5a41;
  --primary-light: #e8f0eb;
  --primary-surface: #f2f7f4;

  --gold-accent: #c59b38;
  --gold-hover: #dbb352;
  --gold-subtle: #fcf8ee;
  --gold-border: #e8d7a7;

  --bg-parchment: #faf8f5;
  --bg-card: #ffffff;
  --bg-card-subtle: #f6f3ed;

  --text-main: #1d2621;
  --text-muted: #536259;
  --text-light: #7b8b82;

  --border-subtle: #e6e1d8;
  --border-focus: #c59b38;

  --success-color: #2e7d32;
  --success-bg: #e8f5e9;

  /* Typography Scales */
  --font-en: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-ar: 'Amiri', 'Scheherazade New', 'Traditional Arabic', serif;
  --font-ur: 'Noto Nastaliq Urdu', 'Gulzar', serif;
  --font-display: 'Cinzel', serif;

  /* Dynamic Font Size Modifiers (Controlled by A- / A+) */
  --arabic-size: 24px;
  --arabic-line-height: 2.3;
  --translation-size: 16px;
  --translation-line-height: 1.8;

  /* Elevations */
  --shadow-sm: 0 2px 8px rgba(15, 48, 32, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 48, 32, 0.07);
  --shadow-lg: 0 16px 36px rgba(15, 48, 32, 0.12);
  --shadow-glow: 0 0 20px rgba(197, 155, 56, 0.35);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 9999px;

  --transition-fast: 0.18s ease;
  --transition-normal: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Midnight Spiritual Dark Mode */
[data-theme="dark"] {
  --primary-deep: #08150f;
  --primary-emerald: #0f241a;
  --primary-sage: #1e4532;
  --primary-light: #183325;
  --primary-surface: #12221a;

  --gold-accent: #d8b257;
  --gold-hover: #ecd07e;
  --gold-subtle: #242217;
  --gold-border: #4d442a;

  --bg-parchment: #0a1410;
  --bg-card: #12211b;
  --bg-card-subtle: #172a22;

  --text-main: #f0f4f2;
  --text-muted: #a6b8ae;
  --text-light: #768a80;

  --border-subtle: #20352a;
  --border-focus: #d8b257;

  --success-color: #4caf50;
  --success-bg: #143520;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.38);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(216, 178, 87, 0.3);
}

/* ==========================================================================
   3. Base & Reset
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-en);
  background-color: var(--bg-parchment);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Direction and Language Specific Typography */
html[dir="rtl"] {
  text-align: right;
}

html[lang="ar"] body {
  font-family: var(--font-ar);
}

html[lang="ur"] body {
  font-family: var(--font-ur);
  line-height: 2.1;
}

.font-arabic {
  font-family: var(--font-ar);
}

.font-urdu {
  font-family: var(--font-ur);
}

.font-english {
  font-family: var(--font-en);
}

.font-display {
  font-family: var(--font-display);
}

/* ==========================================================================
   4. Layout & Grid
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ==========================================================================
   5. Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(250, 248, 245, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

[data-theme="dark"] .site-header {
  background-color: rgba(10, 20, 16, 0.94);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
}

.brand-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary-emerald), var(--primary-deep));
  border: 1px solid var(--gold-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-accent);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.brand-icon-wrap svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.brand-text h1 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary-deep);
  line-height: 1.2;
}

[data-theme="dark"] .brand-text h1 {
  color: var(--gold-accent);
}

.brand-text span {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: block;
}

/* Header Action Controls */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Language Switcher Dropdown / Pills */
.lang-switcher {
  display: inline-flex;
  background-color: var(--primary-light);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
}

.lang-btn {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-muted);
  transition: all var(--transition-fast);
  border: none;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.lang-btn.active, .lang-btn:hover {
  background-color: var(--primary-emerald);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(20, 61, 43, 0.2);
}

[data-theme="dark"] .lang-btn.active {
  background-color: var(--gold-accent);
  color: #0b1510;
}

/* Accessibility Font Resizer & Theme Buttons */
.tool-btn {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tool-btn:hover {
  border-color: var(--gold-accent);
  color: var(--gold-accent);
  transform: translateY(-1px);
}

/* ==========================================================================
   6. Hero & Arabesque Banner
   ========================================================================== */
.hero-section {
  position: relative;
  background: linear-gradient(180deg, var(--primary-surface) 0%, var(--bg-parchment) 100%);
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
  text-align: center;
}

.hero-arabesque-bg {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  pointer-events: none;
  background-image: radial-gradient(var(--primary-emerald) 1px, transparent 1px);
  background-size: 20px 20px;
}

.bismillah-calligraphy {
  font-family: var(--font-ar);
  font-size: clamp(26px, 4vw, 38px);
  color: var(--gold-accent);
  margin-bottom: 1rem;
  letter-spacing: 1px;
}

.hero-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  color: var(--primary-deep);
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

[data-theme="dark"] .hero-title {
  color: #f7f9f8;
}

.hero-subtitle {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 1.8rem;
  line-height: 1.7;
}

/* Dynamic Time Notification Badge */
.time-badge-banner {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background-color: var(--gold-subtle);
  border: 1px solid var(--gold-border);
  color: #7d5b12;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 1.8rem;
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .time-badge-banner {
  color: var(--gold-accent);
}

/* Live Search Bar */
.search-container {
  max-width: 620px;
  margin: 0 auto;
  position: relative;
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  padding: 0.95rem 1.4rem;
  padding-inline-start: 3.2rem;
  font-size: 1.05rem;
  border-radius: var(--radius-pill);
  border: 2px solid var(--border-subtle);
  background-color: var(--bg-card);
  color: var(--text-main);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  font-family: inherit;
}

.search-input:focus {
  outline: none;
  border-color: var(--gold-accent);
  box-shadow: var(--shadow-glow);
}

.search-icon {
  position: absolute;
  inset-inline-start: 1.2rem;
  color: var(--text-light);
  width: 20px;
  height: 20px;
  pointer-events: none;
}

/* ==========================================================================
   7. Quick Category Navigation Pills
   ========================================================================== */
.categories-nav-wrap {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
  background-color: var(--bg-card);
  position: sticky;
  top: 65px;
  z-index: 90;
  transition: background-color var(--transition-normal);
}

.categories-pills {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding: 0.4rem 0.2rem;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.categories-pills::-webkit-scrollbar {
  height: 4px;
}

.categories-pills::-webkit-scrollbar-thumb {
  background-color: var(--border-subtle);
  border-radius: var(--radius-pill);
}

.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-pill);
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.category-pill:hover, .category-pill.active {
  background-color: var(--primary-emerald);
  border-color: var(--primary-emerald);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

[data-theme="dark"] .category-pill:hover, [data-theme="dark"] .category-pill.active {
  background-color: var(--gold-accent);
  border-color: var(--gold-accent);
  color: #0c1813;
}

.category-pill .pill-count {
  font-size: 0.75rem;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background-color: rgba(0, 0, 0, 0.08);
}

.category-pill.active .pill-count {
  background-color: rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   8. Main Content & Category Detail
   ========================================================================== */
.main-content {
  flex: 1;
  padding: 2.5rem 0 4rem;
}

.category-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.category-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  color: var(--primary-deep);
  margin-bottom: 0.6rem;
}

[data-theme="dark"] .category-title {
  color: var(--gold-accent);
}

.category-badge {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.25rem 0.85rem;
  border-radius: var(--radius-pill);
  background-color: var(--primary-light);
  color: var(--primary-sage);
  margin-bottom: 0.8rem;
}

.category-desc {
  max-width: 720px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* ==========================================================================
   9. Azkar Cards & Layout
   ========================================================================== */
.azkar-grid {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.zikr-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-normal), border-color var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.zikr-card:hover {
  border-color: var(--border-focus);
  box-shadow: var(--shadow-md);
}

.zikr-card.is-completed {
  border-color: var(--success-color);
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--success-bg) 100%);
}

/* Card Header */
.zikr-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.85rem;
}

.zikr-badge-number {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: var(--primary-light);
  color: var(--primary-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
}

[data-theme="dark"] .zikr-badge-number {
  background-color: var(--primary-sage);
  color: #ffffff;
}

.zikr-card-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.action-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.action-icon-btn:hover {
  color: var(--gold-accent);
  border-color: var(--gold-accent);
  background-color: var(--gold-subtle);
}

.action-icon-btn.saved {
  color: #e65100;
  border-color: #ff9800;
}

/* Arabic Text Display */
.zikr-arabic-text {
  font-family: var(--font-ar);
  font-size: var(--arabic-size);
  line-height: var(--arabic-line-height);
  color: var(--text-main);
  direction: rtl;
  text-align: right;
  margin-bottom: 1.5rem;
  font-weight: 400;
  user-select: text;
}

/* Transliteration */
.zikr-transliteration {
  background-color: var(--bg-card-subtle);
  border-inline-start: 3px solid var(--gold-accent);
  padding: 0.85rem 1.25rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 1.3rem;
  line-height: 1.6;
}

html[dir="rtl"] .zikr-transliteration {
  border-inline-start: 3px solid var(--gold-accent);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

/* Translations */
.zikr-translation-box {
  margin-bottom: 1.4rem;
  font-size: var(--translation-size);
  line-height: var(--translation-line-height);
  color: var(--text-main);
}

.zikr-translation-ur {
  font-family: var(--font-ur);
  direction: rtl;
  text-align: right;
  font-size: calc(var(--translation-size) + 2px);
  line-height: 2.2;
}

.zikr-translation-ar {
  font-family: var(--font-ar);
  direction: rtl;
  text-align: right;
  font-size: calc(var(--translation-size) + 1px);
  line-height: 2.0;
  color: var(--text-main);
  background: rgba(20, 61, 43, 0.04);
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  border-inline-start: 3px solid var(--gold-accent);
}

.zikr-trans-title {
  display: block;
  font-weight: 700;
  font-size: 0.88em;
  margin-bottom: 0.35rem;
  color: var(--primary-emerald);
}

html[data-theme="dark"] .zikr-translation-ar {
  background: rgba(197, 155, 56, 0.08);
  border-inline-start-color: var(--gold-accent);
}

html[data-theme="dark"] .zikr-trans-title {
  color: var(--gold-accent);
}

/* Card Reference & Virtue Meta */
.zikr-meta-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border-subtle);
  margin-bottom: 1.75rem;
}

.zikr-reference {
  font-size: 0.88rem;
  color: var(--gold-accent);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.zikr-virtue {
  background-color: var(--gold-subtle);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: #7d5b12;
  line-height: 1.6;
}

[data-theme="dark"] .zikr-virtue {
  color: var(--gold-hover);
}

/* ==========================================================================
   10. Interactive Counter
   ========================================================================== */
.zikr-counter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background-color: var(--primary-surface);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
}

.counter-progress-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.counter-ring-box {
  position: relative;
  width: 48px;
  height: 48px;
}

.counter-ring-box svg {
  transform: rotate(-90deg);
  width: 48px;
  height: 48px;
}

.counter-ring-bg {
  stroke: var(--border-subtle);
  fill: none;
  stroke-width: 4;
}

.counter-ring-fill {
  stroke: var(--primary-emerald);
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.25s ease;
}

.counter-ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-deep);
}

[data-theme="dark"] .counter-ring-text {
  color: var(--gold-accent);
}

.counter-stat-text {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
}

.counter-stat-text strong {
  color: var(--primary-deep);
  font-size: 1.15rem;
}

[data-theme="dark"] .counter-stat-text strong {
  color: #ffffff;
}

.counter-btn-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Main Tap-to-count Button */
.tap-counter-btn {
  background: linear-gradient(135deg, var(--primary-emerald), var(--primary-deep));
  color: #ffffff;
  border: 1px solid var(--gold-accent);
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-pill);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: 0 4px 12px rgba(15, 48, 32, 0.2);
  transition: transform 0.1s ease, box-shadow var(--transition-fast);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.tap-counter-btn:active {
  transform: scale(0.95);
}

.tap-counter-btn.completed {
  background: linear-gradient(135deg, var(--success-color), #1b5e20);
  border-color: #81c784;
}

.counter-reset-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.counter-reset-btn:hover {
  color: #d32f2f;
  border-color: #d32f2f;
}

/* ==========================================================================
   11. Dedicated Digital Tasbih Tool Modal / Section
   ========================================================================== */
.tasbih-hero-card {
  background: linear-gradient(145deg, var(--primary-deep), var(--primary-emerald));
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  border: 2px solid var(--gold-accent);
  box-shadow: var(--shadow-lg);
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
}

.tasbih-presets {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.preset-chip {
  background-color: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  padding: 0.5rem 1.15rem;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.preset-chip:hover, .preset-chip.active {
  background-color: var(--gold-accent);
  border-color: var(--gold-accent);
  color: #0c1813;
}

.tasbih-big-dial {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  margin: 0 auto 2rem;
  background: radial-gradient(circle, var(--primary-sage), var(--primary-deep));
  border: 4px solid var(--gold-accent);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 0 25px rgba(197, 155, 56, 0.3);
  transition: transform 0.08s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.tasbih-big-dial:active {
  transform: scale(0.94);
}

.dial-number {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--gold-accent);
  line-height: 1;
}

.dial-target {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 4px;
}

.tasbih-metrics {
  display: flex;
  justify-content: center;
  gap: 2rem;
  font-size: 1rem;
}

/* ==========================================================================
   12. AEO - Frequently Asked Questions Accordion
   ========================================================================== */
.faq-section {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 2.5rem;
  margin-top: 3.5rem;
  box-shadow: var(--shadow-sm);
}

.faq-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-deep);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

[data-theme="dark"] .faq-section h2 {
  color: var(--gold-accent);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--bg-card-subtle);
}

.faq-question {
  width: 100%;
  padding: 1.1rem 1.4rem;
  background: transparent;
  border: none;
  text-align: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.faq-question:hover {
  color: var(--gold-accent);
}

.faq-answer {
  padding: 0 1.4rem 1.2rem;
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 0.98rem;
}

/* ==========================================================================
   13. Footer
   ========================================================================== */
.site-footer {
  background-color: var(--primary-deep);
  color: #d1ded6;
  border-top: 3px solid var(--gold-accent);
  padding: 3.5rem 0 2rem;
  margin-top: auto;
}

.footer-top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-brand h3 {
  font-size: 1.4rem;
  color: var(--gold-accent);
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.footer-brand p {
  font-size: 0.92rem;
  line-height: 1.7;
  color: #a4bab0;
}

.footer-links h4 {
  font-size: 1.1rem;
  color: #ffffff;
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: #b0c4ba;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--gold-accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
  color: #8fa79c;
}

.footer-bottom a {
  color: var(--gold-accent);
  text-decoration: none;
}

/* ==========================================================================
   14. Toast Notifications
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  inset-inline-end: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background-color: var(--primary-deep);
  color: #ffffff;
  border: 1px solid var(--gold-accent);
  border-radius: var(--radius-pill);
  padding: 0.75rem 1.5rem;
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: auto;
}

@keyframes toastIn {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.action-icon-btn.btn-whatsapp {
  color: #25d366;
  border-color: rgba(37, 211, 102, 0.35);
}

.action-icon-btn.btn-whatsapp:hover {
  background-color: rgba(37, 211, 102, 0.15);
  border-color: #25d366;
  color: #25d366;
  transform: translateY(-2px);
}

/* ==========================================================================
   14. Category Progress Toolbar & Recitation Focus Mode
   ========================================================================== */
.category-toolbar-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 0.65rem 1.4rem;
  margin: 1.5rem auto 1rem;
  max-width: 820px;
  box-shadow: var(--shadow-sm);
}

.progress-info-pill {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.progress-info-pill strong {
  color: var(--primary-deep);
  font-size: 1.05rem;
}

[data-theme="dark"] .progress-info-pill strong {
  color: var(--gold-accent);
}

.category-progress-track {
  flex: 1;
  min-width: 140px;
  height: 8px;
  background-color: var(--border-subtle);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.category-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-accent), var(--primary-emerald));
  border-radius: var(--radius-pill);
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.mode-toggle-btn {
  background-color: var(--primary-light);
  border: 1px solid var(--border-subtle);
  color: var(--primary-deep);
  padding: 0.45rem 1.15rem;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all var(--transition-fast);
}

.mode-toggle-btn:hover, .mode-toggle-btn.active {
  background-color: var(--primary-emerald);
  color: #ffffff;
  border-color: var(--primary-emerald);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .mode-toggle-btn {
  color: var(--text-main);
  background-color: var(--primary-surface);
}

[data-theme="dark"] .mode-toggle-btn.active {
  background-color: var(--gold-accent);
  color: #0b1510;
}

/* Recitation Mode Stepper Header */
.recitation-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 820px;
  margin: 1.25rem auto 1.5rem;
  background: linear-gradient(135deg, var(--primary-surface), var(--bg-card));
  border: 1.5px solid var(--gold-accent);
  border-radius: var(--radius-pill);
  padding: 0.5rem 0.85rem;
  box-shadow: var(--shadow-md);
}

.stepper-nav-btn {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.stepper-nav-btn:hover {
  border-color: var(--gold-accent);
  color: var(--gold-accent);
  transform: translateY(-1px);
}

.stepper-nav-btn.next-primary {
  background-color: var(--primary-emerald);
  color: #ffffff;
  border-color: var(--primary-emerald);
}

.stepper-nav-btn.next-primary:hover {
  background-color: var(--gold-accent);
  color: #0a1710;
}

.stepper-indicator {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold-accent);
}

/* Focus Mode Active State */
.focus-mode-active .zikr-card {
  display: none !important;
}

.focus-mode-active .zikr-card.focus-active-card {
  display: block !important;
  animation: focusCardFade 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--gold-accent);
}

@keyframes focusCardFade {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ==========================================================================
   15. Mobile Sticky Bottom Navigation Bar
   ========================================================================== */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background-color: rgba(250, 248, 245, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-subtle);
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.08);
  height: 64px;
  align-items: center;
  justify-content: space-around;
  padding: 0 0.5rem;
}

[data-theme="dark"] .mobile-bottom-nav {
  background-color: rgba(10, 20, 16, 0.96);
  border-top-color: rgba(255, 255, 255, 0.08);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  min-width: 54px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav-item .nav-icon {
  font-size: 1.35rem;
  line-height: 1;
  margin-bottom: 2px;
}

.mobile-nav-item .nav-label {
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}

.mobile-nav-item.active, .mobile-nav-item:hover {
  color: var(--gold-accent);
  transform: translateY(-2px);
}

[data-theme="dark"] .mobile-nav-item.active {
  color: var(--gold-accent);
}

/* ==========================================================================
   16. Mobile Viewers & Responsiveness
   ========================================================================== */
@media (max-width: 768px) {
  body {
    padding-bottom: 70px; /* Space for sticky bottom nav */
  }

  .mobile-bottom-nav {
    display: flex;
/* ==========================================================================
   16. Bidirectional (RTL / LTR) Directional Alignment Rules
   ========================================================================== */
html[dir="rtl"] .zikr-card-header {
  flex-direction: row;
}

html[dir="rtl"] .zikr-arabic-text {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .zikr-translation-ur {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .zikr-translation-ar {
  direction: rtl;
  text-align: right;
}

/* Ensure English translations inside RTL documents don't invert Latin punctuation */
.zikr-translation-en {
  direction: ltr;
  text-align: left;
}

html[dir="rtl"] .zikr-translation-en {
  direction: ltr;
  text-align: left;
}

/* Transliteration always LTR for correct Latin reading */
.zikr-transliteration {
  direction: ltr;
  text-align: left;
}

html[dir="rtl"] .zikr-transliteration {
  direction: ltr;
  text-align: left;
  border-inline-start: 3px solid var(--gold-accent);
}

html[dir="rtl"] .counter-stat-text {
  text-align: right;
}

html[dir="rtl"] .footer-links {
  text-align: right;
}

html[dir="rtl"] .footer-brand {
  text-align: right;
}

/* ==========================================================================
   17. Comprehensive Display Alignment & Breakpoints (Mobile, Tablet, Desktop)
   ========================================================================== */

/* Tablets & Medium Displays (<= 1024px) */
@media (max-width: 1024px) {
  .container {
    padding: 0 1rem;
  }

  .hero-title {
    font-size: 2.4rem;
  }

  .category-toolbar-wrap {
    max-width: 100%;
  }

  .recitation-stepper {
    max-width: 100%;
  }
}

/* Standard Mobile Smartphones (<= 768px) */
@media (max-width: 768px) {
  body {
    /* Prevent sticky bottom nav from covering content + iPhone home bar */
    padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px));
  }

  .mobile-bottom-nav {
    display: flex;
    height: calc(64px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.75rem 0;
  }
  
  .brand-logo {
    justify-content: flex-start;
  }

  html[dir="rtl"] .brand-logo {
    justify-content: flex-start;
  }

  .brand-text h1 {
    font-size: 1.2rem;
  }

  .brand-text span {
    font-size: 0.74rem;
  }

  .header-actions {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
  }

  .lang-switcher {
    flex: 1;
    justify-content: space-around;
  }

  .lang-btn {
    flex: 1;
    text-align: center;
    justify-content: center;
    padding: 6px 8px;
    font-size: 0.82rem;
  }
  
  .hero-section {
    padding: 2.2rem 0 1.5rem;
  }

  .bismillah-calligraphy {
    font-size: clamp(22px, 5vw, 28px);
    margin-bottom: 0.6rem;
  }
  
  .hero-title {
    font-size: clamp(1.6rem, 5vw, 2.1rem);
  }

  .hero-subtitle {
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    padding: 0 0.5rem;
  }

  .time-badge-banner {
    padding: 0.5rem 1.15rem;
    font-size: 0.88rem;
    margin-bottom: 1.25rem;
    max-width: 100%;
    text-align: center;
    line-height: 1.4;
  }

  .search-container {
    padding: 0 0.25rem;
  }

  .search-input {
    font-size: 0.95rem;
    padding: 0.85rem 1.25rem;
    padding-inline-start: 2.85rem;
  }

  .categories-nav-wrap {
    top: 0;
    padding: 0.85rem 0;
  }

  .categories-pills {
    padding: 0.2rem 0.25rem;
    gap: 0.45rem;
  }

  .category-pill {
    padding: 0.45rem 0.95rem;
    font-size: 0.85rem;
  }

  .category-header {
    margin-bottom: 1.5rem;
  }

  .category-title {
    font-size: clamp(1.5rem, 5vw, 2.1rem);
  }

  .category-desc {
    font-size: 0.95rem;
    padding: 0 0.5rem;
  }
  
  .zikr-card {
    padding: 1.35rem 1.1rem;
    border-radius: var(--radius-md);
  }

  .zikr-card-header {
    margin-bottom: 1.2rem;
    padding-bottom: 0.65rem;
    gap: 0.5rem;
  }

  .zikr-badge-number {
    width: 34px;
    height: 34px;
    font-size: 0.9rem;
    flex-shrink: 0;
  }

  .zikr-card-actions {
    gap: 0.35rem;
  }

  .action-icon-btn {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }
  
  .zikr-arabic-text {
    font-size: clamp(21px, 5.2vw, 26px);
    line-height: 2.25;
    margin-bottom: 1.15rem;
  }

  .zikr-translation-ur {
    font-size: clamp(16px, 4.2vw, 19px);
    line-height: 2.3;
  }

  .zikr-translation-en {
    font-size: 0.95rem;
    line-height: 1.7;
  }

  .zikr-transliteration {
    font-size: 0.88rem;
    padding: 0.75rem 1rem;
  }
  
  .zikr-counter-row {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 0.85rem;
    padding: 0.85rem;
  }
  
  .counter-progress-info {
    justify-content: center;
    gap: 0.75rem;
  }
  
  .counter-btn-group {
    width: 100%;
    display: flex;
    gap: 0.5rem;
  }

  .tap-counter-btn {
    flex: 1;
    min-height: 52px;
    font-size: 1.05rem;
    justify-content: center;
    padding: 0.75rem 1rem;
  }

  .counter-reset-btn {
    width: 48px;
    height: 52px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
  }
  
  .tasbih-hero-card {
    padding: 2rem 1rem;
  }

  .tasbih-big-dial {
    width: 170px;
    height: 170px;
  }

  .dial-number {
    font-size: 3.2rem;
  }

  .category-toolbar-wrap {
    flex-direction: column;
    align-items: stretch;
    border-radius: var(--radius-md);
    padding: 0.85rem;
    gap: 0.75rem;
  }

  .category-progress-track {
    width: 100%;
    min-width: 0;
  }

  .view-mode-buttons {
    display: flex;
    justify-content: center;
  }

  .mode-toggle-btn {
    width: 100%;
    justify-content: center;
    padding: 0.55rem 1rem;
  }

  .recitation-stepper {
    border-radius: var(--radius-md);
    padding: 0.55rem 0.65rem;
    gap: 0.5rem;
  }

  .stepper-nav-btn {
    padding: 0.5rem 0.85rem;
    font-size: 0.85rem;
    min-height: 42px;
  }

  .stepper-indicator {
    font-size: 0.88rem;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
}

/* Compact Smartphones (<= 480px, e.g. iPhone 12/13/14/15/16, Galaxy S, Pixel) */
@media (max-width: 480px) {
  .container {
    padding: 0 0.85rem;
  }

  .header-actions {
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .font-controls {
    display: inline-flex;
    gap: 2px;
  }

  .tool-btn {
    width: 34px;
    height: 34px;
    font-size: 0.82rem;
  }

  .action-icon-btn {
    width: 34px;
    height: 34px;
    font-size: 0.8rem;
  }

  .zikr-card {
    padding: 1.15rem 0.85rem;
  }

  .stepper-nav-btn {
    padding: 0.45rem 0.65rem;
    font-size: 0.78rem;
  }
}

/* Ultra Compact Screens (<= 360px, e.g. iPhone SE, Galaxy Fold outer screen) */
@media (max-width: 360px) {
  .lang-btn {
    font-size: 0.75rem;
    padding: 4px 6px;
  }

  .hero-title {
    font-size: 1.45rem;
  }

  .zikr-badge-number {
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
  }

  .action-icon-btn {
    width: 30px;
    height: 30px;
    font-size: 0.75rem;
  }

  .tap-counter-btn {
    font-size: 0.95rem;
    padding: 0.65rem 0.75rem;
  }
}
