/* =========================================================
   Bismillah Quran Center — main stylesheet
   Colors: deep green + gold, warm cream background
   ========================================================= */
:root {
  --green-900: #06331f;
  --green-800: #0a4a2e;
  --green-700: #0e5e3a;
  --green-600: #137548;
  --green-100: #e3f1e9;
  --gold-500: #c9a227;
  --gold-400: #d9b84a;
  --gold-100: #f8efd2;
  --cream: #fbf8f1;
  --white: #ffffff;
  --ink: #1d2a24;
  --muted: #5a6b62;
  --line: #e5e0d3;
  --wa: #25d366;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 10px 30px rgba(6, 51, 31, 0.08);
  --shadow-lg: 0 20px 50px rgba(6, 51, 31, 0.16);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-ar: "Amiri", "Scheherazade New", serif;
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  font-size: 16px;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--green-700); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6em; color: var(--green-900); letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.3rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.section { padding: 72px 0; }
.section-sm { padding: 48px 0; }
.section-white { background: var(--white); }
.section-green { background: var(--green-800); color: #e8f3ec; }
.section-green h2, .section-green h3 { color: var(--white); }
.center { text-align: center; }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--gold-500); margin-bottom: .6rem;
}
.lead { font-size: 1.12rem; color: var(--muted); max-width: 720px; }
.center .lead { margin-left: auto; margin-right: auto; }
.arabic { font-family: var(--font-ar); direction: rtl; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--gold-500); color: #000; padding: 8px 14px; z-index: 999; }
.skip-link:focus { left: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: 14px 26px; border-radius: 999px; font-weight: 700; font-size: 1rem;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  font-family: inherit; line-height: 1.2;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold { background: var(--gold-500); color: var(--green-900); box-shadow: 0 8px 20px rgba(201,162,39,.35); }
.btn-gold:hover { background: var(--gold-400); }
.btn-green { background: var(--green-700); color: var(--white); }
.btn-green:hover { background: var(--green-600); }
.btn-outline { border-color: currentColor; color: var(--green-800); background: transparent; }
.btn-outline-light { border-color: rgba(255,255,255,.7); color: var(--white); background: transparent; }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: #1ebe5b; }
.btn-block { width: 100%; }
.btn-lg { padding: 17px 32px; font-size: 1.08rem; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.center .btn-row { justify-content: center; }

/* ---------- Top bar + header ---------- */
.topbar { background: var(--green-900); color: #cfe3d7; font-size: .85rem; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 8px; padding-bottom: 8px; }
.topbar a { color: var(--gold-400); text-decoration: none; font-weight: 600; }
.topbar .tb-hide { display: none; }

.header { position: sticky; top: 0; z-index: 50; background: rgba(251,248,241,.95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header .container { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--green-900); }
.logo-mark { width: 42px; height: 42px; flex: none; }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text strong { font-size: 1.05rem; font-weight: 800; }
.logo-text span { font-size: .72rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.nav { display: none; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem; padding: 8px 10px; border-radius: 8px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--green-700); background: var(--green-100); }
.header-cta { display: none; }
.menu-btn { background: none; border: 0; padding: 8px; cursor: pointer; color: var(--green-900); }
.menu-btn svg { width: 28px; height: 28px; }
.mobile-nav { display: none; border-top: 1px solid var(--line); background: var(--cream); }
.mobile-nav.open { display: block; }
.mobile-nav a { display: block; padding: 14px 16px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600; }
.mobile-nav .btn { margin: 16px; width: calc(100% - 32px); }

@media (min-width: 640px) { .topbar .tb-hide { display: inline; } }
@media (min-width: 1140px) {
  .nav { display: flex; gap: 2px; }
  .header-cta { display: inline-flex; padding: 11px 20px; font-size: .95rem; }
  .menu-btn, .mobile-nav, .mobile-nav.open { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #e6f2ea;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(201,162,39,.25), transparent 60%),
    linear-gradient(160deg, var(--green-900), var(--green-700));
}
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .09; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='1.2'%3E%3Cpath d='M40 4l10 26 26 10-26 10-10 26-10-26L4 40l26-10z'/%3E%3Ccircle cx='40' cy='40' r='12'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 80px 80px;
}
.hero .container { position: relative; display: grid; gap: 40px; padding-top: 56px; padding-bottom: 64px; }
.hero h1 { color: var(--white); }
.hero h1 em { font-style: normal; color: var(--gold-400); }
.hero .lead { color: #cfe3d7; }
.hero-bismillah { font-family: var(--font-ar); font-size: 1.9rem; color: var(--gold-400); margin-bottom: 12px; direction: rtl; text-align: left; }
.hero-points { list-style: none; padding: 0; margin: 22px 0 28px; display: grid; gap: 10px; }
.hero-points li { display: flex; gap: 10px; align-items: flex-start; }
.hero-points svg { width: 22px; height: 22px; color: var(--gold-400); flex: none; margin-top: 2px; }
.hero-note { font-size: .9rem; color: #b7d3c3; margin-top: 14px; }
.hero-card { background: var(--white); color: var(--ink); border-radius: var(--radius-lg); padding: 26px 22px; box-shadow: var(--shadow-lg); }
.hero-card h2 { font-size: 1.45rem; margin-bottom: .2em; }
.hero-card .sub { color: var(--muted); font-size: .95rem; margin-bottom: 16px; }
@media (min-width: 980px) {
  .hero .container { grid-template-columns: 1.1fr .9fr; align-items: center; padding-top: 80px; padding-bottom: 90px; }
  .hero-card { padding: 32px; }
}

/* Small page hero */
.page-hero { background: linear-gradient(160deg, var(--green-900), var(--green-700)); color: #d6e9de; padding: 56px 0 50px; position: relative; overflow: hidden; }
.page-hero h1 { color: var(--white); font-size: clamp(1.9rem, 4.4vw, 2.8rem); }
.page-hero .lead { color: #cfe3d7; }
.breadcrumb { font-size: .85rem; margin-bottom: 14px; color: #a9cbb8; }
.breadcrumb a { color: var(--gold-400); text-decoration: none; }

/* ---------- Trust strip ---------- */
.trust { background: var(--white); border-bottom: 1px solid var(--line); }
.trust .container { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; padding-top: 22px; padding-bottom: 22px; }
.trust-item { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: .92rem; color: var(--green-900); }
.trust-item svg { width: 30px; height: 30px; color: var(--gold-500); flex: none; }
@media (min-width: 860px) { .trust .container { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: 22px; }
@media (min-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.card h3 { margin-bottom: .4em; }
.card p { color: var(--muted); font-size: .97rem; }
.card .card-foot { margin-top: auto; padding-top: 12px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.card .price-tag { font-weight: 800; color: var(--green-700); }
.card .price-tag small { font-weight: 600; color: var(--muted); }
.icon-badge { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; background: var(--green-100); color: var(--green-700); margin-bottom: 16px; }
.icon-badge svg { width: 28px; height: 28px; }
.card-link { font-weight: 700; text-decoration: none; color: var(--green-700); }
.card-link:hover { text-decoration: underline; }
.tag { display: inline-block; align-self: flex-start; font-size: .75rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--gold-100); color: #7a5f0c; margin-bottom: 10px; }
.section-head { margin-bottom: 40px; }

/* Steps */
.steps { counter-reset: step; }
.step { position: relative; padding-top: 8px; }
.step-num { width: 48px; height: 48px; border-radius: 50%; background: var(--gold-500); color: var(--green-900); font-weight: 800; font-size: 1.2rem; display: grid; place-items: center; margin-bottom: 14px; }
.section-green .step p { color: #cfe3d7; }

/* Split feature */
.split { display: grid; gap: 36px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 60px; } .split.reverse > :first-child { order: 2; } }
.check-list { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; }
.check-list svg { width: 22px; height: 22px; color: var(--green-600); flex: none; margin-top: 2px; }
.section-green .check-list svg { color: var(--gold-400); }
.feature-panel {
  border-radius: var(--radius-lg); padding: 34px; color: #e6f2ea; position: relative; overflow: hidden;
  background: linear-gradient(150deg, var(--green-800), var(--green-600));
  box-shadow: var(--shadow-lg);
}
.feature-panel .arabic { font-size: 2.2rem; color: var(--gold-400); line-height: 1.7; text-align: center; }
.feature-panel .translation { text-align: center; font-style: italic; color: #cfe3d7; }
.feature-panel .ref { text-align: center; font-size: .85rem; color: var(--gold-400); }
.stat-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 24px; }
.stat { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 12px; padding: 14px; text-align: center; }
.stat strong { display: block; font-size: 1.35rem; color: var(--gold-400); }
.stat span { font-size: .85rem; }

/* ---------- Teachers ---------- */
.teacher { text-align: center; align-items: center; }
.avatar {
  width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; font-size: 1.8rem; color: var(--white); margin: 0 auto 14px;
  background: linear-gradient(140deg, var(--green-700), var(--green-500, #1d8f5a));
  border: 4px solid var(--gold-100);
}
.avatar.female { background: linear-gradient(140deg, #6b3f6e, #9a5c8f); }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.teacher .role { color: var(--gold-500); font-weight: 700; font-size: .9rem; margin-bottom: 8px; }
.teacher ul { list-style: none; padding: 0; margin: 0 0 10px; font-size: .92rem; color: var(--muted); }

/* ---------- Pricing ---------- */
.price-card { position: relative; text-align: left; }
.price-card.popular { border: 2px solid var(--gold-500); box-shadow: var(--shadow-lg); }
.price-card .badge { position: absolute; top: -13px; right: 20px; background: var(--gold-500); color: var(--green-900); font-weight: 800; font-size: .75rem; padding: 5px 12px; border-radius: 999px; text-transform: uppercase; letter-spacing: .06em; }
.price { font-size: 2.6rem; font-weight: 800; color: var(--green-900); line-height: 1; margin: 6px 0 4px; }
.price small { font-size: 1rem; font-weight: 600; color: var(--muted); }
.price-card ul { list-style: none; padding: 0; margin: 16px 0 22px; display: grid; gap: 9px; }
.price-card li { display: flex; gap: 9px; font-size: .95rem; }
.price-card li svg { width: 19px; height: 19px; color: var(--green-600); flex: none; margin-top: 3px; }
.price-card .btn { margin-top: auto; }
.note-box { background: var(--gold-100); border: 1px dashed var(--gold-500); border-radius: var(--radius); padding: 18px 20px; color: #5c4708; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--white); }
table { width: 100%; border-collapse: collapse; min-width: 520px; }
th, td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); font-size: .95rem; }
th { background: var(--green-100); color: var(--green-900); }
tr:last-child td { border-bottom: 0; }

/* ---------- FAQ ---------- */
.faq { max-width: 860px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 30px 18px 0; font-weight: 700; color: var(--green-900); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 14px; font-size: 1.5rem; color: var(--gold-500); font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); padding-bottom: 6px; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 14px; }
.form-row { display: grid; gap: 14px; }
@media (min-width: 560px) { .form-row.two { grid-template-columns: 1fr 1fr; } }
.field label { display: block; font-weight: 700; font-size: .88rem; margin-bottom: 6px; color: var(--green-900); }
.field label .opt { font-weight: 500; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 10px;
  font: inherit; font-size: 16px; background: #fdfcf8; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--green-600); box-shadow: 0 0 0 3px rgba(19,117,72,.15); }
.field input:invalid:not(:placeholder-shown) { border-color: #c0392b; }
.radio-group { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-group label { display: inline-flex; align-items: center; gap: 7px; border: 1.5px solid var(--line); border-radius: 999px; padding: 9px 14px; font-weight: 600; font-size: .9rem; cursor: pointer; margin: 0; background: #fdfcf8; }
.radio-group input { width: auto; accent-color: var(--green-700); }
.radio-group label:has(input:checked) { border-color: var(--green-600); background: var(--green-100); }
.form-small { font-size: .8rem; color: var(--muted); text-align: center; margin: 0; }
.form-msg { display: none; padding: 12px 14px; border-radius: 10px; font-weight: 600; font-size: .92rem; }
.form-msg.error { display: block; background: #fdecea; color: #922b21; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.btn[disabled] { opacity: .7; cursor: wait; transform: none; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(140deg, var(--green-800), var(--green-600)); border-radius: var(--radius-lg); padding: 44px 26px; text-align: center; color: #e6f2ea; box-shadow: var(--shadow-lg); }
.cta-band h2 { color: var(--white); }
.cta-band p { color: #cfe3d7; max-width: 620px; margin: 0 auto 22px; }

/* ---------- Countries ---------- */
.country-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 760px) { .country-grid { grid-template-columns: repeat(5, 1fr); } }
.country { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-align: center; text-decoration: none; color: var(--green-900); font-weight: 700; transition: transform .15s, box-shadow .15s; }
.country:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.country .flag { font-size: 2rem; display: block; margin-bottom: 4px; }
.country small { display: block; color: var(--muted); font-weight: 500; font-size: .8rem; }

/* ---------- Prose (legal / long text) ---------- */
.prose { max-width: 820px; margin: 0 auto; }
.prose h2 { font-size: 1.45rem; margin-top: 1.8em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }

/* ---------- Footer ---------- */
.footer { background: var(--green-900); color: #b9d2c4; padding: 60px 0 0; font-size: .94rem; }
.footer h4 { color: var(--white); font-size: 1rem; margin-bottom: 14px; }
.footer a { color: #d9eadf; text-decoration: none; }
.footer a:hover { color: var(--gold-400); }
.footer-grid { display: grid; gap: 34px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer .logo { color: var(--white); margin-bottom: 14px; }
.footer .logo-text span { color: #9fc1ae; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 44px; padding: 20px 0 96px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; font-size: .85rem; }
@media (min-width: 760px) { .footer-bottom { padding-bottom: 24px; } }

/* ---------- Floating WhatsApp + mobile sticky CTA ---------- */
.wa-float {
  position: fixed; right: 18px; bottom: 86px; z-index: 60; width: 58px; height: 58px; border-radius: 50%;
  background: var(--wa); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 25px rgba(0,0,0,.25);
  animation: wa-pulse 2.4s infinite;
}
.wa-float svg { width: 32px; height: 32px; }
@keyframes wa-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(37,211,102,.55), 0 10px 25px rgba(0,0,0,.25); } 50% { box-shadow: 0 0 0 14px rgba(37,211,102,0), 0 10px 25px rgba(0,0,0,.25); } }
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 55; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 12px; background: rgba(255,255,255,.97); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(0,0,0,.08); }
.sticky-cta .btn { padding: 13px 10px; font-size: .95rem; }
@media (min-width: 760px) { .sticky-cta { display: none; } .wa-float { bottom: 24px; } }
@media (prefers-reduced-motion: reduce) { .wa-float { animation: none; } html { scroll-behavior: auto; } .btn:hover { transform: none; } }

/* ---------- Landing (ads) page ---------- */
.landing-header .container { justify-content: space-between; }
.landing-header .nav, .landing-header .menu-btn { display: none !important; }
.landing-header .header-cta { display: inline-flex; padding: 10px 16px; font-size: .9rem; }

/* Thank you */
.thanks-box { max-width: 640px; margin: 0 auto; text-align: center; background: var(--white); border-radius: var(--radius-lg); padding: 44px 26px; box-shadow: var(--shadow-lg); }
.thanks-icon { width: 80px; height: 80px; margin: 0 auto 18px; border-radius: 50%; background: var(--green-100); color: var(--green-700); display: grid; place-items: center; }
.thanks-icon svg { width: 44px; height: 44px; }

/* Grid children may shrink below content width (prevents mobile overflow) */
.grid > *, .split > *, .hero .container > *, .footer-grid > * { min-width: 0; }
body { overflow-x: hidden; }

/* Utilities */
.mt-0 { margin-top: 0; } .mt-2 { margin-top: 20px; } .mt-3 { margin-top: 32px; } .mb-0 { margin-bottom: 0; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
