/* ============================================================
   WayQuran – Main Stylesheet
   Design: Refined Islamic Luxury | Gold + Deep Green
   ============================================================ */

/* ── RESET & ROOT ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --green:       #006400;
  --green-dark:  #004d00;
  --green-mid:   #00820a;
  --green-light: #e8f5e9;
  --gold:        #FFD700;
  --gold-dark:   #c8a600;
  --gold-light:  #fff8d6;
  --white:       #ffffff;
  --off-white:   #fafaf7;
  --text:        #1a1a1a;
  --text-muted:  #5a5a5a;
  --text-light:  #888;
  --border:      #e0ddd4;
  --shadow-sm:   0 2px 8px rgba(0,100,0,.08);
  --shadow-md:   0 4px 20px rgba(0,100,0,.12);
  --shadow-lg:   0 8px 40px rgba(0,100,0,.18);
  --radius:      12px;
  --radius-sm:   8px;
  --radius-lg:   20px;
  --transition:  all .22s cubic-bezier(.4,0,.2,1);
  --font-arabic: 'Noto Naskh Arabic', 'Amiri', serif;
  --font-display:'Cormorant Garamond', 'Amiri', Georgia, serif;
  --font-body:   'Amiri', Georgia, serif;
  --container:   1240px;
  --header-h:    64px;
  --nav-h:       48px;
}

html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--off-white);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* RTL body */
body[dir="rtl"], .dir-rtl { direction: rtl; text-align: right; }
body.lang-ar { font-family: var(--font-arabic); }

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

/* ── GEOMETRIC PATTERN BACKGROUND ── */
.geometric-bg {
  position: relative;
  overflow: hidden;
}
.geometric-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 2px 2px, rgba(0,100,0,.06) 1px, transparent 0);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}

/* ── ADS ── */
.ad-banner {
  background: #f5f5f0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
  text-align: center;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ad-top { top: 0; z-index: 100; }

/* ── HEADER ── */
.site-header {
  background: var(--green);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 16px rgba(0,0,0,.25);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--header-h);
  padding: 0 24px;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-icon { display: flex; align-items: center; }
.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.logo-arabic {
  font-family: var(--font-arabic);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0;
}
.logo-sub {
  font-family: var(--font-arabic);
  font-size: 0.78rem;
  color: rgba(255,215,0,.75);
  font-weight: 400;
}

/* Search */
.header-search {
  flex: 1;
  max-width: 480px;
  display: flex;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50px;
  overflow: hidden;
  transition: var(--transition);
}
.header-search:focus-within {
  background: rgba(255,255,255,.2);
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255,215,0,.15);
}
.header-search input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  padding: 8px 16px;
  color: white;
  font-family: var(--font-body);
  font-size: .9rem;
}
.header-search input::placeholder { color: rgba(255,255,255,.6); }
.header-search button {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,.7);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  transition: var(--transition);
}
.header-search button:hover { color: var(--gold); }

/* Language Switcher */
.lang-switcher { position: relative; }
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-sm);
  color: white;
  cursor: pointer;
  padding: 6px 12px;
  font-size: .82rem;
  font-family: var(--font-body);
  transition: var(--transition);
  white-space: nowrap;
}
.lang-toggle:hover { background: rgba(255,255,255,.2); border-color: var(--gold); }
.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  list-style: none;
  min-width: 160px;
  z-index: 999;
  overflow: hidden;
  display: none;
  border: 1px solid var(--border);
}
.lang-dropdown.open { display: block; animation: dropIn .18s ease; }
.lang-dropdown li a {
  display: block;
  padding: 10px 16px;
  color: var(--text);
  text-decoration: none;
  font-size: .88rem;
  transition: var(--transition);
}
.lang-dropdown li a:hover { background: var(--green-light); color: var(--green); }
.lang-dropdown li a.active { color: var(--green); font-weight: 700; background: var(--green-light); }

/* Nav toggle (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: var(--transition);
}

/* Main Nav */
.main-nav {
  background: var(--green-dark);
  border-top: 1px solid rgba(255,215,0,.15);
}
.nav-list {
  display: flex;
  list-style: none;
  gap: 0;
  height: var(--nav-h);
  align-items: stretch;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-list::-webkit-scrollbar { display: none; }
.nav-list li { position: relative; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  height: 100%;
  color: rgba(255,255,255,.85);
  text-decoration: none;
  font-size: .82rem;
  font-weight: 500;
  white-space: nowrap;
  transition: var(--transition);
  letter-spacing: .01em;
}
.nav-link:hover, .nav-link.active {
  color: var(--gold);
  background: rgba(255,215,0,.07);
}
.nav-link.nav-highlight {
  color: var(--gold);
  border-bottom: 2px solid var(--gold);
}
.nav-link svg { opacity: .7; }
.nav-link:hover svg { opacity: 1; }

/* Dropdown */
.has-dropdown .dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  list-style: none;
  min-width: 200px;
  z-index: 999;
  display: none;
  border: 1px solid var(--border);
  overflow: hidden;
}
.has-dropdown:hover .dropdown-menu { display: block; animation: dropIn .18s ease; }
.dropdown-menu li a {
  display: block;
  padding: 10px 16px;
  color: var(--text);
  text-decoration: none;
  font-size: .88rem;
  transition: var(--transition);
}
.dropdown-menu li a:hover { background: var(--green-light); color: var(--green); }

/* ── BREADCRUMB ── */
.breadcrumb-nav {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
}
.breadcrumb-list { display: flex; align-items: center; gap: 6px; list-style: none; font-size: .82rem; flex-wrap: wrap; }
.breadcrumb-item a { color: var(--green); text-decoration: none; }
.breadcrumb-item a:hover { text-decoration: underline; }
.breadcrumb-item.active span { color: var(--text-muted); }
.breadcrumb-sep { color: var(--text-light); font-size: .9em; }

/* ── MAIN CONTENT ── */
.site-main { min-height: 60vh; }

/* ── HERO SECTION ── */
.hero-section {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 50%, var(--green-mid) 100%);
  padding: 80px 0 100px;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L37 10H23L30 0zm0 60L23 50H37L30 60zM0 30L10 23V37L0 30zm60 0L50 37V23L60 30zM30 15a15 15 0 1 0 0 30 15 15 0 0 0 0-30z' fill='%23ffffff' fill-opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-section::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--off-white);
  clip-path: ellipse(55% 100% at 50% 100%);
}
.hero-content { position: relative; z-index: 1; }
.hero-bismillah {
  font-family: var(--font-arabic);
  font-size: 2.4rem;
  color: var(--gold);
  margin-bottom: 16px;
  text-shadow: 0 2px 12px rgba(0,0,0,.3);
  letter-spacing: .02em;
}
.hero-title {
  font-family: var(--font-arabic);
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  color: white;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.3;
  text-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.hero-sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,.8);
  margin-bottom: 36px;
  font-style: italic;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.hero-stat { text-align: center; color: white; }
.hero-stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--gold);
  line-height: 1;
}
.hero-stat-label { font-size: .8rem; color: rgba(255,255,255,.7); margin-top: 4px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 50px;
  font-size: .92rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  font-family: var(--font-body);
  letter-spacing: .02em;
}
.btn-primary {
  background: var(--gold);
  color: var(--green-dark);
  box-shadow: 0 4px 16px rgba(255,215,0,.35);
}
.btn-primary:hover {
  background: white;
  color: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255,215,0,.45);
}
.btn-outline {
  background: transparent;
  border: 2px solid rgba(255,255,255,.5);
  color: white;
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); background: rgba(255,215,0,.07); }
.btn-green { background: var(--green); color: white; }
.btn-green:hover { background: var(--green-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-sm { padding: 8px 18px; font-size: .82rem; }
.btn-lg { padding: 16px 36px; font-size: 1rem; }
.btn-icon { padding: 10px; border-radius: 50%; min-width: 40px; justify-content: center; }

/* ── SECTION LAYOUT ── */
.section { padding: 64px 0; }
.section-sm { padding: 40px 0; }
.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-eyebrow::before, .section-eyebrow::after {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: var(--gold);
}
.section-title {
  font-family: var(--font-arabic);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--green-dark);
  line-height: 1.25;
  margin-bottom: 12px;
}
.section-desc { color: var(--text-muted); max-width: 560px; margin: 0 auto; font-size: .95rem; }

/* ── GRID LAYOUTS ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-surahs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }

/* ── SURAH CARD ── */
.surah-card {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.surah-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gold);
  transform: scaleY(0);
  transition: var(--transition);
}
.surah-card:hover {
  border-color: var(--green);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.surah-card:hover::before { transform: scaleY(1); }
.surah-number {
  width: 44px;
  height: 44px;
  background: var(--green-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: .88rem;
  font-weight: 600;
  color: var(--green);
  flex-shrink: 0;
  border: 1.5px solid rgba(0,100,0,.15);
  position: relative;
}
.surah-number-diamond {
  width: 44px;
  height: 44px;
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.surah-number-diamond::before {
  content: '✦';
  position: absolute;
  font-size: 36px;
  color: var(--gold);
  line-height: 1;
}
.surah-number-diamond span {
  position: relative;
  z-index: 1;
  font-size: .78rem;
  font-weight: 700;
  color: var(--green-dark);
}
.surah-info { flex: 1; min-width: 0; }
.surah-name-arabic {
  font-family: var(--font-arabic);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--green-dark);
  line-height: 1.2;
}
.surah-name-en {
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.surah-meta {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 50px;
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.badge-makkah { background: #fff3e0; color: #e65100; }
.badge-madinah { background: #e8f5e9; color: #1b5e20; }
.badge-verses { background: var(--gold-light); color: var(--gold-dark); }
.surah-play-btn {
  width: 36px;
  height: 36px;
  background: var(--green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
  opacity: 0;
}
.surah-card:hover .surah-play-btn { opacity: 1; }
.surah-play-btn:hover { background: var(--green-dark); transform: scale(1.1); }

/* ── RECITER CARD ── */
.reciter-card {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 24px 20px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  transition: var(--transition);
}
.reciter-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.reciter-avatar {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--green-light), var(--gold-light));
  border-radius: 50%;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-arabic);
  font-size: 1.8rem;
  color: var(--green);
  border: 3px solid var(--gold);
  font-weight: 700;
}
.reciter-name {
  font-size: .95rem;
  font-weight: 600;
  color: var(--green-dark);
  margin-bottom: 4px;
  line-height: 1.3;
}
.reciter-style { font-size: .75rem; color: var(--text-muted); margin-bottom: 14px; }
.reciter-listen-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green);
  color: white;
  padding: 7px 16px;
  border-radius: 50px;
  font-size: .78rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}
.reciter-listen-btn:hover { background: var(--green-dark); transform: translateY(-1px); }

/* ── AUDIO PLAYER ── */
.audio-player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--green-dark);
  border-top: 3px solid var(--gold);
  z-index: 2000;
  box-shadow: 0 -4px 24px rgba(0,0,0,.3);
  transition: transform .3s ease;
}
.audio-player[hidden] { display: block !important; transform: translateY(100%); }
.audio-player.visible { transform: translateY(0); }
.player-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 70px;
  padding: 0 24px;
  flex-wrap: nowrap;
  overflow: hidden;
}
.player-info { flex: 0 0 auto; min-width: 0; max-width: 180px; }
.player-surah-name {
  display: block;
  font-family: var(--font-arabic);
  color: var(--gold);
  font-size: .9rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-reciter-name {
  display: block;
  color: rgba(255,255,255,.6);
  font-size: .72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-controls { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.player-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,.7);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  padding: 4px;
  border-radius: 50%;
}
.player-btn:hover { color: var(--gold); }
.player-play-btn {
  width: 44px;
  height: 44px;
  background: var(--gold) !important;
  color: var(--green-dark) !important;
  border-radius: 50%;
}
.player-play-btn:hover { background: white !important; transform: scale(1.05); }
.player-progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.player-time { color: rgba(255,255,255,.6); font-size: .7rem; flex-shrink: 0; font-family: monospace; }
.player-progress, .volume-slider {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 4px;
  background: rgba(255,255,255,.2);
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}
.player-progress { flex: 1; }
.volume-slider { width: 80px; }
.player-progress::-webkit-slider-thumb, .volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
  box-shadow: 0 0 4px rgba(255,215,0,.5);
}
.player-volume { display: flex; align-items: center; gap: 6px; color: rgba(255,255,255,.6); flex-shrink: 0; }
.player-speed select {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: white;
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-size: .75rem;
  cursor: pointer;
  font-family: var(--font-body);
}
.player-autoplay.active { color: var(--gold) !important; }

/* ── VERSE / AYAH ── */
.verse-container {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 16px;
  overflow: hidden;
  transition: var(--transition);
}
.verse-container:hover { box-shadow: var(--shadow-sm); }
.verse-arabic {
  font-family: var(--font-arabic);
  font-size: 1.8rem;
  line-height: 2.2;
  color: var(--green-dark);
  padding: 24px 28px 16px;
  text-align: right;
  border-bottom: 1px solid var(--border);
  direction: rtl;
}
.verse-number-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--gold);
  color: var(--green-dark);
  border-radius: 50%;
  font-size: .75rem;
  font-weight: 700;
  margin-left: 8px;
  direction: ltr;
  font-family: var(--font-display);
  vertical-align: middle;
}
.verse-translation {
  padding: 16px 28px;
  font-size: .92rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.7;
  border-bottom: 1px solid var(--border);
}
.verse-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--off-white);
}
.verse-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 5px 12px;
  font-size: .75rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-body);
}
.verse-action-btn:hover { border-color: var(--green); color: var(--green); background: var(--green-light); }

/* ── TAFSIR ── */
.tafsir-box {
  background: var(--gold-light);
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 20px 24px;
  margin-top: 16px;
}
.tafsir-box h4 {
  color: var(--green);
  font-size: .85rem;
  font-weight: 700;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.tafsir-box p { font-size: .9rem; color: var(--text); line-height: 1.8; }

/* ── PRAYER TIMES ── */
.prayer-card {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.prayer-header {
  background: linear-gradient(135deg, var(--green), var(--green-mid));
  padding: 24px;
  color: white;
  text-align: center;
}
.prayer-city { font-size: 1.4rem; font-family: var(--font-display); font-weight: 600; }
.prayer-date { font-size: .85rem; opacity: .8; margin-top: 4px; }
.prayer-list { list-style: none; }
.prayer-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.prayer-item:last-child { border-bottom: none; }
.prayer-item.active { background: var(--green-light); }
.prayer-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text);
  font-size: .92rem;
}
.prayer-icon { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex-shrink: 0; }
.prayer-item.active .prayer-icon { background: var(--green); width: 10px; height: 10px; }
.prayer-time {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--green);
}
.prayer-item.active .prayer-time { color: var(--green-dark); font-size: 1.2rem; }

/* ── FEATURES GRID ── */
.feature-card {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.feature-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green), var(--gold));
  transform: scaleX(0);
  transition: var(--transition);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--green); }
.feature-card:hover::after { transform: scaleX(1); }
.feature-icon {
  width: 64px;
  height: 64px;
  background: var(--green-light);
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  border: 2px solid rgba(0,100,0,.1);
}
.feature-title { font-size: 1rem; font-weight: 700; color: var(--green-dark); margin-bottom: 10px; }
.feature-desc { font-size: .85rem; color: var(--text-muted); line-height: 1.6; }

/* ── MEMORIZE PAGE ── */
.memorize-section { background: var(--off-white); }
.mic-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 48px;
  background: white;
  border-radius: var(--radius-lg);
  border: 2px dashed var(--border);
  transition: var(--transition);
}
.mic-container.recording { border-color: #e53935; background: #fff5f5; }
.mic-btn {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--green-mid));
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 24px rgba(0,100,0,.3), 0 0 0 0 rgba(0,100,0,.2);
}
.mic-btn:hover { transform: scale(1.05); box-shadow: 0 6px 32px rgba(0,100,0,.4); }
.mic-btn.recording {
  background: linear-gradient(135deg, #e53935, #b71c1c);
  animation: pulse-recording 1.5s infinite;
}
@keyframes pulse-recording {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229,57,53,.5); }
  50% { box-shadow: 0 0 0 20px rgba(229,57,53,0); }
}

/* ── KHATMAH TRACKER ── */
.khatmah-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.khatmah-surah {
  padding: 12px 8px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: white;
  font-size: .78rem;
}
.khatmah-surah:hover { border-color: var(--green); }
.khatmah-surah.read {
  background: var(--green);
  border-color: var(--green);
  color: white;
}
.khatmah-surah.read .khatmah-num { color: var(--gold); }
.khatmah-num { display: block; font-size: 1.1rem; font-weight: 700; color: var(--green); margin-bottom: 3px; }
.khatmah-surah.read .khatmah-name { color: rgba(255,255,255,.85); }
.progress-bar-wrap { background: var(--border); border-radius: 50px; overflow: hidden; height: 12px; }
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--gold));
  border-radius: 50px;
  transition: width .5s ease;
}

/* ── SEARCH ── */
.search-hero {
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  padding: 60px 0;
  text-align: center;
}
.search-input-lg {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  background: white;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.2);
}
.search-input-lg input {
  flex: 1;
  border: none;
  outline: none;
  padding: 16px 24px;
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--text);
  background: none;
}
.search-input-lg button {
  background: var(--gold);
  border: none;
  padding: 16px 28px;
  cursor: pointer;
  color: var(--green-dark);
  font-weight: 700;
  font-family: var(--font-body);
  font-size: .9rem;
  transition: var(--transition);
}
.search-input-lg button:hover { background: white; }
.search-result {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px 24px;
  margin-bottom: 12px;
  transition: var(--transition);
}
.search-result:hover { border-color: var(--green); box-shadow: var(--shadow-sm); }
.search-result-ref { font-size: .75rem; color: var(--green); font-weight: 700; margin-bottom: 8px; }
.search-result-text { font-family: var(--font-arabic); font-size: 1.2rem; color: var(--text); direction: rtl; margin-bottom: 8px; line-height: 1.8; }
.search-result-trans { font-size: .88rem; color: var(--text-muted); font-style: italic; }

/* ── ADMIN PANEL ── */
.admin-sidebar {
  width: 240px;
  background: var(--green-dark);
  min-height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 900;
  overflow-y: auto;
}
.admin-logo {
  padding: 20px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
  font-family: var(--font-arabic);
  font-size: .95rem;
  font-weight: 700;
}
.admin-nav { padding: 16px 0; }
.admin-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  color: rgba(255,255,255,.7);
  text-decoration: none;
  font-size: .85rem;
  transition: var(--transition);
}
.admin-nav a:hover, .admin-nav a.active {
  color: var(--gold);
  background: rgba(255,215,0,.07);
  border-right: 3px solid var(--gold);
}
.admin-main { margin-left: 240px; padding: 24px; min-height: 100vh; background: #f0f2f0; }
.stat-card {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  border-left: 4px solid var(--green);
  box-shadow: var(--shadow-sm);
}
.stat-card.gold { border-left-color: var(--gold); }
.stat-num { font-family: var(--font-display); font-size: 2.2rem; font-weight: 600; color: var(--green-dark); }
.stat-label { font-size: .82rem; color: var(--text-muted); margin-top: 4px; }

/* ── FOOTER ── */
.site-footer {
  background: var(--green-dark);
  color: rgba(255,255,255,.75);
  margin-top: 80px;
}
.footer-top {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  padding: 56px 24px 40px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--gold);
  font-family: var(--font-arabic);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
}
.footer-tagline { font-size: .84rem; line-height: 1.6; margin-bottom: 20px; }
.footer-social { display: flex; gap: 12px; }
.footer-social a {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.7);
  text-decoration: none;
  transition: var(--transition);
}
.footer-social a:hover { background: var(--gold); color: var(--green-dark); }
.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.footer-col h4 {
  color: var(--gold);
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a {
  color: rgba(255,255,255,.6);
  text-decoration: none;
  font-size: .82rem;
  transition: var(--transition);
}
.footer-col ul li a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: .75rem;
  color: rgba(255,255,255,.45);
}
.footer-apis { font-size: .7rem; }

/* ── SIDEBAR AD ── */
.sidebar-ad {
  background: #f5f5f0;
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  border: 1px solid var(--border);
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── ANIMATIONS ── */
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.animate-up { animation: fadeUp .4s ease both; }
.animate-up-1 { animation-delay: .1s; }
.animate-up-2 { animation-delay: .2s; }
.animate-up-3 { animation-delay: .3s; }

/* Skeleton loader */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ── PAGE LAYOUT ── */
.page-layout { display: grid; grid-template-columns: 1fr 300px; gap: 32px; padding: 40px 0; }
.page-content {}
.page-sidebar {}

/* ── FORMS ── */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: .85rem; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: .9rem;
  color: var(--text);
  background: white;
  transition: var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(0,100,0,.08); }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%23666' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

/* ── ALERTS ── */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert-success { background: #e8f5e9; border: 1px solid #a5d6a7; color: #1b5e20; }
.alert-warning { background: #fff8e1; border: 1px solid #ffe082; color: #e65100; }
.alert-error   { background: #ffebee; border: 1px solid #ef9a9a; color: #b71c1c; }
.alert-info    { background: var(--gold-light); border: 1px solid #ffe082; color: var(--green-dark); }

/* ── UTILITY ── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-arabic { font-family: var(--font-arabic); direction: rtl; }
.text-gold   { color: var(--gold); }
.text-green  { color: var(--green); }
.text-muted  { color: var(--text-muted); }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.hidden { display: none !important; }
.divider { border: none; border-top: 1px solid var(--border); margin: 32px 0; }
.gold-line {
  display: block;
  width: 60px;
  height: 3px;
  background: var(--gold);
  margin: 12px auto;
  border-radius: 2px;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .page-layout { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .footer-links { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --header-h: 56px; --nav-h: auto; }
  .header-inner { padding: 0 16px; gap: 10px; }
  .header-search { max-width: none; flex: 1; }
  .logo-sub { display: none; }
  .nav-toggle { display: flex; }
  .main-nav { display: none; }
  .main-nav.open { display: block; }
  .nav-list { flex-direction: column; height: auto; padding: 8px 0; overflow: visible; }
  .nav-link { padding: 12px 20px; }
  .has-dropdown .dropdown-menu { position: static; box-shadow: none; border: none; padding-left: 20px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero-section { padding: 52px 0 72px; }
  .hero-stats { gap: 24px; }
  .hero-stat-num { font-size: 2rem; }
  .section { padding: 44px 0; }
  .section-title { font-size: 1.5rem; }
  .verse-arabic { font-size: 1.4rem; padding: 16px 18px 12px; }
  .player-inner { padding: 0 12px; gap: 8px; }
  .player-info { max-width: 100px; }
  .player-volume, .player-speed { display: none; }
  .footer-links { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .admin-sidebar { display: none; }
  .admin-main { margin-left: 0; }
}

@media (max-width: 480px) {
  .container { padding: 0 14px; }
  .hero-bismillah { font-size: 1.8rem; }
  .surah-card { padding: 14px; }
  .grid-surahs { grid-template-columns: 1fr; }
  .footer-links { grid-template-columns: 1fr; }
  .lang-toggle span:not(svg) { display: none; }
}

/* ── PRINT ── */
@media print {
  .site-header, .main-nav, .audio-player, .site-footer, .ad-banner { display: none !important; }
  .site-main { margin: 0; }
  .verse-arabic { color: black; }
}
