/* ============================================================
   Masnoon Duain — Hand-rolled Tailwind-like utility CSS
   No CDN, no build step. Only the classes used in index.html.
   ============================================================ */

/* ---------- @font-face: custom Nastaleeq fonts ---------- */
@font-face {
  font-family: 'IndoPakNastaleeq';
  src: url('assets/fonts/IndoPakNastaleeq/IndoPakNastaleeq.ttf') format('truetype');
  font-display: swap;
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: 'NafeesNastaleeq';
  src: url('assets/fonts/NafeesNastaleeq/NafeesNastaleeq-v1.02.ttf') format('truetype');
  font-display: swap;
  font-weight: 400;
  font-style: normal;
}

/* ---------- Design tokens (CSS variables) ---------- */
:root {
  /* Blue palette */
  --blue-50:  #E3F2FD;
  --blue-100: #BBDEFB;
  --blue-200: #90CAF9;
  --blue-300: #64B5F6;
  --blue-400: #42A5F5;
  --blue-500: #2196F3;
  --blue-600: #1976D2;
  --blue-700: #1565C0;

  /* Surfaces / neutrals */
  --bg-page:   #F8FAF9;
  --surface:   #FFFFFF;
  --border-soft: rgba(0,0,0,0.06);
  --text-primary:   #212121;
  --text-secondary: #616161;
  --text-muted:     #9E9E9E;

  /* Green accents (kept faithful to app) */
  --green-50:  #E8F5E9;
  --green-100: #C8E6C9;
  --green-700: #2E7D32;
  --green-800: #2E7D32;
  --shadow-green: rgba(46,125,50,0.15);

  /* Functional */
  --fav-active:   #E53935;
  --fav-bg-active: rgba(229,57,53,0.10);
  --fav-bg-idle:   rgba(0,0,0,0.05);

  /* Fonts (used for Arabic + Urdu Nastaleeq text on detail pages) */
  --font-arabic: 'IndoPakNastaleeq', 'Scheherazade New', 'Amiri', 'Traditional Arabic', 'Times New Roman', serif;
  --font-urdu:   'NafeesNastaleeq', 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', 'Tahoma', sans-serif;

  /* Language card accents (per design 6.7) */
  --arabic-border:    #BBDEFB;
  --arabic-shadow:    rgba(144,202,249,0.30);
  --urdu-border:      #E8F5E9;
  --urdu-shadow:      rgba(200,230,201,0.30);
  --english-border:   #FFF3E0;
  --english-shadow:   rgba(255,224,178,0.30);

  /* Reference row */
  --reference-bg:     #F1F8FE;
  --reference-border: #BBDEFB;

  /* Shadows */
  --shadow-card:     0 4px 12px rgba(25,118,210,0.15), 0 1px 3px rgba(0,0,0,0.04);
  --shadow-elevated: 0 8px 24px rgba(25,118,210,0.25);
  --shadow-soft:     0 2px 8px rgba(0,0,0,0.06);
  --shadow-hero:     0 8px 15px rgba(100,181,246,0.5);

  /* Font stacks */
  --font-arabic: "IndoPakNastaleeq", "Scheherazade New", "Amiri", "Noto Naskh Arabic", serif;
  --font-urdu:   "NafeesNastaleeq", "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", serif;
  --font-ui:     system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Radii */
  --radius-card:   20px;
  --radius-card-lg:24px;
  --radius-pill:   999px;
  --radius-button: 12px;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-ui);
  color: var(--text-primary);
  background:
    linear-gradient(180deg, var(--blue-50) 0%, #ffffff 60%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
ul, ol { list-style: none; padding: 0; margin: 0; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }

/* Focus ring (accessibility) */
:focus-visible { outline: 2px solid var(--blue-600); outline-offset: 2px; border-radius: 4px; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; margin-left: auto; margin-right: auto; padding-left: 16px; padding-right: 16px; max-width: 1100px; }
.container-narrow { max-width: 720px; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.block { display: block; }
.inline-block { display: inline-block; }
.hidden { display: none; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-1 { flex: 1 1 0%; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }

/* ---------- Spacing ---------- */
.m-0 { margin: 0; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 20px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mt-10 { margin-top: 40px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.p-0 { padding: 0; }
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-5 { padding: 20px; }
.p-6 { padding: 24px; }
.px-3 { padding-left: 12px; padding-right: 12px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.px-5 { padding-left: 20px; padding-right: 20px; }
.px-6 { padding-left: 24px; padding-right: 24px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.py-5 { padding-top: 20px; padding-bottom: 20px; }
.py-6 { padding-top: 24px; padding-bottom: 24px; }
.py-8 { padding-top: 32px; padding-bottom: 32px; }
.py-10 { padding-top: 40px; padding-bottom: 40px; }

/* ---------- Typography ---------- */
.font-arabic { font-family: var(--font-arabic); }
.font-urdu   { font-family: var(--font-urdu); }
.font-ui     { font-family: var(--font-ui); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.font-normal { font-weight: 400; }
.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.text-xs { font-size: 12px; }
.text-sm { font-size: 14px; }
.text-base { font-size: 16px; }
.text-lg { font-size: 18px; }
.text-xl { font-size: 20px; }
.text-2xl { font-size: 24px; }
.text-3xl { font-size: 28px; }
.text-4xl { font-size: 32px; }
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }
.leading-tight { line-height: 1.2; }
.leading-snug  { line-height: 1.4; }
.leading-normal { line-height: 1.5; }
.leading-relaxed { line-height: 1.6; }
.leading-loose { line-height: 1.8; }

/* ---------- Color helpers ---------- */
.text-white { color: #fff; }
.text-blue-600 { color: var(--blue-600); }
.text-blue-700 { color: var(--blue-700); }
.text-green-700 { color: var(--green-700); }
.text-grey-500 { color: var(--text-muted); }
.text-grey-600 { color: var(--text-secondary); }
.text-grey-800 { color: #424242; }

.bg-white { background: var(--surface); }
.bg-blue-50 { background: var(--blue-50); }
.bg-blue-100 { background: var(--blue-100); }
.bg-blue-600 { background: var(--blue-600); }
.bg-blue-700 { background: var(--blue-700); }
.bg-green-700 { background: var(--green-700); }

.border { border: 1px solid var(--border-soft); }
.border-0 { border: 0; }
.border-2 { border-width: 2px; }
.border-green-50 { border: 2px solid var(--green-50); }
.border-white { border-color: #fff; }
.rounded { border-radius: 8px; }
.rounded-md { border-radius: 12px; }
.rounded-lg { border-radius: 16px; }
.rounded-xl { border-radius: 20px; }
.rounded-2xl { border-radius: 24px; }
.rounded-full { border-radius: 9999px; }

/* ---------- Shadows ---------- */
.shadow-sm { box-shadow: var(--shadow-soft); }
.shadow    { box-shadow: var(--shadow-card); }
.shadow-lg { box-shadow: var(--shadow-elevated); }

/* ---------- Width / height ---------- */
.w-full { width: 100%; }
.w-6 { width: 24px; }
.w-8 { width: 32px; }
.w-10 { width: 40px; }
.w-12 { width: 48px; }
.w-16 { width: 64px; }
.h-6 { height: 24px; }
.h-8 { height: 32px; }
.h-10 { height: 40px; }
.h-12 { height: 48px; }
.h-16 { height: 64px; }
.min-h-screen { min-height: 100vh; }
.max-w-md { max-width: 480px; }
.max-w-2xl { max-width: 640px; }

/* ---------- Position ---------- */
.relative { position: relative; }
.absolute { position: absolute; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }

/* ---------- Overflow ---------- */
.overflow-hidden { overflow: hidden; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Transition ---------- */
.transition { transition: all 0.2s ease; }
.duration-200 { transition-duration: 0.2s; }

/* ---------- Cursor ---------- */
.cursor-pointer { cursor: pointer; }

/* ---------- Header (site-wide app bar) ---------- */
.site-header {
  background: linear-gradient(135deg, var(--blue-400), var(--blue-700));
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 16px;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
}
.site-header .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.5px;
}
.site-header .brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  padding: 2px;
  object-fit: contain;
}
.site-header nav { display: flex; gap: 22px; }
.site-header nav a {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  opacity: 0.95;
  transition: opacity 0.2s ease;
}
.site-header nav a:hover { opacity: 1; text-decoration: underline; }
.site-header nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
  opacity: 1;
}
.site-header .header-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: var(--blue-700);
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.site-header .header-download-btn:hover {
  transform: translateX(-50%) translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.site-header .header-download-btn:active {
  transform: translateX(-50%) scale(0.96);
}
.site-header .header-download-btn img {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.site-header .menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
}
.site-header .menu-btn svg { width: 22px; height: 22px; fill: #fff; }
.mobile-nav-drawer { display: none; }

/* ---------- Bismillah banner ---------- */
.bismillah-banner {
  margin: 16px;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--blue-50), #ffffff);
  border-radius: 20px;
  border: 2px solid #fff;
  box-shadow:
    0 4px 12px rgba(144,202,249,0.45),
    inset 0 2px 4px rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
}
.bismillah-banner img {
  width: auto;
  max-width: min(80%, 520px);
  max-height: 90px;
  height: auto;
  object-fit: contain;
}

/* ---------- Hero "Masnoon Duain" card ---------- */
.hero-card {
  position: relative;
  display: flex;
  align-items: stretch;
  margin: 0 16px;
  height: 120px;
  border-radius: 20px;
  overflow: hidden;
  background: var(--blue-600);
  box-shadow: 0 8px 15px rgba(100,181,246,0.5);
  color: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hero-card:hover { transform: translateY(-2px); box-shadow: 0 12px 20px rgba(100,181,246,0.55); }
.hero-card .hero-img {
  width: 200px;
  flex: 0 0 200px;
  object-fit: cover;
  height: 100%;
}
.hero-card .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, transparent 0%, transparent 40%, rgba(0,0,0,0.30) 100%);
  pointer-events: none;
}
.hero-card .hero-content {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 12px;
}
.hero-card .hero-title {
  font-family: var(--font-urdu);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0;
  text-shadow: 0 2px 6px rgba(0,0,0,0.45);
  line-height: 1.2;
  margin: 0;
  direction: ltr;          /* matches the list styling; keeps LTR per request */
  unicode-bidi: isolate;
}
.hero-card .hero-subtitle {
  font-size: 13px;
  font-weight: 500;
  opacity: 0.92;
  margin: 4px 0 0;
  letter-spacing: 0.3px;
}
.hero-card .hero-arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}
.hero-card:hover .hero-arrow { background: rgba(255,255,255,0.34); transform: translateX(2px); }
.hero-card .hero-arrow svg { width: 22px; height: 22px; stroke: #fff; fill: none; stroke-width: 2.4; }

/* ---------- Section header ---------- */
.section-header {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  gap: 12px;
}
.section-header .icon-square {
  width: 36px;
  height: 36px;
  background: var(--blue-100);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.section-header .icon-square svg { width: 20px; height: 20px; fill: var(--blue-600); }
.section-header .section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--blue-600);
  flex: 1;
  line-height: 1.2;
}
.section-header .section-count {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ---------- Search bar ---------- */
.search-wrap {
  padding: 0 16px 8px;
}
.search-bar {
  position: relative;
  display: flex;
  align-items: center;
  height: 50px;
  background: #fff;
  border-radius: 25px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  border: 1px solid var(--border-soft);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.search-bar:focus-within {
  border-color: var(--blue-300);
  box-shadow: 0 2px 10px rgba(25,118,210,0.18);
}
.search-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 100%;
  color: var(--blue-600);
  flex-shrink: 0;
}
.search-icon svg { width: 22px; height: 22px; }
.search-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--font-ui);
  font-size: 15px;
  color: var(--text-primary);
  padding: 0 8px 0 0;
  -webkit-appearance: none;
  appearance: none;
}
.search-input::placeholder { color: var(--text-muted); }
.search-input::-webkit-search-cancel-button { display: none; }
.search-clear {
  width: 36px;
  height: 36px;
  margin-right: 6px;
  border-radius: 50%;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
}
.search-clear[hidden] { display: none; }
.search-clear:hover { background: var(--blue-50); color: var(--text-primary); }
.search-clear svg { width: 18px; height: 18px; }

/* screen-reader only */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ---------- Empty state (no search results) ---------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 16px 32px;
  gap: 8px;
}
.empty-state[hidden] { display: none; }
.empty-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--blue-50);
  color: var(--blue-300);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.empty-icon svg { width: 44px; height: 44px; }
.empty-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-secondary);
}
.empty-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 320px;
}

/* ---------- Dua list item card ---------- */
.dua-list { padding: 4px 16px 16px; }

/* Modifier: 2-column responsive grid — used only on /duas/ page.
   Mobile: 1 column.  ≥720px: 2 columns. */
.dua-list--grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 720px) {
  .dua-list--grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
}
@media (min-width: 1100px) {
  .dua-list--grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
}

.dua-card {
  display: flex;
  align-items: center;
  background: #fff;
  border: 2px solid var(--green-50);
  border-radius: 24px;
  padding: 18px 20px 18px 8px;
  margin-top: 8px;
  box-shadow: var(--shadow-card), 0 0 0 0 var(--shadow-green);
  text-align: right;
  gap: 12px;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.dua-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--shadow-green);
  border-color: var(--green-100);
}
.dua-card .dua-text { flex: 1; min-width: 0; }
.dua-card .dua-urdu {
  font-family: var(--font-urdu);
  font-size: 20px;
  font-weight: 600;
  color: var(--green-700);
  line-height: 1.35;
  margin-bottom: 6px;
  text-align: right;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}
.dua-card .dua-eng {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #546E7A;                              /* ~6.2:1 on white (AA) */
  text-align: right;
  line-height: 1.4;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}
.dua-card .dua-id {
  position: absolute;
  top: 10px;
  left: 12px;
  font-size: 11px;
  font-weight: 600;
  color: #455A64;                              /* AA on blue-50 + white */
  background: var(--blue-50);
  padding: 2px 8px;
  border-radius: 999px;
}
.dua-card .fav-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--fav-bg-idle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s ease, transform 0.15s ease;
}
.dua-card .fav-btn:hover { background: var(--fav-bg-active); transform: scale(1.06); }
.dua-card .fav-btn svg { width: 22px; height: 22px; fill: none; stroke: #9E9E9E; stroke-width: 2; transition: stroke 0.2s ease, fill 0.2s ease; }
.dua-card .fav-btn.active svg { fill: var(--fav-active); stroke: var(--fav-active); }

/* ---------- Load more button ---------- */
.load-more-wrap { text-align: center; padding: 24px 16px 8px; }
.load-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--blue-600);
  color: #fff;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  box-shadow: var(--shadow-card);
  transition: background 0.2s ease, transform 0.15s ease;
}
.load-more:hover { background: var(--blue-700); transform: translateY(-1px); }
.load-more:disabled { background: #9E9E9E; cursor: default; transform: none; }
.load-more svg { width: 18px; height: 18px; fill: currentColor; }

/* ---------- CTA card (promote the app) ---------- */
.cta-card {
  margin: 32px 16px 24px;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
  color: #fff;
  border-radius: 20px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-elevated);
}
.cta-card .cta-icon {
  width: 52px;
  height: 52px;
  background: #fff;
  border-radius: 14px;
  padding: 4px;
  flex-shrink: 0;
  object-fit: contain;
}
.cta-card .cta-text { flex: 1; min-width: 0; }
.cta-card .cta-title { font-size: 16px; font-weight: 700; margin-bottom: 2px; line-height: 1.3; }
.cta-card .cta-desc { font-size: 13px; opacity: 0.92; line-height: 1.4; }
.cta-card .cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: var(--blue-700);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.cta-card .cta-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,0,0,0.18); }
.cta-card .cta-btn svg { width: 16px; height: 16px; fill: currentColor; }
.cta-card .cta-btn img { width: 20px; height: 20px; flex-shrink: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: #fff;
  border-top: 1px solid var(--border-soft);
  padding: 24px 16px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.6;
}
.site-footer .muted { color: var(--text-secondary); margin-top: 4px; }
.site-footer .heart { color: #C62828; }   /* red, 5.6:1 on white (AA) */
.site-footer a { color: var(--blue-600); text-decoration: underline; text-underline-offset: 2px; }
.site-footer a:hover { text-decoration-thickness: 2px; }
.footer-preference {
  appearance: none;
  padding: 0;
  border: 0;
  color: var(--blue-700);
  background: transparent;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.footer-preference:hover { text-decoration-thickness: 2px; }
.footer-preference:focus-visible { outline: 3px solid var(--blue-200); outline-offset: 3px; border-radius: 3px; }

/* ---------- Analytics consent ---------- */
.analytics-consent {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 1200;
  max-width: 920px;
  margin: 0 auto;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--text-primary);
  background: #fff;
  border: 1px solid var(--blue-200);
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(21, 101, 192, 0.22), 0 4px 12px rgba(0, 0, 0, 0.10);
}
.analytics-consent[hidden] { display: none; }
.analytics-consent-copy { min-width: 0; }
.analytics-consent-copy strong { display: block; margin-bottom: 4px; font-size: 15px; }
.analytics-consent-copy p { margin: 0; color: var(--text-secondary); font-size: 13px; line-height: 1.55; }
.analytics-consent-copy a { color: var(--blue-700); font-weight: 700; text-underline-offset: 2px; }
.analytics-consent-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.consent-reject,
.consent-accept {
  min-height: 44px;
  padding: 10px 15px;
  border-radius: 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.consent-reject { color: var(--blue-700); background: #fff; border: 1px solid var(--blue-300); }
.consent-accept { color: #fff; background: var(--blue-700); border: 1px solid var(--blue-700); }
.consent-reject:hover { background: var(--blue-50); }
.consent-accept:hover { background: #0D47A1; }
.consent-reject:focus-visible,
.consent-accept:focus-visible { outline: 3px solid var(--blue-300); outline-offset: 3px; }

@media (max-width: 680px) {
  .analytics-consent { align-items: stretch; flex-direction: column; gap: 14px; padding: 16px; }
  .analytics-consent-actions { width: 100%; }
  .consent-reject, .consent-accept { flex: 1; }
}


/* ---------- Breadcrumb ---------- */
.breadcrumb {
  padding: 12px 16px 0;
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--blue-600); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span[aria-current] { color: var(--text-primary); font-weight: 600; }
.breadcrumb .sep { opacity: 0.5; }


/* ---------- Page intro (used on /duas/ landing) ---------- */
.collection-heading {
  margin: 12px 16px 4px;
  padding: 18px 20px;
  text-align: center;
  background: linear-gradient(135deg, var(--blue-50), #fff 72%);
  border: 1px solid var(--blue-100);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}
.collection-heading h1 {
  margin: 0;
  color: var(--blue-700);
  font-size: clamp(20px, 3vw, 27px);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.2px;
}
.collection-heading p {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

.page-intro {
  padding: 16px 16px 0;
  max-width: 760px;
  margin: 0 auto;
}
.page-intro h1,
.page-intro h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.3;
  margin: 0 0 8px;
}
.page-intro .lede {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0 0 8px;
}
.page-intro .stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}
.page-intro .stats strong { color: var(--blue-600); font-weight: 700; }


/* ---------- Homepage information guide ---------- */
.homepage-guide {
  max-width: 840px;
  margin: 20px 16px 24px;
  padding: 22px 24px;
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
}
.homepage-guide h2 {
  margin: 0 0 12px;
  color: var(--text-primary);
  font-size: 22px;
  line-height: 1.3;
}
.homepage-guide h3 {
  margin: 20px 0 6px;
  color: var(--blue-700);
  font-size: 16px;
  line-height: 1.4;
}
.homepage-guide p {
  margin: 0 0 10px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.8;
}
.homepage-guide p:last-child { margin-bottom: 0; }

@media (min-width: 872px) {
  .homepage-guide { margin-left: auto; margin-right: auto; }
}


/* ---------- About and privacy content pages ---------- */
.content-page {
  max-width: 920px;
  margin: 14px auto 28px;
  padding: 0 16px;
}
.content-hero {
  padding: 28px 30px;
  background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
  color: #fff;
  border-radius: var(--radius-card-lg);
  box-shadow: var(--shadow-elevated);
}
.content-eyebrow {
  display: block;
  margin-bottom: 6px;
  color: inherit;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  opacity: 0.86;
}
.content-hero h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(26px, 5vw, 38px);
  line-height: 1.2;
}
.content-hero p {
  max-width: 720px;
  margin: 10px 0 0;
  color: rgba(255,255,255,0.92);
  font-size: 15px;
  line-height: 1.75;
}
.content-meta {
  display: inline-flex;
  margin-top: 14px;
  padding: 6px 10px;
  color: #fff;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
}
.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 14px;
}
.content-card {
  padding: 22px 24px;
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
}
.content-card h2,
.contact-card h2 {
  margin: 0 0 8px;
  color: var(--text-primary);
  font-size: 19px;
  line-height: 1.35;
}
.content-card p,
.contact-card p,
.content-card li {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.8;
}
.content-card p { margin: 0 0 12px; }
.content-card p:last-child { margin-bottom: 0; }
.content-card--wide { margin-top: 14px; }
.content-card--wide h2 {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
}
.content-card--wide h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.content-note {
  margin-top: 14px;
  padding: 13px 15px;
  color: var(--text-secondary);
  background: var(--blue-50);
  border-left: 4px solid var(--blue-500);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.7;
}
.content-list {
  margin: 0;
  padding-left: 22px;
}
.content-list li + li { margin-top: 6px; }
.text-link {
  color: var(--blue-700);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.contact-card {
  margin-top: 14px;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: linear-gradient(135deg, var(--blue-50), #fff);
  border: 1px solid var(--blue-100);
  border-radius: var(--radius-card);
}
.contact-card p { margin: 0; }
.contact-card .content-eyebrow { color: var(--blue-700); }
.contact-email {
  padding: 10px 14px;
  color: var(--blue-700);
  background: #fff;
  border: 1px solid var(--blue-100);
  border-radius: var(--radius-button);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  overflow-wrap: anywhere;
  white-space: nowrap;
}

/* ---------- 40 Masnoon Duain PDF ---------- */
.pdf-landing { max-width: 980px; }
.pdf-hero {
  padding: 30px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
  border-radius: var(--radius-card-lg);
  box-shadow: var(--shadow-elevated);
}
.pdf-hero h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.16;
}
.pdf-hero > p:not(.pdf-urdu-title) {
  max-width: 610px;
  margin: 10px 0 0;
  color: rgba(255,255,255,0.94);
  font-size: 15px;
  line-height: 1.75;
}
.pdf-urdu-title {
  margin: 8px 0 0;
  color: #fff;
  font-family: var(--font-urdu);
  font-size: 21px;
  line-height: 1.8;
  text-align: left;
}
.pdf-meta {
  margin: 15px 0 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.pdf-meta span {
  padding: 5px 9px;
  color: #fff;
  background: rgba(0,0,0,0.16);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 750;
}
.pdf-download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 11px 17px;
  color: var(--blue-700);
  background: #fff;
  border-radius: var(--radius-button);
  box-shadow: 0 5px 16px rgba(0,0,0,0.18);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}
.pdf-download-button:hover { background: var(--blue-50); }
.pdf-download-button svg { width: 20px; height: 20px; }
.pdf-introduction { margin-top: 16px; }
.pdf-download-panel {
  margin-top: 14px;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  color: #fff;
  background: var(--green-700);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
}
.pdf-download-panel h2 {
  margin: 0 0 5px;
  color: #fff;
  font-size: 19px;
  line-height: 1.35;
}
.pdf-download-panel p {
  margin: 0;
  color: rgba(255,255,255,0.94);
  font-size: 13px;
  line-height: 1.65;
}
.pdf-download-button--light {
  flex: 0 0 auto;
  color: var(--green-700);
}
.pdf-dua-list {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  list-style: none;
  padding: 0;
}
.pdf-dua-list li {
  display: flex;
  align-items: stretch;
  min-width: 0;
  overflow: hidden;
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  border-radius: 12px;
}
.pdf-dua-number {
  width: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  background: var(--blue-600);
  font-size: 11px;
  font-weight: 800;
}
.pdf-dua-list a {
  min-width: 0;
  flex: 1;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pdf-dua-list a:hover { background: #fff; }
.pdf-dua-urdu {
  color: var(--green-700);
  font-family: var(--font-urdu);
  font-size: 15px;
  line-height: 1.6;
  text-align: right;
}
.pdf-dua-english {
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
}
.pdf-info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pdf-faq { max-width: none; padding-left: 0; padding-right: 0; }
.contact-email:hover { background: var(--blue-50); }

@media (min-width: 760px) {
  .content-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* ---------- Branded 404 page ---------- */
.not-found-main { min-height: calc(100vh - 150px); }
.not-found-card {
  max-width: 680px;
  margin: 8px 16px 28px;
  padding: 28px 24px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card-lg);
  box-shadow: var(--shadow-card);
}
.not-found-code {
  color: var(--blue-100);
  font-size: clamp(58px, 13vw, 96px);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: 4px;
}
.not-found-icon {
  width: 72px;
  height: 72px;
  margin: 12px auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-600);
  background: var(--blue-50);
  border-radius: 50%;
}
.not-found-icon svg { width: 40px; height: 40px; }
.not-found-urdu {
  margin: 8px 0 2px;
  color: var(--blue-700);
  font-family: var(--font-urdu);
  font-size: 22px;
  line-height: 1.8;
}
.not-found-card h1 {
  margin: 0 0 10px;
  color: var(--text-primary);
  font-size: 26px;
  line-height: 1.3;
}
.not-found-copy {
  max-width: 520px;
  margin: 0 auto;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}
.not-found-actions {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.not-found-primary,
.not-found-secondary {
  min-height: 44px;
  padding: 11px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-button);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.not-found-primary {
  color: #fff;
  background: var(--blue-600);
  box-shadow: 0 4px 12px rgba(25,118,210,0.24);
}
.not-found-secondary {
  color: var(--blue-700);
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
}
.not-found-primary:hover { background: var(--blue-700); }
.not-found-secondary:hover { background: var(--blue-100); }

@media (min-width: 712px) {
  .not-found-card { margin-left: auto; margin-right: auto; }
}


/* ---------- Category section (All Duas page) — REMOVED, flat list now ---------- */
/* .category { ... } .cat-header { ... } -- no longer used; the page is a flat list now */


/* ---------- FAQ section (AEO) ---------- */
.faq-section {
  padding: 24px 16px 8px;
  max-width: 760px;
  margin: 0 auto;
}
.faq-section h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 12px;
}
.faq-item {
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  margin-bottom: 8px;
  overflow: hidden;
  transition: box-shadow 0.15s ease;
}
.faq-item[open] { box-shadow: 0 4px 12px rgba(25, 118, 210, 0.08); }
.faq-item summary {
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 20px;
  color: var(--blue-600);
  font-weight: 400;
  line-height: 1;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { content: '\2212'; }
.faq-item .faq-answer {
  padding: 0 16px 14px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}


/* ---------- Back-to-top button ---------- */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--blue-600);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.15s ease;
  z-index: 50;
}
.back-to-top.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { background: var(--blue-700); }
.back-to-top:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 5px var(--blue-600); }
.back-to-top svg { width: 22px; height: 22px; fill: currentColor; }


/* ============================================================
   DETAIL PAGE  (/duas/{slug}/index.html)
   Per design doc §6.7 (Detail page cards) + §7.3 (Detail page route)
   ============================================================ */

/* ---------- Detail sub-header (back, dua #, favorite) ---------- */
.detail-subheader {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid var(--border-soft);
}
.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--blue-600);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  min-width: 64px;       /* keeps layout balanced when arrow vs text */
  flex-shrink: 0;
}
.detail-back:hover { background: var(--blue-50); }
.detail-back svg { width: 18px; height: 18px; fill: currentColor; }

/* (detail-titlebar removed — Back + Fav only, per design tweak) */

.detail-fav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--fav-bg-idle);
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  flex-shrink: 0;
  margin-left: auto;     /* push to the right edge of sub-header */
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.detail-fav:hover { background: var(--fav-bg-active); }
.detail-fav:active { transform: scale(0.92); }
.detail-fav svg { width: 22px; height: 22px; fill: currentColor; }
.detail-fav.is-active { color: var(--fav-active); background: var(--fav-bg-active); }
.detail-fav.is-active svg { fill: var(--fav-active); }


/* ---------- H1 (English title + Urdu subhead) ---------- */
.detail-h1-wrap {
  padding: 20px 16px 8px;
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}
.detail-h1 {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
  margin: 0 0 4px;
}
.detail-h1-ur {
  display: block;
  font-family: var(--font-urdu);
  font-size: 16px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.4;
  direction: rtl;
  margin-top: 4px;
}

.detail-answer {
  max-width: 728px;
  margin: 8px auto 20px;
  padding: 18px 20px;
  background: linear-gradient(135deg, var(--blue-50), #fff 78%);
  border: 1px solid var(--blue-100);
  border-left: 4px solid var(--blue-600);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}
.detail-answer-label {
  display: block;
  margin-bottom: 6px;
  color: var(--blue-700);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.detail-answer p {
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.75;
}


/* ---------- Language cards (Arabic / Urdu / English) ---------- */
.dua-detail {
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.lang-card {
  position: relative;
  background: #fff;
  border-radius: 20px;
  padding: 24px 20px 20px;
  box-shadow: 0 4px 16px var(--shadow-soft, rgba(0,0,0,0.06));
}
.lang-card .lang-badge {
  position: absolute;
  top: -10px;
  padding: 6px 12px;
  border-radius: 20px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.10);
  white-space: nowrap;
}
.lang-card .lang-badge.is-rtl { right: 16px; }  /* RTL languages (Arabic, Urdu) — badge top-right */
.lang-card .lang-badge.is-ltr { left: 16px; }   /* LTR languages (English)    — badge top-left  */

/* Arabic card */
.lang-card--arabic {
  border: 1.5px solid var(--arabic-border);
  box-shadow: 0 4px 16px var(--arabic-shadow);
  padding-top: 28px;
}
.lang-card--arabic .lang-badge {
  background: linear-gradient(135deg, #1976D2 0%, #42A5F5 100%);
}
.lang-card--arabic .lang-body {
  font-family: var(--font-arabic);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.8;
  color: var(--text-primary);
  direction: rtl;
  text-align: right;
  word-spacing: 2px;
}

/* Urdu card */
.lang-card--urdu {
  border: 1px solid var(--urdu-border);
  box-shadow: 0 4px 16px var(--urdu-shadow);
}
.lang-card.lang-card--urdu .lang-badge {
  background: linear-gradient(135deg, #43A047 0%, #66BB6A 100%);
  font-family: var(--font-urdu);
  /* Urdu (Nastaleeq) badge — mirror the Urdu card body typography:
     - NafeesNastaleeq only ships weight 400; 600 would synthesize a fake
       bold and distort the glyphs.
     - letter-spacing inserts gaps inside the CONNECTED Nastaleeq script,
       which makes the letters look detached/broken — keep it at 0.
     - 11–12px is too small for Nastaleeq's tall glyphs (they collapse and
       look broken); 13px + roomier line-height keeps it legible. */
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.6;
  padding: 7px 14px;
}
.lang-card--urdu .lang-body {
  font-family: var(--font-urdu);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  color: #212121;
  direction: rtl;
  text-align: right;
}

/* English card */
.lang-card--english {
  border: 1px solid var(--english-border);
  box-shadow: 0 4px 16px var(--english-shadow);
}
.lang-card--english .lang-badge {
  background: linear-gradient(135deg, #FB8C00 0%, #FFA726 100%);
}
.lang-card--english .lang-body {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: #212121;
  direction: ltr;
  text-align: left;
}

/* Roman Urdu / pronunciation card */
.lang-card--transliteration {
  border: 1px solid var(--blue-100);
  box-shadow: 0 4px 16px rgba(25, 118, 210, 0.08);
}
.lang-card--transliteration .lang-badge {
  background: linear-gradient(135deg, #5C6BC0 0%, #7986CB 100%);
}
.lang-card--transliteration .lang-body {
  color: var(--text-primary);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.6;
  text-align: left;
}


/* ---------- Reference row ---------- */
.ref-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--reference-bg);
  border: 1px solid var(--reference-border);
  border-radius: 16px;
  padding: 16px;
  margin-top: 4px;
}
.ref-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--blue-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.ref-icon svg { width: 20px; height: 20px; fill: currentColor; }
.ref-text {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: #424242;
}
.ref-text strong { color: var(--blue-700); font-weight: 600; margin-right: 4px; }
.ref-text a { color: var(--blue-700); font-weight: 600; text-underline-offset: 2px; }
.ref-text a:hover { color: var(--blue-800); }


/* ---------- Editorial answer content ---------- */
.detail-reply,
.detail-sources,
.detail-content,
.detail-faq {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.detail-reply,
.detail-sources {
  padding: 20px 16px 0;
}
.detail-section-heading { margin-bottom: 12px; }
.detail-section-heading h2 {
  margin-top: 4px;
  color: var(--text-primary);
  font-size: 20px;
  line-height: 1.35;
}
.reply-card {
  padding: 22px 20px;
  background: #fff;
  border: 1px solid var(--blue-100);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
}
.reply-card p + p { margin-top: 10px; }
.reply-arabic {
  color: var(--text-primary);
  font-family: var(--font-arabic);
  font-size: 25px;
  line-height: 1.9;
  text-align: right;
}
.reply-transliteration {
  color: var(--blue-700);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.6;
}
.reply-urdu {
  color: var(--text-primary);
  font-family: var(--font-urdu);
  font-size: 17px;
  line-height: 1.7;
  text-align: right;
}
.reply-english {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}
.detail-content { padding: 20px 16px 0; }
.detail-section {
  padding: 20px;
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}
.detail-section + .detail-section { margin-top: 14px; }
.detail-section h2 {
  margin-bottom: 10px;
  color: var(--blue-700);
  font-size: 19px;
  line-height: 1.4;
}
.detail-section p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.8;
}
.detail-section p + p { margin-top: 10px; }
.source-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.source-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 16px 18px;
  color: var(--text-primary);
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--blue-100);
  border-radius: 14px;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.source-card:hover {
  border-color: var(--blue-300);
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}
.source-card strong { color: var(--blue-700); font-size: 14px; }
.source-card span { color: var(--text-secondary); font-size: 12.5px; line-height: 1.55; }
.detail-faq { padding-top: 24px; }


/* ---------- Related Duas strip ---------- */
.related {
  padding: 24px 16px 0;
  max-width: 760px;
  margin: 0 auto;
}
.related-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.related-title::before {
  content: '';
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: var(--blue-600);
}
.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
@media (min-width: 600px) {
  .related-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
}
.related-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 16px 18px;
  min-height: 72px;              /* taller cards — text fully visible */
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.related-card:hover {
  border-color: var(--blue-200);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}
.related-card .rc-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--blue-700);
  background: var(--blue-50);
  border-radius: 8px;
  padding: 4px 8px;
  flex-shrink: 0;
}
.related-card .rc-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}
.related-card .rc-ur {
  font-family: var(--font-urdu);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-primary);
  direction: rtl;
  text-align: right;
  white-space: normal;      /* let long titles wrap so nothing is cut off */
  overflow: visible;
}
.related-card .rc-en {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.4;
  white-space: normal;      /* let long titles wrap so nothing is cut off */
  overflow: visible;
}


/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .site-header .inner { height: 56px; padding: 0 12px; }
  .site-header .brand { font-size: 15px; gap: 8px; }
  .site-header .brand span { display: none; } /* Hide "Masnoon Duain" text on mobile */
  .site-header .brand-logo { width: 38px; height: 38px; }
  .site-header .inner > nav { display: none; }
  .site-header .menu-btn { display: inline-flex; }
  .site-header .header-download-btn {
    font-size: 12px;
  }

  /* Mobile Navigation Drawer */
  .mobile-nav-drawer {
    display: none;
    background: linear-gradient(180deg, var(--blue-700), var(--blue-800, #0D47A1));
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding: 8px 12px 14px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  }
  .mobile-nav-drawer.is-open {
    display: block;
    animation: drawerSlideDown 0.2s ease-out forwards;
  }
  .mobile-nav-drawer nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .mobile-nav-drawer nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.15s ease;
  }
  .mobile-nav-drawer nav a:hover,
  .mobile-nav-drawer nav a:active {
    background: rgba(255, 255, 255, 0.15);
  }
  .mobile-nav-drawer nav a svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    opacity: 0.9;
  }
  .bismillah-banner { margin: 12px; padding: 10px 12px; }
  .bismillah-banner img { width: 90%; }
  .hero-card { margin: 0 12px; height: 110px; }
  .hero-card .hero-img { width: 160px; flex-basis: 160px; }
  .hero-card .hero-content { padding: 0 14px; }
  .hero-card .hero-title { font-size: 18px; }
  .hero-card .hero-subtitle { font-size: 11px; }
  .hero-card .hero-arrow { width: 36px; height: 36px; }
  .section-header { padding: 8px 12px; gap: 10px; }
  .section-header .icon-square { width: 32px; height: 32px; }
  .section-header .section-title { font-size: 16px; }
  .section-header .section-count { font-size: 12px; white-space: nowrap; }
  .search-wrap { padding: 0 12px 8px; }
  .search-bar { height: 46px; }
  .search-input { font-size: 14px; }
  .dua-list { padding: 4px 12px 16px; }
  .dua-card { padding: 16px 16px 16px 8px; }
  .dua-card .dua-urdu { font-size: 17px; }
  .cta-card { margin: 24px 12px 20px; padding: 14px 14px; flex-wrap: wrap; }
  .cta-card .cta-icon { width: 44px; height: 44px; }
  .cta-card .cta-title { font-size: 14px; }
  .cta-card .cta-desc { font-size: 12px; }
  .cta-card .cta-btn { width: 100%; justify-content: center; padding: 10px 14px; }

  /* All Duas page */
  .breadcrumb { padding: 10px 12px 0; font-size: 11px; }
  .page-intro { padding: 20px 12px 12px; }
  .collection-heading { margin: 10px 12px 2px; padding: 15px 16px; }
  .collection-heading h1 { font-size: 19px; }
  .collection-heading p { font-size: 12px; }
  .page-intro h1, .page-intro h2 { font-size: 19px; }
  .page-intro .lede { font-size: 13px; }
  .homepage-guide { margin: 16px 12px 20px; padding: 18px 16px; }
  .homepage-guide h2 { font-size: 19px; }
  .homepage-guide h3 { font-size: 15px; }
  .homepage-guide p { font-size: 13px; }
  .content-page { margin-top: 10px; padding: 0 12px; }
  .content-hero { padding: 22px 18px; border-radius: 18px; }
  .content-hero p { font-size: 13px; }
  .content-card { padding: 18px 16px; }
  .content-card h2, .contact-card h2 { font-size: 17px; }
  .content-card p, .contact-card p, .content-card li { font-size: 13px; }
  .pdf-hero { padding: 22px 18px; }
  .pdf-hero h1 { font-size: 25px; }
  .pdf-hero > p:not(.pdf-urdu-title) { font-size: 13px; line-height: 1.65; }
  .pdf-urdu-title { font-size: 17px; }
  .pdf-meta { margin: 12px 0 15px; }
  .pdf-download-button { width: 100%; padding: 10px 12px; font-size: 13px; }
  .pdf-download-panel { padding: 18px 16px; align-items: stretch; flex-direction: column; }
  .pdf-download-panel h2 { font-size: 17px; }
  .pdf-dua-list { grid-template-columns: 1fr; }
  .pdf-info-grid { grid-template-columns: 1fr; }
  .contact-card { padding: 18px 16px; align-items: stretch; flex-direction: column; }
  .contact-email { text-align: center; white-space: normal; }
  .not-found-card { margin: 4px 12px 22px; padding: 22px 16px; }
  .not-found-card h1 { font-size: 22px; }
  .not-found-actions { flex-direction: column; }
  .not-found-primary, .not-found-secondary { width: 100%; }
  .dua-list--grid { gap: 8px; }
  .faq-section { padding: 20px 12px 4px; }
  .faq-section h2 { font-size: 16px; }
  .faq-item summary { padding: 12px 14px; font-size: 13px; }
  .faq-item .faq-answer { padding: 0 14px 12px; font-size: 12px; }
  .back-to-top { right: 14px; bottom: 14px; width: 40px; height: 40px; }

  /* Detail page (mobile) */
  .detail-subheader { padding: 8px 12px; gap: 8px; }
  .detail-back { font-size: 0; padding: 6px; min-width: 0; }  /* icon only on mobile */
  .detail-back svg { width: 20px; height: 20px; }
  .detail-fav { width: 36px; height: 36px; }
  .detail-h1-wrap { padding: 16px 12px 4px; }
  .detail-h1 { font-size: 20px; }
  .detail-h1-ur { font-size: 14px; }
  .detail-answer { margin: 8px 12px 18px; padding: 15px 16px; }
  .detail-answer p { font-size: 13px; line-height: 1.7; }
  .dua-detail { padding: 8px 12px 16px; gap: 16px; }
  .lang-card { padding: 20px 14px 16px; border-radius: 18px; }
  .lang-card--arabic { padding-top: 24px; }
  .lang-card--arabic .lang-body { font-size: 22px; line-height: 1.9; }
  .lang-card--urdu .lang-body { font-size: 16px; }
  .lang-card--english .lang-body { font-size: 14px; }
  .lang-card--transliteration .lang-body { font-size: 15px; }
  .lang-card .lang-badge { font-size: 11px; padding: 5px 10px; }
  .ref-row { padding: 12px 14px; gap: 10px; }
  .ref-text { font-size: 13px; }
  .detail-reply, .detail-sources, .detail-content { padding-left: 12px; padding-right: 12px; }
  .detail-section-heading h2 { font-size: 17px; }
  .reply-card, .detail-section { padding: 17px 15px; border-radius: 16px; }
  .reply-arabic { font-size: 21px; }
  .reply-urdu { font-size: 16px; }
  .detail-section h2 { font-size: 17px; }
  .detail-section p { font-size: 13px; }
  .detail-faq { padding-top: 20px; }
  .related { padding: 20px 12px 0; }
  .related-title { font-size: 15px; }
}

@media (min-width: 1024px) {
  .hero-card .hero-img { width: 220px; flex-basis: 220px; }
  .hero-card { height: 130px; }
  .hero-card .hero-title { font-size: 24px; }
}

/* ---------- Print niceties ---------- */
@media print {
  .site-header, .cta-card, .load-more-wrap, .fav-btn { display: none; }
  body { background: #fff; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
