/* Al-Marifah Academy — shared stylesheet */

:root {
  --green: #0B3D2B;
  --green-soft: #14553d;
  --gold: #C5A046;
  --gold-text: #8A6A1C;
  --cream: #FBF9F4;
  --mint: #EAF1EC;
  --text: #1B2A24;
  --white: #ffffff;
  --line: rgba(11, 61, 43, 0.12);
  --border: #E3E8E4;

  --font-head: "Cormorant Garamond", Georgia, serif;
  --font-body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-ar: "Amiri", serif;
  --font-ur: "Noto Nastaliq Urdu", serif;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 6px 24px rgba(11, 61, 43, 0.08);
  --shadow-lg: 0 12px 36px rgba(11, 61, 43, 0.14);
  --space: clamp(3rem, 7vw, 5.5rem);
  --wrap: 1120px;

  /* Geometric 8-point star pattern, gold, used at very low opacity */
  --pattern: 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='%23B8913A' stroke-width='1.6'%3E%3Cpath d='M40 6l8.5 20.5L69 18l-8.5 20.5L81 47l-20.5 8.5L69 76 48.5 67.5 40 88 31.5 67.5 11 76l8.5-20.5L-1 47l20.5-8.5L11 18l20.5 8.5z' transform='translate(0 -4) scale(.95) translate(2 2)'/%3E%3Ccircle cx='40' cy='40' r='9'/%3E%3C/g%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
}

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

h1, h2, h3, h4 {
  font-variant-numeric: lining-nums;
  font-family: var(--font-head);
  color: var(--green);
  line-height: 1.15;
  margin: 0 0 .6em;
  font-weight: 700;
}
h1 { font-size: clamp(2.3rem, 6.5vw, 3.8rem); }
h2 { font-size: clamp(1.9rem, 4.5vw, 2.7rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }
a { color: var(--green); }

.ar { font-family: var(--font-ar); }
.ur { font-family: var(--font-ur); }

/* Accessibility */
:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}
.on-dark :focus-visible, .site-footer :focus-visible {
  outline-color: var(--gold);
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--green); color: var(--cream);
  padding: .6rem 1rem; border-radius: 8px; z-index: 200;
}
.skip-link:focus { top: 1rem; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Layout */
.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.section { padding-block: var(--space); position: relative; }
.section--mint { background: var(--mint); }
/* Islamic geometry layer: gold tile, strength set by layer opacity and a mask */
.section--pattern::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: var(--pattern); background-size: 96px 96px;
  opacity: .08; /* mobile: uniform ~8% */
}
.section--pattern > * { position: relative; }
.section-head { max-width: 46rem; margin-bottom: 2.2rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  color: var(--gold-text); font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; font-size: .82rem; margin-bottom: .6rem;
}
.divider {
  height: 22px; background-image: var(--pattern); background-size: 96px 96px;
  background-position: center; opacity: .18;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.6rem; min-height: 48px;
  border-radius: 999px; border: 2px solid transparent;
  font: 700 1rem/1.2 var(--font-body); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--primary { background: var(--green); color: var(--cream); }
.btn--primary:hover { background: var(--green-soft); }
.btn--gold { background: var(--gold); color: var(--green); }
.btn--outline { border-color: var(--green); color: var(--green); background: transparent; }
.btn--outline:hover { background: var(--green); color: var(--cream); }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.4rem; }
.cta-center { margin-top: 2rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251, 249, 244, .96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: .6rem;
}
.logo img { height: 44px; min-height: 44px; width: auto; }
.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 48px; height: 48px; padding: 12px;
  background: none; border: 1px solid var(--line); border-radius: 12px; cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--green); border-radius: 2px; }
.site-nav {
  display: none; position: absolute; left: 0; right: 0; top: 100%;
  background: var(--cream); border-bottom: 1px solid var(--line);
  padding: 1rem; box-shadow: var(--shadow);
}
.site-nav.open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; }
.site-nav a {
  display: block; padding: .8rem .6rem; border-radius: 10px;
  color: var(--green); font-weight: 700; text-decoration: none;
}
.site-nav a:hover { background: var(--mint); }
.site-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--gold); }
.site-nav .btn { margin-top: .6rem; width: 100%; color: var(--cream); }
.site-nav .btn:hover { background: var(--green-soft); }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav {
    display: block; position: static; background: none; border: 0;
    padding: 0; box-shadow: none;
  }
  .site-nav ul { display: flex; align-items: center; gap: .3rem; }
  .site-nav .btn { margin: 0 0 0 .6rem; width: auto; padding: .6rem 1.2rem; min-height: 44px; }
  .site-nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--gold); border-radius: 0; }
}

/* Hero */
.hero { position: relative; padding-block: clamp(2.5rem, 7vw, 5rem) var(--space); overflow: hidden; }
.hero-inner { max-width: 640px; }
.badge {
  display: inline-block; background: var(--mint); color: var(--green);
  border: 1px solid var(--gold); border-radius: 999px;
  padding: .3rem 1rem; font-weight: 700; font-size: .9rem; margin-bottom: 1.2rem;
}
.hero .sub { font-size: 1.15rem; max-width: 42rem; }

/* Cards & grids */
.grid { display: grid; gap: 1.4rem; }
@media (min-width: 700px) { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
}
.card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .4rem; }
.card .meta {
  color: var(--gold-text); font-weight: 700; font-size: .9rem; margin-bottom: .8rem;
}

/* Lists: solid green 20px circle with a thin cream check (inline SVG) */
.check-list { list-style: none; padding: 0; margin: 0 0 1em; }
.check-list li { padding-left: 2.1rem; position: relative; margin-bottom: .6rem; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: .22rem; width: 20px; height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='10' fill='%230B3D2B'/%3E%3Cpath d='M5.8 10.3l2.9 2.9 5.5-5.8' fill='none' stroke='%23FBF9F4' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px 20px no-repeat;
}
.why-item { display: flex; gap: .8rem; }
.why-item .icon {
  flex: none; width: 20px; height: 20px; border-radius: 50%; margin-top: .3rem;
  background: var(--green); color: var(--cream);
  display: grid; place-items: center;
}
.why-item .icon svg { width: 12px; height: 12px; stroke-width: 2; }
.why-item h3 { font-size: 1.25rem; margin-bottom: .2rem; }
.why-item p { margin: 0; }

.callout {
  background: var(--white); border-left: 4px solid var(--gold);
  border-radius: var(--radius-sm); padding: 1.2rem 1.4rem; box-shadow: var(--shadow);
}
.quote {
  font-family: var(--font-head); font-size: 1.35rem; color: var(--green);
  font-style: italic;
}

/* Two columns */
.split { display: grid; gap: 2rem; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; align-items: start; } }

/* Teachers */
.teacher { text-align: left; display: flex; flex-direction: column; }
.avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--green); color: var(--gold);
  display: grid; place-items: center;
  font: 700 2rem/1 var(--font-head); margin-bottom: 1rem;
}
.teacher dl { margin: 0 0 .8rem; display: grid; gap: .35rem; font-size: .98rem; }
.teacher dt { color: var(--gold-text); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.teacher dd { margin: 0; }
.teacher .bio { font-size: .98rem; margin: auto 0 0; padding-top: .8rem; }
.note { margin-top: 1.6rem; }

/* Footer */
.site-footer {
  background: var(--green); color: var(--cream);
  padding-block: 3rem 6rem; margin-top: 0; /* extra room so the floating WhatsApp button never covers the copyright */
}
.site-footer a { color: var(--cream); }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.4fr 1fr; } }
.site-footer .logo img { height: 72px; margin-bottom: 1rem; }
.footer-tag { font-family: var(--font-head); font-size: 1.5rem; margin: 0 0 .3rem; color: var(--gold); }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .4rem 1rem; }
.footer-links a { display: inline-block; padding: .3rem 0; }
.copyright {
  border-top: 1px solid rgba(251, 249, 244, .2);
  margin-top: 2rem; padding-top: 1.2rem; font-size: .9rem; opacity: .85;
}

/* Floating WhatsApp */
.wa-float {
  position: fixed; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); z-index: 90;
  width: 58px; height: 58px; border-radius: 50%;
  background: #1f8a4c; color: var(--white);
  display: grid; place-items: center; box-shadow: var(--shadow-lg);
  transition: transform .15s ease;
}
.wa-float:hover { transform: scale(1.06); }
.wa-float svg { width: 32px; height: 32px; fill: currentColor; }
.wa-float:focus-visible { outline-color: var(--green); outline-offset: 4px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---- Polish ---- */

/* Announcement bar */
.announce { background: var(--green); color: var(--cream); font-size: .95rem; text-align: center; }
.announce p { margin: 0; padding-block: .55rem; line-height: 1.4; }
.announce a { color: var(--gold); font-weight: 700; text-underline-offset: 3px; }
.announce a:focus-visible { outline-color: var(--gold); }


/* Larger header logo on desktop, larger footer logo */
@media (min-width: 900px) {
  .logo img { height: 56px; }
  .site-footer .logo img { height: 88px; }
}

/* Prices on program cards */
.price {
  font: 800 2rem/1 var(--font-body); font-variant-numeric: lining-nums;
  color: var(--green); margin: 1.1rem 0 0;
}
.price span { font: 600 .95rem var(--font-body); color: var(--gold-text); }

/* Wider footer padding on small screens already handled; keep content off the floating button */
@media (max-width: 599px) {
  .wa-float { width: 54px; height: 54px; right: .75rem; }
}


/* Trust strip: text only, thin vertical dividers */
.trust {
  list-style: none; margin: clamp(2.2rem, 5vw, 3.5rem) 0 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.trust li {
  padding: 1rem .8rem; text-align: center; font-weight: 700; color: var(--green); font-size: .95rem;
}
.trust li:nth-child(odd) { border-right: 1px solid var(--border); }
.trust li:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
@media (min-width: 768px) {
  .trust { grid-template-columns: repeat(4, 1fr); }
  .trust li { border: 0 !important; }
  .trust li + li { border-left: 1px solid var(--border) !important; }
}


/* Teachers: 1 col mobile, 2x2 from 600px, 4 columns from 1100px */
.grid--teachers { grid-template-columns: 1fr; }
@media (min-width: 600px) { .grid--teachers { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .grid--teachers { grid-template-columns: repeat(4, 1fr); } }
.grid--teachers .card { padding: 1.4rem; }

/* Directional pattern (desktop): very light behind text on the left, clearly visible on the right.
   Same drawing, only opacity changes via a smooth mask. Mobile stays a uniform ~8%. */
@media (min-width: 900px) {
  /* Why Choose, Who Can Learn: ~6% left to ~20% right */
  .section--pattern::before {
    opacity: .2;
    -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,.3) 0%, rgba(0,0,0,.3) 40%, #000 100%);
    mask-image: linear-gradient(90deg, rgba(0,0,0,.3) 0%, rgba(0,0,0,.3) 40%, #000 100%);
  }
  /* Hero: ~5.6% behind the text (left ~55%), easing up to ~28% on the right */
  .hero.section--pattern::before {
    opacity: .28;
    -webkit-mask-image: linear-gradient(90deg,
      rgba(0,0,0,.2) 0%, rgba(0,0,0,.2) 52%, rgba(0,0,0,.3) 60%, rgba(0,0,0,.5) 68%,
      rgba(0,0,0,.75) 77%, rgba(0,0,0,.92) 86%, #000 94%, #000 100%);
    mask-image: linear-gradient(90deg,
      rgba(0,0,0,.2) 0%, rgba(0,0,0,.2) 52%, rgba(0,0,0,.3) 60%, rgba(0,0,0,.5) 68%,
      rgba(0,0,0,.75) 77%, rgba(0,0,0,.92) 86%, #000 94%, #000 100%);
  }
}
[hidden] { display: none !important; }

/* ---- Courses & Fees ---- */
.page-hero { padding-block: clamp(2rem, 5vw, 3.5rem); }
.section-head .age { font-size: .6em; color: var(--gold-text); font-weight: 600; white-space: nowrap; }
.grid--courses { align-items: stretch; }
@media (min-width: 900px) { .grid--courses { grid-template-columns: repeat(2, 1fr); } }
.course { display: flex; flex-direction: column; }
.course .facts { margin: 0 0 1.2rem; display: grid; gap: .6rem; }
.course .facts dt { color: var(--gold-text); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.course .facts dd { margin: 0; }
.levels { list-style: none; margin: 0 0 1.4rem; padding: 0; display: grid; gap: .9rem; }
.levels li { display: flex; gap: .9rem; background: var(--mint); border-radius: var(--radius-sm); padding: 1rem; }
.level-no {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: var(--green); color: var(--cream); display: grid; place-items: center;
  font: 800 1rem/1 var(--font-body);
}
.levels h4 { font-size: 1.2rem; margin: 0 0 .2rem; }
.levels p { margin: 0; font-size: .98rem; }
.course-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.course-foot .price { margin: 0; }

.table-wrap { overflow-x: auto; }
.fee-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.fee-table th, .fee-table td { padding: 1rem 1.2rem; text-align: left; border-bottom: 1px solid var(--border); }
.fee-table thead th { background: var(--green); color: var(--cream); font-size: .9rem; }
.fee-table tbody th { color: var(--green); font-weight: 700; }
.fee-table .fee { font-weight: 800; font-size: 1.4rem; color: var(--green); }
.fee-summary { font-weight: 700; color: var(--green); margin-bottom: 1rem; }
@media (max-width: 699px) {
  .fee-table { font-size: .9375rem; }
  .fee-table th, .fee-table td { padding: .8rem .7rem; }
  .fee-table .fee { font-size: 1.2rem; white-space: nowrap; }
  .col-week { display: none; }
}
@media (min-width: 700px) { .fee-summary { display: none; } }
.offer { border: 2px solid var(--gold); max-width: 46rem; margin-inline: auto; }
.offer .spots { display: block; color: var(--gold-text); font-weight: 700; font-size: .95rem; }

/* ---- About ---- */
#mission .card h2 { font-size: 1.9rem; }
.cta-band { background: var(--green); color: var(--cream); padding-block: clamp(2.5rem, 6vw, 4rem); text-align: center; }
.cta-band h2 { color: var(--cream); }
.cta-band .btn-row { justify-content: center; }
.btn--outline-light { border-color: var(--cream); color: var(--cream); background: transparent; }
.btn--outline-light:hover { background: var(--cream); color: var(--green); }
.cta-band :focus-visible { outline-color: var(--gold); }

/* ---- Enroll, FAQ, 404 ---- */
.salaam { text-align: left; font-size: 1.5rem; line-height: 2; margin-bottom: .4rem; color: var(--green); }
.enroll-grid { display: grid; gap: 1.6rem; align-items: start; }
@media (min-width: 900px) { .enroll-grid { grid-template-columns: 1.4fr 1fr; } }
.form .field { margin-bottom: 1.2rem; }
.form label { display: block; font-weight: 700; color: var(--green); margin-bottom: .35rem; }
.req { color: var(--gold-text); font-weight: 800; }
.form input, .form select, .form textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--text);
  background: var(--white); border: 1.5px solid #8a9b92; border-radius: var(--radius-sm);
  padding: .75rem .9rem; min-height: 48px;
}
.form textarea { resize: vertical; }
.form input:focus-visible, .form select:focus-visible, .form textarea:focus-visible {
  outline: 3px solid var(--green); outline-offset: 2px; border-color: var(--green);
}
.form [aria-invalid="true"] { border-color: #b3261e; }
.error { color: #b3261e; font-weight: 600; font-size: .95rem; margin: .35rem 0 0; }
.form-note { font-size: .95rem; }
.form-error-summary { background: #fdecea; color: #8c1d18; border-radius: var(--radius-sm); padding: .8rem 1rem; margin-bottom: 1.2rem; font-weight: 700; }
.form .btn { width: 100%; }
@media (min-width: 600px) { .form .btn { width: auto; } }
.next h2 { font-size: 1.8rem; }

.faq-wrap { max-width: 48rem; }
.faq-item { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: .8rem; box-shadow: var(--shadow); }
.faq-item summary {
  cursor: pointer; list-style: none; padding: 1rem 3rem 1rem 1.2rem; position: relative;
  font-weight: 700; color: var(--green); min-height: 48px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 1.2rem; top: .8rem; font-size: 1.4rem; line-height: 1; color: var(--gold-text); }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin: 0; padding: 0 1.2rem 1.2rem; }

.center-text { text-align: center; max-width: 40rem; }
.center-text .btn-row { justify-content: center; }

/* ---- Radio choice cards (enroll) ---- */
.form input, .form select, .form textarea, .form input[type="radio"] { accent-color: #0B3D2B; }
.form input:focus-visible, .form select:focus-visible, .form textarea:focus-visible { outline-color: #0B3D2B; border-color: #0B3D2B; }
.choice-group { border: 0; padding: 0; margin: 0 0 1.2rem; min-width: 0; }
.choice-group legend { padding: 0; font-weight: 700; color: var(--green); margin-bottom: .5rem; }
.choices { display: grid; gap: .7rem; }
.choices--course { grid-template-columns: 1fr; }
@media (min-width: 480px) { .choices--course { grid-template-columns: repeat(2, 1fr); } }
.choices--pills { grid-template-columns: repeat(2, 1fr); }
.choice { position: relative; display: block; margin: 0; font-weight: 400; cursor: pointer; }
.choice input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; opacity: 0; margin: 0; cursor: pointer; }
.choice-text {
  display: flex; align-items: center; justify-content: center; gap: .5rem; height: 100%;
  min-height: 48px; padding: .6rem .9rem; text-align: center;
  font-size: 16px; line-height: 1.3; color: var(--text); font-weight: 600;
  background: var(--white); border: 1px solid #D5DDD8; border-radius: 12px;
  transition: border-color .15s ease, background .15s ease;
}
.choice:hover .choice-text { border-color: #0B3D2B; }
.choice input:checked + .choice-text { background: #0B3D2B; color: var(--cream); border-color: #0B3D2B; }
.choice input:checked + .choice-text::before {
  content: ""; flex: none; width: 18px; height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4.5 10.5l3.7 3.7 7.3-7.8' fill='none' stroke='%23FBF9F4' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
}
.choice input:focus-visible + .choice-text { outline: 3px solid #0B3D2B; outline-offset: 3px; }

/* ---- Home: pricing + short teacher cards ---- */
.price-card { text-align: left; display: flex; flex-direction: column; padding: 1.3rem 1.5rem; }
.price-card h3 { font-size: 1.35rem; }
.price-card .meta { margin-bottom: 0; }
.price-card .price { font-weight: 800; font-variant-numeric: lining-nums; margin-top: auto; padding-top: .9rem; }
.price-note { margin: 1.6rem 0 .4rem; font-weight: 700; color: var(--green); }
.price-offer { margin: 0; }
.teacher--short { align-items: flex-start; }
.teacher--short h3 { margin-bottom: .3rem; }
.teacher--short .t-qual { margin: 0 0 .2rem; font-weight: 600; }
.teacher--short .t-exp { margin: 0; color: var(--gold-text); font-weight: 700; font-size: .95rem; }
