/* ==========================================================================
   Ayat Al Quran School — design system
   Colors / fonts mirror rahiqalquran.com's structure with original assets.
   ========================================================================== */

:root {
  --green: #157815;
  --green-dark: #0e5c0e;
  --green-light: #e8f3e8;
  --gray-bg: #f6f6f6;
  --text: #666666;
  --heading: #1c1c1c;
  --white: #ffffff;
  --border: #e6e6e6;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
  --radius: 14px;
  --font-body: "Cairo", Arial, sans-serif;
  --font-ayah: "Amiri Quran", "Amiri", serif;
  --font-deco: "Rakkas", "Cairo", serif;
}

/* Alternate color themes — same variable names, swapped via [data-theme] on <html>.
   Default (no attribute) stays the original green. */
:root[data-theme="teal"] {
  --green: #0d6e6e; --green-dark: #0a4f4f; --green-light: #e3f5f5;
}
:root[data-theme="blue"] {
  --green: #1a56c4; --green-dark: #123f8f; --green-light: #e8eefb;
}
:root[data-theme="maroon"] {
  --green: #8a1538; --green-dark: #611027; --green-light: #f7e9ec;
}
:root[data-theme="indigo"] {
  --green: #5b3a8e; --green-dark: #402a66; --green-light: #efe9f7;
}
:root[data-theme="gold"] {
  --green: #a9720a; --green-dark: #7a5407; --green-light: #faf1e0;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.8;
}

img { max-width: 100%; display: block; }

a { text-decoration: none; color: inherit; }

ul { margin: 0; padding: 0; list-style: none; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 { color: var(--heading); margin: 0; }

.eyebrow {
  display: inline-block;
  color: var(--green);
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 10px;
  position: relative;
  padding-inline-start: 28px;
}
.eyebrow::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 50%;
  width: 20px;
  height: 2px;
  background: var(--green);
  transform: translateY(-50%);
}

.section-title {
  font-size: 34px;
  font-weight: 800;
  margin-bottom: 14px;
}

.section-lead {
  max-width: 680px;
  margin: 0 0 40px;
  color: var(--text);
  font-size: 16px;
}

.section-head { margin-bottom: 30px; }
.section-head.center { text-align: center; margin-inline: auto; }
.section-head.center .section-lead { margin-inline: auto; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all .2s ease;
}
.btn-primary { background: var(--green); color: var(--white); }
.btn-primary:hover { background: var(--green-dark); }
.btn-outline { background: transparent; border-color: var(--white); color: var(--white); }
.btn-outline:hover { background: var(--white); color: var(--green); }
.btn-outline-green { background: transparent; border-color: var(--green); color: var(--green); }
.btn-outline-green:hover { background: var(--green); color: var(--white); }

/* ---------------- Top bar ---------------- */
.topbar {
  background: var(--green-dark);
  color: var(--white);
  font-size: 14px;
}
.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 8px;
  flex-wrap: wrap;
  gap: 8px;
}
.topbar-contact { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.topbar-contact a { display: inline-flex; align-items: center; gap: 6px; color: var(--white); white-space: nowrap; }
.topbar-contact a span { white-space: nowrap; }
.topbar-social { display: flex; align-items: center; gap: 14px; }
.topbar-social a { color: var(--white); opacity: .85; }
.topbar-social a:hover { opacity: 1; }
.topbar-social svg { width: 16px; height: 16px; }

.contact-num { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.contact-num svg { width: 16px; height: 16px; flex-shrink: 0; }
.contact-num .mini-icon { display: inline-flex; align-items: center; opacity: .8; }
.contact-num .mini-icon:hover { opacity: 1; }
.contact-num .mini-icon svg { width: 15px; height: 15px; }
.contact-info .contact-num,
.site-footer .contact-num { color: inherit; }

/* ---------------- Header / nav ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  box-shadow: 0 2px 14px rgba(0,0,0,.06);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 14px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-deco);
  font-size: 26px;
  color: var(--green);
}
.logo svg { width: 40px; height: 40px; }
.logo-img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }

.main-nav { display: flex; align-items: center; gap: 6px; }
.main-nav > ul { display: flex; align-items: center; gap: 4px; }
.main-nav > ul > li { position: relative; }
.main-nav > ul > li > a {
  display: block;
  padding: 12px 16px;
  font-weight: 600;
  color: var(--heading);
  border-radius: 8px;
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li.active > a { color: var(--green); }

.has-dropdown > .dropdown {
  position: absolute;
  top: 100%;
  inset-inline-start: 0;
  min-width: 230px;
  background: var(--white);
  box-shadow: var(--shadow);
  border-radius: 10px;
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all .2s ease;
}
.has-dropdown:hover > .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown li a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14.5px;
  color: var(--text);
}
.dropdown li a:hover { background: var(--green-light); color: var(--green); }

.header-cta { display: flex; align-items: center; gap: 14px; }
.lang-switch { display: flex; gap: 8px; font-size: 14px; font-weight: 600; }
.lang-switch a.active { color: var(--green); }

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--white);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  background: var(--gray-bg);
  color: var(--heading);
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 80px 0;
}
.hero-pattern { display: none; }
.hero .container { position: relative; z-index: 1; text-align: center; }
.hero-logo-img {
  display: block;
  width: min(420px, 75%);
  margin: 0 auto 10px;
}
.hero-ayah {
  font-family: var(--font-ayah);
  font-size: 40px;
  line-height: 2;
  max-width: 820px;
  margin: 0 auto 20px;
}
.hero-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-family: var(--font-deco);
  color: var(--green-dark);
  margin-bottom: 8px;
}
.hero-brand-en { font-size: 22px; letter-spacing: 1px; }
.hero-brand-ar { font-size: 19px; }
.hero-tagline {
  font-size: 18px;
  max-width: 640px;
  margin: 0 auto 34px;
  color: var(--text);
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero .btn-outline { border-color: var(--green); color: var(--green); }
.hero .btn-outline:hover { background: var(--green); color: var(--white); }
.hero-note { margin-top: 18px; font-size: 14px; color: var(--text); }

/* ---------------- Features row ---------------- */
.features {
  margin-top: -60px;
  position: relative;
  z-index: 2;
}
.features .container {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
.feature-card {
  padding: 34px 26px;
  text-align: center;
  border-inline-end: 1px solid var(--border);
}
.feature-card:last-child { border-inline-end: none; }
.feature-icon {
  width: 58px; height: 58px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--green-light);
  display: flex; align-items: center; justify-content: center;
}
.feature-icon svg { width: 28px; height: 28px; color: var(--green); }
.feature-card h3 { font-size: 17px; margin-bottom: 8px; }
.feature-card p { font-size: 14px; margin: 0; }

/* ---------------- About ---------------- */
.about { padding: 100px 0; background: var(--white); }
.about .container { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-visual {
  position: relative;
  aspect-ratio: 4/3.6;
}
.about-visual .ph-1, .about-visual .ph-2 {
  position: absolute;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  object-fit: cover;
  border: 6px solid var(--white);
}
.about-visual .ph-1 { width: 70%; height: 78%; top: 0; right: 0; z-index: 2; }
.about-visual .ph-2 { width: 55%; height: 55%; bottom: 0; left: 0; z-index: 1; }

.about-visual-simple {
  aspect-ratio: 4/3.2;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--green-light), var(--white));
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}
.about-visual-simple svg { width: 55%; color: var(--green); }
.about-body p { margin: 0 0 16px; }

/* ---------------- Courses ---------------- */
.courses { padding: 100px 0; background: var(--gray-bg); }
.course-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.course-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 26px;
  box-shadow: var(--shadow);
  transition: transform .2s ease;
}
.course-card:hover { transform: translateY(-6px); }
.course-icon {
  width: 54px; height: 54px;
  border-radius: 14px;
  background: var(--green);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.course-icon svg { width: 26px; height: 26px; color: var(--white); }
.course-card h4 { font-size: 19px; margin-bottom: 10px; }
.course-card p { font-size: 14.5px; margin: 0 0 16px; }
.course-card .more { color: var(--green); font-weight: 700; font-size: 14px; }

/* ---------------- Stats ---------------- */
.stats {
  position: relative;
  padding: 60px 0;
  background: linear-gradient(rgba(14,92,14,.88), rgba(21,120,21,.88)), url("../img/stats-bg.jpg") center/cover;
}
.stats .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  text-align: center;
  color: var(--white);
}
.stat-num { font-size: 40px; font-weight: 800; }
.stat-label { font-size: 14px; opacity: .9; }

/* ---------------- Pricing ---------------- */
.pricing { padding: 100px 0; background: var(--white); }
.price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.price-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 30px;
  text-align: center;
  transition: all .2s ease;
}
.price-card.featured {
  border-color: var(--green);
  box-shadow: var(--shadow);
  transform: scale(1.03);
}
.price-card h4 { font-size: 18px; margin-bottom: 18px; }
.price-amount { font-size: 42px; font-weight: 800; color: var(--green); }
.price-amount span { font-size: 15px; color: var(--text); font-weight: 500; }
.price-note { font-size: 14px; margin: 16px 0 26px; }
.price-card .btn { width: 100%; justify-content: center; }

/* ---------------- Steps ---------------- */
.steps {
  padding: 100px 0;
  background: var(--green-dark);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.steps::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .08;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='1.2'%3E%3Cpath d='M42 2l40 40-40 40L2 42z'/%3E%3Ccircle cx='42' cy='42' r='18'/%3E%3C/g%3E%3C/svg%3E");
}
.steps .container { position: relative; z-index: 1; }
.steps-icon {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  border: 2px solid rgba(255,255,255,.25);
  margin: 0 auto 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.steps-icon svg { width: 40px; height: 40px; color: var(--white); }
.step-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 40px; }
.step-card { text-align: center; }
.step-num {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--white);
  color: var(--green-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  margin: 0 auto 16px;
}
.step-card h4 { color: var(--white); font-size: 16px; margin-bottom: 8px; }
.step-card p { color: #d9f0d9; font-size: 14px; }
.step-card a { color: var(--white); text-decoration: underline; }

/* ---------------- CTA ---------------- */
.cta {
  padding: 70px 0;
  background: var(--green-light);
  text-align: center;
}
.cta h2 { font-size: 28px; margin-bottom: 24px; }

/* ---------------- Contact / form ---------------- */
.contact-block { padding: 100px 0; background: var(--white); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.contact-info li {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.contact-info svg { width: 22px; height: 22px; color: var(--green); flex-shrink: 0; }
.form-grid { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field label { display: block; font-size: 14px; font-weight: 600; color: var(--heading); margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-family: var(--font-body);
  font-size: 15px;
  background: var(--gray-bg);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--green); background: var(--white);
}

/* ---------------- Newsletter (footer subscribe) ---------------- */
.subscribe-form { display: flex; gap: 10px; flex-wrap: wrap; }
.subscribe-form input {
  flex: 1;
  min-width: 140px;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.08);
  color: var(--white);
}
.subscribe-form input::placeholder { color: rgba(255,255,255,.6); }
.subscribe-form button {
  padding: 12px 22px;
  border-radius: 8px;
  border: none;
  background: var(--green);
  color: var(--white);
  font-weight: 700;
  cursor: pointer;
}

/* ---------------- Footer ---------------- */
.site-footer { background: #101d10; color: #c9d6c9; padding: 70px 0 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 50px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-logo { font-family: var(--font-deco); font-size: 24px; color: var(--white); margin-bottom: 14px; }
.site-footer h5 { color: var(--white); font-size: 17px; margin-bottom: 18px; }
.site-footer ul li { margin-bottom: 10px; font-size: 14.5px; }
.site-footer a:hover { color: var(--white); }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
}
.footer-social svg { width: 16px; height: 16px; }
.footer-bottom {
  padding: 22px 0 0;
  text-align: center;
  font-size: 13.5px;
}

.dev-credit {
  display: flex;
  justify-content: center;
  padding: 18px 0 26px;
}
.dev-credit-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 13px;
  color: #c9d6c9;
  flex-wrap: wrap;
  justify-content: center;
  transition: background .2s ease;
}
.dev-credit-badge:hover { background: rgba(255,255,255,.12); }
.dev-credit-badge a { color: inherit; }
.dev-credit-badge a:hover { text-decoration: underline; }
.dev-credit-sep {
  width: 1px;
  height: 14px;
  background: rgba(255,255,255,.2);
}
.dev-credit-wa {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #25D366;
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.dev-credit-wa svg { width: 12px; height: 12px; }

/* ---------------- WhatsApp float ---------------- */
.wa-float {
  position: fixed;
  inset-inline-end: 22px;
  bottom: 22px;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #25D366;
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
  z-index: 200;
}
.wa-float svg { width: 28px; height: 28px; }

/* ---------------- Theme switcher ---------------- */
.theme-fab {
  position: fixed;
  inset-inline-start: 22px;
  bottom: 22px;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  border: none;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
  z-index: 200;
  cursor: pointer;
  transition: transform .2s ease;
}
.theme-fab:hover { transform: scale(1.06); }
.theme-fab svg { width: 26px; height: 26px; }
.theme-panel {
  position: fixed;
  inset-inline-start: 22px;
  bottom: 90px;
  z-index: 200;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  width: 220px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all .2s ease;
}
.theme-panel.open { opacity: 1; visibility: visible; transform: translateY(0); }
.theme-panel-title { font-size: 13px; font-weight: 700; color: var(--heading); margin-bottom: 12px; }
.theme-swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.theme-swatch {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 2px solid var(--white);
  outline: 2px solid var(--border);
  cursor: pointer;
  padding: 0;
}
.theme-swatch.active { outline: 2px solid var(--heading); }

/* ---------------- Inner page hero (simple) ---------------- */
.page-hero {
  background: linear-gradient(160deg, var(--green-dark), var(--green) 60%);
  color: var(--white);
  padding: 60px 0;
  text-align: center;
}
.page-hero h1 { color: var(--white); font-size: 34px; }
.breadcrumb { margin-top: 10px; font-size: 14px; opacity: .9; }
.breadcrumb a { color: var(--white); text-decoration: underline; }

.page-content { padding: 80px 0; }
.page-content .container { max-width: 880px; }
.page-content h2 { font-size: 24px; margin: 30px 0 14px; }
.page-content ul.styled li {
  position: relative;
  padding-inline-start: 26px;
  margin-bottom: 10px;
}
.page-content ul.styled li::before {
  content: "";
  position: absolute; inset-inline-start: 0; top: 9px;
  width: 8px; height: 8px;
  background: var(--green);
  border-radius: 50%;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 980px) {
  .main-nav, .header-cta .lang-switch { display: none; }
  .nav-toggle { display: flex; }
  .features .container { grid-template-columns: 1fr; }
  .feature-card { border-inline-end: none !important; border-bottom: 1px solid var(--border); }
  .feature-card:last-child { border-bottom: none; }
  .about .container, .contact-grid { grid-template-columns: 1fr; }
  .course-grid, .price-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .step-grid { grid-template-columns: 1fr; }
  .stats .container { grid-template-columns: repeat(2, 1fr); row-gap: 30px; }
}
@media (max-width: 640px) {
  .hero-ayah { font-size: 28px; }
  .course-grid, .price-grid, .footer-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .topbar-contact span.divider { display: none; }
}

/* Mobile nav panel */
.mobile-nav {
  position: fixed;
  inset: 0;
  background: var(--white);
  z-index: 300;
  padding: 24px;
  transform: translateX(100%);
  transition: transform .25s ease;
  overflow-y: auto;
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.mobile-nav-head button {
  width: 42px; height: 42px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--heading);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.mobile-nav-head button svg { width: 20px; height: 20px; }
.mobile-nav ul li a { display: block; padding: 14px 6px; font-weight: 700; border-bottom: 1px solid var(--border); }
.mobile-nav .dropdown { padding-inline-start: 16px; }
.mobile-nav .dropdown li a { font-weight: 500; font-size: 14px; border: none; padding: 10px 6px; }
