@import url("https://fonts.googleapis.com/css2?family=Noto+Naskh+Arabic:wght@600;700&family=Cormorant+Garamond:ital,wght@1,500;1,600&display=swap");

:root {
  --forest: #0e3b2e;
  --forest-deep: #08261d;
  --forest-mid: #1a5c45;
  --gold: #c6a15a;
  --gold-deep: #9a7838;
  --gold-soft: #f3e6c4;
  --cream: #f6f1e6;
  --paper: #fffdf8;
  --ink: #1a2e26;
  --muted: #5e6d66;
  --line: #e6dcc8;
  --danger: #8d2d2d;
  --shadow: 0 16px 40px rgba(16, 40, 30, .08);
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Outfit", "Segoe UI", sans-serif;
  --arabic: "Amiri", "Traditional Arabic", "Noto Naskh Arabic", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
}
body::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, #8d6b2f, #e8d29a, #8d6b2f);
}
img { max-width: 100%; }
a { color: var(--forest-mid); }
button, input, select, textarea { font: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; }
.container { width: calc(100% - 48px); max-width: none; margin: 0 auto; }
.narrow { width: min(860px, calc(100% - 40px)); }
.sr-only, .skip {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.skip:focus {
  width: auto;
  height: auto;
  clip: auto;
  left: 12px;
  top: 12px;
  z-index: 20;
  background: white;
  padding: 8px 12px;
}
.hp { position: absolute; left: -10000px; height: 0; overflow: hidden; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 253, 248, .94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(198, 161, 90, .35);
}
.topbar-inner {
  position: relative;
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--forest); }
.brand-mark { width: 52px; height: 52px; display: block; }
.brand-mark svg { width: 52px; height: 52px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-family: var(--serif); font-size: 1.7rem; letter-spacing: .14em; font-weight: 600; }
.brand-text small { color: #6d7a74; letter-spacing: .14em; font-size: .58rem; text-transform: uppercase; }
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-burger { display: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; place-items: center; }
.nav-burger svg { width: 20px; height: 20px; }
.main-nav { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.nav-links { position: absolute; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 28px; }
.nav-links a { text-decoration: none; color: var(--ink); font-weight: 500; padding-bottom: 4px; }
.nav-links a.is-active { color: var(--forest); border-bottom: 2px solid var(--gold); }
.nav-search { display: flex; align-items: center; justify-content: flex-end; width: 42px; height: 42px; background: white; border: 1px solid #e4d2a4; border-radius: 50%; overflow: hidden; transition: width .2s ease; }
.nav-search:focus-within { width: 220px; border-radius: 999px; padding-left: 14px; }
.nav-search input { border: 0; width: 0; opacity: 0; background: transparent; outline: none; }
.nav-search:focus-within input { width: 150px; opacity: 1; }
.nav-search button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--forest); display: grid; place-items: center; cursor: pointer; flex: none; }
.nav-search svg, .btn svg, .chevron svg, .footer-icon svg, .contact-line svg { width: 18px; height: 18px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
}
.btn-gold { background: linear-gradient(180deg, #e4c98a, #b8923e); color: #2a2108; box-shadow: 0 8px 18px rgba(154, 120, 56, .25); }
.btn-green { background: var(--forest); color: #f6edd8; }
.btn-line { background: transparent; color: var(--forest); border: 1px solid var(--line); }
.btn-danger { background: transparent; color: var(--danger); border: 1px solid #eccfcf; }

.hero {
  position: relative;
  overflow: hidden;
  color: white;
  background-color: #0c3428;
  background-image: url("../images/geo-pattern.svg?v=5");
  background-size: 72px;
}
.hero::before { content: none; }
.hero::after { content: none; }
.hero-grid, .page-hero .container { position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 42%) minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
  padding: 0;
}
.hero-copy { align-self: center; padding: 28px 0; }
.hero-arch {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 460px;
  object-fit: cover;
  object-position: center center;
  justify-self: stretch;
  align-self: stretch;
}
.eyebrow, .section-label {
  margin: 0 0 8px;
  color: var(--gold);
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: .74rem;
  font-weight: 600;
}
.hero h1, .page-hero h1 { margin: 0; font-size: clamp(2.6rem, 5vw, 4.5rem); font-weight: 600; }
.hero h1 { font-size: clamp(2.3rem, 3.3vw, 3.6rem); }
.tagline { margin: 14px 0; color: #f0d9a0; font-family: var(--serif); font-size: 1.45rem; font-style: italic; }
.tagline::before { content: ""; display: inline-block; width: 42px; height: 1px; background: var(--gold); margin-right: 12px; vertical-align: middle; }
.lede { max-width: 58ch; color: rgba(255,255,255,.88); font-weight: 300; }
.verse-card {
  justify-self: end;
  width: min(100%, 420px);
  background:
    radial-gradient(circle at 20% 10%, rgba(255,255,255,.55), transparent 42%),
    linear-gradient(180deg, #fbf7ee, #f3ead6);
  color: #24362e;
  border-radius: 8px 8px 46% 46% / 8px 8px 18px 18px;
  padding: 22px 22px 28px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .18);
  text-align: center;
}
.verse-title { margin: 0; display: flex; align-items: center; justify-content: center; gap: 12px; white-space: nowrap; color: #8d6a32; letter-spacing: .01em; font-family: var(--serif); font-size: 1.35rem; font-weight: 600; font-style: italic; }
.verse-title::before, .verse-title::after { content: ""; width: 36px; height: 1px; background: #c6a15a; flex: none; }
.arabic { font-family: "Noto Naskh Arabic", var(--arabic); font-weight: 600; font-size: 1.22rem; line-height: 2.05; text-align: center; margin: 12px 0 10px; color: #1c2c26; }
.verse-en { margin: 0 auto; max-width: 36em; color: #3e5148; font-family: var(--serif); font-size: 1.02rem; font-style: italic; font-weight: 500; text-align: center; line-height: 1.45; }

.home-band { padding: 42px 0 64px; }
.home-grid { display: grid; grid-template-columns: minmax(260px, 320px) minmax(0, 1fr) minmax(260px, 320px); gap: 28px; align-items: start; }
.section-label.center { text-align: center; }
.section-list, .enroll-list { display: grid; gap: 12px; }
.section-card, .enroll-item {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 12px;
  align-items: center;
  background: var(--paper);
  border: 1px solid white;
  border-radius: 16px;
  padding: 12px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
}
.enroll-item { grid-template-columns: 44px 1fr; }
.section-card:hover { transform: translateY(-2px); border-color: #e2cf9f; }
.section-card strong, .enroll-item strong { display: block; font-size: .98rem; }
.section-card small, .enroll-item small { display: block; color: var(--muted); font-size: .84rem; line-height: 1.4; }
.icon-bubble {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--forest); color: #f3e0b0;
}
.icon-bubble svg { width: 22px; height: 22px; }
.icon-bubble.gold { background: linear-gradient(180deg, #f0d7a4, #c6a15a); color: #fffaf2; }
.icon-bubble.sm { width: 32px; height: 32px; }
.icon-bubble.sm svg { width: 16px; height: 16px; }
.chevron { color: var(--gold-deep); }

.framework { text-align: center; }
.framework h2 { margin: 0 0 8px; display: inline-block; font-size: 2.15rem; color: var(--forest); border-bottom: 2px solid #c6a15a; padding-bottom: 2px; }
.framework-summary { margin: 0 auto 22px; max-width: 46ch; color: var(--muted); }
.framework-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px) minmax(0, 1fr);
  grid-template-areas: "a m b" "c m d";
  gap: 16px 18px;
  text-align: left;
  align-items: stretch;
}
.pillar-card {
  min-width: 0;
  background: var(--paper);
  border-radius: 16px;
  padding: 14px 12px 14px;
  box-shadow: var(--shadow);
}
.pillar-head { display: grid; grid-template-columns: 42px minmax(0, 1fr) 16px; gap: 8px; align-items: center; }
.pillar-card.to-left .pillar-head { grid-template-columns: 16px 42px minmax(0, 1fr); }
.pillar-card.to-left .pillar-arrow { order: -1; transform: scaleX(-1); }
.pillar-arrow { color: #c6a15a; display: grid; }
.pillar-arrow svg { width: 16px; height: 16px; }
.pillar-card h3 { margin: 0; font-size: 1.28rem; color: var(--forest); }
.pillar-sub { margin: 1px 0 0; color: var(--gold-deep); font-size: .74rem; font-weight: 600; line-height: 1.3; }
.pillar-card > p { margin: 8px 0 0; color: #3e5148; font-size: .82rem; line-height: 1.45; }
.medallion-wrap {
  grid-area: m;
  position: relative;
  display: grid;
  place-items: center;
  align-self: center;
}
.seal { width: 100%; max-width: 280px; height: auto; display: block; }

.overview, .fee-box, .side-card, .prose-card, .form-card {
  background: var(--paper);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.overview, .fee-box { margin-top: 16px; padding: 16px; }
.overview dl, .facts { margin: 0; }
.overview dl > div, .facts > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: .92rem;
}
.overview dt { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.overview dt svg { width: 16px; height: 16px; color: var(--forest); }
.overview dd, .facts dd { margin: 0; font-weight: 600; text-align: right; }
.fee-box > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; }
.fee-box strong { color: var(--forest); }

.site-footer {
  position: relative;
  background-color: #0c3227;
  background-image:
    url("../images/footer-trees.svg?v=4"),
    url("../images/footer-geo.svg?v=2"),
    linear-gradient(180deg, #123c2e, #0c3227);
  background-repeat: repeat-x, repeat-x, no-repeat;
  background-position: center top, center bottom, center;
  background-size: 520px 22px, 180px 18px, auto;
  border-top: 1px solid rgba(198, 161, 90, .4);
  color: #efe6d2;
  padding: 16px 0 22px;
}
.footer-grid { display: flex; align-items: center; gap: 0; }
.footer-item { flex: 1; display: flex; gap: 10px; align-items: center; padding: 0 14px; border-right: 1px solid rgba(230, 204, 138, .35); }
.footer-icon { width: 30px; height: 30px; display: grid; place-items: center; color: #e6cc8a; flex: none; }
.footer-icon svg { width: 26px; height: 26px; stroke-width: 1.25; }
.footer-wa .footer-icon { color: #3ddc84; }
.site-footer h2 { margin: 0 0 2px; font-size: .98rem; color: white; font-weight: 600; line-height: 1.15; }
.site-footer p { margin: 0; color: rgba(255,255,255,.78); font-size: .75rem; line-height: 1.25; }
.footer-contact { position: relative; flex: 0 0 250px; display: flex; flex-direction: column; gap: 3px; padding: 0 0 0 16px; }
.footer-contact .section-label { margin: 0 0 2px; font-size: .68rem; }
.footer-contact a, .contact-line { color: #f6edd8; text-decoration: none; display: flex; gap: 8px; align-items: center; font-size: .78rem; line-height: 1.2; }
.admin-link { position: static; color: var(--gold) !important; font-size: .68rem; margin: 0; line-height: 1.1; }
.footer-base { display: none; }

.page-hero { background: linear-gradient(100deg, #08261d, #14543f); color: white; padding: 48px 0 42px; }
.page-hero p { max-width: 62ch; color: rgba(255,255,255,.84); }
.page-wrap { padding: 32px 0 64px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.content-grid.menu-left { grid-template-columns: 300px minmax(0, 1fr); grid-template-areas: "side main"; }
.content-grid.menu-left .prose-card { grid-area: main; }
.content-grid.menu-left .side-card { grid-area: side; }
.prose-card, .form-card { padding: 28px; }
.prose p, .prose li { color: #31423a; }
.prose h2, .prose h3 { color: var(--forest); }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose li { margin: .45rem 0; }
.prose .steps { list-style: none; padding: 0; counter-reset: step; }
.prose .steps > li { background: #f8f4ea; border-radius: 14px; padding: 14px 16px 14px 64px; margin: 12px 0; position: relative; }
.prose .steps > li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--forest);
  color: #f6edd8;
  font-weight: 600;
}
.prose .steps h3 { margin: 0 0 4px; font-size: 1.35rem; }
.prose .steps p { margin: 0; }
.callout { background: #f8f1de; border-left: 4px solid var(--gold); padding: 14px 16px; border-radius: 10px; }
.profile { display: grid; grid-template-columns: 52px 1fr; gap: 14px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.qual-list { list-style: none; padding: 0; }
.qual-list li { display: flex; flex-direction: column; padding: 8px 0; border-bottom: 1px solid var(--line); }
.qual-list span { color: var(--muted); }
.lecture-list { display: grid; gap: 12px; margin-top: 18px; }
.lecture-list article { background: #f8f4ea; border-radius: 14px; padding: 14px 16px; }
.lecture-label { margin: 0; color: var(--gold-deep); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; }
.lecture-list h3 { margin: 4px 0; font-size: 1.35rem; }
.lecture-list p { margin: 0; color: var(--muted); }
.side-card { padding: 18px; position: sticky; top: 96px; }
.side-nav { display: grid; gap: 8px; }
.side-nav a { display: flex; gap: 8px; align-items: center; text-decoration: none; color: var(--ink); padding: 6px; border-radius: 10px; }
.side-nav a.is-active { background: #f4ead2; }
.side-note { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.side-note .btn { margin-top: 8px; }
.enroll-list.plain { margin: 12px 0 18px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 500; }
.field-wide { grid-column: 1 / -1; }
.field input, .field select, .field textarea, .search-bar input {
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--ink);
}
.field textarea { resize: vertical; }
.field-error { color: var(--danger); font-size: .82rem; font-weight: 500; }
.hint { color: var(--muted); font-size: .86rem; font-weight: 400; }
.flash { margin: 0 auto 16px; width: min(1240px, calc(100% - 40px)); padding: 12px 14px; border-radius: 12px; }
.flash.ok { background: #e7f4ec; color: #14543f; }
.flash.bad { background: #fdecec; color: var(--danger); }
main > .flash { margin-top: 16px; }
.form-card .flash { width: auto; margin: 0 0 12px; }
.search-bar { display: flex; gap: 10px; margin-bottom: 22px; }
.search-bar input { flex: 1; }
.result-list { display: grid; gap: 10px; margin-bottom: 22px; }
.result-list a, .contact-line { background: var(--paper); border-radius: 14px; padding: 14px; text-decoration: none; color: inherit; box-shadow: var(--shadow); }
.result-list strong, .result-list span { display: block; }
.result-list span { color: var(--muted); }
.empty { color: var(--muted); }

@media (max-width: 1100px) {
  .home-grid, .content-grid { grid-template-columns: 1fr; }
  .content-grid.menu-left { grid-template-areas: "main" "side"; }
  .footer-grid { flex-direction: column; align-items: stretch; }
  .footer-item { border-right: 0; border-bottom: 1px solid rgba(230, 204, 138, .35); padding: 12px 0; }
  .site-footer { padding: 22px 0 28px; }
  .admin-link { position: static; display: inline; }
  .footer-base { display: block; margin-top: 12px; color: rgba(255,255,255,.55); font-size: .75rem; }
  .framework-grid { grid-template-columns: 1fr 1fr; grid-template-areas: "m m" "a b" "c d"; }
  .medallion-wrap { margin: 0 auto; }
  .side-card { position: static; }
}
@media (max-width: 860px) {
  .nav-burger { display: grid; }
  .main-nav {
    display: none;
    position: absolute;
    top: 82px;
    left: 0;
    right: 0;
    background: var(--paper);
    flex-direction: column;
    align-items: stretch;
    padding: 16px 20px 20px;
    border-bottom: 1px solid var(--line);
  }
  .nav-links { position: static; transform: none; flex-direction: column; align-items: flex-start; gap: 12px; }
  .nav-toggle:checked ~ .main-nav { display: flex; }
  .nav-search { width: 100%; border-radius: 999px; padding-left: 14px; }
  .nav-search input { width: 100%; opacity: 1; }
  .hero-grid, .form-grid { grid-template-columns: 1fr; }
  .hero { min-height: 0; }
  .hero-grid { padding: 0 0 28px; min-height: 0; }
  .hero-copy { padding: 28px 0 8px; }
  .hero-arch { height: 320px; min-height: 0; width: 100%; }
}
