/* =========================================================
   Albasmah School — styles
   Uses logical properties (inline/block) so the same rules
   work for English (LTR) and Arabic (RTL).
   ========================================================= */

:root {
  /* Palette taken from the school logo */
  --blue-950:  #051A4F;   /* deepest navy (footer) */
  --blue-900:  #082A75;   /* headings, dark panels */
  --blue-800:  #0B3591;   /* primary buttons */
  --blue-700:  #1747B8;   /* links, hovers */
  --blue-100:  #DCE6F8;
  --blue-50:   #EEF3FC;
  --gold-500:  #E8AE35;   /* logo gold */
  --gold-600:  #C98F17;
  --gold-700:  #8A5D00;   /* gold text on white (AA) */
  --gold-200:  #F6DBA0;
  --gold-100:  #FDF3DD;
  --olive-600: #6E6B0E;
  --olive-500: #A49D18;   /* logo olives */
  --olive-100: #F2F1DA;
  --sky-500:   #23C4FB;   /* logo light-blue leaves */
  --sky-100:   #E3F6FE;
  --cream:     #F8FAFD;   /* off-white */
  --sand:      #F4F7FB;   /* alternate section off-white */
  --white:     #FFFFFF;
  --ink:       #14213D;
  --muted:     #4A5670;
  --line:      #E1E7F0;
  --wa:        #1FAF54;
  --error:     #B3261E;

  --font-display: Georgia, "Times New Roman", serif;
  --font-body: Arial, "Helvetica Neue", Helvetica, sans-serif;

  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --shadow-sm: 0 1px 2px rgba(8, 42, 117, .06), 0 2px 8px rgba(8, 42, 117, .05);
  --shadow: 0 2px 6px rgba(8, 42, 117, .06), 0 12px 32px rgba(8, 42, 117, .09);
  --shadow-lg: 0 20px 60px rgba(5, 26, 79, .2);
  --header-h: 84px;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);

  /* Olive branches with smiling leaves, inspired by the logo */
  --pattern: url("../images/olive-pattern.svg");
  --pattern-size: 260px;
}

:lang(ar) {
  /* Georgia/Arial first as requested; Arabic glyphs fall back to Amiri / IBM Plex Sans Arabic */
  --font-display: Georgia, "Amiri", "Traditional Arabic", serif;
  --font-body: Arial, "IBM Plex Sans Arabic", Tahoma, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
:lang(ar) body, body:lang(ar) { line-height: 1.85; font-size: 1.09rem; }
img { max-width: 100%; display: block; }
a { color: var(--blue-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue-900); }
h1, h2, h3 { font-family: var(--font-display); color: var(--blue-900); line-height: 1.2; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
:lang(ar) h1, :lang(ar) h2, :lang(ar) h3 { letter-spacing: 0; line-height: 1.4; font-weight: 700; }
h1 { font-size: clamp(2.3rem, 5.4vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
h3 { font-size: 1.28rem; }
:lang(ar) h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }

.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .icon-dir { transform: scaleX(-1); }
.ltr { direction: ltr; unicode-bidi: isolate; }
.muted { color: var(--muted); }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(64px, 9vw, 112px); }
.section-tight { padding-block: 0 clamp(40px, 6vw, 72px); }
.section-head { max-width: 680px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p:last-child { color: var(--muted); font-size: 1.1rem; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--font-display); font-size: clamp(1.7rem, 3.2vw, 2.5rem); font-weight: 700; line-height: 1.2;
  letter-spacing: .04em; text-transform: uppercase; color: var(--blue-900); margin-bottom: .5rem;
}
.eyebrow::before { content: ""; flex: none; width: .45em; height: .45em; background: var(--gold-500); transform: rotate(45deg); border-radius: 2px; }
:lang(ar) .eyebrow { letter-spacing: 0; font-size: clamp(2rem, 3.6vw, 2.8rem); line-height: 1.5; }
/* the line under a section title is its subtitle: smaller than the title */
.eyebrow + h2 { font-size: clamp(1.25rem, 2.1vw, 1.65rem); font-weight: 600; color: var(--blue-700); line-height: 1.4; letter-spacing: 0; margin-bottom: .9em; }
:lang(ar) .eyebrow + h2 { font-size: clamp(1.35rem, 2.3vw, 1.8rem); }
/* the small label in the home banner stays small */
.hero .eyebrow { font-family: var(--font-body); font-size: .95rem; font-weight: 800; letter-spacing: .12em; line-height: 1.4; margin-bottom: 1rem; }
.hero .eyebrow::before { width: 10px; height: 10px; }
:lang(ar) .hero .eyebrow { font-size: 1.15rem; letter-spacing: 0; }
.eyebrow-light { color: var(--gold-200); }
.gcse-panel .eyebrow + h2 { color: #fff; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; inset-inline-start: 16px; top: -100px; z-index: 200; background: var(--blue-900); color: #fff; padding: 10px 16px; border-radius: 8px; }
.skip-link:focus { top: 12px; color: #fff; }

.pattern-bg { position: relative; isolation: isolate; }
.pattern-bg::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: var(--pattern); background-size: var(--pattern-size); opacity: .15; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 140px, rgba(0,0,0,.5) 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 140px, rgba(0,0,0,.5) 100%); }
.pattern-bg-dark { position: relative; isolation: isolate; }
.pattern-bg-dark::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: var(--pattern); background-size: var(--pattern-size); opacity: .12; pointer-events: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px; padding: .7em 1.35em; border-radius: 999px; border: 2px solid transparent;
  font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-lg { min-height: 54px; padding: .8em 1.7em; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--blue-800); color: #fff; box-shadow: 0 6px 18px rgba(11, 53, 145, .25); }
.btn-primary:hover { background: var(--blue-900); color: #fff; }
.btn-outline { border-color: var(--blue-800); color: var(--blue-800); background: transparent; }
.btn-outline:hover { background: var(--blue-800); color: #fff; }
.btn-soft { background: var(--blue-50); color: var(--blue-800); border-color: var(--blue-100); }
.btn-soft:hover { background: var(--blue-800); color: #fff; border-color: var(--blue-800); }
.btn-gold { background: var(--gold-500); color: var(--blue-950); box-shadow: 0 6px 18px rgba(232, 174, 53, .3); }
.btn-gold:hover { background: var(--gold-200); color: var(--blue-950); }
.btn-ghost-light { border-color: rgba(255, 255, 255, .5); color: #fff; }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .12); color: #fff; border-color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.link-arrow { display: inline-flex; align-items: center; gap: .45em; font-weight: 700; color: var(--blue-800); text-decoration: none; }
.link-arrow .icon { transition: transform .2s; }
.link-arrow:hover .icon { transform: translateX(4px); }
[dir="rtl"] .link-arrow:hover .icon { transform: scaleX(-1) translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .96);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 4px 24px rgba(8, 42, 117, .06); }
.header-inner { display: flex; align-items: center; gap: 20px; min-height: var(--header-h); max-width: 1360px; }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--blue-900); flex: none; }
.brand-mark { width: 66px; height: auto; aspect-ratio: 160 / 162; flex: none; }
.site-footer .brand-mark { width: 84px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; letter-spacing: -.01em; color: var(--blue-900); }
.brand-light .brand-name { color: #fff; }
.brand-light { color: #fff; }

.primary-nav { display: flex; align-items: center; gap: 12px; margin-inline-start: auto; }
.primary-nav ul { display: flex; gap: 2px; }
.primary-nav ul a {
  display: block; padding: 8px 12px; border-radius: 999px; color: var(--ink); text-decoration: none;
  font-weight: 600; font-size: .95rem; white-space: nowrap; transition: background-color .2s, color .2s;
}
.primary-nav ul a:hover { background: var(--blue-50); color: var(--blue-900); }
.primary-nav ul a[aria-current] { color: var(--blue-900); background: var(--blue-50); box-shadow: inset 0 -2px 0 var(--gold-500); }
.site-footer nav a[aria-current] { color: var(--gold-200); }
.nav-cta { min-height: 44px; padding: .55em 1.1em; font-size: .95rem; }

.header-actions { display: flex; align-items: center; gap: 8px; }
.lang-switch {
  display: inline-flex; align-items: center; gap: 2px; padding: 4px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--white);
}
.lang-switch > span { color: var(--line); padding-inline: 1px; }
.lang-switch button {
  border: 0; background: transparent; cursor: pointer; min-width: 44px; min-height: 36px;
  padding: 4px 12px; border-radius: 999px; font-weight: 700; font-size: .9rem; color: var(--muted);
}
.lang-switch button[lang="ar"] { font-family: "IBM Plex Sans Arabic", sans-serif; }
.lang-switch button[aria-pressed="true"] { background: var(--blue-800); color: #fff; }
.lang-switch button:not([aria-pressed="true"]):hover { color: var(--blue-900); background: var(--blue-50); }

.nav-toggle {
  display: none; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--white); color: var(--blue-900); cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle .icon { width: 24px; height: 24px; }

@media (max-width: 1400px) {
  .primary-nav ul a { padding: 8px 9px; font-size: .92rem; }
  .brand-name { font-size: 1.45rem; }
}
@media (max-width: 1340px) {
  .header-inner { gap: 14px; }
  .primary-nav { gap: 8px; }
  .primary-nav ul a { padding: 8px 7px; }
  .brand-name { font-size: 1.32rem; }
  .brand-mark { width: 58px; }
  .nav-cta { padding: .5em .95em; }
}
@media (max-width: 1260px) {
  .nav-toggle { display: inline-flex; }
  .header-actions { margin-inline-start: auto; }
  .primary-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; margin: 0;
    flex-direction: column; align-items: stretch; gap: 16px;
    padding: 16px var(--gutter) 24px; background: var(--cream);
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg);
    max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .primary-nav.open { transform: none; opacity: 1; visibility: visible; }
  .primary-nav ul { flex-direction: column; gap: 2px; }
  .primary-nav ul a { padding: 14px 16px; font-size: 1.05rem; border-radius: 12px; }
  .nav-cta { min-height: 52px; font-size: 1.05rem; }
}
@media (max-width: 480px) {
  .header-inner { gap: 8px; }
  .brand { gap: 8px; min-width: 0; }
  .brand-mark { width: 48px; }
  .brand-name { font-size: 1.12rem; }
  .header-actions { gap: 6px; }
  .lang-switch { padding: 3px; }
  .lang-switch > span { display: none; }
  .lang-switch button { min-width: 40px; min-height: 38px; padding: 4px 8px; font-size: .85rem; }
  .nav-toggle { width: 44px; height: 44px; }
}
@media (max-width: 400px) {
  .header-inner { gap: 6px; }
  .brand { gap: 6px; }
  .brand-mark { width: 42px; }
  .brand-name { font-size: 1.04rem; }
  .header-actions { gap: 4px; }
  .lang-switch button { min-width: 34px; padding: 4px 7px; }
  .nav-toggle { width: 40px; height: 40px; }
}
@media (max-width: 350px) {
  .brand-name { font-size: .94rem; }
}

/* ---------- Hero (full-width background image) ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden; color: #fff;
  min-height: clamp(580px, 88vh, 820px); display: flex; align-items: center;
  padding-block: clamp(72px, 10vw, 120px) clamp(110px, 12vw, 150px);
}
.hero-bg {
  position: absolute; inset: 0; z-index: -2;
  /* Drop a photo at images/hero.jpg (approx. 1920x1000). Until then the blue base shows. */
  background:
    radial-gradient(ellipse at 80% 30%, #1747B8 0%, transparent 60%),
    linear-gradient(135deg, #0B3591 0%, #051A4F 100%);
}
.hero-bg::after { /* full-width classroom photo (images/hero.jpg) */
  content: ""; position: absolute; inset: 0;
  background: url("../images/hero.jpg") 62% 30% / cover no-repeat;
  animation: hero-zoom 18s ease-out both;
}
@keyframes hero-zoom { from { transform: scale(1.06); } to { transform: scale(1); } }
.hero::before { /* tint so text always reads well over the photo */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, rgba(5, 26, 79, .55) 0%, transparent 28%),
    linear-gradient(90deg, rgba(5, 26, 79, .94) 0%, rgba(8, 42, 117, .82) 34%, rgba(8, 42, 117, .35) 62%, rgba(8, 42, 117, .08) 100%);
}
[dir="rtl"] .hero::before { background:
    linear-gradient(to top, rgba(5, 26, 79, .55) 0%, transparent 28%),
    linear-gradient(270deg, rgba(5, 26, 79, .94) 0%, rgba(8, 42, 117, .82) 34%, rgba(8, 42, 117, .35) 62%, rgba(8, 42, 117, .08) 100%); }
.hero::after { /* olive branch pattern, kept off the photo */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--pattern); background-size: var(--pattern-size); opacity: .1;
  -webkit-mask-image: linear-gradient(to right, #000 25%, transparent 55%); mask-image: linear-gradient(to right, #000 25%, transparent 55%);
}
[dir="rtl"] .hero::after { -webkit-mask-image: linear-gradient(to left, #000 25%, transparent 55%); mask-image: linear-gradient(to left, #000 25%, transparent 55%); }
.hero-inner { width: 100%; }
.hero-copy { max-width: 660px; }
.hero h1 { color: #fff; margin-bottom: .45em; text-shadow: 0 2px 24px rgba(5, 26, 79, .35); font-size: clamp(2.4rem, 5.6vw, 4.2rem); text-wrap: balance; }
.hero h1 .accent { color: var(--gold-500); white-space: nowrap; }
.hero .lead { font-size: clamp(1.1rem, 1.6vw, 1.28rem); color: rgba(255, 255, 255, .88); max-width: 34em; margin-bottom: 2em; }
.trust-list { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 36px; color: #fff; font-weight: 700; font-size: .98rem; }
.trust-list li { display: inline-flex; align-items: center; gap: 8px; }
.trust-list .icon { color: var(--gold-500); }

/* ---------- Photo frames (placeholder until a real image is added) ---------- */
.photo {
  position: relative; margin: 0; overflow: hidden; border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 30% 20%, rgba(35, 196, 251, .3), transparent 55%),
    linear-gradient(160deg, var(--blue-700), var(--blue-950));
  box-shadow: var(--shadow);
}
.photo::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern); background-size: 200px; opacity: .2; }
.photo::after { content: ""; position: absolute; inset: 12px; border: 1px solid rgba(235, 217, 172, .45); border-radius: inherit; pointer-events: none; z-index: 2; }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.photo-arch { border-radius: 999px 999px var(--radius-lg) var(--radius-lg); }
.photo-arch::after { border-radius: 999px 999px 20px 20px; }
.photo-soft { aspect-ratio: 8 / 9; }
.photo-square { aspect-ratio: 1 / 1; border-radius: 36px; }
.photo-square::after { border-radius: 26px; }
.photo-ph {
  position: absolute; inset-inline: 24px; bottom: 24px; display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 12px; background: rgba(5, 26, 79, .55); color: var(--gold-100);
  font-size: .88rem; line-height: 1.4; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}

/* ---------- Pillars ---------- */
.pillars {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden;
  margin-top: calc(-1 * clamp(64px, 8vw, 96px)); position: relative; z-index: 2;
}
.pillar { padding: clamp(22px, 3vw, 32px); border-inline-start: 1px solid var(--line); }
.pillar:first-child { border-inline-start: 0; }
.pillar h3 { margin: 14px 0 6px; }
.pillar p { color: var(--muted); font-size: .98rem; margin: 0; }
.pillar-icon, .way-icon, .class-icon, .contact-icon {
  display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 14px;
  background: var(--blue-50); color: var(--blue-800);
}
.pillar:nth-child(2) .pillar-icon { background: var(--sky-100); color: #0A6E92; }
.pillar:nth-child(3) .pillar-icon { background: var(--olive-100); color: var(--olive-600); }
.pillar:nth-child(4) .pillar-icon { background: var(--gold-100); color: var(--gold-700); }
.pillar-icon .icon, .way-icon .icon, .class-icon .icon, .contact-icon .icon { width: 26px; height: 26px; }

/* ---------- Ways to learn ---------- */
.ways { padding-top: clamp(40px, 6vw, 72px); }
.ways-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.way-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 32px;
  display: flex; flex-direction: column; gap: 6px; transition: transform .25s, box-shadow .25s;
}
.way-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.way-card h3 { margin-top: 14px; }
.way-card p { color: var(--muted); flex: 1; }
.way-card-feature { background: var(--blue-900); border-color: var(--blue-900); }
.way-card-feature h3 { color: #fff; }
.way-card-feature p { color: rgba(255, 255, 255, .78); }
.way-card-feature .way-icon { background: rgba(232, 174, 53, .18); color: var(--gold-200); }
.way-card-feature .link-arrow { color: var(--gold-200); }

/* ---------- About ---------- */

.about-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.about-visual { position: sticky; top: calc(var(--header-h) + 24px); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0 0; }
.stats div { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-align: center; }
.stats dt { font-size: .82rem; color: var(--muted); font-weight: 600; }
.stats dd { margin: 0; font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--blue-800); order: -1; line-height: 1.1; }
.stats div { display: flex; flex-direction: column-reverse; }
.about-copy > p:not(.eyebrow) { color: var(--muted); font-size: 1.08rem; }
.values { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 32px 0; }
.value { display: flex; gap: 14px; padding: 20px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.value > .icon { width: 28px; height: 28px; color: var(--olive-600); margin-top: 2px; }
.value h3 { font-size: 1.12rem; margin-bottom: 4px; }
.value p { margin: 0; color: var(--muted); font-size: .96rem; }
.about-quote {
  margin: 0; padding: 24px 28px; border-radius: var(--radius); display: flex; gap: 16px; align-items: flex-start;
  background: var(--blue-900); color: #fff;
}
.about-quote .icon { width: 30px; height: 30px; color: var(--gold-500); margin-top: 2px; }
.about-quote p { margin: 0; font-family: var(--font-display); font-size: 1.2rem; line-height: 1.55; }

/* ---------- Classes ---------- */
.classes, .about, .gcse, .online, .register, .contact, .home-band { background: var(--sand); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.class-card {
  background: var(--white); border-radius: var(--radius-lg); padding: 28px; border: 1px solid var(--line);
  display: flex; flex-direction: column; position: relative; overflow: hidden;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.class-card::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--blue-800), var(--sky-500), var(--gold-500)); transform: scaleX(0); transform-origin: left; transition: transform .35s; }
[dir="rtl"] .class-card::before { transform-origin: right; }
.class-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.class-card:hover::before { transform: scaleX(1); }
.class-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.class-card p { color: var(--muted); }
.class-card .meta { display: flex; align-items: center; gap: 8px; font-size: .92rem; font-weight: 700; color: var(--blue-800); margin-top: auto; padding-top: 14px; border-top: 1px dashed var(--line); }
.class-card .meta .icon { color: var(--olive-500); }
.class-card .btn { margin-top: 16px; align-self: flex-start; }
.tag { font-size: .86rem; font-weight: 800; letter-spacing: .01em; padding: 6px 14px; border-radius: 999px; background: var(--blue-800); color: #fff; white-space: nowrap; }
.tag-gold { background: var(--gold-500); color: var(--blue-950); }

/* ---------- GCSE ---------- */
.gcse-panel {
  display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(28px, 5vw, 64px); align-items: center;
  background: var(--blue-900); color: #fff; border-radius: clamp(20px, 3vw, 36px);
  padding: clamp(28px, 5vw, 64px); position: relative; overflow: hidden; isolation: isolate;
}
.gcse-panel::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: var(--pattern); background-size: var(--pattern-size); opacity: .1; }
.gcse-panel::after { content: ""; position: absolute; z-index: -1; width: 520px; height: 520px; inset-inline-end: -180px; top: -200px; border-radius: 50%; background: radial-gradient(circle, rgba(232, 174, 53, .25), transparent 65%); }
.gcse-panel h2 { color: #fff; }
.gcse-intro > p:not(.eyebrow) { color: rgba(255, 255, 255, .8); font-size: 1.08rem; }
.skills { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.skill {
  display: flex; gap: 14px; padding: 18px; border-radius: var(--radius);
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12);
  transition: background-color .2s;
}
.skill:hover { background: rgba(255, 255, 255, .1); }
.skill > .icon { width: 26px; height: 26px; color: var(--gold-500); margin-top: 2px; }
.skill h3 { color: #fff; font-size: 1.08rem; margin-bottom: 2px; }
.skill p { margin: 0; color: rgba(255, 255, 255, .72); font-size: .93rem; line-height: 1.5; }
.skill-wide { grid-column: 1 / -1; background: rgba(232, 174, 53, .14); border-color: rgba(232, 174, 53, .35); }

.checks { display: grid; gap: 10px; margin: 24px 0 32px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.checks .icon { width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: var(--blue-100); color: var(--blue-800); stroke-width: 3; margin-top: 2px; }
.checks-light li { color: #fff; }
.checks-light .icon { background: var(--gold-500); color: var(--blue-950); }

/* ---------- Split layouts (Online / Tuition) ---------- */
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split-copy > p:not(.eyebrow) { color: var(--muted); font-size: 1.08rem; }
.split-visual .photo-arch { aspect-ratio: 5 / 6; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 4px; }
.chips li { padding: 7px 16px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); font-weight: 700; font-size: .92rem; color: var(--blue-800); }
.tuition { background: var(--sand); }
.tuition .chips { margin-bottom: 28px; }
.tailor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.tailor { background: var(--white); border-radius: var(--radius); padding: 18px; border: 1px solid var(--line); }
.tailor .icon { width: 26px; height: 26px; color: var(--olive-600); }
.tailor h3 { font-size: 1.08rem; margin: 8px 0 2px; }
.tailor p { margin: 0; color: var(--muted); font-size: .94rem; }

/* ---------- Registration ---------- */

.register-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.register-aside > p:not(.eyebrow) { color: var(--muted); font-size: 1.08rem; }
.steps { display: grid; gap: 4px; margin: 28px 0; counter-reset: s; }
.steps li { display: flex; gap: 16px; align-items: flex-start; padding: 12px 0; position: relative; }
.steps li:not(:last-child)::after { content: ""; position: absolute; inset-inline-start: 19px; top: 54px; bottom: -8px; width: 2px; background: var(--gold-200); }
.step-n { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--blue-800); color: #fff; font-weight: 800; }
.steps div { display: flex; flex-direction: column; }
.steps strong { color: var(--blue-900); }
.steps div span { color: var(--muted); font-size: .95rem; }
.wa-inline { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--blue-800); text-decoration: none; padding: 12px 18px; background: var(--white); border: 1px solid var(--line); border-radius: 999px; }
.wa-inline .icon { color: var(--wa); width: 24px; height: 24px; }
.wa-inline:hover { border-color: var(--wa); }

.form-card { background: var(--white); border-radius: var(--radius-lg); padding: clamp(22px, 4vw, 44px); box-shadow: var(--shadow); border: 1px solid var(--line); border-top: 5px solid var(--gold-500); }
.form-note { font-size: .9rem; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; margin-bottom: 24px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-full { grid-column: 1 / -1; }
fieldset.field { border: 0; padding: 0; margin: 0; }
.field label, .field legend { font-weight: 700; color: var(--blue-900); font-size: .96rem; padding: 0; }
.req { color: var(--error); }
.field input:not([type="radio"]):not([type="checkbox"]), .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 12px;
  border: 1.5px solid #D5CCBA; background: var(--cream); transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%231747B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-inline-end: 44px;
}
[dir="rtl"] .field select { background-position: left 14px center; }
[dir="rtl"] .field input[dir="ltr"] { text-align: right; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue-700); background: #fff; box-shadow: 0 0 0 4px rgba(23, 71, 184, .14); }
.field.invalid input:not([type="radio"]):not([type="checkbox"]), .field.invalid select, .field.invalid textarea { border-color: var(--error); background: #FFF8F7; }
.field-error { margin: 0; font-size: .88rem; color: var(--error); font-weight: 600; min-height: 0; }
.field-error:empty { display: none; }

.radio-group { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 6px; }
.radio { position: relative; cursor: pointer; }
.radio input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.radio > span {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 10px 12px; text-align: center;
  border: 1.5px solid #D5CCBA; border-radius: 12px; background: var(--cream); font-weight: 700; color: var(--blue-900); transition: all .2s;
}
.radio .icon { color: var(--gold-600); }
.radio input:checked + span { border-color: var(--blue-800); background: var(--blue-50); box-shadow: inset 0 0 0 1px var(--blue-800); }
.radio input:focus-visible + span { outline: 3px solid var(--gold-500); outline-offset: 2px; }
.field.invalid .radio > span { border-color: var(--error); }
.consent { display: flex; gap: 12px; align-items: flex-start; font-weight: 500 !important; color: var(--ink) !important; cursor: pointer; }
.consent input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--blue-800); flex: none; }
.hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); opacity: 0; }
.form-status { margin: 14px 0 0; text-align: center; font-weight: 600; }
.form-status:empty { display: none; }
.form-status.error { color: var(--error); }
button[aria-busy="true"] { opacity: .7; pointer-events: none; }

.form-success { text-align: center; padding: 32px 8px; }
.form-success:focus { outline: none; }
.success-icon { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--blue-50); color: var(--blue-800); margin-bottom: 16px; }
.success-icon .icon { width: 36px; height: 36px; stroke-width: 2.5; }
.success-msg { color: var(--muted); max-width: 32em; margin-inline: auto; margin-bottom: 24px; }

/* ---------- Contact ---------- */

.contact-grid { display: grid; grid-template-columns: 3fr 2fr; gap: clamp(24px, 4vw, 48px); align-items: stretch; }
.contact-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-list li { display: flex; gap: 14px; padding: 20px; border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow-sm); border: 1px solid var(--line); min-width: 0; }
.contact-list h3 { font-family: var(--font-body); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gold-700); margin-bottom: 4px; }
:lang(ar) .contact-list h3 { letter-spacing: 0; font-size: .95rem; }
.contact-list address, .contact-list p { font-style: normal; margin: 0; font-size: .97rem; }
.contact-list a { font-weight: 700; word-break: break-word; }
.contact-icon { width: 44px; height: 44px; border-radius: 12px; }
.contact-icon .icon { width: 22px; height: 22px; }
.contact-icon-wa { background: #E3F6EA; color: var(--wa); }
.social { display: flex; gap: 8px; margin-top: 4px; }
.social a { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--white); border: 1px solid var(--line); color: var(--blue-800); transition: all .2s; }
.social a:hover { background: var(--blue-800); color: #fff; border-color: var(--blue-800); }
.social .icon { width: 18px; height: 18px; }
.map { position: relative; border-radius: var(--radius-lg); overflow: hidden; min-height: 380px; background: var(--blue-50); border: 1px solid var(--line); }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: saturate(.85); }
.map-link { position: absolute; inset-inline-start: 16px; bottom: 16px; display: inline-flex; align-items: center; gap: 8px; background: var(--white); padding: 10px 16px; border-radius: 999px; font-weight: 700; text-decoration: none; box-shadow: var(--shadow); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--blue-900); color: #fff; padding-block: clamp(48px, 7vw, 80px); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; max-width: 20em; font-size: clamp(1.6rem, 3vw, 2.3rem); }
.cta-band p { color: rgba(255, 255, 255, .78); margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--blue-950); color: rgba(255, 255, 255, .75); padding-top: 64px; font-size: .96rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 48px; }
.footer-brand p { margin-top: 16px; max-width: 26em; }
.footer-h { font-family: var(--font-body); font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; color: var(--gold-200); margin-bottom: 16px; }
:lang(ar) .footer-h { letter-spacing: 0; font-size: 1rem; }
.site-footer ul { display: grid; gap: 8px; }
.site-footer a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.site-footer a:hover { color: var(--gold-200); text-decoration: underline; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border-top: 1px solid rgba(255, 255, 255, .12); padding-block: 20px 28px; font-size: .9rem; }
.footer-bottom p { margin: 0; }

/* ---------- WhatsApp chat ---------- */
.wa-widget {
  position: fixed; z-index: 90; inset-inline-end: 20px; bottom: 20px;
  display: flex; flex-direction: column; align-items: flex-end; gap: 14px;
}
.wa-float {
  display: inline-flex; align-items: center; gap: 10px; height: 60px; padding-inline: 18px 24px;
  border-radius: 999px; background: var(--wa); color: #fff; text-decoration: none; font-weight: 800; font-size: 1.02rem;
  box-shadow: 0 10px 28px rgba(31, 175, 84, .4); transition: transform .2s, box-shadow .2s;
}
.wa-float:hover { color: #fff; transform: translateY(-2px) scale(1.02); box-shadow: 0 14px 34px rgba(31, 175, 84, .5); }
.wa-float .icon { width: 30px; height: 30px; }
.wa-float::after { /* gentle pulse to draw attention */
  content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 0 rgba(31, 175, 84, .55);
  animation: wa-pulse 2.6s ease-out 1.5s 3; pointer-events: none;
}
.wa-float { position: relative; }
@keyframes wa-pulse { to { box-shadow: 0 0 0 18px rgba(31, 175, 84, 0); } }

.wa-panel {
  width: min(360px, calc(100vw - 32px)); border-radius: 22px; overflow: hidden; background: #fff;
  box-shadow: 0 24px 70px rgba(5, 26, 79, .28); border: 1px solid var(--line);
  transform-origin: bottom right; animation: wa-in .22s ease-out;
}
[dir="rtl"] .wa-panel { transform-origin: bottom left; }
@keyframes wa-in { from { opacity: 0; transform: translateY(10px) scale(.97); } }
.wa-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 16px 18px; background: #075E54; color: #fff; }
.wa-avatar { width: 46px; height: 46px; border-radius: 50%; background: #fff; padding: 3px; flex: none; }
.wa-head-text { flex: 1; min-width: 0; }
.wa-name { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; line-height: 1.2; }
.wa-sub { margin: 2px 0 0; display: flex; align-items: center; gap: 6px; font-size: .85rem; opacity: .9; }
.wa-sub .icon { width: 14px; height: 14px; }
.wa-close { flex: none; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; display: grid; place-items: center; }
.wa-close:hover { background: rgba(255, 255, 255, .25); }
.wa-close .icon { width: 18px; height: 18px; }
.wa-chat {
  display: flex; flex-direction: column; gap: 10px; padding: 16px 14px 14px;
  max-height: min(430px, calc(100dvh - 260px)); overflow-y: auto; overscroll-behavior: contain;
  background-color: #EFE7DD; background-image: var(--pattern); background-size: 200px; background-blend-mode: soft-light;
}
.wa-msg {
  max-width: 86%; padding: 9px 13px; font-size: .95rem; line-height: 1.55; color: var(--ink);
  box-shadow: 0 1px 1px rgba(0, 0, 0, .08); animation: wa-msg-in .2s ease-out;
}
.wa-msg p { margin: 0; }
.wa-bot { align-self: flex-start; background: #fff; border-radius: 0 14px 14px 14px; }
.wa-user { align-self: flex-end; background: #D9FDD3; border-radius: 14px 0 14px 14px; font-weight: 700; color: #075E54; }
[dir="rtl"] .wa-bot { border-radius: 14px 0 14px 14px; }
[dir="rtl"] .wa-user { border-radius: 0 14px 14px 14px; }
@keyframes wa-msg-in { from { opacity: 0; transform: translateY(6px); } }
.wa-typing { display: inline-flex; gap: 4px; padding: 13px 16px; }
.wa-typing span { width: 7px; height: 7px; border-radius: 50%; background: #9AA5A0; animation: wa-dot 1s infinite ease-in-out; }
.wa-typing span:nth-child(2) { animation-delay: .15s; }
.wa-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes wa-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.wa-options { display: flex; flex-wrap: wrap; gap: 8px; }
.wa-option {
  min-height: 40px; padding: 8px 14px; border-radius: 999px; cursor: pointer;
  background: #fff; border: 1.5px solid #25D366; color: #075E54; font: inherit; font-weight: 700; font-size: .9rem;
  transition: background-color .2s, color .2s;
}
.wa-option:hover, .wa-option:focus-visible { background: #25D366; color: #fff; }
.wa-compose { display: grid; gap: 10px; }
.wa-compose label { font-weight: 700; font-size: .9rem; color: #075E54; }
.wa-compose textarea {
  width: 100%; min-height: 76px; resize: vertical; padding: 10px 12px; border-radius: 12px;
  border: 1.5px solid #CFD8D3; background: #fff; font: inherit; font-size: .95rem;
}
.wa-compose textarea:focus { outline: none; border-color: #25D366; box-shadow: 0 0 0 3px rgba(37, 211, 102, .2); }
.wa-send {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; border-radius: 999px;
  background: var(--wa); color: #fff; font-weight: 800; text-decoration: none;
}
.wa-send:hover { color: #fff; background: #189246; }
.wa-send .icon { width: 22px; height: 22px; }
.wa-restart { justify-self: center; border: 0; background: none; color: #075E54; font: inherit; font-size: .88rem; font-weight: 700; text-decoration: underline; cursor: pointer; }
.wa-foot { margin: 0; padding: 10px 14px 12px; text-align: center; font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); }
.wa-foot a { font-weight: 700; color: #075E54; }
.footer-wa { display: inline-flex; align-items: center; gap: 8px; }
.footer-wa .icon { width: 18px; height: 18px; color: #25D366; }
.wa-inline .icon, .contact-icon-wa .icon { color: var(--wa); }
@media (max-width: 640px) {
  .wa-widget { inset-inline-end: 16px; bottom: 16px; }
  .wa-float { width: 60px; padding: 0; justify-content: center; }
  .wa-float-label { display: none; }
}
@media (prefers-reduced-motion: reduce) { .wa-float::after, .wa-panel, .wa-msg, .wa-typing span { animation: none; } }
}

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.i18n-pending body { opacity: 0; }
body { transition: opacity .15s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .pillar:nth-child(3) { border-inline-start: 0; }
  .pillar:nth-child(n+3) { border-top: 1px solid var(--line); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .gcse-panel { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .about-grid, .split, .register-grid { grid-template-columns: 1fr; }
  .about-visual { position: static; }
  .about-visual .photo, .split-visual .photo { max-width: 520px; margin-inline: auto; }
  .split-visual .photo-arch { max-width: 420px; }
  .ways-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .pillars { grid-template-columns: 1fr; }
  .pillar { border-inline-start: 0 !important; border-top: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr; column-gap: 16px; }
  .pillar:first-child { border-top: 0; }
  .pillar-icon { grid-row: span 2; }
  .pillar h3 { margin-top: 2px; }
  .cards, .values, .skills, .tailor-grid, .contact-list, .form-grid, .footer-grid { grid-template-columns: 1fr; }
  .radio-group { grid-template-columns: 1fr; }
  .btn-row .btn { flex: 1 1 100%; }
  .map { min-height: 300px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; padding-bottom: 96px; }
}

/* Placeholder refinements */
.photo-ph { bottom: auto; top: 50%; transform: translateY(-50%); justify-content: center; text-align: center; }
.contact-list .ltr, .contact-list a[href^="tel"] { white-space: nowrap; }

@media (max-width: 860px) {
  .hero { min-height: 0; }
  .hero::before, [dir="rtl"] .hero::before { background: linear-gradient(180deg, rgba(5, 26, 79, .9), rgba(8, 42, 117, .72)); }
  .hero-bg::after { background-position: 58% center; }
}
@media (max-width: 480px) {
  .hero h1 .accent { white-space: normal; }
}

/* "Our Subjects" label on the overview card */
.pillars-wrap { position: relative; z-index: 2; margin-top: calc(-1 * clamp(64px, 8vw, 96px)); }
.pillars-wrap .pillars { margin-top: 0; }
.overview-label {
  position: absolute; z-index: 3; top: 0; inset-inline-start: 50%; transform: translate(-50%, -50%);
  margin: 0; padding: 8px 22px; border-radius: 999px; white-space: nowrap;
  background: var(--gold-500); color: var(--blue-950); font-size: 1rem; font-weight: 700; box-shadow: var(--shadow-sm);
}
[dir="rtl"] .overview-label { transform: translate(50%, -50%); }
:lang(ar) .overview-label { font-size: 1.15rem; }
.icon-letters { stroke-width: 1.6; }
.steps div span:empty { display: none; }

/* ---------- Pages ---------- */
main [data-page][hidden] { display: none !important; }

.page-hero {
  position: relative; isolation: isolate; overflow: hidden; color: #fff;
  padding-block: clamp(64px, 9vw, 120px);
}
.page-hero-bg {
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(ellipse at 80% 20%, #1747B8 0%, transparent 60%),
    linear-gradient(135deg, #0B3591 0%, #051A4F 100%);
}
.page-hero-bg::after { content: ""; position: absolute; inset: 0; background: var(--banner, none) center 40% / cover no-repeat; }
/* Placeholder banner photos — replace the files in images/ with the school's own */
[data-current-page="about"]    .page-hero-bg { --banner: url("../images/banner-about.jpg"); }
[data-current-page="classes"]  .page-hero-bg { --banner: url("../images/banner-classes.jpg"); }
[data-current-page="gcse"]     .page-hero-bg { --banner: url("../images/banner-gcse.jpg"); }
[data-current-page="online"]   .page-hero-bg { --banner: url("../images/banner-online.jpg"); }
[data-current-page="tuition"]  .page-hero-bg { --banner: url("../images/banner-tuition.jpg"); }
[data-current-page="register"] .page-hero-bg { --banner: url("../images/banner-register.jpg"); }
[data-current-page="contact"]  .page-hero-bg { --banner: url("../images/banner-contact.jpg"); }
.page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(5, 26, 79, .9) 0%, rgba(8, 42, 117, .55) 50%, rgba(8, 42, 117, .2) 100%);
}
[dir="rtl"] .page-hero::before { background: linear-gradient(270deg, rgba(5, 26, 79, .9) 0%, rgba(8, 42, 117, .55) 50%, rgba(8, 42, 117, .2) 100%); }
.page-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--pattern); background-size: var(--pattern-size); opacity: .1;
  -webkit-mask-image: linear-gradient(to right, #000 20%, transparent 50%); mask-image: linear-gradient(to right, #000 20%, transparent 50%);
}
[dir="rtl"] .page-hero::after { -webkit-mask-image: linear-gradient(to left, #000 20%, transparent 50%); mask-image: linear-gradient(to left, #000 20%, transparent 50%); }
.page-hero-title { color: #fff; margin: 0; font-size: clamp(2rem, 4.6vw, 3.3rem); }
.page-hero-title:focus { outline: none; }
.page-hero-title::after { content: ""; display: block; width: 64px; height: 4px; margin-top: 16px; border-radius: 4px; background: var(--gold-500); }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; font-weight: 700; font-size: .95rem; color: var(--gold-200); }
:lang(ar) .breadcrumb { font-size: 1.05rem; }
.breadcrumb a { color: #fff; text-decoration: none; opacity: .85; }
.breadcrumb a:hover { opacity: 1; text-decoration: underline; color: #fff; }
[dir="rtl"] .crumb-sep { display: inline-block; transform: scaleX(-1); }
.hero h1:focus { outline: none; }
html:not(.js) .page-hero { display: none; }

.about-visual .photo img { object-position: 45% center; }
.online .photo img { object-position: 38% center; }
.tuition .photo img { object-position: 50% center; }
@media (max-width: 860px) {
  .hero::after, [dir="rtl"] .hero::after { -webkit-mask-image: none; mask-image: none; }
}
@media (prefers-reduced-motion: reduce) { .hero-bg::after { animation: none; } }

/* ---------- One-page layout ---------- */
[data-layout="one-page"] .page-hero { display: none !important; }
[dir="rtl"] .ltr-block { text-align: right; unicode-bidi: isolate; }
/* while the social card is hidden, let the class-times card use the full row */
.contact-list:has(.js-social-card[hidden]) .js-times-card { grid-column: 1 / -1; }
.social a[hidden] { display: none; }
