/* Jameel Noori Nastaleeq — licensed font supplied by the institution.
   Registered only. No selector references it yet, so rendering is unchanged
   and the browser does not download it until it is actually used. */
@font-face {
  font-family: "Jameel Noori Nastaleeq";
  src: url("../fonts/JameelNooriNastaleeq.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Idara Ahsanul Madaris Trust — design system
   Colours, type and spacing carried over verbatim from the approved build.
   Deep forest green / warm muted gold / ivory / dark charcoal. */

:root {
  --ivory: #faf8f3;
  --sage: #e7e9e2;
  --green: #1a4630;
  --dark: #10261a;
  --footer: #0f2418;
  --gold: #c1962f;
  --gold-lt: #d8b25f;
  --gold-pale: #e0c070;
  --gold-ink: #7a5d10;
  --eyebrow: #a97e18;
  --ink: #10261a;
  --muted: #45544a;
  --muted-2: #5b6a5f;
  --line: #e2e4db;
  --line-2: #d5d8cc;
  --paper: #ffffff;
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --urdu-head: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Noto Naskh Arabic", "Urdu Typesetting", "Scheherazade New", serif;
  --urdu-body: "Noto Naskh Arabic", "Urdu Typesetting", "Scheherazade New", "Segoe UI", Tahoma, Arial, sans-serif;
  --pad-y: clamp(56px, 8vw, 104px);
  --pad-x: 22px;
  --maxw: 1200px;
}

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

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.12;
  margin: 0;
  letter-spacing: -0.01em;
}
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--eyebrow); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

[id] { scroll-margin-top: 96px; }
/* Smooth scrolling only once the user has interacted - never during load.
   Browser-initiated scroll corrections must not be animated; in RTL they run
   horizontally from the right edge and read as the page sliding into place. */
html:focus-within { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html:focus-within { scroll-behavior: auto; } }

/* A transient reflow must not make the document horizontally scrollable at
   all. clip (not hidden) does NOT create a scroll container, so sticky
   positioning on the header and the mobile menu keep working. */
html, body { overflow-x: clip; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--green); color: var(--ivory); padding: 12px 20px;
}
.skip:focus { left: 0; color: var(--ivory); }

/* ---------- Urdu / RTL ------------------------------------------------- */
[dir="rtl"] body, body[dir="rtl"] { font-family: var(--urdu-body); font-size: 18px; line-height: 2.05; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4 {
  font-family: var(--urdu-head); line-height: 2.15; padding-bottom: 0.18em; letter-spacing: 0;
}
/* Tracking and uppercasing are meaningless in Arabic script and break shaping. */
[dir="rtl"] * { letter-spacing: normal !important; text-transform: none !important; word-spacing: 0.04em; }
[dir="rtl"] p, [dir="rtl"] li, [dir="rtl"] dd, [dir="rtl"] dt,
[dir="rtl"] label, [dir="rtl"] span, [dir="rtl"] a, [dir="rtl"] button { line-height: 2.05; }
[dir="rtl"] p, [dir="rtl"] li, [dir="rtl"] dd { font-size: max(1em, 16.5px); }
[dir="rtl"] h3 { font-size: max(1.35em, 23px); }
[dir="rtl"] input, [dir="rtl"] textarea { text-align: right; }
[dir="rtl"] .eyebrow, [dir="rtl"] .kicker { letter-spacing: normal; text-transform: none; font-size: 15px; }
[dir="rtl"] .nav-link { font-size: 15.5px; padding: 8px 10px; }

/* ---------- Notice bar -------------------------------------------------- */
.notice {
  background: var(--dark); color: #f0ead9;
  padding: 9px 20px;
  display: flex; align-items: baseline; justify-content: center;
  gap: 0 14px; flex-wrap: wrap; font-size: 14.5px; line-height: 1.45;
}
.notice__label { color: var(--gold-lt); font-size: 13px; font-weight: 600; letter-spacing: 0.03em; white-space: nowrap; }
.notice__text { opacity: 0.94; }
.notice a { color: var(--gold-lt); border-bottom: 1px solid rgba(216, 178, 95, 0.45); white-space: nowrap; }
.notice a:hover { color: #fff; }

/* ---------- Header ------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(250, 248, 243, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #e4e2d8;
}
.header-row {
  max-width: 1560px; margin: 0 auto; padding: 12px 22px;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center; column-gap: 16px;
}
.brand { grid-column: 1; display: flex; align-items: center; gap: 12px; max-width: 280px; min-width: 0; }
.brand img { height: 52px; width: auto; flex: 0 0 auto; }
.brand__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.brand__name { font-family: var(--serif); font-size: 17px; letter-spacing: 0.02em; color: var(--ink); line-height: 1.22; }
.brand__tag { font-size: 12px; letter-spacing: 0.02em; color: #7a6a44; }
[dir="rtl"] .brand__name { line-height: 1.7; }

.primary-nav { grid-column: 2; display: flex; align-items: center; justify-content: center; min-width: 0; overflow: hidden; }
.primary-nav ul { display: flex; align-items: center; gap: 2px; flex-wrap: nowrap; justify-content: center; }
.nav-link {
  display: inline-flex; white-space: nowrap; word-break: normal;
  padding: 9px 8px; border-radius: 3px; font-size: 14px; color: #33463a;
}
.nav-link:hover { color: var(--ink); background: rgba(26, 70, 48, 0.06); }
.nav-link[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--gold); }

.header-actions { grid-column: 3; display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: nowrap; }
.lang-switch {
  display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto;
  background: transparent; border: 1px solid #cfd2c5; border-radius: 999px;
  padding: 7px 14px; color: var(--ink); font-size: 13.5px;
  white-space: nowrap; min-height: 44px;
}
.lang-switch:hover { border-color: var(--gold); }
.lang-switch span { white-space: nowrap; }
.lang-switch .on { color: var(--ink); font-weight: 600; }
.lang-switch .off { color: #78807a; }
.lang-switch .sep { width: 1px; height: 14px; background: #cfd2c5; }
.lang-switch .ur { font-family: var(--urdu-body); }

.btn-apply {
  display: inline-flex; align-items: center; flex: 0 0 auto;
  background: var(--green); color: var(--ivory); border-radius: 4px;
  padding: 10px 15px; font-size: 14px; white-space: nowrap; min-height: 44px;
}
.btn-apply:hover { background: var(--dark); color: var(--ivory); }

.menu-btn {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 0 9px;
  background: transparent; border: 1px solid #cfd2c5; border-radius: 4px;
}
.menu-btn span { display: block; height: 1.5px; background: var(--ink); }

.mobile-menu { display: none; border-top: 1px solid #e4e2d8; background: var(--ivory); }
.mobile-menu.open { display: block; animation: fadeIn 0.18s ease; }
.mobile-menu ul {
  max-width: 1280px; margin: 0 auto; padding: 10px 18px 18px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); gap: 2px;
}
[dir="rtl"] .mobile-menu ul { grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); }
.mobile-menu a {
  display: block; white-space: nowrap; padding: 12px;
  border-bottom: 1px solid #eceee6; font-size: 16px; color: #33463a; min-height: 44px;
}
[dir="rtl"] .mobile-menu a { font-size: 17px; padding: 10px 14px; }
.mobile-menu a[aria-current="page"] { color: var(--eyebrow); }
.menu-lang {
  display: none; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 14px 14px; border-bottom: 1px solid #eceee6;
}
.menu-lang__label { font-size: 13px; font-weight: 600; letter-spacing: 0.03em; color: var(--eyebrow); }

/* All ten links only fit inline on a wide desktop; below that, the menu. */
@media (max-width: 1559px) {
  .brand__text { display: none; }
}
@media (max-width: 1279px) {
  .primary-nav { display: none; }
  .menu-btn { display: inline-flex; }
  .brand__text { display: flex; }
}
@media (max-width: 699px) {
  .header-row { padding: 6px 14px; column-gap: 10px; }
  .brand { gap: 9px; max-width: none; }
  .brand img { height: 56px; }
  .brand__name { font-size: 15px; }
  .notice { padding: 6px 14px; gap: 0 7px; font-size: 12.5px; line-height: 1.38; }
  .notice__text { text-align: center; }
  .btn-apply { padding: 9px 13px; font-size: 13.5px; }
  .lang-switch { padding: 6px 11px; font-size: 13px; }
}
@media (max-width: 459px) { .brand__text { display: none; } }
/* Below 380px the switcher, CTA and menu button overflow the bar together. */
@media (max-width: 379px) {
  .header-actions .lang-switch { display: none; }
  .menu-lang { display: flex; }
}
@media (max-width: 639px) { [dir="rtl"] .brand__text { display: none; } }

/* ---------- Section shells --------------------------------------------- */
.section { padding: var(--pad-y) var(--pad-x); }
.section > .inner { max-width: var(--maxw); margin: 0 auto; }
.section--light { background: var(--ivory); color: var(--ink); }
.section--sage { background: var(--sage); color: var(--ink); }
.section--green { background: var(--green); color: #f6f3ea; }
.section--dark { background: var(--dark); color: #f6f3ea; }
.section--center { text-align: center; }
.section--compact { padding: clamp(40px, 4.4vw, 60px) var(--pad-x); }

/* Subtle architectural lattice — dark institutional bands only. */
.section--pattern, .site-footer {
  background-image:
    repeating-linear-gradient(45deg, rgba(224, 192, 112, 0.055) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(-45deg, rgba(224, 192, 112, 0.055) 0 1px, transparent 1px 26px),
    radial-gradient(circle at 50% 50%, rgba(224, 192, 112, 0.045) 0 1.5px, transparent 1.5px);
  background-size: 52px 52px, 52px 52px, 52px 52px;
}

.channel__value, .pay__id, .footer-contact a { overflow-wrap: anywhere; }
h1, h2, h3, h4 { overflow-wrap: break-word; }

.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: 0.03em; color: var(--eyebrow); margin-bottom: 14px; }
.section--green .eyebrow, .section--dark .channel__value, .pay__id, .footer-contact a { overflow-wrap: anywhere; }
h1, h2, h3, h4 { overflow-wrap: break-word; }

.eyebrow { color: var(--gold-pale); }
h2.h-section { font-size: clamp(29px, 4.2vw, 48px); }
[dir="rtl"] h2.h-section { font-size: clamp(25px, 3.3vw, 38px); }
.lead { margin-top: 18px; font-size: clamp(16px, 1.6vw, 18.5px); color: var(--muted); max-width: 760px; }
[dir="rtl"] .lead { font-size: clamp(17px, 1.5vw, 19px); max-width: 66ch; }
.section--center .lead { margin-inline: auto; }
.section--green .lead, .section--dark .lead { color: rgba(246, 243, 234, 0.86); }
.body-copy { margin-top: 16px; font-size: 16.5px; color: var(--muted); }
[dir="rtl"] .body-copy { font-size: 17.5px; }
.section--green .body-copy, .section--dark .body-copy { color: rgba(246, 243, 234, 0.86); }

/* ---------- Buttons ----------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  border-radius: 4px; min-height: 48px; padding: 14px 26px; font-size: 15px;
  letter-spacing: 0.02em; white-space: nowrap; border: 0; cursor: pointer;
}
.btn--gold { background: var(--gold); color: var(--dark); }
.btn--gold:hover { background: var(--gold-lt); color: var(--dark); }
.btn--green { background: var(--green); color: var(--ivory); }
.btn--green:hover { background: var(--dark); color: var(--ivory); }
.btn--light { background: var(--ivory); color: var(--dark); }
.btn--light:hover { background: #e8dcb8; color: var(--dark); }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid #b9bfae; }
.btn--ghost:hover { border-color: var(--green); color: var(--green); }
.btn--ghost-light { background: transparent; color: #f6f3ea; border: 1px solid rgba(246, 243, 234, 0.45); }
.btn--ghost-light:hover { background: rgba(246, 243, 234, 0.1); color: #f6f3ea; }
.btn--quiet {
  background: transparent; color: #e8dcb8; padding-inline: 10px; border: 0;
  border-bottom: 1px solid rgba(216, 178, 95, 0.6); border-radius: 0; min-height: 44px;
}
.btn--quiet:hover { color: #fff; border-color: var(--gold-pale); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.section--center .btn-row { justify-content: center; }
@media (max-width: 699px) {
  .btn { padding: 12px 18px; font-size: 14.5px; }
  .btn-row { gap: 10px; margin-top: 22px; }
}

/* ---------- Hero -------------------------------------------------------- */
.hero {
  position: relative;
  background-color: #17351f;
  background-image:
    linear-gradient(to right,
      rgba(12, 30, 20, 0.95) 0%, rgba(13, 32, 21, 0.92) 30%,
      rgba(13, 32, 21, 0.86) 45%, rgba(14, 34, 23, 0.78) 55%,
      rgba(16, 38, 26, 0.24) 61%, rgba(16, 38, 26, 0.04) 70%),
    var(--hero-image, url('/assets/images/campus-hero.jpg'));
  background-size: auto, cover;
  background-position: center, center center;
  background-repeat: no-repeat, no-repeat;
  color: #f6f3ea;
}
.hero__inner {
  direction: ltr;
  max-width: 1280px; margin: 0 auto;
  padding: clamp(52px, 5vw, 72px) 22px;
  min-height: min(84vh, 760px);
  min-height: min(84svh, 760px);
  display: flex; align-items: center;
}
.hero__col { width: 100%; max-width: 620px; min-width: 0; opacity: 1 !important; }
.js-anim .hero__col { animation: riseUp 0.5s ease; }
[dir="rtl"] .hero__col { direction: rtl; text-align: right; max-width: 640px; }
.hero__tag { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: 0.03em; color: var(--gold-pale); }
.hero__rule { display: block; width: 200px; height: 1px; background: rgba(224, 192, 112, 0.75); margin: 18px 0 24px; }
[dir="rtl"] .hero__rule { margin-inline-start: 0; }
.hero h1 { font-size: clamp(32px, 4.4vw, 58px); color: #fff; text-wrap: balance; max-width: 18ch; }
[dir="rtl"] .hero h1 { font-size: clamp(26px, 3.4vw, 46px); max-width: 20ch; }
.hero h1 span { display: block; }
.hero h1 span:last-child { color: var(--gold-pale); }
.hero__lead { margin-top: 20px; font-size: clamp(16px, 1.5vw, 18.5px); color: rgba(246, 243, 234, 0.92); max-width: 58ch; }
.hero__facts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 22px;
  margin: 40px 0 0; padding-top: 26px; border-top: 1px solid rgba(246, 243, 234, 0.28);
}
.hero__facts > div + div { padding-inline-start: 22px; border-inline-start: 1px solid rgba(246, 243, 234, 0.28); }
.hero__facts dt { font-size: 13.5px; font-weight: 600; letter-spacing: 0.03em; color: var(--gold-pale); }
.hero__facts dd { margin: 5px 0 0; font-size: 15.5px; color: #f6f3ea; }

@media (max-width: 1099px) {
  .hero { background-image:
    linear-gradient(to right,
      rgba(12, 30, 20, 0.95) 0%, rgba(13, 32, 21, 0.92) 32%,
      rgba(13, 32, 21, 0.86) 47%, rgba(14, 34, 23, 0.78) 58%,
      rgba(16, 38, 26, 0.24) 64%, rgba(16, 38, 26, 0.04) 73%),
    var(--hero-image, url('/assets/images/campus-hero.jpg'));
    background-position: center, 62% center; }
  .hero__col { max-width: 55%; }
  .hero__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero__facts > div:nth-child(odd) { padding-inline-start: 0; border-inline-start: 0; }
}
@media (max-width: 899px) { .hero__col { max-width: 62%; } }
@media (max-width: 699px) {
  /* Portrait: vertical scrim, heavy behind the copy, opening at the base. */
  .hero {
    background-image: linear-gradient(to bottom,
      rgba(11, 28, 18, 0.94) 0%, rgba(12, 30, 20, 0.9) 45%,
      rgba(13, 32, 21, 0.8) 75%, rgba(13, 32, 21, 0.76) 93%,
      rgba(14, 34, 23, 0.42) 100%), var(--hero-image, url('/assets/images/campus-hero.jpg'));
    background-position: center, 70% 38%;
  }
  .hero__inner { padding: 30px 18px 36px; min-height: min(74svh, 560px); }
  /* Urdu runs ~30% taller at the same copy, so it gets a shorter floor still. */
  [dir="rtl"] .hero__inner { min-height: min(62svh, 520px); }
  .hero__col { max-width: none; }
  .hero__rule { width: 72px; margin: 14px 0 18px; }
  .hero__tag { font-size: 13px; }
  .hero__facts { grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 28px; padding-top: 20px; }
  .hero__facts > div + div { padding-inline-start: 0; border-inline-start: 0; }
}

/* Interior page heroes — no photograph, same rhythm. */
.page-hero { padding: clamp(48px, 6vw, 88px) var(--pad-x); }
.page-hero h1 { font-size: clamp(32px, 5vw, 60px); }
[dir="rtl"] .page-hero h1 { font-size: clamp(26px, 3.8vw, 48px); }
.page-hero .lead { color: rgba(246, 243, 234, 0.88); }

/* ---------- Cards ------------------------------------------------------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 20px; margin-top: 38px; text-align: start; }
.card {
  background: var(--paper); border: 1px solid var(--line);
  padding: clamp(22px, 2.6vw, 32px); display: flex; flex-direction: column; gap: 12px;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.card:hover { border-color: var(--gold); transform: translateY(-2px); }
.section--sage .card { background: var(--ivory); border-color: var(--line-2); }
.section--green .card, .section--dark .card {
  background: rgba(255, 255, 255, 0.05); border-color: rgba(224, 192, 112, 0.34);
}
.card h3 { font-size: clamp(21px, 2.2vw, 26px); }
.card p { font-size: 15.5px; color: var(--muted); }
.section--green .card p, .section--dark .card p { color: rgba(246, 243, 234, 0.86); }
.card__icon { width: 34px; height: 34px; border: 1px solid var(--gold); transform: rotate(45deg); flex: 0 0 auto; }
.section--green .card__icon, .section--dark .card__icon { border-color: var(--gold-pale); }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 26px; margin-top: 40px; text-align: start; }
.step { border-top: 1px solid var(--line-2); padding-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.section--green .step, .section--dark .step { border-color: rgba(224, 192, 112, 0.34); }
.step__n { font-size: 12.5px; letter-spacing: 0.18em; color: var(--eyebrow); }
.section--green .step__n, .section--dark .step__n { color: var(--gold-pale); }
[dir="rtl"] .step__n { letter-spacing: normal; }
.step h3 { font-size: 21px; }
.step p { font-size: 15.5px; color: var(--muted); }
.section--green .step p, .section--dark .step p { color: rgba(246, 243, 234, 0.86); }

/* ---------- Split (image + text) ---------------------------------------- */
.split {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px); align-items: center;
}
.split__media { margin: 0; min-width: 0; }
.split__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--line); }
.split--reverse .split__text { order: 2; }
.split--reverse .split__media { order: 1; }
@media (max-width: 899px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .split--reverse .split__text, .split--reverse .split__media { order: 0; }
}

/* ---------- Staff ------------------------------------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.filter {
  background: transparent; color: #33463a; border: 1px solid #c3c8b9;
  border-radius: 999px; padding: 9px 18px; font-size: 14px; min-height: 44px;
}
.filter[aria-pressed="true"] { background: var(--green); color: var(--ivory); border-color: var(--green); }

.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(296px, 100%), 1fr)); gap: 26px; margin-top: 34px; }
.staff-card {
  background: var(--paper); border: 1px solid #dcdfd3;
  display: flex; flex-direction: column; overflow: hidden;
  transition: border-color 0.18s ease;
}
.staff-card:hover { border-color: var(--gold); }
.staff-card img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: center top; background: var(--sage); }
.staff-card__body { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.staff-card h3 { font-size: 23px; line-height: 1.2; }
[dir="rtl"] .staff-card h3 { font-size: 24px; line-height: 1.9; }
.staff-card__role { font-size: 14.5px; font-weight: 600; color: var(--gold-ink); line-height: 1.5; }
[dir="rtl"] .staff-card__role { font-size: 16px; }
.staff-card__dept {
  align-self: flex-start; font-size: 12.5px; color: #33463a;
  background: #eef0e9; border: 1px solid #dcdfd3; border-radius: 999px; padding: 4px 11px;
}
.staff-card__more {
  margin-top: auto; align-self: flex-start; background: transparent; border: 0;
  border-bottom: 1px solid var(--gold); padding: 8px 0 3px;
  color: var(--green); font-size: 14.5px; min-height: 44px;
}

/* ---------- Dialog ------------------------------------------------------ */
.profile-dialog { border: 0; padding: 0; max-width: 760px; width: calc(100% - 40px); background: var(--ivory); }
.profile-dialog::backdrop { background: rgba(9, 20, 14, 0.72); backdrop-filter: blur(3px); }
.profile-dialog__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.profile-dialog img { width: 100%; height: 100%; min-height: 300px; object-fit: cover; object-position: center top; }
.profile-dialog__body { padding: clamp(24px, 3vw, 38px); display: flex; flex-direction: column; gap: 12px; }
.profile-dialog h2 { font-size: clamp(26px, 3vw, 34px); }

/* ---------- News -------------------------------------------------------- */
.news-card {
  display: grid; grid-template-columns: minmax(min(220px, 100%), 0.8fr) minmax(0, 1.2fr);
  background: var(--paper); border: 1px solid var(--line); overflow: hidden; margin-top: 36px;
}
.section--sage .news-card { background: var(--ivory); }
.news-card img { width: 100%; height: 100%; min-height: 260px; object-fit: contain; background: var(--dark); padding: 14px; }
.news-card__body { padding: 30px clamp(20px, 3vw, 38px); display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.news-card__meta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; font-size: 13.5px; font-weight: 600; letter-spacing: 0.03em; color: var(--eyebrow); }
.news-card__meta .dash { width: 18px; height: 1px; background: var(--gold); }
.news-card__meta .date { color: var(--muted-2); font-weight: 400; }
.news-card h3 { font-size: clamp(26px, 3vw, 36px); }
.news-card__thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.news-card__thumbs img { width: 66px; height: 92px; min-height: 0; object-fit: cover; padding: 0; border: 1px solid var(--line); background: var(--sage); }
@media (max-width: 859px) { .news-card { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Gallery ----------------------------------------------------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(248px, 100%), 1fr)); gap: 18px; margin-top: 36px; }
.gallery li { position: relative; background: var(--dark); overflow: hidden; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 0.3s ease; }
.gallery li:hover img { transform: scale(1.03); }
.gallery figcaption {
  position: absolute; inset-inline: 0; bottom: 0; padding: 26px 14px 12px;
  background: linear-gradient(to top, rgba(16, 38, 26, 0.92), rgba(16, 38, 26, 0));
  color: #f0ead9; font-size: 13px; text-align: start;
}

/* ---------- Tables / fees / rules --------------------------------------- */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 22px; margin-top: 36px; text-align: start; }
.plan { border: 1px solid rgba(224, 192, 112, 0.4); background: rgba(255, 255, 255, 0.04); padding: clamp(22px, 3vw, 34px); display: flex; flex-direction: column; gap: 12px; }
.plan__tag { font-size: 13.5px; font-weight: 600; letter-spacing: 0.03em; color: var(--gold-lt); }
.plan h3 { font-size: clamp(24px, 2.6vw, 31px); color: #f6f3ea; }
.plan__amount { font-family: var(--serif); font-size: clamp(40px, 5vw, 56px); color: #fff; line-height: 1; }
.plan__amount-label { font-size: 12.5px; letter-spacing: 0.02em; color: rgba(246, 243, 234, 0.66); }
.plan__break { font-size: 15px; color: rgba(246, 243, 234, 0.9); border-top: 1px solid rgba(255, 255, 255, 0.14); padding-top: 14px; }
.plan ul { display: grid; gap: 6px; font-size: 14.5px; color: rgba(246, 243, 234, 0.88); }

.rule-group { border: 1px solid rgba(224, 192, 112, 0.34); border-inline-start: 3px solid var(--gold); padding: clamp(20px, 2.6vw, 30px); text-align: start; }
.rule-group h3 { font-size: clamp(22px, 2.4vw, 28px); color: #f6f3ea; margin-top: 8px; }
.rule-group ol { display: grid; gap: 16px; margin-top: 20px; }
.rule-group h4 { font-family: var(--sans); font-size: 14.5px; font-weight: 600; color: #e8dcb8; }
.rule-group p { font-size: 14.5px; color: rgba(246, 243, 234, 0.84); margin-top: 3px; }

/* ---------- Forms ------------------------------------------------------- */
.form-grid {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 4vw, 60px); align-items: start;
}
@media (max-width: 899px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.enquiry-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; min-width: 0; }
.field label { font-size: 14px; color: #33463a; overflow-wrap: anywhere; }
.field input, .field textarea {
  background: var(--paper); border: 1px solid #cfd2c5; border-radius: 3px;
  padding: 12px 14px; font-size: 15px; width: 100%; min-width: 0;
}
.field input:focus, .field textarea:focus { border-color: var(--green); }
.field textarea { resize: vertical; }
.field--error input, .field--error textarea { border-color: #9a3412; }
.field__error { font-size: 13px; color: #9a3412; }
.form-note { margin-top: 20px; font-size: 13px; color: #7c8579; }
.form-emphasis { margin-top: 20px; border-top: 3px solid var(--green); padding-top: 18px; font-size: 16px; font-weight: 600; color: var(--ink); }
.form-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 4px; }
.form-alert { background: #fdeee8; border: 1px solid #e0b3a0; padding: 13px 16px; font-size: 14.5px; color: #8a2f12; }

/* Success panel */
.success {
  grid-column: 1 / -1; background: #f3f5ef; border: 1px solid #c9cfbf;
  border-top: 3px solid var(--green); padding: clamp(22px, 3vw, 34px);
  min-width: 0; opacity: 1;
}
.js-anim .success { animation: riseUp 0.3s ease; }
.success h3 { font-size: clamp(24px, 3vw, 32px); color: var(--green); }
.success__lead { margin-top: 10px; font-size: 16px; color: var(--muted); }
.success__next { margin-top: 22px; font-size: 13.5px; font-weight: 600; letter-spacing: 0.03em; color: var(--eyebrow); }
.success ol { display: grid; gap: 8px; margin-top: 10px; counter-reset: step; }
.success ol li { display: flex; gap: 10px; font-size: 15.5px; color: var(--muted); }
.success ol li::before {
  counter-increment: step; content: counter(step);
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%;
  background: var(--green); color: var(--ivory); font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center;
}
.contact-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
@media (max-width: 899px) { .contact-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) { .contact-actions { grid-template-columns: minmax(0, 1fr); } }
.contact-action {
  display: flex; flex-direction: column; gap: 4px; min-height: 46px;
  background: var(--paper); border: 1px solid var(--line-2);
  border-inline-start: 3px solid var(--gold); padding: 14px 16px;
  color: var(--ink); transition: border-color 0.18s ease, background 0.18s ease;
}
.contact-action:hover { background: #f7f8f3; border-color: var(--green); border-inline-start-color: var(--green); color: var(--ink); }
.contact-action strong { font-size: 15.5px; font-weight: 600; }
.contact-action span { font-size: 13.5px; color: var(--muted-2); }
.success__phones { margin-top: 16px; font-size: 14.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* ---------- Contact channels -------------------------------------------- */
.channels { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 18px; margin-top: 36px; text-align: start; }
.channel { background: var(--paper); border: 1px solid var(--line); padding: 26px 24px; display: flex; flex-direction: column; gap: 10px; }
.channel__label { font-size: 13.5px; font-weight: 600; letter-spacing: 0.03em; color: var(--eyebrow); }
.channel__value { font-family: var(--serif); font-size: 22px; color: var(--ink); word-break: break-word; }
[dir="rtl"] .channel__value { font-size: 19px; }
.channel p { font-size: 14px; color: var(--muted-2); }
.channel .btn { margin-top: auto; align-self: flex-start; padding: 11px 20px; font-size: 14px; min-height: 44px; }

.info-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 18px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line-2); text-align: start; }
.info-pair dt { font-size: 13.5px; font-weight: 600; letter-spacing: 0.03em; color: var(--eyebrow); }
.info-pair dd { margin: 6px 0 0; font-size: 15px; color: #33463a; }

.pay-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr)); gap: 22px; margin-top: 36px; text-align: start; }
.pay { background: var(--paper); border: 1px solid var(--line); padding: clamp(22px, 3vw, 32px); display: flex; flex-direction: column; gap: 14px; }
.pay h3 { font-size: 26px; }
.pay img { width: 190px; height: 190px; border: 1px solid var(--line); padding: 8px; background: var(--paper); }
.pay__id { font-size: 17px; font-weight: 600; color: var(--green); word-break: break-all; }
.pay dl { display: grid; gap: 12px; margin: 0; }
.pay dl > div { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; border-bottom: 1px solid #eceee6; padding-bottom: 10px; }
.pay dt { font-size: 14px; color: var(--muted-2); min-width: 140px; }
.pay dd { margin: 0; font-size: 16.5px; font-weight: 600; color: var(--ink); word-break: break-word; }

.map-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 22px; margin-top: 34px; align-items: stretch; text-align: start; }
.map-grid iframe { width: 100%; height: 100%; min-height: 280px; border: 1px solid rgba(224, 192, 112, 0.4); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 30px; margin-top: 40px; }
.stat { text-align: center; padding: 26px 16px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.5); }
.stat dt { font-family: var(--serif); font-size: clamp(38px, 5vw, 54px); color: var(--green); }
.stat dd { margin: 8px 0 0; font-size: 13.5px; letter-spacing: 0.02em; color: var(--muted-2); }

blockquote.ethos { margin: 34px auto 0; max-width: 760px; border-top: 2px solid var(--gold); padding-top: 22px; }
blockquote.ethos p { font-family: var(--serif); font-size: clamp(21px, 2.4vw, 27px); color: #e8dcb8; font-style: italic; }
blockquote.ethos footer { margin-top: 10px; font-size: 14px; color: rgba(246, 243, 234, 0.72); }

/* ---------- Footer ------------------------------------------------------ */
.site-footer { background-color: var(--footer); color: #f0ead9; }
.footer-grid {
  max-width: 1280px; margin: 0 auto;
  padding: clamp(46px, 6vw, 76px) 22px 30px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 40px;
}
.footer-brand { display: flex; flex-direction: column; gap: 16px; }
.footer-brand .mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 78px; height: 78px; background: var(--ivory); border-radius: 50%;
}
.footer-brand .mark img { width: 58px; height: auto; }
.footer-grid h2 { font-size: 22px; letter-spacing: 0.01em; color: #fff; }
.footer-grid h3 { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-lt); }
[dir="rtl"] .footer-grid h3 { font-size: 14px; }
.footer-grid nav ul, .footer-contact { display: grid; gap: 12px; margin-top: 18px; font-size: 15px; color: rgba(240, 234, 217, 0.86); }
.footer-grid nav ul { gap: 9px; }
.footer-grid a { color: rgba(240, 234, 217, 0.86); }
.footer-grid a:hover { color: var(--gold-lt); }
.footer-contact li { display: grid; gap: 4px; }
.footer-contact .k { color: var(--gold-lt); font-size: 12.5px; font-weight: 600; letter-spacing: 0.03em; }
.footer-contact .chan {
  display: inline-flex; margin-top: 4px; border: 1px solid rgba(216, 178, 95, 0.5);
  padding: 10px 18px; border-radius: 4px; color: var(--gold-lt); font-size: 14px; min-height: 44px; align-items: center;
}
.footer-contact .chan:hover { background: rgba(216, 178, 95, 0.12); }
.footer-base {
  max-width: 1280px; margin: 0 auto; padding: 22px;
  border-top: 1px solid rgba(240, 234, 217, 0.16);
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  font-size: 13px; color: rgba(240, 234, 217, 0.6);
}
.footer-base .tag { color: var(--gold-lt); letter-spacing: 0.02em; }

/* ---------- Motion ------------------------------------------------------ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
/* Transform-only entrance for content that must never be invisible. */
@keyframes riseUp { from { transform: translateY(14px); } to { transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .gallery li:hover img, .card:hover { transform: none; }
  .hero__col, .success { opacity: 1 !important; animation: none !important; transform: none !important; }
  .js-anim .hero__col, .js-anim .success { animation: none !important; }
}

/* ---------- Small-phone refinements ------------------------------------- */
@media (max-width: 430px) {
  :root { --pad-x: 16px; }
  .btn { width: 100%; }              /* full-width taps, no awkward two-up rows */
  .btn-row { gap: 10px; }
  .channel .btn, .staff-card__more { width: auto; }
  .news-card__body { padding: 24px 18px; }
  .pay img { width: 100%; max-width: 190px; height: auto; aspect-ratio: 1; }
  .plan__amount { font-size: clamp(34px, 11vw, 44px); }
  .footer-grid { padding-inline: 16px; gap: 32px; }
  .footer-base { padding-inline: 16px; }
  .rule-group { padding: 18px; }
  .profile-dialog { width: calc(100% - 24px); }
}
@media (max-width: 359px) {
  .brand img { height: 46px; }
  .btn-apply { padding: 9px 10px; font-size: 13px; }
  .hero h1 { font-size: 28px; }
  [dir="rtl"] .hero h1 { font-size: 24px; }
}
