/* ================================================================
   EL HUDA — Premium Redesign 2026
   Inspired by basira.institute — Islamic Excellence
   ================================================================ */

/* ── TOKENS ── */
:root {
  --bg: #080f0c;
  --bg-2: #0d1a14;
  --bg-3: #111f18;
  --gold: #c9a84c;
  --gold-2: #e8c97a;
  --gold-3: #f5e4b0;
  --green: #1a6b45;
  --green-2: #22a36a;
  --text: #f0ece3;
  --text-2: #b8c9bf;
  --text-3: #728c80;
  --line: rgba(201,168,76,.12);
  --line-2: rgba(201,168,76,.22);
  --r: 14px;
  --r-lg: 22px;
  --shadow: 0 20px 60px rgba(0,0,0,.6);
  --shadow-sm: 0 8px 28px rgba(0,0,0,.4);
  /* soft surfaces used by inputs / pill buttons / cards across the site */
  --bg-soft: rgba(255,255,255,.035);
  --gold-soft: var(--gold-2);
  --text-dim: var(--text-2);
  --bg-glass: rgba(8,15,12,.85);
  --bg-glass-solid: rgba(8,15,12,.98);
}

[data-theme="light"] {
  --bg:#faf7f0; --bg-2:#f2ece0; --bg-3:#e8e0cc;
  --text:#1a1208; --text-2:#4a3e28; --text-3:#7a6a4a;
  --line:rgba(150,120,60,.18); --line-2:rgba(150,120,60,.32);
  --shadow:0 20px 60px rgba(0,0,0,.1); --shadow-sm:0 8px 24px rgba(0,0,0,.07);
  --bg-soft: rgba(150,120,60,.07);
  --gold-soft: #8a6a1a;
  --text-dim: var(--text-2);
  --gold: #a97f1e; --gold-2:#8a6a1a; --gold-3:#6b520f;
  --bg-glass: rgba(250,247,240,.88);
  --bg-glass-solid: rgba(250,247,240,.98);
}

[data-theme="warm"] {
  --bg:#140f08; --bg-2:#1c150c; --bg-3:#241b0f;
  --gold:#d4a84a; --gold-2:#eec97e; --gold-3:#f7e2ac;
  --green:#8b6914; --green-2:#c9952a;
  --text:#f5ecd8; --text-2:#c9b990; --text-3:#8a7550;
  --line:rgba(212,168,74,.14); --line-2:rgba(212,168,74,.26);
  --shadow:0 20px 60px rgba(0,0,0,.6); --shadow-sm:0 8px 28px rgba(0,0,0,.4);
  --bg-soft: rgba(255,255,255,.04);
  --gold-soft: var(--gold-2); --text-dim: var(--text-2);
  --bg-glass: rgba(20,15,8,.85); --bg-glass-solid: rgba(20,15,8,.98);
}

[data-theme="midnight"] {
  --bg:#000; --bg-2:#0a0a0a; --bg-3:#141414;
  --gold:#c9a84c; --gold-2:#e8c97a; --gold-3:#f5e4b0;
  --green:#1a6b45; --green-2:#22a36a;
  --text:#f0ece3; --text-2:#aaa8a0; --text-3:#666560;
  --line:rgba(201,168,76,.10); --line-2:rgba(201,168,76,.20);
  --shadow:0 20px 60px rgba(0,0,0,.8); --shadow-sm:0 8px 28px rgba(0,0,0,.5);
  --bg-soft: rgba(255,255,255,.03);
  --gold-soft: var(--gold-2); --text-dim: var(--text-2);
  --bg-glass: rgba(0,0,0,.85); --bg-glass-solid: rgba(0,0,0,.98);
}

[data-theme="ocean"] {
  --bg:#050f14; --bg-2:#0a1a22; --bg-3:#0f2530;
  --gold:#4fb3bf; --gold-2:#7dd3dc; --gold-3:#a8e6ec;
  --green:#1a5f6b; --green-2:#2a8a9a;
  --text:#e8f4f6; --text-2:#a8c4c9; --text-3:#5c7d82;
  --line:rgba(79,179,191,.14); --line-2:rgba(79,179,191,.26);
  --shadow:0 20px 60px rgba(0,0,0,.6); --shadow-sm:0 8px 28px rgba(0,0,0,.4);
  --bg-soft: rgba(255,255,255,.035);
  --gold-soft: var(--gold-2); --text-dim: var(--text-2);
  --bg-glass: rgba(5,15,20,.85); --bg-glass-solid: rgba(5,15,20,.98);
}

/* ── RESET ── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; font-size:16px; overflow-x:hidden; }
body {
  background:var(--bg);
  color:var(--text);
  font-family:'Tajawal',sans-serif;
  line-height:1.8;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
  min-height:100vh;
}
body[data-lang="en"], body[data-lang="fr"] { font-family:'Poppins',sans-serif; }
img { max-width:100%; display:block; }
a { color:inherit; text-decoration:none; }
button { cursor:pointer; font-family:inherit; }

/* ── CANVAS BACKGROUND ── */
#bg3d {
  position:fixed; inset:0; z-index:0;
  pointer-events:none; opacity:.6;
}

/* ── GRAIN TEXTURE ── */
body::before {
  content:'';
  position:fixed; inset:0; z-index:0; pointer-events:none;
  background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity:.025;
  background-size:180px;
}

/* ── GEOMETRIC PATTERN ── */
.pattern {
  position:fixed; inset:0; z-index:0; pointer-events:none;
  opacity:.03;
  background-image:
    repeating-linear-gradient(60deg, var(--gold) 0 .5px, transparent .5px 80px),
    repeating-linear-gradient(-60deg, var(--gold) 0 .5px, transparent .5px 80px),
    repeating-linear-gradient(0deg, var(--gold) 0 .5px, transparent .5px 80px);
}

/* ── GLOW ORBS ── */
.orb {
  position:fixed; border-radius:50%; pointer-events:none; z-index:0;
  filter:blur(80px); opacity:.1;
}
.orb-1 { width:clamp(300px,34vw,620px); height:clamp(300px,34vw,620px); background:var(--green); top:-12vw; right:-10vw; }
.orb-2 { width:clamp(220px,24vw,420px); height:clamp(220px,24vw,420px); background:var(--gold); bottom:-9vw; left:-8vw; }
@media(max-width:900px){
  .orb-1 { width:clamp(220px,60vw,340px); height:clamp(220px,60vw,340px); top:-18vw; right:-16vw; opacity:.08; }
  .orb-2 { width:clamp(160px,45vw,260px); height:clamp(160px,45vw,260px); bottom:-12vw; left:-10vw; opacity:.08; }
}

/* ═══════════════════════════════════════
   NAVIGATION
═══════════════════════════════════════ */
.topbar {
  position:sticky; top:0; z-index:100;
  display:flex; align-items:center; gap:20px;
  justify-content:space-between;
  padding:0 clamp(20px, 5vw, 80px);
  height:68px;
  background:var(--bg-glass);
  backdrop-filter:blur(20px) saturate(180%);
  border-bottom:1px solid var(--line);
  transition:background .3s;
}
.topbar.scrolled { background:var(--bg-glass-solid); }

.brand {
  display:flex; align-items:center; gap:11px;
  flex-shrink:0; text-decoration:none;
}
.brand-logo {
  width:36px; height:36px; border-radius:10px;
  background:linear-gradient(135deg, var(--green) 0%, var(--gold) 100%);
  display:flex; align-items:center; justify-content:center;
  font-size:.9rem; font-weight:900; color:#fff;
  box-shadow:0 0 20px rgba(201,168,76,.3);
  flex-shrink:0;
}
.brand-logo img { width:100%; height:100%; object-fit:cover; border-radius:10px; }
.brand-text h1 {
  font-size:1.1rem; font-weight:900; color:var(--gold-3);
  letter-spacing:.5px; line-height:1.1;
}
.brand-text small {
  font-size:.55rem; letter-spacing:3px; color:var(--text-3);
  font-family:'Poppins',sans-serif; font-weight:400;
}

nav.links {
  flex:1; display:flex; justify-content:center;
  gap:2px; align-items:center;
}
nav.links a {
  color:var(--text-2); font-size:.83rem; font-weight:500;
  padding:7px 12px; border-radius:8px;
  transition:all .2s; position:relative; white-space:nowrap;
}
nav.links a:hover { color:var(--gold-2); background:rgba(201,168,76,.07); }
nav.links a.current {
  color:var(--gold-2);
  background:rgba(201,168,76,.1);
}

.topbar-end { display:flex; align-items:center; gap:10px; flex-shrink:0; }

/* Language select */
.lang-pill {
  display:flex; align-items:center; gap:1px;
  background:var(--bg-3); border:1px solid var(--line-2);
  border-radius:20px; padding:3px; overflow:hidden;
}
.lang-opt {
  padding:5px 11px; border-radius:16px; font-size:.73rem;
  font-weight:700; font-family:'Poppins',sans-serif;
  color:var(--text-3); cursor:pointer; border:none;
  background:transparent; transition:.2s; letter-spacing:.5px;
}
.lang-opt.active { background:var(--gold); color:#1a1208; }
.lang-opt:hover:not(.active) { color:var(--text); }

/* Theme & menu */
.icon-btn {
  width:36px; height:36px; border-radius:10px;
  border:1px solid var(--line-2); background:var(--bg-3);
  color:var(--text-2); display:flex; align-items:center;
  justify-content:center; transition:.2s;
}
.icon-btn:hover { border-color:var(--gold); color:var(--gold-2); }
.icon-btn svg { width:16px; height:16px; stroke:currentColor; fill:none; stroke-width:2; }

.theme-wrap { position:relative; }
.theme-panel {
  position:absolute; top:calc(100% + 10px);
  right:0; min-width:160px;
  background:var(--bg-3); border:1px solid var(--line-2);
  border-radius:var(--r); padding:8px;
  display:none; flex-direction:column; gap:4px;
  box-shadow:var(--shadow-sm); z-index:200;
}
.theme-panel.open { display:flex; }
.theme-option {
  display:flex; align-items:center; gap:9px;
  padding:8px 11px; border-radius:9px; border:none;
  background:transparent; color:var(--text-2);
  font-size:.84rem; font-family:inherit; transition:.2s;
}
.theme-option:hover { background:rgba(201,168,76,.08); color:var(--gold-2); }
.theme-option.active { color:var(--gold-2); background:rgba(201,168,76,.1); }
.theme-swatch { width:14px; height:14px; border-radius:50%; flex-shrink:0; }
.swatch-dark { background:#0d1f1a; border:1.5px solid #2e7d32; }
.swatch-warm { background:#1c150c; border:1.5px solid #d4a84a; }
.swatch-midnight { background:#000; border:1.5px solid #c9a84c; }
.swatch-ocean { background:#0a1a22; border:1.5px solid #4fb3bf; }
.swatch-light { background:#f7f4ec; border:1.5px solid #b9892f; }

.menu-toggle {
  display:none; background:var(--bg-3); border:1px solid var(--line-2);
  color:var(--text-2); border-radius:9px;
  width:38px; height:38px; align-items:center; justify-content:center;
  font-size:1.1rem; transition:.2s;
}

/* ═══════════════════════════════════════
   HERO
═══════════════════════════════════════ */
.hero {
  position:relative; z-index:1;
  min-height:calc(100vh - 68px);
  display:flex; flex-direction:column;
  align-items:center; justify-content:center;
  text-align:center;
  padding:80px clamp(20px,8vw,140px) 100px;
  overflow:hidden;
}

/* Big decorative Arabic letter behind hero */
.hero-bg-letter {
  position:absolute; inset:0; z-index:0;
  display:flex; align-items:center; justify-content:center;
  pointer-events:none; overflow:hidden;
  opacity:.03;
  font-family:'Scheherazade New',serif;
  font-size:clamp(300px,60vw,700px);
  color:var(--gold);
  user-select:none;
  line-height:1;
}

.hero-badge {
  display:inline-flex; align-items:center; gap:8px;
  background:rgba(201,168,76,.08); border:1px solid rgba(201,168,76,.2);
  border-radius:30px; padding:7px 18px; margin-bottom:28px;
  font-size:.8rem; color:var(--gold-2); font-weight:600;
  letter-spacing:1px;
}
.hero-badge-dot {
  width:7px; height:7px; border-radius:50%;
  background:var(--gold); box-shadow:0 0 8px var(--gold);
  animation:pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%,100% { opacity:1; transform:scale(1); }
  50% { opacity:.5; transform:scale(.8); }
}

.hero h1 {
  font-size:clamp(2.6rem, 7vw, 5.5rem);
  font-weight:900;
  line-height:1.15;
  color:var(--text);
  max-width:900px;
  margin-bottom:24px;
}
.hero h1 .highlight {
  background:linear-gradient(120deg, var(--gold-2) 0%, var(--gold-3) 40%, var(--gold) 80%);
  background-size:200% auto;
  -webkit-background-clip:text; background-clip:text;
  color:transparent;
  animation:shimmer 4s linear infinite;
}
@keyframes shimmer {
  0% { background-position:200% center; }
  100% { background-position:-200% center; }
}

.hero-desc {
  font-size:clamp(1rem, 1.8vw, 1.18rem);
  color:var(--text-2);
  max-width:560px;
  margin-bottom:44px;
  line-height:1.9;
}

.hero-cta {
  display:flex; gap:14px; flex-wrap:wrap; justify-content:center;
  margin-bottom:70px;
}

/* Scroll indicator */
.scroll-hint {
  position:absolute; bottom:32px; left:50%; transform:translateX(-50%);
  display:flex; flex-direction:column; align-items:center; gap:8px;
  color:var(--text-3); font-size:.73rem; letter-spacing:2px;
  animation:float-y 2.5s ease-in-out infinite;
}
.scroll-hint-line {
  width:1px; height:44px;
  background:linear-gradient(to bottom, var(--gold), transparent);
}
@keyframes float-y {
  0%,100% { transform:translateX(-50%) translateY(0); }
  50% { transform:translateX(-50%) translateY(8px); }
}

/* Floating cards in hero */
.hero-floats {
  position:absolute; inset:0; pointer-events:none; z-index:0;
}
.hero-float {
  position:absolute;
  background:rgba(201,168,76,.06);
  border:1px solid rgba(201,168,76,.15);
  border-radius:16px; padding:14px 18px;
  font-size:.82rem; color:var(--gold-2);
  white-space:nowrap;
  animation:float-card 6s ease-in-out infinite;
  backdrop-filter:blur(8px);
  display:flex; align-items:center; gap:8px;
}
.hero-float i{ width:15px; height:15px; flex:none; }
.hero-float:nth-child(1) { top:18%; right:6%; animation-delay:0s; }
.hero-float:nth-child(2) { top:40%; right:4%; animation-delay:1.5s; }
.hero-float:nth-child(3) { top:62%; right:7%; animation-delay:3s; }
.hero-float:nth-child(4) { top:20%; left:6%; animation-delay:.8s; }
.hero-float:nth-child(5) { top:55%; left:5%; animation-delay:2.2s; }
@keyframes float-card {
  0%,100% { transform:translateY(0); }
  50% { transform:translateY(-12px); }
}

/* ═══════════════════════════════════════
   BUTTONS
═══════════════════════════════════════ */
.btn {
  display:inline-flex; align-items:center; gap:8px;
  padding:13px 30px; border-radius:12px; font-weight:700;
  font-size:.92rem; font-family:inherit; border:none;
  transition:all .25s; cursor:pointer; text-decoration:none;
  position:relative; overflow:hidden; white-space:nowrap;
}
.btn::before {
  content:''; position:absolute; inset:0;
  background:rgba(255,255,255,0); transition:.25s;
}
.btn:hover::before { background:rgba(255,255,255,.06); }

.btn-primary {
  background:linear-gradient(135deg, var(--gold) 0%, var(--gold-2) 100%);
  color:#1a1208;
  box-shadow:0 6px 28px rgba(201,168,76,.35);
}
.btn-primary:hover { box-shadow:0 10px 40px rgba(201,168,76,.5); transform:translateY(-1px); }

.btn-ghost {
  background:transparent;
  border:1.5px solid var(--line-2);
  color:var(--text-2);
}
.btn-ghost:hover { border-color:var(--gold); color:var(--gold-2); }

.btn-green {
  background:linear-gradient(135deg, var(--green) 0%, var(--green-2) 100%);
  color:#fff;
  box-shadow:0 6px 28px rgba(26,107,69,.4);
}
.btn-green:hover { box-shadow:0 10px 40px rgba(26,107,69,.6); transform:translateY(-1px); }

.btn svg { width:16px; height:16px; stroke:currentColor; fill:none; stroke-width:2.5; flex-shrink:0; }
.btn-sm { padding:9px 20px; font-size:.83rem; border-radius:9px; }

/* ═══════════════════════════════════════
   SECTIONS
═══════════════════════════════════════ */
.section {
  position:relative; z-index:1;
  padding:90px clamp(20px,7vw,120px);
}
.section-sm { padding:50px clamp(20px,7vw,120px); }
.section-center { text-align:center; }

.section-badge {
  display:inline-flex; align-items:center; gap:7px;
  background:rgba(201,168,76,.07); border:1px solid rgba(201,168,76,.18);
  border-radius:20px; padding:5px 14px; margin-bottom:16px;
  font-size:.73rem; color:var(--gold); letter-spacing:2px; font-weight:700;
  text-transform:uppercase;
}

.section-title {
  font-size:clamp(1.8rem, 4vw, 3rem);
  font-weight:900; color:var(--text);
  margin-bottom:14px; line-height:1.2;
}
.section-title .accent { color:var(--gold-2); }

.section-desc {
  font-size:1rem; color:var(--text-2);
  max-width:560px; margin:0 auto;
  line-height:1.9;
}

/* ═══════════════════════════════════════
   QUICK ACCESS BAR
═══════════════════════════════════════ */
.quick-bar {
  position:relative; z-index:1;
  padding:0 clamp(20px,5vw,80px) 60px;
}
.quick-bar-inner {
  display:flex; gap:10px; flex-wrap:wrap; justify-content:center;
}
.quick-chip {
  display:inline-flex; align-items:center; gap:7px;
  padding:10px 20px; border-radius:40px;
  background:var(--bg-2); border:1px solid var(--line);
  color:var(--text-2); font-size:.85rem; font-weight:600;
  transition:all .2s; text-decoration:none;
}
.quick-chip:hover {
  background:rgba(201,168,76,.08);
  border-color:var(--gold); color:var(--gold-2);
  transform:translateY(-2px);
  box-shadow:0 8px 24px rgba(201,168,76,.15);
}
.quick-chip svg { width:15px; height:15px; stroke:currentColor; fill:none; stroke-width:2; }

/* ═══════════════════════════════════════
   STATS
═══════════════════════════════════════ */
.stats-row {
  display:grid;
  grid-template-columns:repeat(5, 1fr);
  gap:1px;
  background:var(--line);
  border:1px solid var(--line);
  border-radius:var(--r-lg);
  overflow:hidden;
  max-width:900px;
  margin:0 auto;
}
.stat-item {
  background:var(--bg-2);
  padding:36px 20px;
  text-align:center;
  transition:background .2s;
}
.stat-item:hover { background:var(--bg-3); }
.stat-num {
  font-size:2.6rem; font-weight:900;
  font-family:'Poppins',sans-serif;
  background:linear-gradient(135deg, var(--gold) 0%, var(--gold-3) 100%);
  -webkit-background-clip:text; background-clip:text; color:transparent;
  display:block; line-height:1;
}
.stat-label {
  font-size:.78rem; color:var(--text-3);
  margin-top:6px; font-weight:500;
}

/* ═══════════════════════════════════════
   AYAH FEATURE
═══════════════════════════════════════ */
.ayah-feature {
  position:relative; z-index:1;
  padding:80px clamp(20px,7vw,120px);
  text-align:center;
}
.ayah-card {
  max-width:780px; margin:0 auto;
  background:linear-gradient(135deg, rgba(26,107,69,.12) 0%, rgba(201,168,76,.08) 100%);
  border:1px solid rgba(201,168,76,.2);
  border-radius:24px;
  padding:56px 48px;
  position:relative; overflow:hidden;
}
.ayah-card::before {
  content:'"'; position:absolute;
  font-family:'Scheherazade New',serif;
  font-size:200px; color:var(--gold); opacity:.04;
  top:-40px; right:20px; line-height:1; pointer-events:none;
}
.ayah-text {
  font-family:'Scheherazade New',serif;
  font-size:clamp(1.4rem, 3.5vw, 2.2rem);
  color:var(--gold-2); line-height:2.2;
  margin-bottom:20px; font-weight:700;
}
.ayah-ref {
  font-size:.82rem; color:var(--text-3);
  letter-spacing:2px; text-transform:uppercase;
  font-family:'Poppins',sans-serif;
}

/* ═══════════════════════════════════════
   FEATURE CARDS
═══════════════════════════════════════ */
.features-grid {
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(300px, 1fr));
  gap:16px;
}

.feature-card {
  background:var(--bg-2);
  border:1px solid var(--line);
  border-radius:var(--r-lg);
  padding:32px 28px;
  transition:all .3s;
  position:relative;
  overflow:hidden;
  text-decoration:none; color:inherit;
  display:block;
}
.feature-card::before {
  content:''; position:absolute;
  top:0; right:0; width:200px; height:200px;
  background:radial-gradient(circle, rgba(201,168,76,.06) 0%, transparent 70%);
  pointer-events:none; transition:.3s;
}
.feature-card:hover {
  border-color:rgba(201,168,76,.35);
  transform:translateY(-4px);
  box-shadow:0 24px 60px rgba(0,0,0,.4);
}
.feature-card:hover::before { opacity:2; }

.fc-icon {
  width:50px; height:50px; border-radius:14px;
  background:linear-gradient(135deg, rgba(26,107,69,.3) 0%, rgba(201,168,76,.15) 100%);
  border:1px solid rgba(201,168,76,.15);
  display:flex; align-items:center; justify-content:center;
  margin-bottom:20px; flex-shrink:0;
}
.fc-icon svg { width:22px; height:22px; stroke:var(--gold); fill:none; stroke-width:1.8; }
.fc-title { font-size:1.05rem; font-weight:800; margin-bottom:8px; color:var(--text); }
.fc-desc { font-size:.86rem; color:var(--text-3); line-height:1.75; }
.fc-arrow {
  margin-top:20px; display:inline-flex; align-items:center; gap:5px;
  font-size:.8rem; color:var(--gold); font-weight:600; opacity:0;
  transition:.25s; transform:translateX(6px);
}
.feature-card:hover .fc-arrow { opacity:1; transform:translateX(0); }
.fc-arrow svg { width:14px; height:14px; stroke:currentColor; fill:none; stroke-width:2.5; }

/* ═══════════════════════════════════════
   BENTO GRID (Homepage)
═══════════════════════════════════════ */
.bento-grid {
  display:grid;
  grid-template-columns:repeat(12, 1fr);
  grid-auto-rows:180px;
  gap:14px;
}
.bento-cell {
  background:var(--bg-2); border:1px solid var(--line);
  border-radius:var(--r-lg); overflow:hidden;
  position:relative; transition:all .3s;
  text-decoration:none; color:inherit;
  display:flex; flex-direction:column;
  padding:28px;
}
.bento-cell:hover { border-color:rgba(201,168,76,.3); transform:translateY(-3px); box-shadow:var(--shadow-sm); }

.bento-cell.span-4 { grid-column:span 4; }
.bento-cell.span-6 { grid-column:span 6; }
.bento-cell.span-8 { grid-column:span 8; }
.bento-cell.span-12 { grid-column:span 12; }
.bento-cell.row-2 { grid-row:span 2; }

.bento-icon {
  width:44px; height:44px; border-radius:12px;
  background:rgba(201,168,76,.1); border:1px solid rgba(201,168,76,.15);
  display:flex; align-items:center; justify-content:center; margin-bottom:14px;
}
.bento-icon svg { width:20px; height:20px; stroke:var(--gold); fill:none; stroke-width:1.8; }
.bento-title { font-size:.95rem; font-weight:800; margin-bottom:6px; }
.bento-desc { font-size:.8rem; color:var(--text-3); line-height:1.65; }
.bento-tag {
  margin-top:auto; font-size:.7rem; font-weight:700; letter-spacing:1.5px;
  color:var(--gold); text-transform:uppercase; opacity:.7;
}

/* Decorative bento backgrounds */
.bento-cell.bento-quran {
  background:linear-gradient(135deg, rgba(26,107,69,.2) 0%, var(--bg-2) 100%);
}
.bento-cell.bento-prayer {
  background:linear-gradient(135deg, rgba(15,30,60,.35) 0%, var(--bg-2) 100%);
}
.bento-cell.bento-stories {
  background:linear-gradient(135deg, rgba(80,20,20,.22) 0%, var(--bg-2) 100%);
}
.bento-cell.bento-gold {
  background:linear-gradient(135deg, rgba(100,75,20,.22) 0%, var(--bg-2) 100%);
}

/* Big bento cell with arabic quote */
.bento-quote-text {
  font-family:'Scheherazade New',serif;
  font-size:1.3rem; line-height:2.2; color:var(--gold-2);
  margin-bottom:10px;
}
.bento-quote-ref { font-size:.75rem; color:var(--text-3); letter-spacing:1px; }

/* ═══════════════════════════════════════
   CTA BAND
═══════════════════════════════════════ */
.cta-band {
  position:relative; z-index:1;
  margin:0 clamp(20px,4vw,60px);
  border-radius:28px;
  padding:70px 60px;
  overflow:hidden;
  text-align:center;
  background:linear-gradient(135deg, rgba(26,107,69,.35) 0%, rgba(201,168,76,.15) 50%, rgba(26,107,69,.2) 100%);
  border:1px solid rgba(201,168,76,.25);
}
.cta-band::before {
  content:''; position:absolute; inset:0;
  background:url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='200' cy='200' r='180' fill='none' stroke='rgba(201,168,76,.05)' stroke-width='1'/%3E%3Ccircle cx='200' cy='200' r='140' fill='none' stroke='rgba(201,168,76,.04)' stroke-width='1'/%3E%3Ccircle cx='200' cy='200' r='100' fill='none' stroke='rgba(201,168,76,.03)' stroke-width='1'/%3E%3C/svg%3E");
  background-size:500px; background-position:center;
  pointer-events:none;
}
.cta-band h2 { font-size:clamp(1.6rem,3.5vw,2.6rem); font-weight:900; margin-bottom:14px; }
.cta-band p { color:var(--text-2); max-width:480px; margin:0 auto 36px; line-height:1.9; }

/* ═══════════════════════════════════════
   PAGE HERO (inner pages)
═══════════════════════════════════════ */
.page-hero {
  position:relative; z-index:1;
  padding:70px clamp(20px,7vw,120px) 50px;
  text-align:center;
  border-bottom:1px solid var(--line);
  background:linear-gradient(to bottom, rgba(26,107,69,.06) 0%, transparent 100%);
}
.page-hero-badge {
  display:inline-flex; align-items:center; gap:7px;
  background:rgba(201,168,76,.08); border:1px solid rgba(201,168,76,.18);
  border-radius:20px; padding:5px 14px; margin-bottom:18px;
  font-size:.72rem; color:var(--gold); letter-spacing:2px; text-transform:uppercase; font-weight:700;
}
.page-hero h2 {
  font-size:clamp(2rem, 5vw, 3.5rem); font-weight:900;
  color:var(--text); margin-bottom:14px; line-height:1.2;
}
.page-hero p {
  color:var(--text-2); max-width:550px; margin:0 auto;
  font-size:1rem; line-height:1.85;
}

/* ═══════════════════════════════════════
   CARDS (generic)
═══════════════════════════════════════ */
.card-grid {
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(280px, 1fr));
  gap:16px;
}
.card {
  background:var(--bg-2); border:1px solid var(--line);
  border-radius:var(--r-lg); padding:28px 24px;
  transition:all .25s; position:relative; overflow:hidden;
  text-decoration:none; color:inherit; display:block;
}
.card:hover {
  border-color:rgba(201,168,76,.3);
  transform:translateY(-3px);
  box-shadow:var(--shadow-sm);
}
.card-icon {
  width:46px; height:46px; border-radius:13px;
  background:rgba(201,168,76,.1); border:1px solid rgba(201,168,76,.15);
  display:flex; align-items:center; justify-content:center;
  margin-bottom:18px;
}
.card-icon svg { width:20px; height:20px; stroke:var(--gold); fill:none; stroke-width:1.8; }
.card-title { font-size:1rem; font-weight:800; margin-bottom:7px; color:var(--text); }
.card-desc { font-size:.86rem; color:var(--text-3); line-height:1.7; }

/* ═══════════════════════════════════════
   DIVIDER
═══════════════════════════════════════ */
.divider {
  height:1px; margin:0 clamp(20px,7vw,120px);
  background:linear-gradient(90deg, transparent, var(--line-2) 30%, var(--gold) 50%, var(--line-2) 70%, transparent);
}

/* ═══════════════════════════════════════
   FOOTER
═══════════════════════════════════════ */
footer {
  position:relative; z-index:1;
  padding:70px clamp(20px,7vw,120px) 40px;
  border-top:1px solid var(--line);
  text-align:center;
}
.footer-logo {
  display:inline-flex; align-items:center; gap:10px;
  margin-bottom:20px;
}
.footer-logo-mark {
  width:38px; height:38px; border-radius:10px;
  background:linear-gradient(135deg, var(--green), var(--gold));
  display:flex; align-items:center; justify-content:center;
  font-size:1rem; color:#fff; font-weight:900;
}
.footer-brand { font-size:1.1rem; font-weight:900; color:var(--gold-2); }
.footer-tagline { color:var(--text-3); font-size:.85rem; margin-bottom:32px; line-height:1.7; }

.footer-links {
  display:flex; flex-wrap:wrap; justify-content:center;
  gap:8px 6px; margin-bottom:32px;
}
.footer-link {
  padding:6px 14px; border-radius:8px;
  font-size:.8rem; color:var(--text-3);
  border:1px solid transparent; transition:.2s;
}
.footer-link:hover { color:var(--gold-2); border-color:var(--line); }

.footer-social {
  display:flex; justify-content:center; gap:10px; margin-bottom:36px;
}
.social-icon {
  width:40px; height:40px; border-radius:11px;
  border:1px solid var(--line); background:var(--bg-2);
  display:flex; align-items:center; justify-content:center;
  color:var(--text-3); font-size:.85rem; transition:.2s;
}
.social-icon:hover { border-color:var(--gold); color:var(--gold-2); transform:translateY(-2px); }
.social-icon svg { width:16px; height:16px; stroke:currentColor; fill:none; stroke-width:2; }

.footer-copy { font-size:.78rem; color:var(--text-3); line-height:1.8; }
.footer-quote {
  font-family:'Scheherazade New',serif;
  font-size:1rem; color:var(--gold-2); opacity:.6;
  margin-bottom:10px;
}

/* Daily quote in footer */
.daily-quote-wrap {
  max-width:500px; margin:0 auto 36px;
  padding:20px 24px;
  background:rgba(201,168,76,.05);
  border:1px solid rgba(201,168,76,.12);
  border-radius:14px;
}
.daily-label { font-size:.72rem; color:var(--gold); letter-spacing:2px; text-transform:uppercase; margin-bottom:8px; }
#daily-quote { font-size:.9rem; color:var(--text-2); line-height:1.8; }

/* ═══════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════ */
.reveal { opacity:0; transform:translateY(28px); transition:opacity .7s ease, transform .7s ease; }
.reveal.in { opacity:1; transform:translateY(0); }
.reveal-up { opacity:0; transform:translateY(40px); transition:opacity .6s ease, transform .6s ease; }
.reveal-up.in { opacity:1; transform:translateY(0); }
.reveal-scale { opacity:0; transform:scale(.95); transition:opacity .5s ease, transform .5s ease; }
.reveal-scale.in { opacity:1; transform:scale(1); }

.stagger > * { opacity:0; transform:translateY(20px); transition:opacity .5s ease, transform .5s ease; }
.stagger.in > *:nth-child(1) { opacity:1; transform:translateY(0); transition-delay:.05s; }
.stagger.in > *:nth-child(2) { opacity:1; transform:translateY(0); transition-delay:.12s; }
.stagger.in > *:nth-child(3) { opacity:1; transform:translateY(0); transition-delay:.19s; }
.stagger.in > *:nth-child(4) { opacity:1; transform:translateY(0); transition-delay:.26s; }
.stagger.in > *:nth-child(5) { opacity:1; transform:translateY(0); transition-delay:.33s; }
.stagger.in > *:nth-child(6) { opacity:1; transform:translateY(0); transition-delay:.40s; }
.stagger.in > *:nth-child(7) { opacity:1; transform:translateY(0); transition-delay:.47s; }
.stagger.in > *:nth-child(8) { opacity:1; transform:translateY(0); transition-delay:.54s; }

@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }

/* ═══════════════════════════════════════
   LEGACY COMPAT (for inner pages)
═══════════════════════════════════════ */
.lp-section { padding:80px clamp(20px,7vw,120px); position:relative; z-index:1; }
.lp-section-head { text-align:center; margin-bottom:50px; }
.lp-section-head h2 { font-size:clamp(1.8rem,4vw,2.8rem); font-weight:900; }
.lp-section-head p { color:var(--text-2); max-width:520px; margin:12px auto 0; font-size:.95rem; }
.lp-features { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:16px; }
.lp-feature {
  display:flex; align-items:flex-start; gap:18px;
  background:var(--bg-2); border:1px solid var(--line);
  border-radius:var(--r-lg); padding:28px;
  transition:all .25s; text-decoration:none; color:inherit;
}
.lp-feature:hover { border-color:rgba(201,168,76,.3); transform:translateY(-3px); box-shadow:var(--shadow-sm); }
.feat-icon { width:46px; height:46px; border-radius:13px; background:rgba(201,168,76,.1); border:1px solid rgba(201,168,76,.15); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.feat-icon svg { width:22px; height:22px; stroke:var(--gold); fill:none; stroke-width:1.7; }
.lp-feature h3 { font-size:.98rem; font-weight:800; margin-bottom:6px; }
.lp-feature p { font-size:.85rem; color:var(--text-3); line-height:1.7; }

.lp-stats { display:grid; grid-template-columns:repeat(5,1fr); gap:1px; background:var(--line); border:1px solid var(--line); border-radius:var(--r-lg); overflow:hidden; max-width:860px; margin:0 auto; }
.lp-stat { background:var(--bg-2); padding:32px 16px; text-align:center; }
.lp-stat-num { font-size:2.2rem; font-weight:900; font-family:'Poppins',sans-serif; background:linear-gradient(135deg,var(--gold),var(--gold-3)); -webkit-background-clip:text; background-clip:text; color:transparent; display:block; }
.lp-stat-label { font-size:.75rem; color:var(--text-3); margin-top:4px; }

.lp-cta-band { margin:0 clamp(20px,4vw,60px); border-radius:28px; padding:70px 60px; text-align:center; background:linear-gradient(135deg,rgba(26,107,69,.3),rgba(201,168,76,.12),rgba(26,107,69,.2)); border:1px solid rgba(201,168,76,.22); position:relative; z-index:1; overflow:hidden; }
.lp-cta-band h2 { font-size:clamp(1.6rem,3.5vw,2.5rem); font-weight:900; margin-bottom:12px; }
.lp-cta-band p { color:var(--text-2); max-width:480px; margin:0 auto 32px; }

/* Old quick-access */
.quick-access { display:flex; gap:10px; flex-wrap:wrap; justify-content:center; }
.qa-btn { display:inline-flex; align-items:center; gap:7px; padding:10px 20px; border-radius:40px; background:var(--bg-2); border:1px solid var(--line); color:var(--text-2); font-size:.85rem; font-weight:600; transition:.2s; }
.qa-btn:hover { background:rgba(201,168,76,.08); border-color:var(--gold); color:var(--gold-2); transform:translateY(-2px); }

/* Old .grid .card */
.grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:16px; }
.card .icon { width:46px; height:46px; border-radius:13px; background:rgba(201,168,76,.1); border:1px solid rgba(201,168,76,.15); display:flex; align-items:center; justify-content:center; margin-bottom:18px; }
.card .icon svg { width:20px; height:20px; stroke:var(--gold); fill:none; stroke-width:1.8; }

/* "Coming soon" badge for sections still under active development */
.soon-badge{
  position:absolute; top:14px; left:14px;
  display:inline-flex; align-items:center; gap:5px;
  background:rgba(201,168,76,.14); border:1px solid rgba(201,168,76,.3);
  color:var(--gold-2); font-size:.68rem; font-weight:800;
  padding:4px 10px; border-radius:20px; letter-spacing:.3px;
  z-index:2; backdrop-filter:blur(6px);
}
.soon-badge svg{ width:11px; height:11px; stroke:currentColor; fill:none; stroke-width:2.5; }
a.card:has(.soon-badge), a.bento-cell:has(.soon-badge), a.feature-card:has(.soon-badge) { position:relative; }
.soon-banner{
  max-width:900px; margin:0 auto 30px; padding:14px 22px;
  display:flex; align-items:center; gap:10px;
  background:rgba(201,168,76,.08); border:1px solid rgba(201,168,76,.22);
  border-radius:14px; color:var(--gold-2); font-size:.86rem;
}
.soon-banner svg{ width:18px; height:18px; stroke:currentColor; fill:none; stroke-width:2; flex-shrink:0; }
.card h4 { font-size:1rem; font-weight:800; margin-bottom:7px; color:var(--gold-2); }
.card p { font-size:.86rem; color:var(--text-3); line-height:1.7; }
.card.anim-card { opacity:1; }

/* Buttons compat */
.btn.primary { background:linear-gradient(135deg,var(--gold),var(--gold-2)); color:#1a1208; box-shadow:0 6px 28px rgba(201,168,76,.3); font-weight:700; }
.btn.primary:hover { box-shadow:0 10px 40px rgba(201,168,76,.5); transform:translateY(-1px); }
.btn.ghost { background:transparent; border:1.5px solid var(--line-2); color:var(--text-2); }
.btn.ghost:hover { border-color:var(--gold); color:var(--gold-2); }
.more { display:inline-flex; align-items:center; gap:6px; padding:9px 20px; border:1px solid var(--gold); border-radius:30px; color:var(--gold-2); font-weight:700; font-size:.86em; text-decoration:none; transition:.3s; }
.more:hover { background:var(--gold); color:#1a1208; }

/* ═══════════════════════════════════════
   INNER PAGES — article, story
═══════════════════════════════════════ */
.article-body { max-width:760px; margin:0 auto; padding:0 clamp(20px,7vw,120px) 90px; }
.story-detail { max-width:820px; margin:0 auto; padding:0 clamp(20px,7vw,120px) 90px; text-align:center; position:relative; z-index:1; }
.back-link { display:inline-flex; align-items:center; gap:6px; margin:30px clamp(20px,7vw,120px) 14px; color:var(--gold); text-decoration:none; font-weight:700; position:relative; z-index:1; font-size:.9rem; }
.back-link:hover { opacity:.8; }
.ayah-block { text-align:center; padding:70px clamp(20px,7vw,120px); position:relative; z-index:1; }
.ayah-block .quote { font-size:clamp(1.3em,3.5vw,2.2em); color:var(--gold-2); font-weight:700; max-width:800px; margin:0 auto 16px; line-height:2; font-family:'Scheherazade New',serif; }
.ayah-block .ref { color:var(--text-3); letter-spacing:2px; font-size:.88em; }

/* ═══════════════════════════════════════
   QURAN — mushaf reader, audio, tafsir, tajweed
   (previously unstyled — page rendered as bare HTML)
═══════════════════════════════════════ */
:root { --quran-font: 1; }

.quran-controls{
  display:flex; align-items:center; gap:14px; flex-wrap:wrap;
  max-width:900px; margin:0 auto 18px; padding:0 4vw;
}
.quran-controls label{ color:var(--text-dim); font-size:.88rem; white-space:nowrap; }
#surahSelect, #reciterSelect, #tafsirSource, #mushafStyle{
  flex:1; min-width:180px; padding:13px 18px; border-radius:12px;
  border:1px solid var(--line); background:var(--bg-soft); color:var(--text);
  font-family:inherit; font-size:1rem; cursor:pointer; outline:none;
  transition:border-color .2s; min-height:48px;
}
#surahSelect{ font-weight:700; }
#surahSelect:focus, #reciterSelect:focus, #tafsirSource:focus, #mushafStyle:focus{ border-color:var(--gold); }
@media(max-width:700px){
  #surahSelect, #reciterSelect, #tafsirSource, #mushafStyle{ min-width:100%; font-size:1.02rem; }
}

.quran-toolbar{
  display:flex; align-items:center; gap:22px; flex-wrap:wrap;
  max-width:900px; margin:0 auto 16px; padding:12px 4vw;
  border-top:1px solid var(--line); border-bottom:1px solid var(--line);
}
.quran-toolbar .group{ display:flex; align-items:center; gap:8px; }
.quran-toolbar .group label{ color:var(--text-dim); font-size:.82rem; }
.tool-btn{
  padding:7px 14px; border-radius:10px; border:1px solid var(--line);
  background:var(--bg-soft); color:var(--text); font-family:inherit;
  font-size:.86rem; transition:border-color .2s,color .2s;
}
.tool-btn:hover{ border-color:var(--gold); color:var(--gold-2); }
.tool-btn.active{ border-color:var(--gold); background:rgba(201,168,76,.14); color:var(--gold-2); }

/* memorization marks legend */
/* tajweed color legend */
.tajweed-legend{
  max-width:900px; margin:0 auto 20px; padding:18px 4vw;
  border:1px solid var(--line); border-radius:var(--r-lg);
  background:var(--bg-2);
}
.tajweed-legend strong{ display:block; color:var(--gold-2); font-size:.95rem; margin-bottom:12px; }
.tw-legend-row{ display:inline-flex; align-items:center; gap:8px; margin:0 16px 10px 0; font-size:.86rem; color:var(--text-2); }
.tw-swatch{ width:14px; height:14px; border-radius:4px; display:inline-block; flex:none; }
.tw-swatch.tw-ghunnah{ background:#e07a9e; }
.tw-swatch.tw-qalqalah{ background:#e08a3c; }
.tw-swatch.tw-madd_normal{ background:#d94b4b; }
.tw-swatch.tw-ikhfa{ background:#4b8fd9; }
.tw-swatch.tw-idgham{ background:#9b6bd9; }
.tw-swatch.tw-ham_wasl{ background:#8a9099; }
.tw-disclaimer{ margin-top:6px; font-size:.78rem; color:var(--text-3); line-height:1.7; }
.tw-guide-link{ display:inline-block; margin-top:12px; color:var(--gold); font-size:.85rem; font-weight:700; text-decoration:none; }
.tw-guide-link:hover{ color:var(--gold-2); }

/* tajweed-colored spans inside ayah text */
.tw-ghunnah{ color:#e07a9e; }
.tw-qalqalah{ color:#e08a3c; font-weight:700; }
.tw-madd_normal{ color:#d94b4b; font-weight:700; }
.tw-ikhfa{ color:#4b8fd9; }
.tw-idgham{ color:#9b6bd9; }
.tw-ham_wasl{ color:#8a9099; }
.tw-other{ color:inherit; }

/* per-ayah cards (default reading mode) */
#quran-ayat{ max-width:900px; margin:0 auto; padding:0 4vw 70px; display:flex; flex-direction:column; gap:16px; }
.ayah-card{
  background:var(--bg-2); border:1px solid var(--line); border-radius:var(--r-lg);
  padding:22px 24px; transition:border-color .3s, box-shadow .3s;
}
.ayah-card.playing{ border-color:var(--gold); box-shadow:0 0 0 1px var(--gold) inset; }
.ayah-card.mark-memorize{ border-inline-start:3px solid #e9c46a; }
.ayah-card.mark-review{ border-inline-start:3px solid #e76f51; }
.ayah-card.mark-done{ border-inline-start:3px solid #2a9d8f; }
.ayah-top{ display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.ayah-num{
  width:32px; height:32px; border-radius:50%; border:1px solid var(--line-2);
  display:flex; align-items:center; justify-content:center;
  font-size:.8rem; color:var(--gold-2); font-family:'Poppins',sans-serif;
}
.play-btn{
  width:34px; height:34px; border-radius:50%; border:1px solid var(--line-2);
  background:var(--bg-soft); color:var(--gold-2); font-size:.85rem;
  display:flex; align-items:center; justify-content:center; transition:.2s;
}
.play-btn:hover{ border-color:var(--gold); background:rgba(201,168,76,.14); }
.ayah-arabic{
  font-family:'Amiri Quran','Scheherazade New',serif;
  font-size:calc(1.7rem * var(--quran-font));
  line-height:2.4; color:var(--text); text-align:justify; margin-bottom:10px;
}
.style-simple .ayah-arabic{ font-family:'Scheherazade New',serif; }
.ayah-translation{ font-size:.94rem; color:var(--text-2); line-height:1.9; }
.ayah-translation strong{ color:var(--gold-2); }

/* page / mushaf-flow mode */
.mushaf-page{ max-width:900px; margin:0 auto; padding:0 4vw 70px; }
.mushaf-banner{
  text-align:center; color:var(--gold-2); font-weight:800; font-size:1.1rem;
  margin-bottom:22px; padding-bottom:14px; border-bottom:1px solid var(--line);
}
.mushaf-flow{
  font-family:'Amiri Quran','Scheherazade New',serif;
  font-size:calc(1.6rem * var(--quran-font));
  line-height:2.6; text-align:justify; color:var(--text);
}
.page-ayah-num{
  display:inline-flex; align-items:center; justify-content:center;
  width:1.6em; height:1.6em; border-radius:50%; border:1px solid var(--line-2);
  font-size:.5em; vertical-align:middle; margin:0 4px; color:var(--gold-2); cursor:pointer;
}
.page-ayah-num.playing{ background:var(--gold); color:#1a1208; border-color:var(--gold); }

@media(max-width:700px){
  .quran-controls, .quran-toolbar{ flex-direction:column; align-items:stretch; }
  .ayah-arabic{ font-size:calc(1.4rem * var(--quran-font)); }
  .mushaf-flow{ font-size:calc(1.3rem * var(--quran-font)); }
}

/* ═══════════════════════════════════════
   PRAYER, TOOLS, etc.
═══════════════════════════════════════ */
/* ═══════════════════════════════════════
   PRAYER, QIBLA, HIJRI, ZAKAT, TRACKER,
   CONTACT, SEARCH — previously unstyled pages
═══════════════════════════════════════ */
.lead{ max-width:640px; margin:0 auto; text-align:center; color:var(--text-dim); font-size:1rem; line-height:1.9; }
.section-head{ max-width:900px; margin:34px auto 18px; padding:0 4vw; }
.section-head h3{ font-size:1.15rem; color:var(--gold-2); font-weight:800; }

/* -- Prayer times -- */
#location-status{ text-align:center; color:var(--text-dim); font-size:.86rem; margin-bottom:22px; }
.prayer-wrap{ max-width:760px; margin:0 auto; padding:0 4vw; display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
.prayer-cell{ background:var(--bg-2); border:1px solid var(--line); border-radius:var(--r-lg); padding:22px 14px; text-align:center; transition:border-color .3s,transform .3s; }
.prayer-cell .name{ font-size:.88rem; color:var(--text-dim); margin-bottom:8px; }
.prayer-cell .time{ font-size:1.5rem; font-weight:800; font-family:'Poppins',sans-serif; color:var(--text); }
.prayer-cell.next-prayer{ border-color:var(--gold); background:linear-gradient(135deg,rgba(201,168,76,.14),rgba(26,107,69,.08)); transform:translateY(-3px); }
.prayer-cell.next-prayer .name{ color:var(--gold-2); }
.prayer-cell.next-prayer .time{ color:var(--gold-2); }
#next-prayer-label{ text-align:center; margin:26px auto 6px; color:var(--gold-2); font-weight:700; font-size:1.02rem; }
.prayer-note{ text-align:center; color:var(--text-3); font-size:.82rem; margin-top:14px; }
@media(max-width:600px){ .prayer-wrap{ grid-template-columns:repeat(2,1fr); } }

/* -- Qibla compass -- */
.qibla-compass{ width:220px; height:220px; margin:30px auto; border-radius:50%; border:2px solid var(--line-2); background:radial-gradient(circle,var(--bg-2) 0%,var(--bg-3) 100%); display:flex; align-items:center; justify-content:center; position:relative; box-shadow:var(--shadow-sm); }
.qibla-compass::before{ content:''; position:absolute; inset:14px; border-radius:50%; border:1px dashed var(--line-2); }
.qibla-arrow{ display:flex; align-items:center; justify-content:center; width:56px; height:56px; color:var(--gold); transition:transform .3s ease; }
.qibla-arrow svg{ width:100%; height:100%; }
#qiblaResult{ text-align:center; }
.qibla-degrees{ font-size:2.2rem; font-weight:900; font-family:'Poppins',sans-serif; color:var(--gold-2); }

/* -- Hijri calendar -- */
.hijri-today{ text-align:center; font-size:1.6rem; font-weight:800; color:var(--gold-2); margin:10px auto 30px; }
.hijri-events{ max-width:700px; margin:0 auto; padding:0 4vw 60px; display:flex; flex-direction:column; gap:10px; }
.hijri-event{ background:var(--bg-2); border:1px solid var(--line); border-inline-start:3px solid var(--gold); border-radius:12px; padding:14px 20px; font-size:.92rem; color:var(--text-2); }

/* -- Zakat calculator -- */
.zakat-form{ max-width:480px; margin:0 auto; padding:0 4vw 70px; display:flex; flex-direction:column; gap:14px; }
.zakat-form label{ font-size:.86rem; color:var(--text-dim); margin-bottom:-6px; }
.zakat-form input{ padding:12px 16px; border-radius:12px; border:1px solid var(--line); background:var(--bg-soft); color:var(--text); font-family:inherit; font-size:1rem; outline:none; transition:border-color .2s; }
.zakat-form input:focus{ border-color:var(--gold); }
.zakat-result{ text-align:center; background:var(--bg-2); border:1px solid var(--line); border-radius:var(--r-lg); padding:22px; margin-top:6px; }
.zakat-result .amount{ font-size:2rem; font-weight:900; color:var(--gold-2); font-family:'Poppins',sans-serif; margin-top:6px; }

/* -- Quran wird tracker -- */
.tracker-form{ max-width:520px; margin:0 auto; padding:0 4vw; display:flex; gap:10px; }
.tracker-form input{ flex:1; padding:12px 16px; border-radius:12px; border:1px solid var(--line); background:var(--bg-soft); color:var(--text); font-family:inherit; font-size:.95rem; outline:none; }
.tracker-form input:focus{ border-color:var(--gold); }
.tracker-form button{ padding:12px 22px; border-radius:12px; border:none; background:var(--gold); color:#1a1208; font-weight:800; font-size:.9rem; }
.tracker-total{ max-width:520px; margin:22px auto; padding:0 4vw; text-align:center; font-size:1.2rem; color:var(--text-2); }
.tracker-total span:last-child{ color:var(--gold-2); font-weight:900; font-family:'Poppins',sans-serif; }
#trackerLogList{ max-width:520px; margin:0 auto; padding:0 4vw; display:flex; flex-direction:column; gap:8px; }
#trackerLogList .log-row{ display:flex; justify-content:space-between; background:var(--bg-2); border:1px solid var(--line); border-radius:10px; padding:10px 16px; font-size:.86rem; color:var(--text-2); }
.tracker-reset{ display:block; margin:24px auto 60px; padding:9px 20px; border-radius:20px; border:1px solid var(--line); background:var(--bg-soft); color:var(--text-3); font-family:inherit; font-size:.82rem; }
.tracker-reset:hover{ border-color:#d94b4b; color:#d94b4b; }

/* -- Contact -- */
.contact-discord{ max-width:460px; margin:0 auto 70px; padding:36px 30px; text-align:center; background:var(--bg-2); border:1px solid var(--line); border-radius:var(--r-lg); }
.contact-discord img{ width:64px; height:64px; border-radius:16px; margin:0 auto 18px; object-fit:cover; }
.discord-btn{ display:inline-flex; align-items:center; gap:9px; padding:13px 26px; border-radius:30px; background:var(--gold); color:#1a1208; font-weight:800; font-size:.92rem; }
.discord-btn:hover{ box-shadow:0 10px 30px rgba(201,168,76,.4); }

/* -- Quran search -- */
.search-box{ max-width:600px; margin:0 auto 30px; padding:0 4vw; display:flex; gap:10px; }
.search-box input{ flex:1; padding:13px 20px; border-radius:14px; border:1px solid var(--line); background:var(--bg-soft); color:var(--text); font-family:inherit; font-size:1rem; outline:none; }
.search-box input:focus{ border-color:var(--gold); }
.search-box button{ padding:13px 24px; border-radius:14px; border:none; background:var(--gold); color:#1a1208; font-weight:800; }
#searchResults{ max-width:800px; margin:0 auto; padding:0 4vw 70px; display:flex; flex-direction:column; gap:12px; }

/* ═══════════════════════════════════════
   MOBILE
═══════════════════════════════════════ */
@media(max-width:900px) {
  .topbar nav.links { display:none; flex:none; }
  .menu-toggle { display:flex !important; }
  nav.links.open {
    display:flex !important;
    position:fixed; top:68px; right:0; left:0;
    height:calc(100vh - 68px); flex-direction:column;
    background:var(--bg-glass-solid);
    backdrop-filter:blur(24px);
    padding:24px 28px; gap:4px; z-index:99;
    overflow-y:auto;
    animation:slideInMenu .25s ease;
  }
  nav.links.open a {
    padding:14px 18px; border-radius:12px;
    font-size:1rem; border:1px solid transparent;
    color:var(--text-2);
  }
  nav.links.open a:hover,
  nav.links.open a.current {
    background:rgba(201,168,76,.08);
    border-color:var(--line-2); color:var(--gold-2);
  }
  @keyframes slideInMenu {
    from { opacity:0; transform:translateY(-10px); }
    to { opacity:1; transform:translateY(0); }
  }
  .topbar { padding:0 20px; }
  .hero-floats { display:none; }
  .bento-grid { display:flex; flex-direction:column; }
  .bento-cell { min-height:160px; }
  .stats-row { grid-template-columns:repeat(3,1fr); }
  .stats-row .stat-item:nth-child(4),
  .stats-row .stat-item:nth-child(5) { border-radius:0 0 var(--r-lg) var(--r-lg); }
  .cta-band { padding:48px 28px; border-radius:20px; }
  .lp-cta-band { padding:48px 28px; border-radius:20px; }
}

@media(max-width:600px) {
  .stats-row { grid-template-columns:repeat(2,1fr); }
  .hero h1 { font-size:2.4rem; }
  .section { padding:60px 20px; }
  .lp-section { padding:60px 20px; }
  .cta-band { margin:0 16px; }
  .lp-cta-band { margin:0 16px; }
  .ayah-card { padding:36px 24px; }
  .features-grid { grid-template-columns:1fr; }
}

/* ═══════════════════════════════════════
   WIDE SCREEN
═══════════════════════════════════════ */
@media(min-width:1400px) {
  .features-grid { grid-template-columns:repeat(3,1fr); }
  .card-grid { grid-template-columns:repeat(4,1fr); }
  .lp-features { grid-template-columns:repeat(3,1fr); }
}

/* =========================================================
   DUAS & DHIKR — GRID FIX
   Prevent cards from touching screen edges
   ========================================================= */

section.reveal {
    width: min(1400px, calc(100% - 48px));
    margin-left: auto;
    margin-right: auto;
}

section.reveal .section-head {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

section.reveal .grid {
    width: 100%;
    margin-left: auto;
    margin-right: auto;

    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));

    gap: 18px;
}


/* =========================================================
   Cards
   ========================================================= */

section.reveal .grid > * {
    min-width: 0;
    box-sizing: border-box;
}


/* =========================================================
   Divider
   ========================================================= */

.divider {
    width: min(1400px, calc(100% - 48px));
    margin: 55px auto;
}


/* =========================================================
   Desktop
   ========================================================= */

@media (max-width: 1250px) {

    section.reveal .grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}


@media (max-width: 1000px) {

    section.reveal .grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}


/* =========================================================
   Tablet
   ========================================================= */

@media (max-width: 750px) {

    section.reveal {
        width: min(100% - 30px, 650px);
    }

    section.reveal .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .divider {
        width: calc(100% - 30px);
        margin: 40px auto;
    }
}


/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 520px) {

    section.reveal {
        width: calc(100% - 24px);
    }

    section.reveal .grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .divider {
        width: calc(100% - 24px);
        margin: 35px auto;
    }
}














/* =========================================================
   EL HUDA — PROFESSIONAL QURAN READER
   Theme-aware / Responsive / Full-width Ayah Cards
   ========================================================= */

/* ---------- Quran page container ---------- */

body:has(#quran-ayat) {
  --quran-surface: var(--bg-glass);
  --quran-surface-2: var(--bg-soft);
  --quran-border: var(--line);
  --quran-border-strong: var(--line-2);
  --quran-accent: var(--gold);
  --quran-accent-2: var(--gold-2);
  --quran-text: var(--text);
  --quran-muted: var(--text-2);
}

/* Main Quran content */
body:has(#quran-ayat) > section:not(.page-hero) {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

/* ---------- Hero ---------- */

body:has(#quran-ayat) .page-hero {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
  min-height: 220px !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

body:has(#quran-ayat) .page-hero h2 {
  color: var(--gold);
  font-size: clamp(2rem, 4vw, 3.3rem);
  margin: 0;
  text-shadow: 0 8px 30px rgba(0,0,0,.12);
}

/* ---------- Back button ---------- */

body:has(#quran-ayat) .back-link {
  width: min(1180px, calc(100% - 40px));
  margin: 25px auto 0;
  display: flex;
  align-items: center;
  gap: 8px;

  color: var(--text-2);
  text-decoration: none;
  font-weight: 700;

  transition:
    color .25s ease,
    transform .25s ease;
}

body:has(#quran-ayat) .back-link:hover {
  color: var(--gold);
  transform: translateX(-4px);
}

/* =========================================================
   SURAH SELECT
   ========================================================= */

.quran-controls {
  width: 100%;
  max-width: 100%;
  margin: 10px auto 20px;

  display: grid;
  grid-template-columns: auto minmax(260px, 1fr);
  align-items: center;
  gap: 16px;

  padding: 18px 22px;

  background: var(--quran-surface);
  border: 1px solid var(--quran-border);
  border-radius: var(--r-lg);

  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
}

.quran-controls label {
  color: var(--quran-muted);
  font-weight: 700;
  white-space: nowrap;
}

.quran-controls select,
.quran-toolbar select {
  width: 100%;
  min-height: 50px;

  padding: 0 18px;

  color: var(--quran-text);
  background: var(--bg-soft);

  border: 1px solid var(--quran-border-strong);
  border-radius: 12px;

  font-family: "Tajawal", sans-serif;
  font-size: 1rem;
  font-weight: 700;

  outline: none;
  cursor: pointer;

  transition:
    border-color .25s ease,
    box-shadow .25s ease,
    background .25s ease;
}

.quran-controls select:focus,
.quran-toolbar select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 12%, transparent);
}

/* =========================================================
   TOOLBAR
   ========================================================= */

.quran-toolbar {
  width: 100%;

  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;

  margin-bottom: 18px;
  padding: 14px 18px;

  background: var(--quran-surface);
  border: 1px solid var(--quran-border);

  border-radius: var(--r-lg);

  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
}

.quran-toolbar .group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.quran-toolbar label {
  color: var(--quran-muted);
  font-weight: 700;
  margin-inline-end: 4px;
}

.quran-toolbar select {
  width: auto;
  min-width: 180px;
}

.tool-btn {
  min-width: 46px;
  height: 42px;

  border: 1px solid var(--quran-border-strong);
  border-radius: 10px;

  background: var(--bg-soft);
  color: var(--quran-text);

  font-family: "Tajawal", sans-serif;
  font-weight: 800;

  cursor: pointer;

  transition:
    transform .2s ease,
    color .2s ease,
    border-color .2s ease,
    background .2s ease;
}

.tool-btn:hover {
  color: var(--gold);
  border-color: var(--gold);
  transform: translateY(-2px);
  background: var(--bg-3);
}

/* =========================================================
   TAJWEED LEGEND
   ========================================================= */

.tajweed-legend {
  width: 100%;
  margin: 18px 0;

  padding: 20px;

  background: var(--quran-surface);
  border: 1px solid var(--quran-border);
  border-radius: var(--r-lg);

  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
}

.tajweed-legend strong {
  display: block;
  margin-bottom: 15px;

  color: var(--gold);
  font-size: 1.05rem;
}

.tw-legend-row {
  display: inline-flex;
  align-items: center;
  gap: 7px;

  margin: 5px 12px 5px 0;

  color: var(--quran-muted);
  font-size: .9rem;
}

.tw-disclaimer {
  margin: 15px 0 8px;
  color: var(--text-3);
  line-height: 1.8;
  font-size: .85rem;
}

.tw-guide-link {
  color: var(--gold);
  font-weight: 700;
  text-decoration: none;
}

/* =========================================================
   AYAH LIST
   ========================================================= */

/*
   أهم إصلاح:
   البطاقة لم تعد صغيرة في المنتصف.
   كل بطاقة تأخذ عرض الحاوية بالكامل.
*/

#quran-ayat {
  width: 100%;
  max-width: 100%;

  display: flex;
  flex-direction: column;
  gap: 18px;

  margin: 22px auto 60px;
}

/* ---------- Ayah card ---------- */

#quran-ayat .ayah-card {
  width: 100%;
  max-width: none;
  box-sizing: border-box;

  position: relative;

  padding: 28px 34px;

  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--bg-3) 72%, transparent),
      var(--quran-surface)
    );

  border: 1px solid var(--quran-border);
  border-radius: 22px;

  box-shadow:
    0 12px 35px color-mix(in srgb, var(--bg) 35%, transparent);

  backdrop-filter: blur(14px);

  transition:
    transform .25s ease,
    border-color .25s ease,
    box-shadow .25s ease,
    background .25s ease;
}

#quran-ayat .ayah-card:hover {
  transform: translateY(-3px);

  border-color: var(--quran-border-strong);

  box-shadow:
    0 18px 45px color-mix(in srgb, var(--bg) 42%, transparent),
    0 0 0 1px color-mix(in srgb, var(--gold) 5%, transparent);
}

/* Playing ayah */

#quran-ayat .ayah-card.playing {
  border-color: var(--gold);

  box-shadow:
    0 15px 45px color-mix(in srgb, var(--gold) 14%, transparent),
    inset 0 0 0 1px color-mix(in srgb, var(--gold) 12%, transparent);
}

/* ---------- Ayah header ---------- */

.ayah-top {
  display: flex;
  align-items: center;
  justify-content: space-between;

  min-height: 42px;
  margin-bottom: 12px;
}

/* Number circle */

.ayah-num {
  width: 42px;
  height: 42px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  color: var(--gold);
  background: var(--bg-soft);

  border: 1px solid var(--quran-border-strong);

  font-family: "Poppins", sans-serif;
  font-size: .9rem;
  font-weight: 700;

  box-shadow: inset 0 0 0 4px color-mix(in srgb, var(--gold) 3%, transparent);
}

/* ---------- Play button ---------- */

.play-btn {
  width: 42px;
  height: 42px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  border: 1px solid var(--quran-border-strong);

  background: var(--bg-soft);
  color: var(--gold);

  cursor: pointer;

  font-size: .95rem;

  transition:
    transform .2s ease,
    background .2s ease,
    color .2s ease,
    border-color .2s ease;
}

.play-btn:hover {
  transform: scale(1.08);
  background: var(--gold);
  color: var(--bg);
  border-color: var(--gold);
}

/* =========================================================
   ARABIC AYAH
   ========================================================= */

.ayah-arabic {
  width: 100%;
  margin: 0;

  color: var(--quran-text);

  font-family: "Amiri Quran", "Scheherazade New", serif;

  font-size: calc(2rem * var(--quran-font, 1));
  line-height: 2.35;

  text-align: center;

  direction: rtl;

  word-spacing: .08em;

  letter-spacing: 0;

  text-wrap: pretty;
}

/* =========================================================
   TRANSLATION / TAFSIR
   ========================================================= */

.ayah-translation {
  margin-top: 20px;
  padding: 15px 18px;

  color: var(--quran-muted);

  background: var(--bg-soft);

  border: 1px solid var(--quran-border);

  border-radius: 13px;

  font-family: "Tajawal", sans-serif;
  font-size: .95rem;
  line-height: 1.9;

  text-align: start;
}

.ayah-translation strong {
  color: var(--gold);
}

/* =========================================================
   TAJWEED
   ========================================================= */

.tw-ghunnah {
  color: var(--gold);
}

.tw-qalqalah {
  color: var(--green-2);
}

.tw-madd_normal {
  color: var(--gold-2);
}

.tw-ikhfa {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--green-2);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.tw-idgham {
  color: var(--green-2);
}

.tw-ham_wasl {
  color: var(--text-2);
}

.tw-other {
  color: inherit;
}

/* =========================================================
   MUSHAF PAGE MODE
   ========================================================= */

#quran-ayat .mushaf-page {
  width: 100%;
  max-width: 100%;

  box-sizing: border-box;

  padding: clamp(28px, 5vw, 60px);

  background: var(--quran-surface);

  border: 1px solid var(--quran-border);
  border-radius: 24px;

  box-shadow: var(--shadow);

  backdrop-filter: blur(14px);
}

.mushaf-banner {
  width: fit-content;
  max-width: 100%;

  margin: 0 auto 35px;
  padding: 10px 28px;

  color: var(--gold);

  border: 1px solid var(--quran-border-strong);
  border-radius: 999px;

  background: var(--bg-soft);

  font-family: "Amiri Quran", serif;
  font-size: 1.35rem;
  font-weight: 700;

  text-align: center;
}

.mushaf-flow {
  margin: 0;

  color: var(--quran-text);

  font-family: "Amiri Quran", "Scheherazade New", serif;

  font-size: calc(2.1rem * var(--quran-font, 1));
  line-height: 2.35;

  text-align: justify;
  text-align-last: center;

  direction: rtl;
}

/* Quran page ayah number */

.page-ayah-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 32px;
  height: 32px;

  margin: 0 5px;

  border: 1px solid var(--quran-border-strong);
  border-radius: 50%;

  color: var(--gold);

  background: var(--bg-soft);

  font-family: "Tajawal", sans-serif;
  font-size: .72rem;

  vertical-align: middle;

  transition: all .2s ease;
}

.page-ayah-num.playing {
  background: var(--gold);
  color: var(--bg);

  border-color: var(--gold);

  box-shadow: 0 0 0 6px color-mix(in srgb, var(--gold) 12%, transparent);
}

/* =========================================================
   STATUS
   ========================================================= */

.quran-status {
  width: 100%;
  box-sizing: border-box;

  padding: 35px;

  text-align: center;

  color: var(--text-2);

  background: var(--quran-surface);

  border: 1px solid var(--quran-border);
  border-radius: var(--r-lg);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {

  body:has(#quran-ayat) > section:not(.page-hero),
  body:has(#quran-ayat) .page-hero,
  body:has(#quran-ayat) .back-link {
    width: min(100% - 28px, 760px);
  }

  .quran-controls {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .quran-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .quran-toolbar .group {
    width: 100%;
  }

  .quran-toolbar select {
    flex: 1;
  }

  #quran-ayat .ayah-card {
    padding: 24px 22px;
  }

  .ayah-arabic {
    font-size: calc(1.75rem * var(--quran-font, 1));
    line-height: 2.3;
  }
}

@media (max-width: 600px) {

  body:has(#quran-ayat) > section:not(.page-hero),
  body:has(#quran-ayat) .page-hero,
  body:has(#quran-ayat) .back-link {
    width: calc(100% - 20px);
  }

  body:has(#quran-ayat) .page-hero {
    min-height: 170px !important;
  }

  .quran-controls {
    padding: 14px;
  }

  .quran-toolbar {
    padding: 12px;
  }

  .quran-toolbar .group {
    display: grid;
    grid-template-columns: auto 1fr 1fr;
  }

  .quran-toolbar .group:nth-child(2) {
    grid-template-columns: auto 1fr;
  }

  .quran-toolbar select {
    width: 100%;
    min-width: 0;
  }

  #quran-ayat {
    gap: 12px;
    margin-bottom: 35px;
  }

  #quran-ayat .ayah-card {
    padding: 20px 15px;
    border-radius: 18px;
  }

  .ayah-arabic {
    font-size: calc(1.55rem * var(--quran-font, 1));
    line-height: 2.25;
  }

  .ayah-translation {
    font-size: .9rem;
    padding: 12px;
  }

  #quran-ayat .mushaf-page {
    padding: 22px 15px;
    border-radius: 18px;
  }

  .mushaf-flow {
    font-size: calc(1.65rem * var(--quran-font, 1));
    line-height: 2.25;
    text-align: center;
  }

  .page-ayah-num {
    width: 28px;
    height: 28px;
    margin-inline: 3px;
  }
}
