/* =============================================================================
   Public site: hero, sections, courses, testimonials, gallery, CTA
   ========================================================================== */

body.site { display: flex; flex-direction: column; min-height: 100dvh; }
body.site main { flex: 1 1 auto; }

/* ---------------------------------------------------------------- hero --- */

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 460px at 12% 0%, rgba(217, 174, 56, 0.16), transparent 62%),
    linear-gradient(158deg, var(--green-900) 0%, var(--green-950) 62%, #03170f 100%);
  color: var(--text-invert);
  isolation: isolate;
}
.hero::before {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background-image: url('../assets/pattern-arabesque.svg');
  background-size: 420px;
  opacity: 0.07;
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 1rem + 4vw, 4.5rem);
  align-items: center;
  padding-block: clamp(3rem, 2rem + 5vw, 6rem);
}
.hero h1 {
  font-size: var(--text-hero);
  color: #fff;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: var(--space-4);
}
.hero h1 em { font-style: normal; color: var(--gold-400); }
.hero-sub {
  margin-top: var(--space-5);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.16rem);
  color: rgba(255, 255, 255, 0.82);
  max-width: 54ch;
  line-height: 1.66;
}
.hero-bismillah {
  font-family: var(--font-arabic);
  direction: rtl;
  font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.8rem);
  color: var(--gold-300);
  line-height: 1.8;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }
.hero-proof {
  display: flex; flex-wrap: wrap; gap: var(--space-5);
  margin-top: clamp(2rem, 1.4rem + 1.6vw, 3rem);
  padding-top: var(--space-5);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}
.hero-proof-item { min-width: 108px; }
.hero-proof-num {
  font-family: var(--font-display);
  font-size: 1.85rem; font-weight: 600; color: var(--gold-400); line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.hero-proof-label { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.13em; color: rgba(255, 255, 255, 0.62); font-weight: 700; margin-top: 0.3rem; }

.hero-visual { position: relative; }
.hero-visual-frame {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.hero-visual-frame img { width: 100%; height: 100%; object-fit: cover; }
.hero-visual-frame::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(4, 35, 26, 0.72) 100%);
}
.hero-float {
  position: absolute;
  left: clamp(-1rem, -2vw, 0rem);
  bottom: clamp(1.2rem, 3vw, 2.2rem);
  z-index: 2;
  background: rgba(255, 255, 255, 0.97);
  color: var(--ink-900);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.1rem;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 0.7rem;
  max-width: 84%;
}
.hero-float .icon-badge { width: 38px; height: 38px; }
.hero-float .icon-badge svg { width: 18px; height: 18px; }
.hero-float-title { font-weight: 700; font-size: var(--text-sm); }
.hero-float-sub { font-size: var(--text-xs); color: var(--text-muted); }

@media (max-width: 940px) {
  .hero-inner { grid-template-columns: 1fr; padding-block: clamp(2.25rem, 1.5rem + 4vw, 3.5rem); }
  .hero-visual { order: -1; }
  .hero-visual-frame { aspect-ratio: 16 / 11; }
  .hero-proof { gap: var(--space-4); }
  .hero-proof-item { min-width: calc(50% - var(--space-4)); }
}

/* --------------------------------------------------------- page header --- */

.page-hero {
  position: relative;
  background:
    radial-gradient(800px 380px at 88% -20%, rgba(217, 174, 56, 0.16), transparent 60%),
    linear-gradient(150deg, var(--green-900), var(--green-950));
  color: var(--text-invert);
  padding-block: clamp(2.5rem, 2rem + 3.5vw, 4.75rem);
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url('../assets/pattern-arabesque.svg');
  background-size: 380px;
  opacity: 0.06;
}
.page-hero > * { position: relative; }
.page-hero h1 { color: #fff; font-size: var(--text-section); margin-top: var(--space-3); }
.page-hero p { color: rgba(255, 255, 255, 0.82); max-width: 66ch; margin-top: var(--space-4); font-size: var(--text-md); }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; font-size: var(--text-sm); color: rgba(255, 255, 255, 0.6); }
.breadcrumbs a { color: rgba(255, 255, 255, 0.78); text-decoration: none; }
.breadcrumbs a:hover { color: var(--gold-300); }
.breadcrumbs span[aria-hidden] { opacity: 0.5; }

/* ------------------------------------------------------------- feature -- */

.feature-card { display: flex; flex-direction: column; gap: var(--space-3); height: 100%; }
.feature-card h3 { font-size: var(--text-lg); }
.feature-card p { color: var(--text-muted); font-size: var(--text-base); }

.value-list { display: flex; flex-direction: column; gap: var(--space-3); }
.value-item { display: flex; gap: 0.7rem; align-items: flex-start; }
.value-item svg { width: 20px; height: 20px; flex: none; margin-top: 3px; color: var(--green-600); }
.section-deep .value-item svg { color: var(--gold-400); }

/* -------------------------------------------------------------- course -- */

.course-card { display: flex; flex-direction: column; height: 100%; }
.course-card .card-media { aspect-ratio: 16 / 10; }
.course-card .card-body { display: flex; flex-direction: column; gap: 0.7rem; flex: 1 1 auto; }
.course-card h3 { font-size: var(--text-lg); }
.course-desc { color: var(--text-muted); font-size: var(--text-base); flex: 1 1 auto; }
.course-meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; font-size: var(--text-sm); color: var(--text-muted); }
.course-meta span { display: inline-flex; align-items: center; gap: 0.35rem; }
.course-meta svg { width: 15px; height: 15px; color: var(--gold-700); }
.course-fee { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 600; color: var(--green-800); }
.course-fee small { font-family: var(--font-body); font-size: var(--text-xs); font-weight: 600; color: var(--text-muted); }
.media-badge {
  position: absolute; top: 0.75rem; left: 0.75rem; z-index: 1;
  background: rgba(4, 35, 26, 0.82); color: #fff; backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.media-badge::before { background: var(--gold-400); }

/* ---------------------------------------------------------- highlights -- */

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
  gap: clamp(1.75rem, 1rem + 3vw, 3.75rem);
  align-items: center;
}
.split-media { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.split-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.split-media-tall img { aspect-ratio: 3 / 4; }
.media-caption {
  position: absolute; inset-inline: 0; bottom: 0;
  padding: var(--space-5) var(--space-4) var(--space-4);
  background: linear-gradient(transparent, rgba(4, 35, 26, 0.88));
  color: #fff; font-size: var(--text-sm);
}

.stat-tile {
  padding: var(--space-5);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.stat-tile .num { font-family: var(--font-display); font-size: 2rem; color: var(--gold-400); font-weight: 600; }
.stat-tile .label { font-size: var(--text-sm); color: rgba(255, 255, 255, 0.72); margin-top: 0.25rem; }

/* -------------------------------------------------------- testimonials -- */

.quote-card { display: flex; flex-direction: column; gap: var(--space-4); height: 100%; position: relative; }
.quote-card::before {
  content: '“';
  font-family: var(--font-display);
  font-size: 4.2rem; line-height: 0.7;
  color: var(--gold-300);
  position: absolute; top: 1rem; right: 1.25rem;
}
.quote-card blockquote { font-size: var(--text-md); line-height: 1.68; color: var(--ink-800); position: relative; }
.quote-foot { display: flex; align-items: center; gap: 0.7rem; margin-top: auto; }
.stars { display: inline-flex; gap: 0.1rem; color: var(--gold-600); }
.stars svg { width: 15px; height: 15px; }

/* ------------------------------------------------------------- gallery -- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: var(--space-4);
}
.gallery-item {
  position: relative; overflow: hidden; border-radius: var(--radius-md);
  aspect-ratio: 3 / 2; background: var(--green-100); border: 1px solid var(--border);
  cursor: zoom-in; padding: 0; display: block; width: 100%;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--ease-out); }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item figcaption {
  position: absolute; inset-inline: 0; bottom: 0;
  padding: 1.6rem 0.9rem 0.75rem;
  background: linear-gradient(transparent, rgba(4, 35, 26, 0.86));
  color: #fff; font-size: var(--text-sm); font-weight: 600; text-align: left;
}
.gallery-item.is-tall { grid-row: span 2; aspect-ratio: 3 / 4; }
.lightbox img { max-height: 78dvh; width: auto; border-radius: var(--radius-md); margin-inline: auto; }

/* ------------------------------------------------------------ teachers -- */

.teacher-card { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 0.55rem; height: 100%; }
.teacher-card .avatar { width: 74px; height: 74px; font-size: var(--text-lg); margin-bottom: var(--space-2); }
.teacher-card h3 { font-size: var(--text-md); }
.teacher-role { font-size: var(--text-sm); color: var(--accent-strong); font-weight: 650; }
.teacher-bio { font-size: var(--text-sm); color: var(--text-muted); }

/* ----------------------------------------------------------------- cta -- */

.cta-band {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  color: #fff;
  isolation: isolate;
  margin-block: var(--section-y);
}
.cta-band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.cta-band::after {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, rgba(4, 35, 26, 0.94) 0%, rgba(6, 61, 43, 0.86) 45%, rgba(6, 61, 43, 0.35) 100%);
}
.cta-inner { padding: clamp(2.25rem, 1.5rem + 4vw, 4.25rem) clamp(1.5rem, 1rem + 3vw, 3.5rem); max-width: 62ch; }
.cta-inner h2 { color: #fff; font-size: var(--text-section); }
.cta-inner p { color: rgba(255, 255, 255, 0.86); margin-top: var(--space-4); font-size: var(--text-md); }
.cta-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }

/* ----------------------------------------------------------- timetable -- */

.timeline { display: flex; flex-direction: column; gap: 0; position: relative; }
.timeline-item { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: var(--space-4); padding-bottom: var(--space-5); position: relative; }
.timeline-item::before {
  content: ''; position: absolute; left: 21px; top: 34px; bottom: 0; width: 2px; background: var(--border);
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item:last-child::before { display: none; }
.timeline-dot {
  width: 44px; height: 44px; border-radius: var(--radius-pill);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--green-100); color: var(--green-800);
  border: 1px solid var(--green-200); font-weight: 700; font-family: var(--font-display);
  position: relative; z-index: 1;
}
.timeline-body h3 { font-size: var(--text-md); }
.timeline-body p { color: var(--text-muted); font-size: var(--text-base); margin-top: 0.25rem; }

/* ------------------------------------------------------- payment cards -- */

.pay-method {
  display: flex; gap: var(--space-4); align-items: flex-start;
  padding: var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface);
}
.pay-method .icon-badge { flex: none; }
.pay-detail { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.3rem 0.9rem; font-size: var(--text-sm); margin-top: var(--space-3); }
.pay-detail dt { color: var(--text-muted); font-weight: 600; }
.pay-detail dd { font-family: var(--font-mono); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.copy-btn { display: inline-flex; align-items: center; gap: 0.3rem; font-size: var(--text-xs); font-weight: 700; color: var(--primary-strong); }
.copy-btn svg { width: 14px; height: 14px; }

/* ------------------------------------------------------------ policies -- */

.prose { max-width: 74ch; }
.prose h2 { font-size: var(--text-xl); margin-top: var(--space-7); }
.prose h3 { font-size: var(--text-md); margin-top: var(--space-5); }
.prose p, .prose li { color: var(--ink-700); line-height: 1.75; font-size: var(--text-md); }
.prose p + p { margin-top: var(--space-4); }
.prose ul, .prose ol { margin-top: var(--space-3); padding-left: 1.35rem; display: flex; flex-direction: column; gap: 0.55rem; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li::marker { color: var(--gold-700); }
.prose blockquote {
  margin-top: var(--space-4); padding: var(--space-4) var(--space-5);
  border-left: 3px solid var(--gold-500); background: var(--gold-100);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--ink-800);
}
.prose table { margin-top: var(--space-4); font-size: var(--text-base); }
.prose th, .prose td { border: 1px solid var(--border); padding: 0.6rem 0.8rem; text-align: left; }
.prose th { background: var(--bg-alt); font-weight: 700; }
.toc { position: sticky; top: calc(var(--header-h) + 1.5rem); }
.toc a { display: block; padding: 0.35rem 0; font-size: var(--text-sm); color: var(--text-muted); text-decoration: none; }
.toc a:hover { color: var(--primary-strong); }
.legal-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(1.5rem, 1rem + 3vw, 3.5rem); }
@media (max-width: 860px) { .legal-layout { grid-template-columns: 1fr; } .toc { position: static; } }

/* ------------------------------------------------------------- auth ------ */

body.auth-page {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  background: var(--ivory);
}
.auth-aside {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 1.5rem + 3vw, 4rem);
  display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-6);
  background: linear-gradient(160deg, var(--green-900), var(--green-950));
  color: var(--text-invert);
}
.auth-aside::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url('../assets/pattern-arabesque.svg');
  background-size: 340px; opacity: 0.07;
}
.auth-aside > * { position: relative; }
.auth-aside h2 { color: #fff; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem); }
.auth-aside p { color: rgba(255, 255, 255, 0.8); margin-top: var(--space-4); max-width: 42ch; }
.auth-main {
  display: flex; align-items: center; justify-content: center;
  padding: clamp(1.5rem, 1rem + 3vw, 3.5rem);
}
.auth-card { width: min(440px, 100%); }
.auth-card h1 { font-size: var(--text-2xl); }
.auth-card > p { color: var(--text-muted); margin-top: var(--space-2); }
.auth-form { margin-top: var(--space-6); display: flex; flex-direction: column; gap: var(--space-4); }
.auth-alt { margin-top: var(--space-5); font-size: var(--text-sm); color: var(--text-muted); text-align: center; }
.auth-footer-links { margin-top: var(--space-6); display: flex; gap: var(--space-4); flex-wrap: wrap; font-size: var(--text-sm); }
.password-wrap { position: relative; }
.password-wrap .input { padding-right: 3rem; }
.password-toggle {
  position: absolute; right: 0.4rem; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center; color: var(--text-muted);
}
.password-toggle:hover { background: var(--bg-alt); color: var(--text); }
.password-toggle svg { width: 18px; height: 18px; }
@media (max-width: 900px) {
  body.auth-page { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-main { min-height: 100dvh; }
}

/* -------------------------------------------------------------- faq ----- */

.faq-list { display: flex; flex-direction: column; gap: var(--space-3); }

/* ------------------------------------------------------- contact block -- */

.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(1.5rem, 1rem + 3vw, 3.5rem); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-item { display: flex; gap: var(--space-3); align-items: flex-start; }
.contact-item .icon-badge { width: 40px; height: 40px; }
.contact-item .icon-badge svg { width: 19px; height: 19px; }
.contact-item a { text-decoration: none; font-weight: 650; overflow-wrap: anywhere; }
.contact-label { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-soft); font-weight: 700; }


/* =============================================================
   Professional home-page polish — production edition
   ============================================================= */
.hero-inner { min-height: min(760px, calc(100dvh - var(--header-h) - 38px)); }
.hero h1 { max-width: 14ch; letter-spacing: -.025em; }
.hero-sub { max-width: 60ch; }
.hero-visual-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16);
  pointer-events: none;
}
.hero-actions .btn { min-width: 160px; }
.feature-card { border-top: 3px solid transparent; }
.feature-card:hover { border-top-color: var(--gold-500); }
.hero-proof-item { min-width: 0; }
.hero-proof-num { letter-spacing: -.02em; }
.section-head-center > p:last-child { max-width: 62ch; margin-inline: auto; }

@media (max-width: 900px) {
  .hero-inner { min-height: auto; }
  .hero h1 { max-width: none; }
}
