:root {
  --green: #0f5c4a;
  --green-dark: #0a3d31;
  --green-deep: #072a22;
  --gold: #d4a64a;
  --gold-dark: #b98a2f;
  --cream: #faf6ec;
  --ink: #1d2a26;
  --muted: #5d6b66;
  --line: #e7e0cd;
  --white: #fff;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(10, 61, 49, .10);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  font-size: 16px;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .6em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); color: var(--green-dark); }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.container.narrow { max-width: 820px; }
.arabic { font-family: "Amiri", serif; direction: rtl; }
.ico { width: 18px; height: 18px; flex: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: .95rem;
  border: 2px solid transparent; cursor: pointer; transition: .2s ease; font-family: inherit;
}
.btn-sm { padding: 8px 18px; font-size: .88rem; }
.btn-block { width: 100%; }
.btn-gold { background: var(--gold); color: var(--green-deep); }
.btn-gold:hover { background: var(--gold-dark); color: var(--white); }
.btn-green { background: var(--green); color: var(--white); }
.btn-green:hover { background: var(--green-dark); }
.btn-outline-light { border-color: rgba(255,255,255,.6); color: var(--white); }
.btn-outline-light:hover { background: rgba(255,255,255,.12); border-color: var(--white); }

/* Top bar */
.topbar { background: var(--green-deep); color: #d9e6e1; font-size: .85rem; }
.topbar-inner { display: flex; gap: 26px; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; }
.topbar-item { display: inline-flex; align-items: center; gap: 7px; }
.topbar-item .ico { color: var(--gold); width: 16px; height: 16px; }
a.topbar-item:hover { color: var(--white); }

/* Header */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 1.2rem; color: var(--green-dark); letter-spacing: .3px; }
.brand-text small { font-size: .78rem; color: var(--gold-dark); font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; }
.brand-light .brand-text strong { color: var(--white); }
.brand-light .brand-text small { color: var(--gold); }

.nav { display: flex; align-items: center; gap: 24px; font-weight: 500; font-size: .95rem; }
.nav a:not(.btn) { position: relative; color: var(--ink); }
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -4px; width: 0; height: 2px;
  background: var(--gold); transition: width .2s;
}
.nav a:not(.btn):hover::after { width: 100%; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--green-dark); margin: 5px 0; transition: .25s; }

/* Hero */
.hero {
  position: relative; overflow: hidden; color: var(--white);
  background: radial-gradient(ellipse at 80% 20%, #17775f 0%, var(--green) 35%, var(--green-deep) 100%);
}
.hero-pattern {
  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='%23fff' stroke-width='1.2'%3E%3Cpath d='M40 4l10 26 26 10-26 10-10 26-10-26L4 40l26-10z'/%3E%3Crect x='22' y='22' width='36' height='36' transform='rotate(45 40 40)'/%3E%3Ccircle cx='40' cy='40' r='8'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 80px 80px;
}
.hero-inner {
  position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 50px;
  align-items: center; padding-top: 80px; padding-bottom: 90px;
}
.bismillah { font-size: 1.9rem; color: var(--gold); margin-bottom: .4em; text-align: left; direction: ltr; }
.hero h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); margin-bottom: .45em; }
.lead { font-size: 1.1rem; color: #dcebe6; max-width: 600px; }
.lead strong { color: var(--white); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 22px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; padding: 0; margin: 0; color: #cfe2dc; font-size: .93rem; }

.hero-card {
  background: linear-gradient(145deg, rgba(212,166,74,.9), rgba(212,166,74,.35));
  padding: 3px; border-radius: 22px; box-shadow: 0 25px 60px rgba(0,0,0,.3);
}
.hero-card-inner {
  background: rgba(7,42,34,.92); border-radius: 20px; padding: 40px 30px 28px; text-align: center;
}
.ayah { font-size: 2.3rem; color: var(--gold); margin-bottom: .3em; line-height: 1.6; }
.ayah-tr { font-style: italic; color: #e5efeb; margin-bottom: .2em; }
.ayah-ref { font-size: .82rem; color: #9fbab1; letter-spacing: 1px; text-transform: uppercase; }
.hero-card-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  border-top: 1px solid rgba(212,166,74,.3); margin-top: 22px; padding-top: 22px;
}
.hero-card-stats strong { display: block; color: var(--white); font-size: 1.15rem; }
.hero-card-stats span { font-size: .78rem; color: #9fbab1; }

/* Features */
.features { position: relative; z-index: 2; margin-top: -45px; }
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature {
  background: var(--white); border-radius: var(--radius); padding: 26px 22px;
  box-shadow: var(--shadow); border-bottom: 3px solid var(--gold);
}
.feature h3 { font-size: 1.05rem; color: var(--green-dark); }
.feature p { font-size: .9rem; color: var(--muted); margin: 0; }
.feature-ico {
  width: 50px; height: 50px; border-radius: 12px; background: var(--cream);
  display: grid; place-items: center; margin-bottom: 14px; color: var(--green);
}
.feature-ico svg { width: 26px; height: 26px; }

/* Sections */
.section { padding: 90px 0; position: relative; }
.section-tint { background: var(--cream); }
.section-dark { background: var(--green-dark); color: var(--white); overflow: hidden; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.section-head p:last-child { color: var(--muted); }
.section-head.light h2 { color: var(--white); }
.eyebrow {
  display: inline-block; color: var(--gold-dark); font-weight: 600; font-size: .85rem;
  letter-spacing: 2px; text-transform: uppercase; margin-bottom: .6em;
}
.section-dark .eyebrow { color: var(--gold); }

/* About */
.about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 60px; align-items: center; }
.about-art { display: flex; justify-content: center; }
.arch {
  width: 100%; max-width: 380px; aspect-ratio: 3 / 4;
  border-radius: 190px 190px 18px 18px;
  background:
    linear-gradient(rgba(7,42,34,.82), rgba(7,42,34,.92)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill='none' stroke='%23d4a64a' stroke-width='1'%3E%3Cpath d='M30 2l8 20 20 8-20 8-8 20-8-20-20-8 20-8z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: auto, 60px 60px;
  border: 3px solid var(--gold); box-shadow: var(--shadow), inset 0 0 0 10px rgba(212,166,74,.15);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 30px; text-align: center;
}
.arch p { font-size: 2.4rem; color: var(--gold); margin: 0; line-height: 1.7; }
.arch span { color: #c4d6d0; font-size: .82rem; letter-spacing: 1px; text-transform: uppercase; }
.checklist { list-style: none; padding: 0; margin: 0 0 28px; }
.checklist li { padding-left: 30px; position: relative; margin-bottom: 10px; }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--green); color: var(--white); font-size: .72rem; display: grid; place-items: center;
}

/* Courses */
.courses-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.course {
  background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s;
}
.course:hover { transform: translateY(-5px); box-shadow: 0 18px 40px rgba(10,61,49,.16); }
.course-top {
  height: 110px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--green), var(--green-deep));
  position: relative;
}
.course-top::after {
  content: ""; position: absolute; inset: 0; opacity: .12;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath d='M20 2l5 13 13 5-13 5-5 13-5-13-13-5 13-5z' fill='none' stroke='%23fff'/%3E%3C/svg%3E");
}
.course-top span { font-size: 2.2rem; color: var(--gold); position: relative; z-index: 1; }
.course-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.course-body h3 { font-size: 1.08rem; color: var(--green-dark); }
.course-body p { font-size: .9rem; color: var(--muted); flex: 1; }
.course-link { color: var(--gold-dark); font-weight: 600; font-size: .9rem; }
.course-link:hover { color: var(--green); }

/* Teachers */
.teachers-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.teacher-card {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 28px; text-align: center;
  background: var(--white); transition: .2s;
}
.teacher-card:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.teacher-card h3 { color: var(--green-dark); font-size: 1.2rem; }
.teacher-card p { color: var(--muted); font-size: .93rem; }
.teacher-badge {
  width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 18px; display: grid; place-items: center;
  color: var(--white); border: 4px solid var(--cream); box-shadow: 0 0 0 2px var(--gold);
}
.teacher-badge svg { width: 40px; height: 40px; }
.teacher-badge.male { background: var(--green); }
.teacher-badge.female { background: #8a5a8f; }
.teacher-badge.lang { background: var(--gold-dark); }
.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.tags li { background: var(--cream); color: var(--green-dark); font-size: .8rem; font-weight: 500; padding: 5px 12px; border-radius: 999px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; position: relative; }
.step {
  background: rgba(255,255,255,.06); border: 1px solid rgba(212,166,74,.35); border-radius: var(--radius);
  padding: 34px 28px; text-align: center;
}
.step-no {
  display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 50%;
  background: var(--gold); color: var(--green-deep); font-weight: 700; font-size: 1.3rem; margin-bottom: 16px;
}
.step h3 { color: var(--white); }
.step p { color: #c4d6d0; margin: 0; font-size: .93rem; }

/* Plans */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; }
.plan {
  background: var(--white); border-radius: var(--radius); padding: 36px 28px; text-align: center;
  box-shadow: var(--shadow); position: relative; display: flex; flex-direction: column;
}
.plan h3 { color: var(--green-dark); font-size: 1.35rem; margin-bottom: .2em; }
.plan-days { font-size: 1.6rem; font-weight: 700; color: var(--gold-dark); margin: 0; }
.plan-classes { color: var(--muted); font-size: .9rem; }
.plan ul { list-style: none; padding: 0; margin: 10px 0 26px; border-top: 1px solid var(--line); flex: 1; }
.plan li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .93rem; }
.plan.featured { background: var(--green-dark); color: var(--white); transform: scale(1.04); }
.plan.featured h3 { color: var(--white); }
.plan.featured .plan-days { color: var(--gold); }
.plan.featured .plan-classes { color: #c4d6d0; }
.plan.featured ul, .plan.featured li { border-color: rgba(255,255,255,.14); }
.plan-flag {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: var(--green-deep); font-size: .78rem; font-weight: 700;
  padding: 5px 16px; border-radius: 999px; white-space: nowrap;
}
.note { text-align: center; color: var(--muted); font-size: .9rem; margin-top: 30px; }

/* Trial form */
.trial-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.contact-cards { display: grid; gap: 14px; margin-top: 26px; }
.contact-card {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--white);
}
a.contact-card:hover { border-color: var(--gold); }
.contact-card small { display: block; color: var(--muted); font-size: .78rem; }
.contact-card strong { color: var(--green-dark); }
.cc-ico {
  width: 44px; height: 44px; border-radius: 50%; background: var(--cream); color: var(--green);
  display: grid; place-items: center; flex: none;
}
.cc-ico svg { width: 22px; height: 22px; }
.cc-ico.wa { background: #25d366; color: var(--white); }

.trial-form {
  background: var(--cream); border-radius: 20px; padding: 34px 30px; border: 1px solid var(--line);
}
.field { display: flex; flex-direction: column; margin-bottom: 16px; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field label { font-size: .85rem; font-weight: 600; color: var(--green-dark); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  font: inherit; font-size: .95rem; padding: 11px 14px; border: 1px solid #d9d0b8; border-radius: 10px;
  background: var(--white); color: var(--ink); width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(15,92,74,.15);
}
.field input.invalid { border-color: #c0392b; }
.form-error { color: #c0392b; font-size: .88rem; margin: -4px 0 12px; }

/* FAQ */
.faq details {
  background: var(--white); border-radius: 12px; margin-bottom: 12px; border: 1px solid var(--line);
  overflow: hidden;
}
.faq summary {
  cursor: pointer; padding: 18px 22px; font-weight: 600; color: var(--green-dark); list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--gold-dark); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 22px 18px; margin: 0; color: var(--muted); }

/* CTA */
.cta { background: linear-gradient(120deg, var(--gold-dark), var(--gold)); padding: 54px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.cta h2 { color: var(--green-deep); margin-bottom: .2em; }
.cta p { margin: 0; color: var(--green-deep); }
.cta .btn-gold { background: var(--green-deep); color: var(--white); font-size: 1.05rem; }
.cta .btn-gold:hover { background: var(--green); }

/* Footer */
.footer { background: var(--green-deep); color: #b7cbc4; padding: 70px 0 0; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
.footer .brand { margin-bottom: 16px; }
.footer h4 { color: var(--white); font-size: 1rem; margin-bottom: 16px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 9px; }
.footer a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 50px; padding-top: 20px; padding-bottom: 20px; text-align: center; font-size: .85rem; }
.footer-bottom p { margin: 0; }

/* Floating WhatsApp */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 60; width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; color: var(--white); display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(37,211,102,.45); animation: pulse 2.4s infinite;
}
.wa-float svg { width: 32px; height: 32px; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(37,211,102,.55); }
  70% { box-shadow: 0 0 0 16px rgba(37,211,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}

/* Responsive */
@media (max-width: 1080px) {
  .courses-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 940px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 72px; left: 0; right: 0; background: var(--white);
    flex-direction: column; align-items: stretch; gap: 0; padding: 10px 20px 20px;
    border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(0,0,0,.08);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav a:not(.btn)::after { display: none; }
  .nav .btn { margin-top: 14px; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .hero-inner, .about-grid, .trial-grid { grid-template-columns: 1fr; }
  .hero-inner { padding-top: 56px; padding-bottom: 80px; gap: 36px; }
  .about-art { order: 2; }
  .teachers-grid, .steps, .plans { grid-template-columns: 1fr; }
  .plans { max-width: 440px; margin: 0 auto; gap: 30px; }
  .plan.featured { transform: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 70px 0; }
}

@media (max-width: 640px) {
  .container { padding-left: 16px; padding-right: 16px; }
  .hide-sm { display: none !important; }
  .features-grid, .courses-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-cta .btn { width: 100%; }
  .bismillah { font-size: 1.5rem; }
  .ayah { font-size: 1.9rem; }
  .arch p { font-size: 2rem; }
  .trial-form { padding: 26px 18px; }
  .cta-inner { text-align: center; justify-content: center; }
  .wa-float { width: 52px; height: 52px; right: 16px; bottom: 16px; }
  .footer-bottom { padding-bottom: 84px; }
}

@media (max-width: 400px) {
  .hide-xs { display: none !important; }
}
