/* ============================================================
   Quran Mubin — design tokens
   ============================================================ */
:root{
  --bg:          #FAF9F5;   /* off-white page background */
  --bg-2:        #E8F2EE;   /* very light emerald tint — alt section / card backgrounds */
  --panel:       #FFFFFF;   /* card & surface background */
  --panel-2:     #FFFFFF;   /* input / search surface */
  --line-dark:   rgba(31,41,38,0.10);
  --line-light:  #E4DFC9;
  --emerald:     #0B5D4B;
  --emerald-lt:  #15806A;
  --emerald-deep:#073D31;
  --gold:        #C9A227;
  --gold-dim:    #8F6E28;
  --cream:       #FFFFFF;
  --muted-dark:  #5B6A5F;
  --ink:         #1F2926;
  --muted-ink:   #5B6A5F;

  --font-display: 'Amiri', serif;
  --font-body:    'Cairo', sans-serif;

  --max: 1180px;
}

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

body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:var(--font-body);
  font-size:16px;
  line-height:1.7;
  -webkit-font-smoothing:antialiased;
  direction:rtl;
}

img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
button{ font-family:inherit; cursor:pointer; }

h1,h2,h3,h4{
  font-family:var(--font-display);
  margin:0 0 .4em 0;
  font-weight:700;
  line-height:1.35;
}

p{ margin:0 0 1em 0; }

::selection{ background:var(--gold); color:#fff; }
:focus-visible{ outline:2px solid var(--gold-dim); outline-offset:3px; }

@media (prefers-reduced-motion: reduce){
  *{ animation-duration:0.001ms !important; animation-iteration-count:1 !important; transition-duration:0.001ms !important; }
}

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

/* ---------------- Geometric star texture (original, hand-built) ---------------- */
.star-texture{
  position:absolute; inset:0;
  opacity:0.06;
  pointer-events:none;
  background-image:
    linear-gradient(30deg, transparent 48%, var(--emerald) 49%, var(--emerald) 51%, transparent 52%),
    linear-gradient(-30deg, transparent 48%, var(--emerald) 49%, var(--emerald) 51%, transparent 52%),
    linear-gradient(90deg, transparent 48%, var(--emerald) 49%, var(--emerald) 51%, transparent 52%);
  background-size: 64px 64px;
}

/* ---------------- Header ---------------- */
header.site-header{
  position:sticky; top:0; z-index:50;
  background:rgba(250,249,245,0.9);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line-light);
}
.nav{
  max-width:var(--max); margin:0 auto; padding:0 24px;
  height:104px; display:flex; align-items:center; justify-content:space-between;
  gap:24px;
}
.brand{
  display:flex; align-items:center; gap:10px;
}
.brand-logo{ height:78px; width:auto; display:block; }
.nav-links{ display:flex; gap:30px; list-style:none; margin:0; padding:0; }
.nav-links a{ font-size:0.94rem; color:var(--muted-ink); transition:color .15s; }
.nav-links a:hover, .nav-links a.active{ color:var(--emerald); }
.nav-cta{
  border:1px solid var(--gold-dim); color:var(--gold-dim);
  padding:9px 20px; border-radius:6px; font-size:0.9rem; font-weight:600;
  white-space:nowrap; transition:background .15s, color .15s;
}
.nav-cta:hover{ background:var(--gold); color:var(--ink); border-color:var(--gold); }
.nav-toggle{
  display:none; background:none; border:1px solid var(--line-light); border-radius:4px;
  width:40px; height:40px; color:var(--ink); font-size:1.2rem;
}
@media (max-width:900px){
  .brand-logo{ height:56px; }
  .nav-links{
    position:fixed; top:104px; right:0; left:0; background:var(--panel);
    border-bottom:1px solid var(--line-light); flex-direction:column; gap:0;
    padding:8px 24px 20px; transform:translateY(-8px); opacity:0; pointer-events:none;
    transition:opacity .18s, transform .18s;
    box-shadow:0 20px 40px rgba(31,41,38,0.10);
  }
  .nav-links.open{ opacity:1; transform:translateY(0); pointer-events:auto; }
  .nav-links a{ padding:14px 0; display:block; border-bottom:1px solid var(--line-light); }
  .nav-toggle{ display:block; }
  .nav-cta{ display:none; }
}

/* ---------------- Hero ---------------- */
.hero{
  position:relative; overflow:hidden;
  background:radial-gradient(120% 100% at 50% 0%, var(--bg-2) 0%, var(--bg) 60%);
  padding:88px 0 72px;
  text-align:center;
}
.hero .wrap{ position:relative; z-index:2; }
.hero-eyebrow{ color:var(--gold-dim); font-size:0.95rem; font-weight:600; margin-bottom:14px; }
.hero h1{ font-size:2.9rem; color:var(--emerald); max-width:18ch; margin:0 auto 8px; font-family:var(--font-body); }
.hero-tagline{ color:var(--gold-dim); font-size:1.02rem; font-weight:600; margin:0 0 22px; letter-spacing:.2px; }
.hero p.lead{ color:var(--muted-ink); max-width:52ch; margin:0 auto 30px; font-size:1.05rem; }

.hero-cta-row{ display:flex; gap:12px; justify-content:center; flex-wrap:wrap; margin-bottom:32px; }
.btn-solid-emerald{ background:var(--emerald); color:#fff; }
.btn-solid-emerald:hover{ background:var(--emerald-lt); }
.btn-outline-gold{ border-color:var(--gold-dim); color:var(--gold-dim); }
.btn-outline-gold:hover{ background:var(--gold); color:var(--ink); border-color:var(--gold); }

.search-box{
  display:flex; gap:8px; max-width:560px; margin:0 auto 28px;
  background:var(--panel-2); border:1px solid var(--line-light); border-radius:10px; padding:6px;
  box-shadow:0 20px 45px rgba(11,93,75,0.10);
}
.search-box input{
  flex:1; border:none; background:transparent; padding:12px 16px;
  font-family:var(--font-body); font-size:0.98rem; color:var(--ink); text-align:right;
}
.search-box input::placeholder{ color:var(--muted-ink); }
.search-box input:focus{ outline:none; }
.search-box button{
  background:var(--emerald); color:#fff; border:none; border-radius:7px;
  padding:0 26px; font-weight:600; font-size:0.95rem; transition:background .15s;
}
.search-box button:hover{ background:var(--emerald-lt); }

.chip-row{ display:flex; gap:10px; flex-wrap:wrap; justify-content:center; }
.chip{
  border:1px solid var(--line-light); color:var(--muted-ink); background:var(--panel);
  padding:8px 18px; border-radius:20px; font-size:0.86rem; transition:all .15s;
}
.chip:hover{ border-color:var(--gold-dim); color:var(--gold-dim); }

/* ---------------- Sections ---------------- */
.section{ padding:64px 0; }
.section-head{
  display:flex; justify-content:space-between; align-items:flex-end;
  margin-bottom:36px; gap:20px; flex-wrap:wrap;
}
.section-head h2{ font-size:1.7rem; color:var(--emerald); margin:0; }
.section-head p{ color:var(--muted-ink); margin:6px 0 0; max-width:46ch; }
.section-head a.see-all{ color:var(--gold-dim); font-size:0.92rem; font-weight:600; white-space:nowrap; transition:color .15s; }
.section-head a.see-all:hover{ color:var(--emerald); }

/* ---------------- Selection cards (recitations) ---------------- */
.grid-selections{
  display:grid; grid-template-columns:repeat(4,1fr); gap:20px;
}
@media (max-width:1000px){ .grid-selections{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:560px){ .grid-selections{ grid-template-columns:1fr; } }

.card-selection{
  background:var(--panel); border:1px solid var(--line-light); border-radius:12px; padding:20px;
  color:var(--ink); box-shadow:0 8px 24px rgba(11,93,75,0.05);
}
.card-selection .reciter-row{ display:flex; align-items:center; gap:10px; margin-bottom:14px; }
.avatar{
  width:44px; height:44px; border-radius:50%;
  background:var(--emerald); color:var(--gold);
  display:flex; align-items:center; justify-content:center;
  font-family:var(--font-display); font-weight:700; font-size:1rem;
  flex:none;
}
.card-selection .reciter-name{ font-size:0.88rem; color:var(--muted-ink); }
.card-selection h3{ font-size:1.15rem; color:var(--ink); margin-bottom:6px; }
.card-selection .cat-tag{
  display:inline-block; font-size:0.76rem; color:var(--emerald);
  background:var(--bg-2); padding:3px 10px; border-radius:12px; margin-bottom:14px;
}
.card-selection .stats{ display:flex; gap:14px; font-size:0.8rem; color:var(--muted-ink); margin-bottom:14px; }
.card-selection .actions{ display:flex; gap:8px; }
.btn-play{
  flex:1; background:var(--emerald); color:#fff; border:none; border-radius:7px;
  padding:10px; font-size:0.88rem; font-weight:600; display:flex; align-items:center; justify-content:center; gap:6px;
  transition:background .15s;
}
.btn-play:hover{ background:var(--emerald-lt); }
.btn-icon{
  width:38px; height:38px; border-radius:7px; border:1px solid var(--line-light);
  background:var(--bg-2); display:flex; align-items:center; justify-content:center; flex:none;
  color:var(--muted-ink); transition:all .15s;
}
.btn-icon:hover{ border-color:var(--gold-dim); color:var(--gold-dim); }
.btn-play:disabled, .btn-icon:disabled{ opacity:0.45; cursor:not-allowed; }
.btn-play:disabled:hover{ background:var(--emerald); }

/* ---------------- Reciter avatars grid ---------------- */
.grid-reciters{ display:grid; grid-template-columns:repeat(6,1fr); gap:18px; }
@media (max-width:900px){ .grid-reciters{ grid-template-columns:repeat(3,1fr); } }
@media (max-width:560px){ .grid-reciters{ grid-template-columns:repeat(2,1fr); } }
.reciter-tile{ text-align:center; }
.reciter-tile .avatar{
  width:84px; height:84px; margin:0 auto 12px; font-size:1.6rem;
  border:2px solid var(--gold-dim);
}
.reciter-tile h4{ font-family:var(--font-body); font-weight:600; font-size:0.95rem; color:var(--ink); margin:0 0 4px; }
.reciter-tile .count{ font-size:0.78rem; color:var(--muted-ink); }

/* ---------------- Mus-haf banner ---------------- */
.mushaf-banner{
  background:var(--bg-2); border:1px solid rgba(11,93,75,0.10); border-radius:18px; padding:48px;
  display:flex; align-items:center; justify-content:space-between; gap:32px;
  color:var(--ink); flex-wrap:wrap;
}
.mushaf-banner h2{ color:var(--emerald); font-size:1.6rem; margin-bottom:10px; }
.mushaf-banner p{ color:var(--muted-ink); max-width:44ch; margin:0; }
.btn-solid-dark{
  background:var(--emerald); color:#fff; padding:14px 30px; border-radius:8px;
  font-weight:600; font-size:0.95rem; white-space:nowrap; transition:background .15s;
}
.btn-solid-dark:hover{ background:var(--emerald-deep); }

/* ---------------- Footer ---------------- */
footer.site-footer{ padding:56px 0 28px; border-top:1px solid var(--line-light); margin-top:40px; background:var(--bg-2); }
.footer-logo{ height:120px; width:auto; display:block; margin-bottom:10px; }
.footer-grid{ display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr; gap:36px; margin-bottom:36px; }
@media (max-width:800px){ .footer-grid{ grid-template-columns:1fr 1fr; } }
.footer-grid h4{ font-size:0.85rem; color:var(--emerald); font-weight:600; margin-bottom:14px; }
.footer-links{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:10px; }
.footer-links a{ color:var(--muted-ink); font-size:0.9rem; }
.footer-links a:hover{ color:var(--gold-dim); }
.footer-bottom{
  border-top:1px solid var(--line-light); padding-top:22px;
  display:flex; justify-content:space-between; color:var(--muted-ink); font-size:0.8rem; flex-wrap:wrap; gap:10px;
}
.newsletter-form{ display:flex; gap:8px; margin-top:12px; }
.newsletter-form input{
  flex:1; background:var(--panel); border:1px solid var(--line-light); border-radius:6px;
  padding:10px 12px; color:var(--ink); font-family:var(--font-body); font-size:0.88rem; text-align:right;
}
.newsletter-form button{
  background:var(--gold); color:var(--ink); border:none; border-radius:6px; padding:0 18px; font-weight:600; font-size:0.85rem;
}
.newsletter-form button:hover{ background:var(--gold-dim); color:#fff; }

/* ---------------- Page hero (inner pages) ---------------- */
.page-hero{
  padding:56px 0 40px; text-align:center; position:relative; overflow:hidden;
  background:radial-gradient(120% 100% at 50% 0%, var(--bg-2) 0%, var(--bg) 70%);
}
.page-hero .wrap{ position:relative; z-index:2; }
.page-hero h1{ color:var(--emerald); font-size:2.1rem; margin-bottom:10px; }
.page-hero p{ color:var(--muted-ink); max-width:50ch; margin:0 auto; }

/* ---------------- Buttons generic ---------------- */
.btn{
  display:inline-flex; align-items:center; gap:8px; padding:13px 26px; border-radius:8px;
  font-size:0.92rem; font-weight:600; transition:all .15s; border:1px solid transparent;
}
.btn-outline-light{ border-color:var(--line-light); color:var(--ink); }
.btn-outline-light:hover{ border-color:var(--gold-dim); color:var(--gold-dim); }

/* ---------------- Sticky audio player bar ---------------- */
.player-bar{
  position:fixed; right:0; left:0; bottom:-100px; z-index:100;
  background:var(--panel); border-top:1px solid var(--gold-dim);
  box-shadow:0 -10px 30px rgba(11,93,75,0.12);
  padding:14px 24px; transition:bottom .25s ease;
}
.player-bar.open{ bottom:0; }
.player-bar .wrap{
  display:flex; align-items:center; gap:18px; padding:0;
}
.player-bar .pb-info{ flex:none; min-width:160px; }
.player-bar .pb-title{ font-family:var(--font-display); font-weight:700; color:var(--emerald); font-size:1rem; }
.player-bar .pb-reciter{ font-size:0.8rem; color:var(--muted-ink); }
.player-bar audio{ flex:1; height:36px; }
.player-bar .pb-close{
  flex:none; width:34px; height:34px; border-radius:50%; border:1px solid var(--line-light);
  background:transparent; color:var(--muted-ink); font-size:0.9rem;
}
.player-bar .pb-close:hover{ color:var(--gold-dim); border-color:var(--gold-dim); }
@media (max-width:700px){
  .player-bar .pb-info{ min-width:110px; }
  .player-bar .pb-title{ font-size:0.88rem; }
}

/* ---------------- Dynamic data UI (reciters/tracks filters, states) ---------------- */
.filter-row{ display:flex; gap:12px; flex-wrap:wrap; align-items:center; margin-bottom:28px; }
.select-field{
  padding:11px 16px; border-radius:8px; border:1px solid var(--line-light);
  background:var(--panel); color:var(--ink); font-family:var(--font-body); font-size:0.9rem;
}
.state-msg{ text-align:center; color:var(--muted-ink); padding:40px 0; }
.load-more-row{ text-align:center; margin-top:32px; }
.btn-load-more{
  background:var(--panel); border:1px solid var(--line-light); color:var(--emerald);
  padding:12px 30px; border-radius:8px; font-weight:600; font-size:0.9rem; transition:all .15s;
}
.btn-load-more:hover{ border-color:var(--gold-dim); color:var(--gold-dim); }

.riwayah-tabs{ display:flex; gap:8px; flex-wrap:wrap; justify-content:center; margin-bottom:28px; }
.riwayah-tab{
  border:1px solid var(--line-light); color:var(--muted-ink); background:var(--panel);
  padding:8px 18px; border-radius:20px; font-size:0.84rem; transition:all .15s;
}
.riwayah-tab.active{ border-color:var(--emerald); color:var(--emerald); background:var(--bg-2); font-weight:600; }
.riwayah-tab:hover{ border-color:var(--gold-dim); color:var(--gold-dim); }

.track-list{ display:flex; flex-direction:column; gap:8px; }
.track-row{
  display:flex; align-items:center; gap:14px; padding:12px 16px;
  border-radius:10px; background:var(--panel); border:1px solid var(--line-light);
}
.track-row .track-num{ width:26px; text-align:center; color:var(--muted-ink); font-size:0.85rem; flex:none; font-variant-numeric:tabular-nums; }
.track-row .track-body{ flex:1; min-width:0; }
.track-row .track-name{ font-weight:600; color:var(--ink); font-size:1rem; }
.track-row .track-meta{ font-size:0.78rem; color:var(--muted-ink); margin-top:2px; }
.track-row .track-actions{ display:flex; gap:8px; flex:none; }

.live-demo-note{
  display:inline-flex; align-items:center; gap:8px;
  background:rgba(201,162,39,0.12); color:var(--gold-dim);
  border:1px solid var(--gold-dim); border-radius:8px;
  padding:6px 14px; font-size:0.8rem; margin-bottom:16px;
}
