/* Noor — noorlife.app | shared stylesheet */
:root {
  /* --green* variables hold the Noor brand BLUE (name kept for legacy references) */
  --green: #35659b;
  --green-deep: #274d78;
  --green-soft: #e8eff7;
  --gold: #c9a35b;
  --gold-soft: #f4ecd8;
  --ink: #14202e;
  --muted: #5b6675;
  --line: #e3e8ee;
  --bg: #faf9f5;
  --card: #ffffff;
  --shadow: 0 10px 30px rgba(39, 77, 120, 0.10);
  --radius: 18px;
  --max: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --green: #6ea3d8;
    --green-deep: #8fbce8;
    --green-soft: #14243a;
    --gold: #e0b968;
    --gold-soft: #241f12;
    --ink: #e9eff6;
    --muted: #9aa8ba;
    --line: #21334a;
    --bg: #0b1420;
    --card: #101d2e;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.38);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
}
img { max-width: 100%; display: block; }
a { color: var(--green-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(12px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-word { font-weight: 700; font-size: 1.08rem; }
.brand-sub { font-weight: 500; color: var(--muted); font-size: 0.72rem; letter-spacing: 0.2px; }
.nav-right { display: flex; align-items: center; gap: 18px; }
.nav-links { display: flex; gap: 18px; }
.nav-links a { color: var(--muted); font-size: 0.95rem; font-weight: 500; }
.nav-links a:hover { color: var(--green-deep); text-decoration: none; }
.lang-switch { display: flex; gap: 8px; align-items: center; font-size: 0.85rem; }
.lang-switch a { color: var(--muted); padding: 2px 6px; border-radius: 8px; }
.lang-switch a.active { color: var(--green-deep); background: var(--green-soft); font-weight: 700; }
@media (max-width: 720px) { .nav-links { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--green); color: #fff; font-weight: 600;
  padding: 13px 22px; border-radius: 999px; border: 0; cursor: pointer;
  font-size: 1rem; transition: transform .12s ease, box-shadow .12s ease;
  box-shadow: 0 8px 20px rgba(39,77,120,.28);
}
.btn:hover { transform: translateY(-1px); text-decoration: none; color: #fff; }
.btn.secondary { background: transparent; color: var(--green-deep); box-shadow: none; border: 1px solid var(--line); }
.btn.disabled { opacity: .55; pointer-events: none; }

/* Hero */
.hero { padding: 72px 0 40px; text-align: center; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gold-soft); color: var(--gold); font-weight: 700;
  padding: 6px 14px; border-radius: 999px; font-size: 0.82rem; letter-spacing: .3px;
  border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent);
}
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1.1; margin: 22px 0 14px; letter-spacing: -0.02em; }
.hero p.lead { font-size: clamp(1.05rem, 2.5vw, 1.3rem); color: var(--muted); max-width: 640px; margin: 0 auto 30px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-note { margin-top: 16px; font-size: 0.9rem; color: var(--muted); }
.arabic { font-size: 1.4rem; color: var(--gold); margin-bottom: 6px; font-family: "Traditional Arabic", "Scheherazade New", serif; }

/* Sections */
section { padding: 56px 0; }
.section-title { text-align: center; font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0 0 12px; letter-spacing: -0.01em; }
.section-sub { text-align: center; color: var(--muted); max-width: 620px; margin: 0 auto 42px; }

/* Feature grid */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 22px; box-shadow: var(--shadow);
}
.card .ic { width: 46px; height: 46px; border-radius: 12px; background: var(--green-soft); display: grid; place-items: center; font-size: 1.4rem; margin-bottom: 14px; }
.card h3 { margin: 0 0 6px; font-size: 1.12rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.97rem; }

/* Privacy highlight band */
.band { background: var(--green-soft); border-radius: var(--radius); padding: 40px 32px; text-align: center; }
.band h2 { margin: 0 0 10px; }
.band p { color: var(--muted); max-width: 640px; margin: 0 auto; }

/* Legal / content pages */
.legal { padding: 48px 0 64px; }
.legal .container { max-width: 820px; }
.legal h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); margin: 0 0 6px; }
.legal .updated { color: var(--muted); font-size: 0.9rem; margin-bottom: 32px; }
.legal h2 { font-size: 1.3rem; margin: 34px 0 10px; }
.legal h3 { font-size: 1.08rem; margin: 22px 0 8px; }
.legal p, .legal li { color: var(--ink); }
.legal ul { padding-inline-start: 22px; }
.legal li { margin-bottom: 6px; }
.legal .note {
  background: var(--gold-soft); border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent);
  border-radius: 12px; padding: 14px 18px; font-size: 0.95rem; margin: 20px 0;
}
.legal table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.95rem; }
.legal th, .legal td { text-align: start; border: 1px solid var(--line); padding: 10px 12px; vertical-align: top; }
.legal th { background: var(--green-soft); }
.legal .overflow { overflow-x: auto; }

/* Steps (delete account) */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 24px 0; }
.steps li { position: relative; padding: 14px 16px 14px 56px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 12px; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; inset-inline-start: 14px; top: 14px;
  width: 28px; height: 28px; border-radius: 50%; background: var(--green); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 0.9rem;
}

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; margin-top: 40px; color: var(--muted); font-size: 0.92rem; }
.footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--green-deep); }
.footer-bottom { margin-top: 24px; font-size: 0.85rem; }

/* ── Scripture pages (dynamic Qur'an / hadith) ── */
.crumbs { padding-top: 20px; font-size: 0.85rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--green-deep); }
.crumbs .sep { margin: 0 6px; opacity: 0.5; }

.scripture { max-width: 760px; padding: 24px 24px 8px; }
.sc-context { color: var(--muted); font-size: 0.95rem; margin: 8px 0 4px; }
.sc-ref { font-size: clamp(1.5rem, 4vw, 2.1rem); margin: 6px 0 22px; letter-spacing: -0.01em; }
.sc-arabic {
  font-family: "Traditional Arabic", "Scheherazade New", "Amiri", serif;
  font-size: clamp(1.9rem, 5vw, 2.6rem); line-height: 2; text-align: right;
  color: var(--ink); margin: 0 0 22px;
  padding: 22px 24px; background: var(--green-soft); border-radius: var(--radius);
  border: 1px solid var(--line);
}
.sc-translation { font-size: 1.15rem; line-height: 1.75; color: var(--ink); margin: 0 0 16px; }
.sc-translation .fallback { color: var(--muted); font-size: 0.85rem; }
.sc-source { color: var(--muted); font-size: 0.92rem; font-weight: 600; margin: 0 0 24px; }
.grade-tag { color: var(--green-deep); font-weight: 700; text-transform: capitalize; }
.sc-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 8px 0 4px; }
.sc-nav .btn.secondary { padding: 10px 16px; font-size: 0.92rem; }
.pageinfo { color: var(--muted); font-size: 0.9rem; }
.scripture-cta { margin: 32px 0; }
.scripture-cta h2 { margin: 0 0 8px; }

/* List / index pages */
.list-page { padding: 12px 24px 40px; }
.list-page h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); margin: 6px 0 4px; }
.chip-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; min-width: 46px; justify-content: center;
  padding: 8px 12px; border-radius: 10px; background: var(--card);
  border: 1px solid var(--line); color: var(--green-deep); font-weight: 600; font-size: 0.92rem;
}
.chip:hover { background: var(--green-soft); text-decoration: none; }

.surah-list { display: flex; flex-direction: column; gap: 8px; }
.surah-row {
  display: grid; grid-template-columns: 40px 1fr auto auto; align-items: center; gap: 14px;
  padding: 12px 16px; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; color: var(--ink);
}
.surah-row:hover { background: var(--green-soft); text-decoration: none; }
.surah-n { color: var(--green-deep); font-weight: 700; text-align: center; }
.surah-name { display: flex; flex-direction: column; }
.surah-name strong { font-size: 1.02rem; }
.surah-meaning { color: var(--muted); font-size: 0.85rem; }
.surah-ar { font-size: 1.25rem; color: var(--gold); }
.surah-count { color: var(--muted); font-size: 0.8rem; min-width: 28px; text-align: end; }
@media (max-width: 520px) { .surah-row { grid-template-columns: 32px 1fr auto; } .surah-ar { display: none; } }

/* RTL */
[dir="rtl"] { text-align: right; }
[dir="rtl"] .sc-arabic { text-align: right; }
[dir="rtl"] .crumbs, [dir="rtl"] .sc-context, [dir="rtl"] .sc-source { text-align: right; }
[dir="rtl"] .hero, [dir="rtl"] .section-title, [dir="rtl"] .section-sub, [dir="rtl"] .band { text-align: center; }
[dir="rtl"] .btn { flex-direction: row-reverse; }
