/* ── Web Fonts ─────────────────────────────────────────────── */
@font-face { font-family: 'UthmanicHafs'; src: url('/fonts/UthmanicHafs.woff2') format('woff2'); font-display: swap; }
@font-face {
  font-family: 'Amiri';
  src: url('/fonts/Amiri-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ============================================================
   QURAN AUDIO SITES — islamictimes.net  v5
   Dark gold theme · urduquran · arabicquran · englishquran
   ============================================================ */

:root {
  --bg:          #0a0a00;
  --bg-card:     #111100;
  --bg-card2:    #161600;
  --gold:        #c9a84c;
  --gold-bright: #f0c040;
  --gold-muted:  #7a6a30;
  --gold-dim:    #3a3020;
  --gold-glow:   rgba(201,168,76,0.15);
  --text:        #e8e0c8;
  --text-muted:  #8a8060;
  --text-dim:    #4a4030;
  --radius:      10px;
  --radius-sm:   6px;

  --safe-top:    env(safe-area-inset-top, 0px);
  --header-h:    52px; /* = --bar-h of the shared header frame (tools/header/header.css) */
  --player-h:    156px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, 'Times New Roman', serif;
  min-height: 100vh;
  /* Push content below header + player + safe area */
  padding-top: calc(var(--safe-top) + var(--bar-extra, 0px) + var(--header-h) + var(--player-h));
  padding-bottom: 3rem;
  -webkit-font-smoothing: antialiased;
}

/* ── GLOBAL LINK RESET ───────────────────────────────────── */
a {
  color: inherit;
  text-decoration: none;
  -webkit-text-decoration: none;
}
a:visited { color: inherit; }
a:focus   { outline: none; }
a:focus-visible, .back-link:focus-visible, button:focus-visible { outline: 2px solid #c9a84c; outline-offset: 2px; } /* the keyboard's focus ring (P3-16) */

/* ── HEADER — two rows, respects iOS notch ──────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  /* Total height = safe area + one row */
  height: calc(var(--safe-top) + var(--header-h));
  background: var(--bg);
  border-bottom: 1px solid var(--gold-dim);
  z-index: 100;
  display: flex;
  flex-direction: column;
  /* Push content below the status bar */
  padding-top: var(--safe-top);
}

.header-inner {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* ── Row 1: back+logo LEFT · site title RIGHT ── */
.header-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  flex: 1;
}

/* Back link */
.back-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--gold-muted);
  text-decoration: none;
  -webkit-text-decoration: none;
  border: none;
  outline: none;
  flex-shrink: 0;
  padding: 0.25rem 0;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s;
}
.back-link:hover,
.back-link:active  { color: var(--gold-bright); }
.back-link:visited { color: var(--gold-muted);  }
.back-link:focus   { outline: none; }

.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  user-select: none;
}
.logo-top,
.logo-bottom {
  font-family: Georgia, serif;
  font-weight: bold;
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  display: block;
}
.logo-line {
  width: 100%;
  height: 1px;
  background: var(--gold-muted);
  opacity: 0.7;
  margin: 2px 0;
  display: block;
  border: none;
}

/* Site title — "Urdu Quran" / "Arabic Quran" / "English Quran" */
.header-title {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 0.82rem;
  font-weight: bold;
  letter-spacing: 0.06em;
  color: var(--gold-bright);
  white-space: nowrap;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}


/* ── STICKY PLAYER ──────────────────────────────────────── */
.sticky-player {
  position: fixed;
  /* Sits directly below header (which already includes safe-top) */
  top: calc(var(--safe-top) + var(--bar-extra, 0px) + var(--header-h));
  left: 0; right: 0;
  height: var(--player-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--gold-dim);
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  padding: 10px 1.25rem 12px;
  overflow: hidden;
}

.player-info {
  text-align: center;
  width: 100%;
  max-width: 600px;
}
.player-surah-name {
  font-size: 0.92rem;
  color: var(--gold-bright);
  font-weight: bold;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-ayat-info {
  font-size: 0.7rem;
  color: var(--gold-muted);
  line-height: 1.25;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-shrink: 0;
}

.ctrl-btn {
  background: none;
  border: none;
  color: var(--gold-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  transition: color 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.ctrl-btn:hover  { color: var(--gold-bright); background: var(--gold-glow); }
.ctrl-btn:active { transform: scale(0.92); }

.play-btn {
  background: var(--gold-dim);
  color: var(--gold);
  border-radius: 50%;
  width: 52px;
  height: 52px;
  min-width: 52px;
  min-height: 52px;
  border: 1px solid var(--gold-muted);
  transition: background 0.2s, color 0.2s, transform 0.15s;
}
.play-btn:hover { background: var(--gold); color: var(--bg); }
.play-btn.playing {
  background: var(--gold);
  color: var(--bg);
  box-shadow: 0 0 20px var(--gold-glow);
}

.player-progress-wrap {
  width: 100%;
  max-width: 600px;
  margin-top: 10px;
}
.progress-bar {
  position: relative;
  height: 3px;
  background: var(--gold-dim);
  border-radius: 2px;
  cursor: pointer;
}
.progress-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 2px;
  width: 0%;
  transition: width 0.25s linear;
  pointer-events: none;
}
.progress-range {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  height: 28px;
  opacity: 0;
  cursor: pointer;
  margin: 0;
  z-index: 2;
  -webkit-appearance: none;
}
.progress-times {
  display: flex;
  justify-content: space-between;
  font-size: 0.6rem;
  color: var(--text-dim);
  margin-top: 4px;
  font-family: monospace;
}

/* ── PLAYBACK INFO BAR ─────────────────────────────────── */
.playback-bar {
  display: none;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0 6px;
  padding: 5px 12px;
  background: rgba(0,0,0,0.35);
  font-size: 0.72rem;
  color: var(--gold-light, #e8c97a);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 26px;
}
.playback-bar.active { display: flex; }
.pb-divider { opacity: 0.45; font-size: 0.65rem; }


/* ── THE RUQYAH PAGE (owner go, 2026-10-21): the Quran audio apps' frame and player, one recording ── */
:root { --player-h: 150px; }
.rq-main { max-width: 600px; margin: 0 auto; padding: 1.5rem 1.25rem 2rem; }
.rq-card { background: var(--bg-card); border: 1px solid var(--gold-dim); border-radius: var(--radius); padding: 1.4rem 1.25rem; text-align: center; }
.rq-ar { font-family: 'Amiri', 'Scheherazade New', serif; font-size: 2rem; line-height: 1.5; color: var(--gold-bright); direction: rtl; }
.rq-en { margin-top: 0.4rem; font-size: 0.98rem; color: var(--text); }
.rq-by { margin-top: 0.9rem; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-muted); }
.rq-by-ar { margin-top: 0.25rem; font-family: 'Amiri', serif; font-size: 1.25rem; color: var(--gold); direction: rtl; }
.rq-note { margin-top: 1rem; font-size: 0.82rem; line-height: 1.6; color: var(--text-muted); }
.rq-note b { color: var(--gold); font-weight: normal; }
.rq-text { margin-top: 1.5rem; font-size: 0.9rem; line-height: 1.7; color: var(--text-muted); }
.rq-text h2 { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-muted); margin: 1.4rem 0 0.4rem; font-weight: normal; text-align: center; }
.rq-text p { margin: 0 0 0.6rem; }
.rq-text p + p { margin-top: 0; }
.player-surah-name { font-family: 'Amiri', serif; font-size: 1.1rem; }
@media (prefers-reduced-motion: reduce) { .play-btn.playing { box-shadow: none; } }
