/* ── RESET & BASE ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; color: #1a1a1a; background: #fafaf8; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; }

/* ── VARIABLES ────────────────────────────────────────────────────────── */
:root {
  --green:     #1a6b3a;
  --green-dark:#145530;
  --green-mid: #2d9e5f;
  --green-lt:  #d4edda;
  --gold:      #c8972a;
  --gold-lt:   #fef3cd;
  --bg:        #fafaf8;
  --bg-lt:     #f3f3ee;
  --text:      #1a1a1a;
  --text-sm:   #555555;
  --border:    #e0e0d8;
  --shadow:    0 4px 24px rgba(0,0,0,0.08);
  --radius:    14px;
}

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

/* ── NAVBAR ───────────────────────────────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(26, 107, 58, 0.97);
  backdrop-filter: blur(12px);
  transition: box-shadow 0.3s;
}
.navbar.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.2); }
.nav-inner {
  display: flex; align-items: center; gap: 32px;
  padding: 16px 0;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-crescent { font-size: 26px; color: var(--gold); }
.logo-text { font-size: 18px; font-weight: 800; color: #fff; letter-spacing: -0.5px; white-space: nowrap; }
.logo-sub { color: var(--gold); font-weight: 400; }
.nav-links { display: flex; align-items: center; gap: 2px; margin-left: auto; flex-wrap: nowrap; }
.nav-links a { color: rgba(255,255,255,0.9); font-size: 13px; font-weight: 500; padding: 7px 10px; border-radius: 8px; transition: all 0.2s; white-space: nowrap; }
.nav-links a:hover { color: #fff; background: rgba(255,255,255,0.12); }
.nav-login {
  background: rgba(255,255,255,0.12) !important; color: #fff !important;
  font-weight: 600 !important; padding: 7px 16px !important; border-radius: 24px !important;
  border: 1px solid rgba(255,255,255,0.25) !important; font-size: 13px !important;
  transition: background 0.2s !important;
}
.nav-login:hover { background: rgba(255,255,255,0.22) !important; }
.nav-cta {
  background: var(--gold) !important; color: #1a1a1a !important;
  font-weight: 700 !important; padding: 8px 20px !important; border-radius: 24px !important;
}
.nav-cta:hover { background: #e8b84b !important; transform: translateY(-1px); }
.hamburger { display: none; background: none; border: none; color: #fff; font-size: 22px; cursor: pointer; margin-left: auto; }
.mobile-menu { display: none; flex-direction: column; padding: 12px 24px 16px; gap: 4px; }
.mobile-menu.open { display: flex; }
.mobile-menu a { color: rgba(255,255,255,0.9); padding: 10px 12px; font-size: 15px; border-radius: 8px; }
.mobile-menu a:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* ── HERO ─────────────────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(150deg, #0d4a24 0%, #1a6b3a 50%, #145530 100%);
  padding: 140px 0 80px; min-height: 100vh; display: flex; align-items: center;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-inner { position: relative; z-index: 1; max-width: 800px; }
.hero-arabic {
  font-family: 'Amiri', serif; font-size: 28px; color: var(--gold);
  margin-bottom: 24px; direction: rtl; text-align: left;
}
.hero h1 { font-size: clamp(36px,5vw,64px); font-weight: 800; color: #fff; line-height: 1.15; margin-bottom: 20px; }
.hero h1 .highlight { color: var(--gold); }
.hero-sub { font-size: 18px; color: rgba(255,255,255,0.85); max-width: 600px; margin-bottom: 36px; line-height: 1.7; }
.hero-stats { display: flex; gap: 32px; margin-bottom: 40px; flex-wrap: wrap; }
.hero-stats .stat { text-align: center; }
.hero-stats .stat strong { display: block; font-size: 28px; font-weight: 800; color: var(--gold); }
.hero-stats .stat span { font-size: 13px; color: rgba(255,255,255,0.7); }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.btn-primary {
  background: var(--gold); color: #1a1a1a; font-size: 16px; font-weight: 700;
  padding: 16px 32px; border-radius: 50px; border: none; cursor: pointer;
  transition: all 0.2s; display: inline-block;
}
.btn-primary:hover { background: #e8b84b; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(200,151,42,0.4); }
.btn-ghost {
  color: rgba(255,255,255,0.9); font-size: 16px; font-weight: 600;
  padding: 16px 32px; border-radius: 50px; border: 2px solid rgba(255,255,255,0.3);
  transition: all 0.2s; display: inline-block;
}
.btn-ghost:hover { border-color: rgba(255,255,255,0.7); color: #fff; background: rgba(255,255,255,0.08); }
.hero-wave { position: absolute; bottom: 0; left: 0; right: 0; }
.hero-wave svg { display: block; }

/* ── TICKER ───────────────────────────────────────────────────────────── */
.ticker-bar { background: var(--gold); overflow: hidden; padding: 10px 0; }
.ticker-track {
  display: flex; gap: 60px; white-space: nowrap;
  animation: ticker 30s linear infinite;
}
.ticker-track span { font-size: 13px; font-weight: 600; color: #1a1a1a; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── SECTIONS ─────────────────────────────────────────────────────────── */
.section { padding: 80px 0; }
.bg-light { background: var(--bg-lt); }
.section-header { text-align: center; margin-bottom: 56px; }
.section-badge {
  display: inline-block; background: var(--green-lt); color: var(--green);
  font-size: 12px; font-weight: 700; padding: 6px 16px; border-radius: 20px;
  margin-bottom: 16px; text-transform: uppercase; letter-spacing: 1px;
}
.section-header h2 { font-size: clamp(28px,3vw,40px); font-weight: 800; color: #111; margin-bottom: 12px; }
.section-header p { font-size: 17px; color: var(--text-sm); max-width: 520px; margin: 0 auto; }

/* ── SHARED CARD/GRID PRIMITIVES ──────────────────────────────────────────
   Every *-card class above (feature-card, course-card, etc.) reimplements
   this same background/border/radius/shadow/hover-lift by hand. New pages
   (e.g. lessons.html) should use .card/.card-grid directly instead of
   inventing another one-off variant. Existing *-card classes are left as-is. */
.card {
  background: #fff; border-radius: var(--radius); padding: 28px;
  border: 1px solid var(--border); transition: all 0.3s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
@media (max-width: 900px) { .card-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 600px) { .card-grid { grid-template-columns: 1fr; } }

/* ── FEATURES ─────────────────────────────────────────────────────────── */
.features-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.feature-card {
  background: #fff; border-radius: var(--radius); padding: 32px 28px;
  border: 1px solid var(--border); transition: all 0.3s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--green-lt); }
.feature-icon { font-size: 36px; margin-bottom: 16px; }
.feature-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; color: #111; }
.feature-card p { font-size: 14px; color: var(--text-sm); line-height: 1.7; }

/* ── COURSES ──────────────────────────────────────────────────────────── */
.courses-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.course-card {
  background: #fff; border-radius: var(--radius); padding: 28px;
  border: 1px solid var(--border); transition: all 0.3s; position: relative;
}
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.featured-course { border: 2px solid var(--green); }
.course-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--green); color: #fff; font-size: 11px; font-weight: 700;
  padding: 4px 14px; border-radius: 20px; white-space: nowrap;
}
.course-icon { font-size: 40px; margin-bottom: 14px; }
.course-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 10px; color: #111; }
.course-card p { font-size: 14px; color: var(--text-sm); margin-bottom: 16px; line-height: 1.6; }
.course-details { margin-bottom: 20px; }
.course-details li { font-size: 13px; color: #444; padding: 4px 0; }
.btn-enroll {
  display: block; text-align: center; background: var(--green); color: #fff;
  padding: 11px 20px; border-radius: 8px; font-weight: 600; font-size: 14px;
  transition: all 0.2s;
}
.btn-enroll:hover { background: var(--green-dark); }

/* ── STEPS ────────────────────────────────────────────────────────────── */
.steps-container { display: flex; align-items: center; gap: 16px; justify-content: center; flex-wrap: wrap; }
.step-card {
  background: #fff; border-radius: var(--radius); padding: 36px 28px;
  border: 1px solid var(--border); text-align: center; flex: 1; min-width: 220px; max-width: 300px;
  transition: all 0.3s;
}
.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.step-num { font-size: 48px; font-weight: 900; color: var(--green-lt); line-height: 1; margin-bottom: 8px; }
.step-icon { font-size: 36px; margin-bottom: 14px; }
.step-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.step-card p { font-size: 14px; color: var(--text-sm); line-height: 1.6; }
.step-arrow { font-size: 32px; color: var(--green); font-weight: 300; }

/* ── SCHOLARS ─────────────────────────────────────────────────────────── */
.scholars-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 24px; }
.scholar-card {
  background: #fff; border-radius: var(--radius); padding: 28px;
  border: 1px solid var(--border); display: flex; gap: 20px; transition: all 0.3s;
  position: relative;
}
.scholar-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.scholar-avatar {
  width: 90px; height: 90px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Amiri', serif; font-size: 22px; color: rgba(255,255,255,0.9);
}
.scholar-info { flex: 1; }
.scholar-info h3 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.scholar-title { font-size: 13px; color: var(--green); font-weight: 600; display: block; margin-bottom: 10px; }
.scholar-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.badge { background: var(--green-lt); color: var(--green); font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; }
.scholar-info p { font-size: 13px; color: var(--text-sm); line-height: 1.6; margin-bottom: 10px; }
.scholar-meta { display: flex; gap: 16px; font-size: 12px; color: #777; margin-bottom: 14px; }
.btn-scholar {
  display: inline-block; background: var(--green); color: #fff;
  padding: 8px 20px; border-radius: 8px; font-size: 13px; font-weight: 600;
  transition: all 0.2s;
}
.btn-scholar:hover { background: var(--green-dark); }

/* ── TESTIMONIALS ─────────────────────────────────────────────────────── */
.testimonials-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 24px; }
.testimonial-card {
  background: #fff; border-radius: var(--radius); padding: 28px;
  border: 1px solid var(--border); transition: all 0.3s;
}
.testimonial-card:hover { box-shadow: var(--shadow); }
.stars { color: var(--gold); font-size: 18px; margin-bottom: 14px; }
.testimonial-card p { font-size: 15px; color: #444; line-height: 1.7; margin-bottom: 20px; font-style: italic; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.author-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--green-mid));
  color: #fff; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.testimonial-author strong { font-size: 14px; color: #111; display: block; }
.testimonial-author span { font-size: 12px; color: #888; }

/* ── PRICING ──────────────────────────────────────────────────────────── */
.pricing-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; margin-bottom: 24px; }
.pricing-card {
  background: #fff; border-radius: var(--radius); padding: 32px 28px;
  border: 1px solid var(--border); text-align: center; position: relative; transition: all 0.3s;
}
.pricing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.featured-pricing { border: 2px solid var(--green); transform: scale(1.03); }
.featured-pricing:hover { transform: scale(1.03) translateY(-4px); }
.pricing-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--green); color: #fff; font-size: 11px; font-weight: 700;
  padding: 4px 16px; border-radius: 20px;
}
.pricing-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.price { font-size: 42px; font-weight: 800; color: var(--green); }
.price span { font-size: 16px; font-weight: 400; color: #888; }
.price-note { font-size: 13px; color: #888; margin-bottom: 20px; }
.pricing-features { text-align: left; margin-bottom: 24px; }
.pricing-features li { font-size: 14px; color: #444; padding: 6px 0; border-bottom: 1px solid #f0f0f0; }
.btn-pricing {
  display: block; padding: 13px; border-radius: 10px; font-weight: 700;
  border: 2px solid var(--green); color: var(--green); font-size: 14px; transition: all 0.2s;
}
.btn-pricing:hover { background: var(--green); color: #fff; }
.btn-pricing-featured {
  display: block; padding: 13px; border-radius: 10px; font-weight: 700;
  background: var(--green); color: #fff; font-size: 14px; transition: all 0.2s;
}
.btn-pricing-featured:hover { background: var(--green-dark); }
.pricing-note { text-align: center; font-size: 14px; color: var(--text-sm); padding: 16px; background: var(--gold-lt); border-radius: 10px; }

/* ── ENROLL SECTION ───────────────────────────────────────────────────── */
.enroll-section {
  background: linear-gradient(150deg, #0d4a24 0%, #1a6b3a 60%, #145530 100%);
  position: relative;
}
.enroll-section::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4z'/%3E%3C/g%3E%3C/svg%3E");
}
.section-header.light .section-badge.light-badge { background: rgba(255,255,255,0.15); color: #fff; }
.enroll-layout { display: grid; grid-template-columns: 1fr 340px; gap: 32px; position: relative; z-index: 1; }
.enroll-form-card { background: #fff; border-radius: var(--radius); padding: 40px; }
.enroll-form-card h2 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.form-section-title {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  color: var(--green); border-bottom: 2px solid var(--green-lt);
  padding-bottom: 8px; margin: 24px 0 16px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: #333; margin-bottom: 6px; }
.req { color: #e53e3e; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--border);
  border-radius: 8px; font-size: 14px; font-family: inherit;
  background: #fafaf8; transition: border-color 0.2s; outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--green); background: #fff; }
.checkbox-label { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; cursor: pointer; }
.checkbox-label input { width: auto; margin-top: 2px; }
.btn-enroll-submit {
  width: 100%; padding: 16px; background: var(--green); color: #fff;
  border: none; border-radius: 10px; font-size: 16px; font-weight: 700;
  cursor: pointer; transition: all 0.2s; margin-top: 8px; font-family: inherit;
}
.btn-enroll-submit:hover { background: var(--green-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(26,107,58,0.4); }
.btn-enroll-submit:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
.enroll-success { text-align: center; padding: 40px 20px; }
.enroll-success h3 { font-size: 24px; font-weight: 700; margin-bottom: 12px; color: var(--green); }
.enroll-success p { font-size: 15px; color: #555; line-height: 1.7; }

/* ── ENROLL SIDEBAR ───────────────────────────────────────────────────── */
.enroll-sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-card { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); border-radius: var(--radius); padding: 24px; }
.sidebar-card h3 { font-size: 16px; font-weight: 700; color: #fff; margin-bottom: 14px; }
.sidebar-card p { font-size: 14px; color: rgba(255,255,255,0.8); line-height: 1.6; }
.next-steps { display: flex; flex-direction: column; gap: 12px; }
.next-step { display: flex; align-items: flex-start; gap: 12px; }
.next-step span {
  width: 24px; height: 24px; border-radius: 50%; background: var(--gold);
  color: #1a1a1a; font-size: 12px; font-weight: 700; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.next-step p { font-size: 13px; color: rgba(255,255,255,0.85); }
.btn-wa {
  display: block; margin-top: 14px; text-align: center;
  background: #25d366; color: #fff; padding: 12px 20px;
  border-radius: 10px; font-weight: 700; font-size: 14px; transition: all 0.2s;
}
.btn-wa:hover { background: #1da851; }
.guarantee-card { text-align: center; }
.guarantee-icon { font-size: 40px; margin-bottom: 12px; }

/* ── FOOTER ───────────────────────────────────────────────────────────── */
.footer { background: #0d3520; }
.footer-top { padding: 60px 0 40px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand .logo { margin-bottom: 16px; }
.footer-brand p { font-size: 14px; color: rgba(255,255,255,0.65); line-height: 1.7; margin-bottom: 16px; }
.footer-arabic { font-family: 'Amiri', serif; font-size: 18px; color: var(--gold); direction: rtl; }
.footer-links h4 { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 1px; }
.footer-links ul { display: flex; flex-direction: column; gap: 10px; }
.footer-links a, .footer-links li { font-size: 14px; color: rgba(255,255,255,0.65); transition: color 0.2s; }
.footer-links a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 20px 0; text-align: center; }
.footer-bottom p { font-size: 13px; color: rgba(255,255,255,0.4); }

/* ── TOAST ────────────────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; right: 24px; background: #1a1a1a; color: #fff;
  padding: 14px 22px; border-radius: 10px; font-size: 14px; font-weight: 500;
  transform: translateY(60px); opacity: 0; pointer-events: none;
  transition: all 0.3s; z-index: 9999;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.toast-error { background: #e53e3e; }

/* ── RESPONSIVE ───────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .courses-grid { grid-template-columns: repeat(2,1fr); }
  .enroll-layout { grid-template-columns: 1fr; }
  .enroll-sidebar { order: -1; display: grid; grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: block; }
  .features-grid { grid-template-columns: 1fr; }
  .courses-grid { grid-template-columns: 1fr; }
  .scholars-grid { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .featured-pricing { transform: none; }
  .featured-pricing:hover { transform: translateY(-4px); }
  .steps-container { flex-direction: column; }
  .step-arrow { transform: rotate(90deg); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .enroll-sidebar { grid-template-columns: 1fr; }
  .scholar-card { flex-direction: column; }
  .form-row { grid-template-columns: 1fr; }
  .hero { padding: 120px 0 60px; }
  .hero-stats { gap: 20px; }
}
@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
  .section { padding: 60px 0; }
}

/* ── FEATURED SCHOLAR (Dr. Naeem) ─────────────────────────────────────── */
.featured-scholar {
  grid-column: 1 / -1;
  border: 2px solid var(--gold);
  background: linear-gradient(135deg, #fffbf0 0%, #fff 60%);
  position: relative;
}
.scholar-featured-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: #1a1a1a; font-size: 12px; font-weight: 700;
  padding: 4px 20px; border-radius: 20px; white-space: nowrap;
}
.badge-gold { background: #fef3cd !important; color: #92650a !important; border: 1px solid #e8b84b; }
.scholar-credentials { margin: 14px 0; display: flex; flex-direction: column; gap: 8px; }
.credential-item {
  font-size: 13px; color: #444; background: #f8f8f8;
  padding: 8px 14px; border-radius: 8px; border-left: 3px solid var(--green);
}

/* ── HADITH OF THE DAY ────────────────────────────────────────────────── */
.hadith-section {
  background: linear-gradient(150deg, #0a3a1c 0%, #1a6b3a 100%);
  position: relative;
}
.hadith-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px; padding: 40px 48px;
  max-width: 860px; margin: 0 auto 28px;
  backdrop-filter: blur(4px);
}
.hadith-loading { text-align: center; padding: 40px; color: rgba(255,255,255,0.7); }
.hadith-spinner {
  width: 40px; height: 40px; border: 3px solid rgba(255,255,255,0.2);
  border-top-color: var(--gold); border-radius: 50%;
  animation: spin 0.8s linear infinite; margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.hadith-meta-top {
  display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap;
}
.hadith-source-badge {
  background: var(--gold); color: #1a1a1a; font-size: 12px; font-weight: 700;
  padding: 4px 14px; border-radius: 20px;
}
.hadith-narrator { font-size: 12px; color: rgba(255,255,255,0.6); }
.hadith-arabic {
  font-family: 'Amiri', serif; font-size: 30px; color: #fff;
  direction: rtl; text-align: right; line-height: 1.8;
  margin-bottom: 20px; padding: 20px; background: rgba(255,255,255,0.05);
  border-radius: 12px;
}
.hadith-divider {
  height: 1px; background: rgba(255,255,255,0.15); margin: 16px 0;
}
.hadith-urdu {
  font-family: 'Amiri', serif; font-size: 18px; color: rgba(255,255,255,0.9);
  direction: rtl; text-align: right; line-height: 1.9; margin-bottom: 16px;
}
.hadith-english {
  font-size: 16px; color: rgba(255,255,255,0.85); line-height: 1.8;
  font-style: italic; margin-bottom: 20px;
}
.lang-tag {
  display: inline-block; font-size: 11px; font-weight: 700;
  background: rgba(200,151,42,0.25); color: var(--gold);
  padding: 2px 10px; border-radius: 12px; margin-bottom: 6px; margin-left: 8px;
  font-style: normal; direction: ltr;
}
.hadith-share { display: flex; gap: 12px; }
.hadith-share-btn {
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  color: #fff; padding: 8px 18px; border-radius: 8px; font-size: 13px;
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.hadith-share-btn:hover { background: rgba(255,255,255,0.2); }
.hadith-nav {
  display: flex; align-items: center; justify-content: center; gap: 24px;
  max-width: 860px; margin: 0 auto;
}
.hadith-btn {
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.25);
  color: #fff; padding: 10px 24px; border-radius: 8px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.hadith-btn:hover { background: var(--gold); color: #1a1a1a; border-color: var(--gold); }

/* ── FREE BOOKS LIBRARY ───────────────────────────────────────────────── */
.books-controls { margin-bottom: 32px; }
.books-search {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1.5px solid var(--border);
  border-radius: 50px; padding: 12px 20px; margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.search-icon { font-size: 18px; flex-shrink: 0; }
.books-search input {
  border: none; outline: none; font-size: 15px; width: 100%;
  background: transparent; font-family: inherit;
}
.books-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-btn {
  padding: 7px 18px; border-radius: 24px; font-size: 13px; font-weight: 600;
  border: 1.5px solid var(--border); background: #fff; color: #555;
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.filter-btn:hover { border-color: var(--green); color: var(--green); }
.filter-btn.active { background: var(--green); color: #fff; border-color: var(--green); }
.books-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 24px;
}
.book-card {
  background: #fff; border-radius: var(--radius); padding: 22px;
  border: 1px solid var(--border); position: relative; transition: all 0.3s;
  display: flex; flex-direction: column;
}
.book-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.book-lang-badge {
  position: absolute; top: 14px; right: 14px;
  color: #fff; font-size: 10px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px;
}
.book-icon { font-size: 36px; margin-bottom: 8px; }
.book-cat-badge {
  display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--green); background: var(--green-lt);
  padding: 2px 10px; border-radius: 20px; margin-bottom: 10px;
}
.book-title {
  font-size: 15px; font-weight: 700; color: #111; margin-bottom: 6px; line-height: 1.4;
}
.book-author { font-size: 12px; color: var(--green); font-weight: 600; margin-bottom: 8px; }
.book-desc { font-size: 13px; color: #666; line-height: 1.6; flex: 1; margin-bottom: 12px; }
.book-meta { font-size: 12px; color: #999; margin-bottom: 14px; }
.btn-download {
  display: block; text-align: center; background: var(--green); color: #fff;
  padding: 10px 16px; border-radius: 8px; font-size: 13px; font-weight: 700;
  transition: all 0.2s; margin-top: auto;
}
.btn-download:hover { background: var(--green-dark); transform: translateY(-1px); }
.btn-download-alt {
  display: block; text-align: center; background: #fff; color: var(--green);
  border: 2px solid var(--green); padding: 10px 16px; border-radius: 8px;
  font-size: 13px; font-weight: 700; transition: all 0.2s; margin-top: 8px;
}
.btn-download-alt:hover { background: var(--green); color: #fff; transform: translateY(-1px); }
/* ── QURAN AUDIO PLAYER ───────────────────────────────────────────────── */
.ql-section { background: var(--bg-lt); }

.ql-controls {
  display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-end;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px; margin-bottom: 24px;
}
.ql-label { font-size: 11px; font-weight: 700; color: #888; text-transform: uppercase; letter-spacing: 1px; display: block; margin-bottom: 6px; }
.ql-reciter-wrap, .ql-search-wrap { flex: 1; min-width: 200px; }
.ql-select {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--border);
  border-radius: 8px; font-size: 14px; color: var(--text);
  background: #fff; cursor: pointer; outline: none;
}
.ql-select:focus { border-color: var(--green); }
.ql-search {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--border);
  border-radius: 8px; font-size: 14px; outline: none;
}
.ql-search:focus { border-color: var(--green); }

/* Surah grid */
.ql-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px; margin-bottom: 20px;
}
.ql-card {
  background: #fff; border: 1.5px solid var(--border);
  border-radius: 10px; padding: 12px 14px;
  display: flex; align-items: center; gap: 12px;
  cursor: pointer; transition: all 0.2s;
}
.ql-card:hover { border-color: var(--green); transform: translateY(-2px); box-shadow: var(--shadow); }
.ql-card-active { border-color: var(--green) !important; background: #f0faf4 !important; }
.ql-card-num {
  font-size: 13px; font-weight: 800; color: var(--green);
  min-width: 28px; text-align: center;
  background: var(--green-lt); border-radius: 6px; padding: 3px 5px;
}
.ql-card-body { flex: 1; min-width: 0; }
.ql-card-ar { font-family: 'Amiri', serif; font-size: 16px; color: #1a1a1a; direction: rtl; text-align: right; }
.ql-card-en { font-size: 12px; font-weight: 700; color: var(--green); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ql-card-meta { font-size: 10px; color: #aaa; }
.ql-card-play {
  font-size: 14px; color: var(--green); width: 28px; height: 28px;
  border-radius: 50%; background: var(--green-lt);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all 0.2s;
}
.ql-card:hover .ql-card-play { background: var(--green); color: #fff; }
.ql-card-active .ql-card-play { background: var(--green); color: #fff; }
.ql-source-note { text-align: center; font-size: 12px; color: #aaa; }

/* Sticky player bar */
.ql-player {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 2000;
  background: linear-gradient(135deg, #0d3320, #1a5c35);
  border-top: 2px solid var(--gold);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.3);
}
.ql-player-inner {
  max-width: 1200px; margin: 0 auto; padding: 10px 24px;
  display: grid; grid-template-columns: 220px auto 1fr auto;
  align-items: center; gap: 16px;
}
.ql-player-surah  { font-size: 13px; font-weight: 700; color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ql-player-reciter { font-size: 11px; color: rgba(255,255,255,0.6); }
.ql-player-controls { display: flex; align-items: center; gap: 12px; justify-content: center; }
.ql-ctrl-btn {
  background: rgba(255,255,255,0.1); color: #fff; border: none;
  width: 34px; height: 34px; border-radius: 50%; font-size: 14px;
  cursor: pointer; transition: background 0.2s;
}
.ql-ctrl-btn:hover { background: rgba(255,255,255,0.22); }
.ql-play-btn {
  background: var(--gold); color: #1a1a1a; border: none;
  width: 44px; height: 44px; border-radius: 50%; font-size: 18px;
  cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center;
}
.ql-play-btn:hover { background: #e8b030; transform: scale(1.08); }
.ql-player-progress-wrap {
  display: flex; align-items: center; gap: 10px;
}
.ql-time { font-size: 11px; color: rgba(255,255,255,0.6); white-space: nowrap; }
.ql-progress-bar {
  flex: 1; height: 5px; background: rgba(255,255,255,0.2);
  border-radius: 10px; cursor: pointer; position: relative; min-width: 80px;
}
.ql-progress-bar:hover { height: 8px; }
.ql-progress-fill { height: 100%; background: var(--gold); border-radius: 10px; width: 0%; transition: width 0.5s linear; }
.ql-player-right { display: flex; align-items: center; gap: 12px; }
.ql-volume {
  width: 80px; accent-color: var(--gold); cursor: pointer;
}
.ql-close-btn {
  background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.7);
  border: none; width: 28px; height: 28px; border-radius: 50%;
  cursor: pointer; font-size: 12px; transition: background 0.2s;
}
.ql-close-btn:hover { background: rgba(255,0,0,0.4); color: #fff; }

@media (max-width: 900px) {
  .ql-grid { grid-template-columns: repeat(3, 1fr); }
  .ql-player-inner { grid-template-columns: 1fr auto 1fr; }
  .ql-player-info, .ql-player-right { display: none; }
}
@media (max-width: 600px) {
  .ql-grid { grid-template-columns: repeat(2, 1fr); }
  .ql-player-inner { grid-template-columns: auto 1fr; gap: 10px; padding: 10px 14px; }
  .ql-player-progress-wrap { display: none; }
}

/* ── QIBLA FINDER ─────────────────────────────────────────────────────── */
.qibla-section { background: linear-gradient(160deg,#0d3320,#1a5c35,#1a6b3a); }
.qibla-section .section-header h2,
.qibla-section .section-header p { color: #fff; }
.qibla-section .section-header p { color: rgba(255,255,255,0.75); }
.qibla-section .section-badge { background: rgba(200,151,42,0.25); color: var(--gold); border: 1px solid rgba(200,151,42,0.4); }

.qibla-layout {
  display: grid; grid-template-columns: 320px 1fr; gap: 48px;
  align-items: center; max-width: 900px; margin: 0 auto;
}

/* Compass */
.qibla-compass-wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.qibla-compass {
  width: 300px; height: 300px; position: relative;
  filter: drop-shadow(0 8px 32px rgba(200,151,42,0.3));
}
.qibla-ring-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.qibla-needle-wrap {
  position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center;
  transition: transform 0.6s cubic-bezier(0.34,1.56,0.64,1);
}
.qibla-needle-svg { width: 40px; height: 220px; }
.qibla-center-label {
  position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center; pointer-events: none;
}
.qibla-kaaba-icon { font-size: 28px; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4)); }
.qibla-degree-badge {
  background: rgba(200,151,42,0.2); border: 1.5px solid var(--gold);
  color: var(--gold); font-size: 15px; font-weight: 800;
  padding: 8px 24px; border-radius: 50px; letter-spacing: 1px;
  min-height: 40px; display: flex; align-items: center; justify-content: center;
  min-width: 160px;
}

/* Info panel */
.qibla-info { display: flex; flex-direction: column; gap: 20px; }
.qibla-status {
  display: flex; gap: 14px; align-items: flex-start;
  background: rgba(255,255,255,0.08); border-radius: 12px; padding: 16px;
}
.qibla-status-icon { font-size: 28px; flex-shrink: 0; }
.qibla-status strong { color: #fff; font-size: 15px; }
.qibla-status span   { color: rgba(255,255,255,0.7); font-size: 13px; }

.qibla-details { display: flex; flex-direction: column; gap: 10px; }
.qibla-detail-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; background: rgba(255,255,255,0.07);
  border-radius: 8px; gap: 12px;
}
.qd-label { font-size: 13px; color: rgba(255,255,255,0.6); }
.qd-val   { font-size: 13px; font-weight: 700; color: #fff; text-align: right; }

.qibla-find-btn {
  background: var(--gold); color: #1a1a1a;
  border: none; padding: 14px 28px; border-radius: 50px;
  font-size: 15px; font-weight: 800; cursor: pointer;
  transition: all 0.2s; width: 100%;
}
.qibla-find-btn:hover { background: #e8b030; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(200,151,42,0.4); }
.qibla-find-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

.qibla-note {
  background: rgba(255,255,255,0.06); border-radius: 8px;
  padding: 12px 14px; font-size: 12px; color: rgba(255,255,255,0.6);
}
.qibla-note strong { color: rgba(255,255,255,0.85); }

.qibla-dua {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 16px; text-align: center;
}
.qibla-dua-ar {
  font-family: 'Amiri', serif; font-size: 20px; color: var(--gold);
  direction: rtl; margin-bottom: 6px; line-height: 1.7;
}
.qibla-dua-tr { font-size: 12px; color: rgba(255,255,255,0.6); font-style: italic; }

@media (max-width: 780px) {
  .qibla-layout { grid-template-columns: 1fr; justify-items: center; gap: 28px; }
  .qibla-compass { width: 260px; height: 260px; }
}
@media (max-width: 400px) {
  .qibla-compass { width: 220px; height: 220px; }
}

/* ── AYAH OF THE DAY ──────────────────────────────────────────────────── */
.ayah-section { background: #fff; }
.ayah-card {
  max-width: 820px; margin: 0 auto 24px;
  background: linear-gradient(160deg, #f9f6ef, #fffdf6);
  border: 2px solid #e8d9a0;
  border-radius: 20px; padding: 36px 40px;
  position: relative; overflow: hidden;
  box-shadow: 0 8px 32px rgba(200,151,42,0.10);
}
.ayah-card::before {
  content: '﷽'; font-family: 'Amiri', serif;
  font-size: 120px; color: rgba(200,151,42,0.06);
  position: absolute; top: -10px; right: -10px;
  line-height: 1; pointer-events: none;
}
.ayah-surah-tag {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 22px; font-size: 13px; font-weight: 600; color: #888;
}
.ayah-surah-ar {
  font-family: 'Amiri', serif; font-size: 18px; color: var(--gold); direction: rtl;
}
.ayah-surah-sep { color: #ccc; }
.ayah-ref-badge {
  margin-left: auto; background: var(--green); color: #fff;
  font-size: 12px; font-weight: 700; padding: 3px 12px; border-radius: 20px;
}
.ayah-arabic {
  font-family: 'Amiri', serif;
  font-size: 32px; line-height: 2.0;
  color: #1a1a1a; direction: rtl; text-align: right;
  margin-bottom: 20px;
  border-right: 4px solid var(--gold);
  padding-right: 18px;
}
.ayah-divider {
  height: 1px; background: linear-gradient(to right, transparent, #e8d9a0, transparent);
  margin: 20px 0;
}
.ayah-urdu {
  font-family: 'Amiri', serif;
  font-size: 20px; line-height: 1.9;
  color: #2a5c3a; direction: rtl; text-align: right;
  margin-bottom: 16px; font-style: italic;
}
.ayah-english {
  font-size: 15px; line-height: 1.8;
  color: #444; font-style: italic;
  border-left: 3px solid var(--green-lt);
  padding-left: 16px; margin-bottom: 24px;
}
.ayah-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.ayah-share-btn, .ayah-copy-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 50px; font-size: 13px;
  font-weight: 700; cursor: pointer; transition: all 0.2s; border: none;
}
.whatsapp-btn {
  background: #25D366; color: #fff;
  text-decoration: none;
}
.whatsapp-btn:hover { background: #1ebe57; transform: translateY(-1px); }
.ayah-copy-btn {
  background: var(--green-lt); color: var(--green);
  border: 1.5px solid var(--green) !important;
}
.ayah-copy-btn:hover { background: var(--green); color: #fff; }

.ayah-nav {
  display: flex; align-items: center; justify-content: center; gap: 20px;
  margin-top: 8px;
}
.ayah-btn {
  background: var(--green); color: #fff; border: none;
  padding: 9px 24px; border-radius: 50px; font-size: 13px;
  font-weight: 700; cursor: pointer; transition: all 0.2s;
}
.ayah-btn:hover { background: var(--green-dark); transform: translateY(-1px); }
.ayah-counter { font-size: 13px; color: #999; }
.ayah-loading { text-align: center; padding: 40px; color: #888; }
.ayah-error   { text-align: center; padding: 30px; color: #c00; }

@media (max-width: 600px) {
  .ayah-card   { padding: 24px 20px; }
  .ayah-arabic { font-size: 24px; }
  .ayah-urdu   { font-size: 17px; }
}

/* ── AZAN PRAYER TIMES ────────────────────────────────────────────────── */
.azan-section {
  background: linear-gradient(160deg, #0d3320 0%, #1a6b3a 60%, #145530 100%);
  padding: 40px 0 32px;
  border-bottom: 4px solid var(--gold);
}
.azan-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 24px;
}
.azan-title-block { display: flex; flex-direction: column; gap: 4px; }
.azan-arabic {
  font-family: 'Amiri', serif; font-size: 26px; color: var(--gold);
  direction: rtl; line-height: 1.4;
}
.azan-label { color: rgba(255,255,255,0.85); font-size: 13px; font-weight: 500; }
.azan-city-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.city-select {
  background: rgba(255,255,255,0.12); color: #fff; border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: 8px; padding: 8px 14px; font-size: 14px; font-weight: 600;
  cursor: pointer; outline: none;
}
.city-select option { background: #1a4030; color: #fff; }
.azan-date-display {
  color: rgba(255,255,255,0.75); font-size: 13px;
  background: rgba(255,255,255,0.08); padding: 6px 14px; border-radius: 20px;
}
.azan-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px;
  margin-bottom: 18px;
}
.azan-card {
  background: rgba(255,255,255,0.08); border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 14px; padding: 16px 10px; text-align: center;
  transition: all 0.3s; position: relative; overflow: hidden;
}
.azan-card:hover { background: rgba(255,255,255,0.15); transform: translateY(-2px); }
.azan-next {
  background: linear-gradient(135deg, rgba(200,151,42,0.35), rgba(200,151,42,0.18)) !important;
  border-color: var(--gold) !important;
  box-shadow: 0 0 20px rgba(200,151,42,0.25);
}
.azan-past { opacity: 0.45; }
.azan-card-icon   { font-size: 22px; margin-bottom: 6px; }
.azan-card-arabic {
  font-family: 'Amiri', serif; font-size: 20px; color: var(--gold);
  direction: rtl; margin-bottom: 2px; line-height: 1.3;
}
.azan-card-eng  { font-size: 11px; color: rgba(255,255,255,0.6); margin-bottom: 8px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; }
.azan-card-time { font-size: 20px; font-weight: 800; color: #fff; letter-spacing: -0.5px; }
.azan-next-tag  {
  position: absolute; top: 0; left: 0; right: 0;
  background: var(--gold); color: #1a1a1a; font-size: 9px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1px; padding: 3px 0;
}
.azan-footer-note {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 12px; color: rgba(255,255,255,0.55); padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.next-up-badge {
  background: rgba(200,151,42,0.25); color: var(--gold);
  border: 1px solid rgba(200,151,42,0.4); padding: 4px 14px;
  border-radius: 20px; font-size: 12px; font-weight: 700;
}
.azan-loading { grid-column: 1/-1; text-align: center; padding: 30px; color: rgba(255,255,255,0.6); }
.azan-error   { grid-column: 1/-1; text-align: center; padding: 20px; color: #fca5a5; font-size: 14px; }

@media (max-width: 900px) { .azan-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) {
  .azan-grid { grid-template-columns: repeat(2, 1fr); }
  .azan-arabic { font-size: 20px; }
  .azan-header { flex-direction: column; align-items: flex-start; }
}

/* ── ISLAMIC CALENDAR BAR ─────────────────────────────────────────────── */
.islamic-calendar-bar {
  display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: rgba(255,255,255,0.13); border: 1px solid rgba(255,255,255,0.25);
  border-radius: 50px; padding: 8px 20px; margin-bottom: 22px;
  font-size: 13px; color: rgba(255,255,255,0.95); font-weight: 500;
  backdrop-filter: blur(6px);
}
.friday-bar { background: rgba(200,151,42,0.25); border-color: var(--gold); }
.ical-sep { color: rgba(255,255,255,0.4); }
.ical-item { white-space: nowrap; }

/* ── QIRAAT SLOGAN ────────────────────────────────────────────────────── */
.qiraat-slogan {
  background: rgba(255,255,255,0.1); border-left: 4px solid var(--gold);
  border-radius: 12px; padding: 16px 22px; margin: 16px 0 20px;
  text-align: left; max-width: 680px;
}
.qiraat-ayah {
  font-family: 'Amiri', serif; font-size: 22px; color: var(--gold);
  direction: rtl; text-align: right; margin-bottom: 6px; line-height: 1.7;
}
.qiraat-trans { color: rgba(255,255,255,0.92); font-size: 15px; font-style: italic; margin-bottom: 4px; }
.qiraat-ref   { color: rgba(255,255,255,0.55); font-size: 12px; }

/* ── DARS SECTION ─────────────────────────────────────────────────────── */
.dars-tabs {
  display: flex; gap: 12px; margin-bottom: 28px; justify-content: center;
}
.dars-tab {
  padding: 10px 28px; border-radius: 50px; border: 2px solid var(--green);
  background: #fff; color: var(--green); font-size: 15px; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
}
.dars-tab.active { background: var(--green); color: #fff; }
.dars-tab:hover  { background: var(--green); color: #fff; }
.dars-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 28px;
}
.dars-card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); transition: all 0.3s; position: relative;
}
.dars-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.dars-thumb { position: relative; }
.dars-thumb-placeholder {
  background: linear-gradient(135deg, #1a4030, #1a6b3a);
  height: 160px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
}
.dars-thumb-hadith { background: linear-gradient(135deg, #4a2c00, #c8972a); }
.dars-icon { font-size: 42px; }
.dars-ep   { color: rgba(255,255,255,0.7); font-size: 12px; font-weight: 600; letter-spacing: 1px; }
.dars-badge-live {
  position: absolute; top: 10px; right: 10px;
  background: #e53e3e; color: #fff; font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px;
}
.dars-info { padding: 18px; }
.dars-info h3 {
  font-size: 15px; font-weight: 700; color: var(--text);
  margin-bottom: 8px; font-family: 'Amiri', serif; direction: rtl; text-align: right;
  line-height: 1.5;
}
.dars-info p  { font-size: 13px; color: var(--text-sm); line-height: 1.6; margin-bottom: 12px; }
.dars-meta    { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: #999; margin-bottom: 12px; }
.dars-notify-btn {
  display: block; text-align: center; background: var(--green-lt); color: var(--green);
  border: 1.5px solid var(--green); padding: 9px; border-radius: 8px;
  font-size: 13px; font-weight: 700; transition: all 0.2s;
}
.dars-notify-btn:hover { background: var(--green); color: #fff; }

/* ── DARS YOUTUBE PLAYER ──────────────────────────────── */
.dars-count {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold); color: #1a1a1a;
  font-size: 10px; font-weight: 800; min-width: 18px; height: 18px;
  border-radius: 50%; padding: 0 5px; margin-left: 6px;
}
.dars-ep-label {
  font-size: 10px; font-weight: 700; color: var(--gold);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px;
}
.dars-yt-thumb {
  width: 100%; height: 180px; object-fit: cover; display: block;
}
.dars-play-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0); transition: background 0.2s;
}
.dars-card-live .dars-thumb:hover .dars-play-overlay { background: rgba(0,0,0,0.38); }
.dars-play-btn {
  width: 58px; height: 58px; background: rgba(255,0,0,0.92);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: #fff; opacity: 0; transition: opacity 0.2s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.dars-card-live .dars-thumb:hover .dars-play-btn { opacity: 1; }
.dars-card-live { border-color: var(--green) !important; }
.dars-card-live .dars-info h3 { color: var(--green); }
.dars-watch-btn {
  display: block; width: 100%; text-align: center;
  background: #ff0000; color: #fff; border: none;
  padding: 10px 16px; border-radius: 8px;
  font-size: 13px; font-weight: 700; cursor: pointer; transition: all 0.2s;
}
.dars-watch-btn:hover { background: #cc0000; transform: translateY(-1px); }
.dars-badge-soon {
  position: absolute; top: 10px; right: 10px;
  background: rgba(0,0,0,0.55); color: #fff;
  font-size: 10px; font-weight: 700; padding: 3px 10px; border-radius: 20px;
}

/* Modal */
.dars-modal {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.88); align-items: center; justify-content: center;
  padding: 20px;
}
.dars-modal-box {
  background: #111; border-radius: 14px; overflow: hidden;
  width: 100%; max-width: 860px; position: relative;
}
.dars-modal-close {
  position: absolute; top: 12px; right: 14px; z-index: 10;
  background: rgba(255,255,255,0.15); color: #fff; border: none;
  width: 34px; height: 34px; border-radius: 50%; font-size: 16px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.dars-modal-close:hover { background: rgba(255,255,255,0.3); }
.dars-modal-title {
  font-family: 'Amiri', serif; font-size: 16px; color: var(--gold);
  direction: rtl; text-align: right;
  padding: 14px 50px 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.dars-modal-player { line-height: 0; }

.dars-upload-notice {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  background: linear-gradient(135deg, #fffbf0, #fef3cd);
  border: 1.5px solid var(--gold); border-radius: var(--radius);
  padding: 20px 28px;
}
.dars-notice-icon { font-size: 36px; flex-shrink: 0; }
.dars-upload-notice strong { color: var(--green); font-size: 16px; }
.dars-upload-notice span   { color: #666; font-size: 13px; }

@media (max-width: 900px) {
  .dars-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .dars-grid { grid-template-columns: 1fr; }
  .dars-upload-notice { flex-direction: column; text-align: center; }
  .islamic-calendar-bar { justify-content: center; }
  .qiraat-slogan { text-align: center; }
  .qiraat-ayah { text-align: center; }
}

/* ── DARS CARD STATES ─────────────────────────────────────────────────── */
.dars-coming-soon { opacity: 0.75; }
.dars-coming-soon .dars-thumb {
  background: linear-gradient(135deg, #2a2a2a, #444);
  height: 160px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
}
.dars-soon-icon { font-size: 40px; }
.dars-soon-label {
  color: rgba(255,255,255,0.6); font-size: 12px;
  font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
}
.dars-ep-badge {
  display: inline-block; font-size: 10px; font-weight: 700;
  color: var(--gold); text-transform: uppercase; letter-spacing: 1px;
  background: var(--gold-lt); border: 1px solid #e8c870;
  padding: 2px 10px; border-radius: 20px; margin-bottom: 6px;
}
.dars-title {
  font-size: 15px; font-weight: 700; color: var(--text);
  margin-bottom: 8px; font-family: 'Amiri', serif;
  direction: rtl; text-align: right; line-height: 1.5;
}
.dars-desc { font-size: 13px; color: var(--text-sm); line-height: 1.6; margin-bottom: 12px; }
.dars-watch-soon {
  background: #e0e0e0 !important; color: #999 !important;
  cursor: not-allowed !important;
}
.dars-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dars-thumb { position: relative; overflow: hidden; }
.dars-play-btn {
  position: absolute; inset: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; color: rgba(255,255,255,0); transition: all 0.2s;
}
.dars-thumb:hover .dars-play-btn { background: rgba(0,0,0,0.4); color: #fff; }

/* ── COMING SOON SCHOLAR CARDS ────────────────────────────────────────── */
.scholar-coming-soon {
  opacity: 0.72;
  border: 2px dashed var(--border) !important;
  background: #f9f9f7 !important;
}
.scholar-coming-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: #999; color: #fff; font-size: 11px; font-weight: 700;
  padding: 4px 16px; border-radius: 20px; white-space: nowrap; z-index: 2;
}
.scholar-avatar-soon { opacity: 0.5; }
.badge-soon { background: #e0e0e0 !important; color: #999 !important; }
.btn-scholar-soon {
  background: #d0d0d0 !important; color: #999 !important;
  cursor: default; pointer-events: none;
}

.book-featured {
  border: 2px solid var(--gold) !important;
  background: linear-gradient(135deg, #fffbf0, #fff) !important;
  box-shadow: 0 4px 20px rgba(200,151,42,0.18);
}
.book-featured-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: #1a1a1a; font-size: 11px; font-weight: 700;
  padding: 4px 16px; border-radius: 20px; white-space: nowrap; z-index: 2;
}
.book-btns { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.books-loading {
  text-align: center; padding: 60px 20px; color: #888;
  grid-column: 1 / -1; font-size: 15px;
}
.books-source-note {
  text-align: center; font-size: 13px; color: #888;
  background: #f8f8f4; padding: 14px 20px; border-radius: 10px;
  border: 1px solid var(--border);
}

/* ── FREE DOWNLOADS SECTION ───────────────────────────────────────────────── */
.downloads-section { background: linear-gradient(135deg, #f0f8f0 0%, #fef9f0 100%); }

.downloads-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin: 36px 0 24px;
}

.download-card {
  background: #fff;
  border-radius: 20px;
  border: 2px solid var(--border);
  box-shadow: 0 6px 32px rgba(26,107,58,0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}
.download-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(26,107,58,0.15);
}

.dl-icon-area {
  background: linear-gradient(135deg, var(--green) 0%, #2d9e5f 100%);
  padding: 28px 20px 20px;
  text-align: center;
  position: relative;
}
.dl-icon {
  font-size: 52px;
  line-height: 1;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}
.dl-badge {
  display: inline-block;
  background: var(--gold);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 4px 14px;
  border-radius: 20px;
  margin-top: 10px;
}

.dl-body { padding: 22px 24px 24px; flex: 1; display: flex; flex-direction: column; }

.dl-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--green-dark);
  margin-bottom: 10px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.dl-title-ur {
  font-family: 'Amiri', serif;
  font-size: 18px;
  color: var(--gold);
  font-weight: 700;
}

.dl-desc {
  font-size: 13.5px;
  color: var(--text-sm);
  line-height: 1.65;
  margin-bottom: 14px;
}

.dl-features {
  list-style: none;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.dl-features li {
  font-size: 12.5px;
  color: #333;
  padding: 3px 0;
}

.dl-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.dl-meta span {
  font-size: 11.5px;
  background: var(--bg-lt);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 20px;
  color: #555;
}

.dl-btn {
  display: block;
  text-align: center;
  padding: 13px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 9px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  letter-spacing: 0.2px;
}
.dl-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.dl-btn:last-child { margin-bottom: 0; }

.dl-btn-green  { background: var(--green);  color: #fff; }
.dl-btn-gold   { background: var(--gold);   color: #fff; }
.dl-btn-outline {
  background: transparent;
  color: var(--green);
  border: 2px solid var(--green);
  padding: 11px 20px;
}

.downloads-note {
  text-align: center;
  font-size: 13.5px;
  color: #555;
  background: #fff;
  padding: 14px 24px;
  border-radius: 12px;
  border: 1px solid #d4edda;
  margin-top: 4px;
}

@media (max-width: 768px) {
  .downloads-grid { grid-template-columns: 1fr; }
}

/* ── RESPONSIVE additions ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .books-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .books-grid { grid-template-columns: repeat(2, 1fr); }
  .hadith-card { padding: 24px; }
  .hadith-arabic { font-size: 22px; }
  .featured-scholar { grid-column: auto; }
}
@media (max-width: 480px) {
  .books-grid { grid-template-columns: 1fr; }
  .hadith-arabic { font-size: 18px; }
}

/* ── GALLERY SECTION ──────────────────────────────────────────────────── */
.gallery-section { background: #f7f9f4; }

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 16px;
}

.gallery-card {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  border: 1.5px solid var(--border);
  box-shadow: 0 4px 18px rgba(0,0,0,0.07);
  transition: transform 0.2s, box-shadow 0.2s;
}
.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.12);
}

/* PREVIEW PANEL */
.gallery-preview {
  position: relative;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.green-preview { background: linear-gradient(135deg, #0f4523 0%, #1a6b3a 60%, #2d8a50 100%); }
.gold-preview  { background: linear-gradient(135deg, #7a5210 0%, #c8972a 60%, #e6b84a 100%); }
.blue-preview  { background: linear-gradient(135deg, #1a3a6b 0%, #2a5ea8 60%, #4a7fd8 100%); }
.dark-preview  { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 60%, #0f3460 100%); }

.gp-inner { text-align: center; padding: 16px; z-index: 2; width: 100%; }
.gp-title-ar { font-family: 'Amiri', 'Noto Nastaliq Urdu', serif; font-size: 1.4rem; color: rgba(255,255,255,0.95); margin-bottom: 2px; }
.gp-title-en { font-size: 0.82rem; color: rgba(255,255,255,0.7); letter-spacing: 1px; margin-bottom: 12px; font-style: italic; }

/* Sample letter grid in preview */
.gp-sample { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; }
.gps-cell {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 7px;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Amiri', serif;
  font-size: 1.3rem;
  color: #fff;
}
.red-s { background: rgba(178,34,34,0.35); border-color: rgba(255,150,150,0.5); }

.gp-rule {
  margin-top: 8px;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
  font-family: 'Noto Nastaliq Urdu', serif;
}

/* Dua preview */
.gp-dua { padding: 0 8px; }
.gp-dua-ar {
  font-family: 'Amiri', serif;
  font-size: 1.05rem;
  color: #fff;
  line-height: 1.8;
  margin-bottom: 8px;
}
.gp-badge-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.gp-badge {
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.2);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
  font-family: 'Noto Nastaliq Urdu', serif;
}
.gold-b { background: rgba(200,151,42,0.4); }

/* Mini table in preview */
.gp-table-mini { display: flex; flex-direction: column; gap: 5px; }
.gpt-row { display: flex; align-items: center; gap: 10px; justify-content: center; }
.gpt-label {
  font-family: 'Noto Nastaliq Urdu', serif;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.75);
  background: rgba(255,255,255,0.12);
  padding: 2px 8px;
  border-radius: 8px;
  min-width: 55px;
  text-align: center;
}
.gpt-ar {
  font-family: 'Amiri', serif;
  font-size: 1.1rem;
  color: #fff;
}

/* Watermark */
.gp-watermark {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  color: rgba(255,255,255,0.35);
  font-family: Georgia, serif;
  letter-spacing: 2px;
  white-space: nowrap;
  z-index: 1;
}

/* INFO PANEL */
.gallery-info { padding: 18px 20px 16px; }
.gallery-info h3 {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 7px;
  line-height: 1.5;
}
.gallery-info p {
  font-size: 0.87rem;
  color: #555;
  line-height: 1.7;
  margin-bottom: 10px;
}
.gallery-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.gtag {
  font-size: 0.72rem;
  padding: 3px 10px;
  background: var(--green-lt);
  color: var(--green-dark);
  border-radius: 20px;
  border: 1px solid #c0d8c0;
  font-weight: 600;
}
.gallery-btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  text-decoration: none;
}
.gallery-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.green-btn { background: var(--green); color: #fff; }
.gold-btn  { background: var(--gold);  color: #fff; }
.blue-btn  { background: #2a5ea8; color: #fff; }

@media (max-width: 768px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-preview { height: 170px; }
}

/* ── FREE TEACHING TOOLS ──────────────────────────────────────────────── */
.tools-cat-title {
  font-size: 18px; font-weight: 700; color: var(--green-dark);
  margin: 44px 0 18px; padding-left: 4px;
  border-left: 4px solid var(--gold); padding-left: 14px;
}
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 8px;
}
.tool-card {
  background: #fff;
  border: 1px solid #e8e8e0;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: box-shadow 0.2s, transform 0.2s;
}
.tool-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.09); transform: translateY(-2px); }
.tool-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; color: #fff;
  flex-shrink: 0;
}
.tool-body { flex: 1; min-width: 0; }
.tool-name { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.tool-desc { font-size: 13px; color: var(--text-sm); line-height: 1.55; margin-bottom: 10px; }
.tool-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.tool-tag {
  font-size: 11px; font-weight: 600; background: #f0f7f2;
  color: var(--green-dark); border-radius: 20px; padding: 2px 9px;
}
.tool-btn {
  display: inline-block; font-size: 13px; font-weight: 600;
  color: var(--green-dark); border: 1.5px solid var(--green-dark);
  border-radius: 8px; padding: 6px 14px;
  transition: background 0.18s, color 0.18s;
}
.tool-btn:hover { background: var(--green-dark); color: #fff; }

.tools-guide-banner {
  margin-top: 48px;
  background: linear-gradient(135deg, #1a4030, #1a6b3a);
  border-radius: 20px;
  padding: 36px 40px;
  display: flex;
  gap: 28px;
  align-items: flex-start;
  color: #fff;
}
.tools-guide-icon { font-size: 48px; flex-shrink: 0; }
.tools-guide-text strong { font-size: 18px; display: block; margin-bottom: 16px; color: var(--gold); }
.tools-guide-steps {
  padding-left: 20px;
  display: flex; flex-direction: column; gap: 10px;
}
.tools-guide-steps li { font-size: 14px; line-height: 1.6; color: rgba(255,255,255,0.88); }
.tools-guide-steps li strong { color: #fff; display: inline; font-size: inherit; }

@media (max-width: 768px) {
  .tools-grid { grid-template-columns: 1fr; }
  .tools-guide-banner { flex-direction: column; padding: 24px 20px; gap: 16px; }
  .tools-guide-icon { font-size: 36px; }
}
