/* ==========================================================================
   IsmFinder - Authentic Islamic Baby Names Directory
   Design System: Elegant Pastel & Emerald with Arabic Calligraphy Styling
   ========================================================================== */

:root {
  /* Color Palette - Light Theme (Emerald & Warm Pastel) */
  --bg-primary: #fbf9f5;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-subtle: #f3efe6;
  --bg-emerald-soft: #ecfdf5;
  --bg-emerald-tint: #d1fae5;
  --bg-gold-soft: #fef3c7;
  --bg-gold-tint: #fde68a;

  /* Primary Brand - Emerald Green */
  --emerald-900: #064e3b;
  --emerald-800: #065f46;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --emerald-500: #10b981;
  --emerald-400: #34d399;
  --emerald-100: #d1fae5;
  --emerald-50: #ecfdf5;

  /* Secondary Brand - Desert Gold / Ochre */
  --gold-700: #b45309;
  --gold-600: #d97706;
  --gold-500: #f59e0b;
  --gold-400: #fbbf24;
  --gold-100: #fef3c7;
  --gold-50: #fffbeb;

  /* Gender Theming */
  --boy-bg: #eff6ff;
  --boy-text: #1d4ed8;
  --boy-border: #bfdbfe;
  --boy-accent: #3b82f6;

  --girl-bg: #fff1f2;
  --girl-text: #be123c;
  --girl-border: #fecdd3;
  --girl-accent: #f43f5e;

  --unisex-bg: #faf5ff;
  --unisex-text: #6b21a8;
  --unisex-border: #e9d5ff;
  --unisex-accent: #a855f7;

  /* Neutral Text & Borders */
  --text-primary: #1c2826;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --border-light: #e5e7eb;
  --border-subtle: #e2dcd2;
  --border-focus: #059669;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(6, 78, 59, 0.08), 0 4px 6px -2px rgba(6, 78, 59, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(6, 78, 59, 0.12), 0 10px 10px -5px rgba(6, 78, 59, 0.04);
  --shadow-glow: 0 0 20px rgba(16, 185, 129, 0.25);

  /* Typography */
  --font-arabic: 'Amiri', 'Scheherazade New', 'Traditional Arabic', serif;
  --font-heading: 'Outfit', 'Plus Jakarta Sans', -apple-system, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Spacing & Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Theme (Emerald Sanctuary) */
[data-theme="dark"] {
  --bg-primary: #0a1714;
  --bg-surface: #11221e;
  --bg-surface-elevated: #162c27;
  --bg-subtle: #19332d;
  --bg-emerald-soft: #064e3b33;
  --bg-emerald-tint: #064e3b66;
  --bg-gold-soft: #b4530926;
  --bg-gold-tint: #b453094d;

  --emerald-900: #ecfdf5;
  --emerald-800: #a7f3d0;
  --emerald-700: #6ee7b7;
  --emerald-600: #34d399;
  --emerald-500: #10b981;
  --emerald-400: #059669;

  --boy-bg: #1e293b;
  --boy-text: #93c5fd;
  --boy-border: #334155;

  --girl-bg: #3f1d24;
  --girl-text: #fda4af;
  --girl-border: #881337;

  --unisex-bg: #2e1065;
  --unisex-text: #d8b4fe;
  --unisex-border: #581c87;

  --text-primary: #f3f4f6;
  --text-secondary: #d1d5db;
  --text-muted: #9ca3af;
  --text-light: #6b7280;
  --border-light: #1e3a33;
  --border-subtle: #162c27;
  --border-focus: #34d399;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 25px rgba(52, 211, 153, 0.35);
}

/* Global Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Subtle Geometric Background Pattern */
.bg-pattern {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
  background-image: radial-gradient(var(--border-subtle) 0.8px, transparent 0.8px);
  background-size: 24px 24px;
}

[data-theme="dark"] .bg-pattern {
  opacity: 0.15;
  background-image: radial-gradient(#34d399 0.8px, transparent 0.8px);
}

/* Container */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.app-header {
  padding: 1.25rem 0;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: var(--transition);
}

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

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

.brand-icon-box {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--emerald-700), var(--emerald-900));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.4rem;
  box-shadow: 0 4px 10px rgba(6, 78, 59, 0.25);
  position: relative;
  overflow: hidden;
}

.brand-icon-box::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.45), transparent 70%);
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.brand-title .accent-text {
  color: var(--emerald-600);
}

.brand-arabic {
  font-family: var(--font-arabic);
  font-size: 1.15rem;
  color: var(--gold-600);
  font-weight: 600;
  line-height: 1;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Generic Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.15rem;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-icon-only {
  padding: 0.6rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--emerald-600), var(--emerald-700));
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(4, 120, 87, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--emerald-700), var(--emerald-800));
  box-shadow: 0 4px 12px rgba(4, 120, 87, 0.4);
  transform: translateY(-1px);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3);
}

.btn-gold:hover {
  background: linear-gradient(135deg, var(--gold-600), var(--gold-700));
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.4);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-subtle);
  color: var(--text-secondary);
}

.btn-outline:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
  border-color: var(--border-light);
}

.btn-saved {
  position: relative;
  background: var(--bg-subtle);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.btn-saved:hover {
  background: var(--emerald-50);
  border-color: var(--emerald-400);
  color: var(--emerald-700);
}

.badge-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--emerald-600);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
  padding: 3rem 0 2rem;
  text-align: center;
  position: relative;
}

.bismillah-banner {
  font-family: var(--font-arabic);
  font-size: 2.2rem;
  line-height: 1.4;
  color: var(--emerald-800);
  margin-bottom: 0.75rem;
  text-shadow: 0 1px 2px rgba(6, 78, 59, 0.1);
  letter-spacing: 0.02em;
}

[data-theme="dark"] .bismillah-banner {
  color: var(--emerald-400);
  text-shadow: 0 0 15px rgba(52, 211, 153, 0.3);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
}

.hero-title span {
  background: linear-gradient(135deg, var(--emerald-700), var(--emerald-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 1.75rem;
}

.hero-action-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 2.25rem;
}

/* Quick Stats Ticker */
.stats-ticker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 0.75rem 1.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.stat-item strong {
  font-weight: 700;
  color: var(--emerald-700);
}

[data-theme="dark"] .stat-item strong {
  color: var(--emerald-400);
}

.stat-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--border-light);
}

/* ==========================================================================
   Filter & Search Hub
   ========================================================================== */

.filters-hub {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 2.5rem;
  position: relative;
}

/* Search Bar */
.search-bar-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
}

.search-icon {
  position: absolute;
  left: 1.15rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 0.95rem 3rem 0.95rem 3rem;
  background: var(--bg-subtle);
  border: 1.5px solid transparent;
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  background: var(--bg-surface);
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}

.search-clear-btn {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 0.9rem;
  display: none;
}

.search-clear-btn:hover {
  color: var(--text-primary);
}

/* Sort Selector */
.sort-select-wrapper {
  position: relative;
  min-width: 180px;
}

.sort-select {
  width: 100%;
  height: 100%;
  padding: 0.95rem 2.25rem 0.95rem 1rem;
  background: var(--bg-subtle);
  border: 1.5px solid transparent;
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  appearance: none;
  cursor: pointer;
  outline: none;
  transition: var(--transition);
}

.sort-select:focus {
  border-color: var(--border-focus);
  background: var(--bg-surface);
}

.sort-select-wrapper::after {
  content: "▾";
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 0.9rem;
}

/* Gender Filter Tabs */
.gender-tabs-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  overflow-x: auto;
  padding-bottom: 4px;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  border: 1.5px solid var(--border-subtle);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.tab-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.tab-btn.active {
  background: var(--emerald-700);
  border-color: var(--emerald-700);
  color: #ffffff;
}

.tab-btn.active .tab-pill-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.tab-pill-count {
  font-size: 0.78rem;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  color: var(--text-muted);
}

/* Category Filter Pills */
.category-filter-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.95rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  background: var(--bg-subtle);
  border: 1px solid transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.category-pill:hover {
  border-color: var(--border-light);
  color: var(--text-primary);
}

.category-pill.active {
  background: var(--emerald-50);
  border-color: var(--emerald-500);
  color: var(--emerald-800);
  font-weight: 600;
}

[data-theme="dark"] .category-pill.active {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald-400);
  border-color: var(--emerald-500);
}

/* Alphabet Filter Row */
.alpha-filter-wrapper {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.4rem 0;
  scrollbar-width: thin;
}

.alpha-pill {
  min-width: 34px;
  height: 34px;
  padding: 0 6px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: transparent;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.alpha-pill:hover:not(:disabled) {
  background: var(--bg-subtle);
  border-color: var(--border-light);
  color: var(--emerald-700);
}

.alpha-pill.active {
  background: var(--emerald-600);
  border-color: var(--emerald-600);
  color: #ffffff;
}

.alpha-pill:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  border-color: transparent;
}

/* Active Filter Badges & Results Bar */
.results-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 1rem;
  margin-top: 1rem;
  border-top: 1px dashed var(--border-subtle);
  font-size: 0.9rem;
}

.results-count {
  color: var(--text-muted);
}

.results-count strong {
  color: var(--text-primary);
}

.active-badges-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: var(--emerald-50);
  border: 1px solid var(--emerald-200);
  color: var(--emerald-800);
  font-size: 0.8rem;
  font-weight: 600;
}

[data-theme="dark"] .filter-badge {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--emerald-700);
  color: var(--emerald-300);
}

.filter-badge-remove {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
}

.clear-all-link {
  color: var(--gold-600);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  font-size: 0.85rem;
}

.clear-all-link:hover {
  color: var(--gold-700);
}

/* ==========================================================================
   Name Cards Grid
   ========================================================================== */

.names-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.name-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.name-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--emerald-600), var(--gold-500));
  opacity: 0;
  transition: var(--transition);
}

.name-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-light);
}

.name-card:hover::before {
  opacity: 1;
}

/* Card Header */
.card-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.gender-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.gender-badge.boy {
  background: var(--boy-bg);
  color: var(--boy-text);
  border: 1px solid var(--boy-border);
}

.gender-badge.girl {
  background: var(--girl-bg);
  color: var(--girl-text);
  border: 1px solid var(--girl-border);
}

.gender-badge.unisex {
  background: var(--unisex-bg);
  color: var(--unisex-text);
  border: 1px solid var(--unisex-border);
}

.card-favorite-btn {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  color: var(--text-light);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.card-favorite-btn:hover {
  color: var(--girl-accent);
  background: var(--girl-bg);
  transform: scale(1.15);
}

.card-favorite-btn.favorited {
  color: var(--girl-accent);
}

/* Arabic Script Calligraphy Display */
.card-arabic-box {
  text-align: center;
  padding: 0.75rem 0.5rem 0.25rem;
  background: var(--bg-emerald-soft);
  border-radius: var(--radius-md);
  margin-bottom: 1.15rem;
  position: relative;
  overflow: hidden;
}

.card-arabic-text {
  font-family: var(--font-arabic);
  font-size: 2.3rem;
  line-height: 1.4;
  color: var(--emerald-800);
  font-weight: 700;
  letter-spacing: 0.02em;
}

[data-theme="dark"] .card-arabic-text {
  color: var(--emerald-400);
}

/* English Name & Pronunciation */
.card-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.card-english-name {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.card-pronunciation-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-style: italic;
}

.card-audio-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--emerald-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  padding: 2px;
  transition: transform 0.15s ease;
}

.card-audio-btn:hover {
  transform: scale(1.2);
  color: var(--emerald-700);
}

/* Root Origin Tag */
.card-root-line {
  font-size: 0.82rem;
  color: var(--gold-700);
  font-weight: 600;
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

[data-theme="dark"] .card-root-line {
  color: var(--gold-400);
}

/* Meaning */
.card-meaning {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0.95rem;
}

/* Quranic / Historical Snippet */
.card-reference-banner {
  background: var(--bg-subtle);
  border-left: 3px solid var(--emerald-600);
  padding: 0.55rem 0.75rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 1.15rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card Categories Tags */
.card-categories-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.card-tag {
  font-size: 0.74rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: capitalize;
}

/* Card Footer Actions */
.card-footer-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-subtle);
}

.btn-card-action {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font-size: 0.84rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
}

.btn-copy-card {
  background: var(--bg-subtle);
  color: var(--text-secondary);
}

.btn-copy-card:hover {
  background: var(--emerald-50);
  color: var(--emerald-700);
  border-color: var(--emerald-200);
}

.btn-details-card {
  background: var(--emerald-700);
  color: #ffffff;
}

.btn-details-card:hover {
  background: var(--emerald-800);
}

/* ==========================================================================
   Empty State
   ========================================================================== */

.empty-state {
  text-align: center;
  padding: 4rem 1.5rem;
  background: var(--bg-surface);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-xl);
  max-width: 540px;
  margin: 2rem auto;
}

.empty-icon {
  font-size: 3.5rem;
  color: var(--gold-500);
  margin-bottom: 1rem;
}

.empty-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.empty-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   Modals & Drawers
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(6, 30, 23, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  position: relative;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.open .modal-box {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 1.5rem 1.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  background: var(--bg-surface-elevated);
  z-index: 10;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close-btn {
  background: var(--bg-subtle);
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 1.1rem;
  transition: var(--transition);
}

.modal-close-btn:hover {
  background: var(--border-light);
  color: var(--text-primary);
}

.modal-body {
  padding: 1.75rem;
}

.modal-footer {
  padding: 1.25rem 1.75rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  background: var(--bg-subtle);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* Celebratory Random Generator Modal */
.celebration-box {
  text-align: center;
}

.celebration-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.95rem;
  border-radius: var(--radius-full);
  background: var(--gold-100);
  color: var(--gold-700);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

[data-theme="dark"] .celebration-badge {
  background: rgba(245, 158, 11, 0.2);
  color: var(--gold-400);
}

.celebration-arabic {
  font-family: var(--font-arabic);
  font-size: 3.5rem;
  line-height: 1.3;
  color: var(--emerald-800);
  font-weight: 700;
  margin-bottom: 0.75rem;
  text-shadow: 0 4px 12px rgba(6, 78, 59, 0.15);
  animation: glowPulse 2.5s infinite alternate;
}

[data-theme="dark"] .celebration-arabic {
  color: var(--emerald-400);
}

@keyframes glowPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.03); }
}

.celebration-english {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.celebration-meaning {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 1.5rem;
}

.celebration-reflection {
  background: var(--bg-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  font-size: 0.92rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.6;
  border: 1px solid var(--border-subtle);
  margin-bottom: 1.5rem;
  text-align: left;
}

/* Detail Modal Sections */
.detail-section {
  margin-bottom: 1.5rem;
}

.detail-section-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--emerald-700);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

[data-theme="dark"] .detail-section-title {
  color: var(--emerald-400);
}

.detail-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.quran-ayah-highlight {
  background: var(--bg-emerald-soft);
  border-left: 4px solid var(--emerald-600);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-family: var(--font-arabic);
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--emerald-900);
  margin-top: 0.5rem;
}

[data-theme="dark"] .quran-ayah-highlight {
  color: var(--emerald-200);
}

/* Saved Names Drawer */
.drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(6, 30, 23, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.drawer-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.drawer-content {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 460px;
  height: 100%;
  background: var(--bg-surface-elevated);
  box-shadow: var(--shadow-xl);
  z-index: 101;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-backdrop.open .drawer-content {
  transform: translateX(0);
}

.drawer-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
}

.drawer-stats-row {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.82rem;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.5rem;
}

.saved-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  transition: var(--transition);
}

.saved-list-item:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.saved-item-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.saved-item-arabic {
  font-family: var(--font-arabic);
  font-size: 1.45rem;
  color: var(--emerald-700);
}

[data-theme="dark"] .saved-item-arabic {
  color: var(--emerald-400);
}

.saved-item-names {
  display: flex;
  flex-direction: column;
}

.saved-item-english {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.98rem;
}

.saved-item-meaning {
  font-size: 0.78rem;
  color: var(--text-muted);
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.saved-item-remove-btn {
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 6px;
  font-size: 1.1rem;
  transition: color 0.15s ease;
}

.saved-item-remove-btn:hover {
  color: var(--girl-accent);
}

.drawer-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  background: var(--bg-subtle);
}

/* ==========================================================================
   Etiquette Guide (Adab al-Tasmiyah)
   ========================================================================== */

.etiquette-card {
  background: var(--bg-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border-subtle);
}

.etiquette-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--emerald-800);
  margin-bottom: 0.5rem;
}

[data-theme="dark"] .etiquette-header {
  color: var(--emerald-400);
}

.etiquette-text {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   Toast Notification System
   ========================================================================== */

.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--emerald-600);
  color: var(--text-primary);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.9rem;
  font-weight: 600;
  transform: translateY(10px);
  opacity: 0;
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.toast.toast-leave {
  animation: toastOut 0.25s forwards;
}

@keyframes toastOut {
  to {
    transform: translateY(10px);
    opacity: 0;
  }
}

/* Floating Back To Top Button */
.back-to-top-btn {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  z-index: 40;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.back-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top-btn:hover {
  background: var(--emerald-600);
  color: #ffffff;
  border-color: var(--emerald-600);
  transform: translateY(-3px);
}

/* ==========================================================================
/* ==========================================================================
   Navigation Menu & Dropdowns
   ========================================================================== */

.main-nav {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--emerald-700);
  background: var(--bg-emerald-soft);
}

[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link.active {
  color: var(--emerald-400);
  background: var(--bg-emerald-soft);
}

.nav-caret {
  font-size: 0.72rem;
  transition: transform 0.2s ease;
}

.nav-item-dropdown {
  position: relative;
}

.nav-item-dropdown:hover .nav-caret {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 250px;
  max-height: calc(100vh - 85px);
  overflow-y: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem 0;
  list-style: none;
  margin: 0;
  margin-top: 0.35rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: all 0.2s ease;
  z-index: 100;
}

.nav-item-dropdown:hover .dropdown-menu,
.nav-item-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 1.15rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
}

.dropdown-menu li a:hover {
  background: var(--bg-emerald-soft);
  color: var(--emerald-700);
}

[data-theme="dark"] .dropdown-menu li a:hover {
  color: var(--emerald-400);
}

.dropdown-menu li a i {
  color: var(--emerald-600);
  width: 16px;
  text-align: center;
}

.mobile-menu-btn {
  display: none;
}

.mobile-nav-drawer {
  display: none;
  position: fixed;
  top: 73px;
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1rem 1.5rem 1.5rem;
  box-shadow: var(--shadow-lg);
  z-index: 49;
  flex-direction: column;
  gap: 0.5rem;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}

.mobile-nav-drawer.open {
  display: flex;
}

.mobile-nav-drawer .nav-link {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  width: 100%;
  justify-content: flex-start;
}

/* ==========================================================================
   Multi-Column Footer
   ========================================================================== */

.app-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 3.5rem 0 2rem;
  position: relative;
  z-index: 10;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2.2fr 1.2fr 1.2fr 1.2fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
  text-align: left;
}

.footer-col-brand .footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.footer-brand-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1.25rem;
  max-width: 380px;
}

.footer-initiative-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  background: var(--bg-emerald-soft);
  color: var(--emerald-800);
  border: 1px solid var(--emerald-100);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 500;
}

[data-theme="dark"] .footer-initiative-badge {
  color: var(--emerald-400);
  border-color: rgba(52, 211, 153, 0.25);
}

.footer-col-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.15rem;
  position: relative;
  padding-bottom: 0.45rem;
}

.footer-col-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 24px;
  height: 2px;
  background: var(--emerald-600);
  border-radius: 2px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.65rem;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  transition: var(--transition);
}

.footer-links a i {
  font-size: 0.72rem;
  color: var(--emerald-600);
  transition: transform 0.2s ease;
}

.footer-links a:hover {
  color: var(--emerald-600);
  transform: translateX(3px);
}

.footer-links a:hover i {
  transform: translateX(2px);
}

.footer-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 2rem 0;
}

.footer-quote {
  font-family: var(--font-arabic);
  font-size: 1.35rem;
  color: var(--emerald-800);
  margin-bottom: 0.5rem;
  text-align: center;
}

[data-theme="dark"] .footer-quote {
  color: var(--emerald-400);
}

.footer-hadith {
  font-size: 0.92rem;
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto 1.5rem;
  font-style: italic;
  text-align: center;
}

.footer-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1rem;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.footer-legal-inline a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}

.footer-legal-inline a:hover {
  color: var(--emerald-600);
  text-decoration: underline;
}

/* ==========================================================================
   Content Pages / Educational Guides & Compliance Styles
   ========================================================================== */

.page-hero {
  padding: 3rem 0 2.25rem;
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-subtle) 100%);
  border-bottom: 1px solid var(--border-subtle);
  text-align: center;
  position: relative;
}

.breadcrumbs {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.breadcrumbs a {
  color: var(--emerald-700);
  text-decoration: none;
  transition: var(--transition);
}

[data-theme="dark"] .breadcrumbs a {
  color: var(--emerald-400);
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs .divider {
  color: var(--text-light);
  font-size: 0.75rem;
}

.page-title {
  font-family: var(--font-heading);
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.page-title span {
  color: var(--emerald-600);
}

.page-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 720px;
  margin: 0 auto 1.25rem;
  line-height: 1.6;
}

.page-meta-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.meta-pill i {
  color: var(--emerald-600);
}

.content-wrapper {
  max-width: 900px;
  margin: 2.5rem auto 4.5rem;
  padding: 0 1.25rem;
}

.article-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.75rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

/* Prose Typography */
.prose {
  font-size: 1.02rem;
  line-height: 1.78;
  color: var(--text-primary);
}

.prose h2 {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--emerald-800);
  margin: 2.25rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--bg-subtle);
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

[data-theme="dark"] .prose h2 {
  color: var(--emerald-400);
  border-bottom-color: var(--bg-subtle);
}

.prose h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 1.75rem 0 0.75rem;
}

.prose p {
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
}

.prose strong {
  color: var(--text-primary);
}

.prose ul, .prose ol {
  margin: 1rem 0 1.5rem 1.5rem;
  color: var(--text-secondary);
}

.prose li {
  margin-bottom: 0.5rem;
  line-height: 1.65;
}

/* Hadith and Quote Callouts */
.hadith-card {
  background: var(--bg-emerald-soft);
  border-left: 4px solid var(--emerald-600);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1.5rem 1.75rem;
  margin: 1.75rem 0;
  position: relative;
}

.hadith-arabic {
  font-family: var(--font-arabic);
  font-size: 1.4rem;
  line-height: 1.8;
  color: var(--emerald-900);
  margin-bottom: 0.75rem;
  text-align: right;
  direction: rtl;
}

[data-theme="dark"] .hadith-arabic {
  color: var(--emerald-300);
}

.hadith-translation {
  font-style: italic;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.hadith-ref {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--emerald-700);
}

[data-theme="dark"] .hadith-ref {
  color: var(--emerald-400);
}

.callout-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.35rem 1.6rem;
  margin: 1.5rem 0;
}

.callout-box.gold {
  background: var(--bg-gold-soft);
  border-color: var(--gold-400);
}

.callout-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.callout-box.gold .callout-title {
  color: var(--gold-700);
}

[data-theme="dark"] .callout-box.gold .callout-title {
  color: var(--gold-400);
}

/* Table of Contents */
.toc-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0 2.25rem;
}

.toc-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1.5rem;
}

.toc-list a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition);
}

.toc-list a:hover {
  color: var(--emerald-600);
}

/* Author Profile Card */
.author-box {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-top: 3rem;
}

.author-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--emerald-600), var(--emerald-800));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.8rem;
  flex-shrink: 0;
}

.author-info h4 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.author-info p {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* FAQ Styles */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  margin: 2rem 0;
}

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

.faq-item:hover {
  border-color: var(--emerald-300);
}

.faq-summary {
  padding: 1.25rem 1.5rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  user-select: none;
}

.faq-summary::-webkit-details-marker {
  display: none;
}

.faq-icon {
  font-size: 0.85rem;
  color: var(--emerald-600);
  transition: transform 0.2s ease;
}

details[open] .faq-icon {
  transform: rotate(180deg);
}

.faq-body {
  padding: 0 1.5rem 1.35rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-secondary);
  border-top: 1px solid var(--bg-subtle);
  padding-top: 1rem;
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.form-label {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-primary);
  transition: var(--transition);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--emerald-600);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  display: none;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.92rem;
}

.form-alert.success {
  background: var(--bg-emerald-soft);
  border: 1px solid var(--emerald-300);
  color: var(--emerald-800);
}

[data-theme="dark"] .form-alert.success {
  color: var(--emerald-300);
}

/* Name card showcase in guides */
.guide-names-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.guide-name-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: var(--transition);
}

.guide-name-card:hover {
  border-color: var(--emerald-400);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.gnc-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.gnc-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
}

.gnc-arabic {
  font-family: var(--font-arabic);
  font-size: 1.25rem;
  color: var(--emerald-700);
}

[data-theme="dark"] .gnc-arabic {
  color: var(--emerald-400);
}

.gnc-meaning {
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.gnc-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ==========================================================================
   Print Styling (for Exporting Shortlists)
   ========================================================================== */

@media print {
  .app-header,
  .hero-section,
  .filters-hub,
  .footer-hadith,
  .header-actions,
  .card-footer-actions,
  .card-favorite-btn,
  .back-to-top-btn,
  .toast-container,
  .main-nav,
  .mobile-menu-btn,
  .mobile-nav-drawer {
    display: none !important;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .names-grid {
    display: block !important;
  }

  .name-card {
    page-break-inside: avoid;
    border: 1px solid #ccc !important;
    margin-bottom: 1.5rem !important;
    box-shadow: none !important;
  }
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */

@media (max-width: 992px) {
  .main-nav {
    display: none;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

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

@media (max-width: 768px) {
  .search-bar-row {
    flex-direction: column;
  }

  .sort-select-wrapper {
    width: 100%;
  }

  .names-grid {
    grid-template-columns: 1fr;
  }

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

  .bismillah-banner {
    font-size: 1.75rem;
  }

  .modal-box {
    margin: 1rem;
    max-height: 85vh;
  }

  .drawer-content {
    max-width: 100%;
  }

  .article-card {
    padding: 1.75rem 1.25rem;
  }

  .page-title {
    font-size: 1.85rem;
  }

  .toc-list {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom-bar {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 576px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .author-box {
    flex-direction: column;
    text-align: center;
  }
}

