/* C-Pi Education — public site in the "modern" C-Pi design (burgundy / bronze / sand, Outfit + Source Sans 3 + Noto Kufi Arabic).
   Structure and content follow the old site; only the presentation is new. */
@font-face { font-family: "Outfit"; src: url(../fonts/outfit-latin-v15.woff2) format("woff2"); font-weight: 300 800; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url(../fonts/source-sans-3-latin-v20.woff2) format("woff2"); font-weight: 300 800; font-display: swap; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url(../fonts/ibm-plex-sans-arabic-arabic-400.woff2) format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url(../fonts/ibm-plex-sans-arabic-arabic-500.woff2) format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url(../fonts/ibm-plex-sans-arabic-arabic-600.woff2) format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url(../fonts/ibm-plex-sans-arabic-arabic-700.woff2) format("woff2"); font-weight: 700 800; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Noto Kufi Arabic"; src: url(../fonts/noto-kufi-arabic-arabic-v27.woff2) format("woff2"); font-weight: 300 800; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; }

:root {
  /* Colours of the old cpieducation.com theme (css/color.css, style.css, widget.css) */
  --burgundy-50: #fdf2f7; --burgundy-100: #f8dce9; --burgundy-200: #efb8d2; --burgundy-500: #b8156c;
  --burgundy-700: #990253; --burgundy-800: #800245; --burgundy-900: #990253; --burgundy-950: #4a0128;
  --bronze-200: #f8c331; --bronze-300: #e1a500; --bronze-400: #dba64c; --bronze-500: #a8730f; --bronze-600: #8a5e0c;
  --sand-50: #ffffff; --sand-100: #f8f8f8; --sand-200: #ececec; --sand-300: #dcdcdc;
  --ink-500: #666666; --ink-700: #333333; --ink-900: #111111;
  --font-display: "Outfit", "Noto Kufi Arabic", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Source Sans 3", "Noto Kufi Arabic", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --container: 88rem;
  --topbar-h: 34px;
  --header-h: 84px;
}
[dir="rtl"] { --font-display: "IBM Plex Sans Arabic", "Outfit", sans-serif; --font-sans: "IBM Plex Sans Arabic", "Source Sans 3", sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body { margin: 0; font: 400 1rem/1.7 var(--font-sans); color: var(--ink-900); background: var(--sand-50); overflow-x: clip; -webkit-font-smoothing: antialiased; }
[dir="rtl"] body { line-height: 1.95; font-size: .97rem; }
img { max-width: 100%; height: auto; }
a { color: var(--burgundy-700); text-underline-offset: 3px; }
a:hover { color: var(--burgundy-500); }
:focus-visible { outline: 2px solid var(--bronze-400); outline-offset: 3px; border-radius: 6px; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink-900); margin: 0; }
.ic { flex: none; width: 18px; height: 18px; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 1.5rem; }
@media (min-width: 768px) { .container { padding-inline: 2.5rem; } }
@media (min-width: 1280px) { .container { padding-inline: 4rem; } }
.narrow { max-width: 62rem; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--sand-100); color: var(--burgundy-900); padding: 10px 16px; border-radius: 999px; font-weight: 700; }
.skip:focus { top: 12px; }
#main:focus { outline: none; }

/* Type helpers from the modern design */
.headline { font-family: var(--font-display); font-weight: 550; letter-spacing: -.03em; line-height: 1.08; text-wrap: balance; }
[dir="rtl"] .headline { letter-spacing: 0; line-height: 1.6; font-weight: 700; }
.eyebrow { margin: 0; letter-spacing: .2em; text-transform: uppercase; color: var(--bronze-500); font-size: .6875rem; font-weight: 700; }
[dir="rtl"] .eyebrow { letter-spacing: 0; text-transform: none; font-size: .8rem; }
.eyebrow-row { display: flex; align-items: center; gap: 14px; }
.eyebrow-num { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgb(248 195 49 / .35); color: var(--bronze-200); font-size: .625rem; font-weight: 700; letter-spacing: .08em; }
.eyebrow-line { width: 36px; height: 1px; background: rgb(219 166 76 / .55); }

/* ---------- Top bar (old quick links + language) ---------- */
.topbar { background: var(--burgundy-900); color: var(--sand-100); font-size: .78rem; position: relative; z-index: 60; }
.topbar-inner { display: flex; align-items: center; justify-content: flex-end; gap: 4px; min-height: var(--topbar-h); }
.toplinks { display: none; gap: 2px; }
.toplinks a, .lang-btn { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; color: rgb(255 255 255 / .78); text-decoration: none; font-weight: 600; background: none; border: 0; border-radius: 999px; }
.toplinks a:hover, .toplinks a[aria-current], .lang-btn:hover, .lang-btn[aria-expanded="true"] { color: var(--sand-100); background: rgb(255 255 255 / .08); }
.toplinks .ic, .lang-btn .ic { width: 15px; height: 15px; opacity: .85; }
.lang-switch { position: relative; }
.lang-btn .ic:last-child { width: 12px; height: 12px; transition: transform .3s var(--ease); }
.lang-btn[aria-expanded="true"] .ic:last-child { transform: rotate(180deg); }
.dropdown { list-style: none; margin: 0; padding: 6px; background: var(--sand-50); border: 1px solid var(--sand-200); border-radius: 18px; box-shadow: 0 24px 60px -20px rgb(74 1 40 / .35); min-width: 190px; }
.lang-switch .dropdown { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); display: none; }
.lang-switch .dropdown.open { display: block; }
.dropdown a { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; color: var(--ink-700); text-decoration: none; font-weight: 600; font-size: .9rem; }
.dropdown a:hover, .dropdown a[aria-current] { background: var(--sand-100); color: var(--burgundy-700); }
@media (min-width: 900px) { .toplinks { display: flex; } }

/* ---------- Header: transparent over the hero, sand + blur once scrolled ---------- */
.site-header { position: absolute; inset-inline: 0; top: var(--topbar-h); z-index: 50; transition: background-color .5s var(--ease), box-shadow .5s var(--ease); }
.site-header.is-stuck { position: fixed; top: 0; background: rgb(252 250 245 / .9); box-shadow: 0 10px 30px -18px rgb(74 1 40 / .35); }
.site-header.is-stuck::before { content: ""; position: absolute; inset: 0; z-index: -1; backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: var(--header-h); }
.logo { position: relative; flex: none; display: block; }
.logo img { display: block; height: 52px; width: auto; transition: opacity .4s; }
.logo .logo-dark { position: absolute; inset: 0; opacity: 0; }
.is-stuck .logo .logo-light { opacity: 0; } .is-stuck .logo .logo-dark { opacity: 1; }
.pill-nav { display: none; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.pill { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 18px; border-radius: 999px; font-weight: 600; font-size: .85rem; text-decoration: none; transition: background .3s, color .3s, border-color .3s; }
.pill-lang { border: 1px solid rgb(255 255 255 / .3); color: var(--sand-100); background: rgb(74 1 40 / .12); backdrop-filter: blur(12px); }
.pill-lang:hover { background: var(--sand-100); color: var(--burgundy-900); }
.is-stuck .pill-lang { background: #fff; color: var(--burgundy-900); border-color: var(--sand-200); }
.is-stuck .pill-lang:hover { border-color: var(--burgundy-700); color: var(--burgundy-700); }
.menu-toggle { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgb(255 255 255 / .3); background: rgb(74 1 40 / .15); color: var(--sand-100); backdrop-filter: blur(12px); }
.is-stuck .menu-toggle { background: #fff; color: var(--burgundy-900); border-color: var(--sand-200); }

@media (min-width: 1180px) {
  .menu-toggle { display: none; }
  .pill-nav { display: block; }
  .nav-list { list-style: none; margin: 0; display: flex; align-items: center; gap: 2px; padding: 5px; border-radius: 999px; border: 1px solid rgb(255 255 255 / .13); background: rgb(74 1 40 / .12); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
  .is-stuck .nav-list { border-color: var(--sand-200); background: var(--sand-100); backdrop-filter: none; }
  .nav-list > li { position: relative; }
  .nav-list > li > a, .sub-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 999px; font-size: .8125rem; font-weight: 600; color: rgb(255 255 255 / .82); text-decoration: none; background: none; border: 0; white-space: nowrap; transition: background .3s, color .3s; }
  [dir="rtl"] .nav-list > li > a, [dir="rtl"] .sub-toggle { font-size: .8rem; padding-inline: 12px; }
  .nav-list > li > a:hover, .sub-toggle:hover, .sub-toggle[aria-expanded="true"] { color: var(--sand-100); background: rgb(255 255 255 / .1); }
  .nav-list > li > a[aria-current], .has-sub.is-current > .sub-toggle { background: rgb(255 255 255 / .16); color: var(--sand-100); }
  .is-stuck .nav-list > li > a, .is-stuck .sub-toggle { color: var(--ink-700); }
  .is-stuck .nav-list > li > a:hover, .is-stuck .sub-toggle:hover, .is-stuck .sub-toggle[aria-expanded="true"] { background: #fff; color: var(--burgundy-700); }
  .is-stuck .nav-list > li > a[aria-current], .is-stuck .has-sub.is-current > .sub-toggle { background: #fff; color: var(--burgundy-700); box-shadow: 0 1px 2px rgb(74 1 40 / .08); }
  .sub-toggle .ic { width: 12px; height: 12px; transition: transform .3s var(--ease); }
  .sub-toggle[aria-expanded="true"] .ic { transform: rotate(180deg); }
  .nav-list .sub { position: absolute; top: calc(100% + 14px); inset-inline-start: 50%; transform: translateX(-50%); min-width: 330px; display: none; }
  [dir="rtl"] .nav-list .sub { transform: translateX(50%); }
  .nav-list .sub.open { display: block; animation: drop .35s var(--ease); }
  .sub-num { font-size: .66rem; font-weight: 700; color: var(--bronze-500); letter-spacing: .1em; min-width: 20px; }
  .logo img { height: 58px; }
}
@keyframes drop { from { translate: 0 -6px; } to { translate: 0 0; } }

/* Mobile drawer (outside the header so it is fixed to the viewport) */
.drawer { position: fixed; inset: 0; z-index: 80; background: rgb(40 0 22 / .55); }
.drawer[hidden] { display: none; }
.drawer-panel { position: absolute; inset-block: 0; inset-inline-end: 0; width: min(390px, 90vw); background: var(--sand-50); overflow-y: auto; padding-bottom: 32px; animation: slide-in .4s var(--ease); box-shadow: 0 0 60px rgb(0 0 0 / .3); }
@keyframes slide-in { from { transform: translateX(30px); } to { transform: none; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--sand-200); }
.drawer-head img { height: 46px; width: auto; }
.menu-close { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--sand-200); background: #fff; display: grid; place-items: center; color: var(--burgundy-900); }
.drawer-list, .drawer-extra, .acc { list-style: none; margin: 0; padding: 0; }
.drawer-list { padding: 10px 12px 0; }
.drawer-list > li > a, .acc-toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 14px 12px; border: 0; background: none; border-radius: 14px; color: var(--ink-900); text-decoration: none; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; text-align: start; }
.drawer-list > li > a[aria-current], .has-sub.is-current > .acc-toggle { color: var(--burgundy-700); }
.drawer-list > li > a:hover, .acc-toggle:hover { background: var(--sand-100); }
.acc-toggle .ic { transition: transform .3s var(--ease); }
.acc-toggle[aria-expanded="true"] .ic { transform: rotate(180deg); }
.acc { margin: 0 12px 8px; padding-inline-start: 12px; border-inline-start: 1px solid var(--sand-300); }
.acc a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--ink-500); text-decoration: none; font-weight: 600; }
.acc a[aria-current] { color: var(--burgundy-700); background: var(--sand-100); }
.drawer-extra { margin: 14px 12px 0; padding-top: 14px; border-top: 1px solid var(--sand-200); }
.drawer-extra a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: var(--ink-500); text-decoration: none; font-weight: 600; }
.drawer-extra a:hover { background: var(--sand-100); color: var(--burgundy-700); }
body.nav-open { overflow: hidden; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 14px; min-height: 46px; padding: 6px 6px 6px 22px; border-radius: 999px; font-weight: 600; font-size: .9rem; text-decoration: none; border: 1px solid transparent; transition: background .3s, color .3s, border-color .3s, transform .3s var(--ease); }
[dir="rtl"] .btn { padding: 6px 22px 6px 6px; }
.btn .ic { width: 34px; height: 34px; padding: 9px; border-radius: 50%; transition: transform .4s var(--ease); }
[dir="rtl"] .btn .ic { transform: scaleX(-1); }
.btn:hover .ic { transform: translateX(3px); }
[dir="rtl"] .btn:hover .ic { transform: scaleX(-1) translateX(3px); }
.btn-primary { background: var(--burgundy-700); color: var(--sand-100); }
.btn-primary .ic { background: rgb(255 255 255 / .14); }
.btn-primary:hover { background: var(--burgundy-800); color: var(--sand-100); }
.btn-outline { background: #fff; color: var(--ink-900); border-color: var(--sand-200); }
.btn-outline .ic { background: var(--sand-100); color: var(--burgundy-700); }
.btn-outline:hover { border-color: var(--burgundy-700); color: var(--burgundy-700); }
.btn-lg { min-height: 52px; font-size: 1rem; }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; background: var(--burgundy-950); color: var(--sand-100); }
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; filter: brightness(1.08) saturate(1.04); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgb(51 0 27 / .62)), radial-gradient(circle at 76% 34%, transparent 0%, rgb(74 1 40 / .08) 34%, rgb(74 1 40 / .3) 100%), linear-gradient(90deg, rgb(51 0 27 / .82) 0%, rgb(51 0 27 / .6) 38%, rgb(51 0 27 / .18) 72%, rgb(51 0 27 / .3) 100%); }
[dir="rtl"] .hero::before { background: linear-gradient(180deg, transparent 55%, rgb(51 0 27 / .62)), radial-gradient(circle at 24% 34%, transparent 0%, rgb(74 1 40 / .08) 34%, rgb(74 1 40 / .3) 100%), linear-gradient(270deg, rgb(51 0 27 / .82) 0%, rgb(51 0 27 / .6) 38%, rgb(51 0 27 / .18) 72%, rgb(51 0 27 / .3) 100%); }
.hero-grid { position: absolute; inset: 0; z-index: -1; opacity: .08; pointer-events: none; background-image: linear-gradient(rgb(255 255 255 / .18) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / .18) 1px, transparent 1px); background-size: 8rem 8rem; -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%); mask-image: linear-gradient(180deg, #000, transparent 85%); }
.hero-content { position: relative; padding-top: calc(var(--header-h) + 72px); padding-bottom: 72px; }
.hero-title { margin-top: 26px; color: var(--sand-100); font-size: clamp(2rem, 5.5vw, 4.5rem); max-width: 18ch; }
[dir="rtl"] .hero-title { max-width: 22ch; font-size: clamp(1.8rem, 4.6vw, 3.6rem); }
.hero-text { margin: 26px 0 0; color: rgb(255 255 255 / .78); font-size: 1.125rem; line-height: 1.75; max-width: 52ch; }
.hero .eyebrow { color: var(--bronze-200); }
.hero-page .hero-content { min-height: clamp(380px, 52vh, 520px); display: flex; flex-direction: column; justify-content: flex-end; }
.hero-page .hero-title { font-size: clamp(2rem, 5vw, 4rem); }
.hero-article .hero-title { font-size: clamp(1.8rem, 4.2vw, 3.4rem); max-width: 24ch; }
.text-outline { position: absolute; top: 14%; inset-inline-end: -1rem; z-index: -1; display: none; font-family: "Outfit", sans-serif; font-weight: 500; font-size: clamp(12rem, 24vw, 25rem); line-height: 1; color: transparent; -webkit-text-stroke: 1px rgb(255 255 255 / .2); pointer-events: none; }
@media (min-width: 1024px) { .text-outline { display: block; } }

/* Home slider */
.hero-home .hero-track { position: relative; min-height: max(560px, 92svh); }
.hero-slide { position: absolute; inset: 0; margin: 0; opacity: 0; visibility: hidden; transition: opacity 1s var(--ease), visibility 1s; }
.hero-slide.is-active { opacity: 1; visibility: visible; z-index: 1; }
.hero-slide .hero-media { z-index: 0; }
.hero-slide .hero-media img { transform: scale(1.06); transition: transform 8s ease-out; }
.hero-slide.is-active .hero-media img { transform: scale(1); }
.hero-slide::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, transparent 50%, rgb(51 0 27 / .62)), linear-gradient(90deg, rgb(51 0 27 / .82) 0%, rgb(51 0 27 / .6) 38%, rgb(51 0 27 / .18) 72%, rgb(51 0 27 / .3) 100%); }
[dir="rtl"] .hero-slide::after { background: linear-gradient(180deg, transparent 50%, rgb(51 0 27 / .62)), linear-gradient(270deg, rgb(51 0 27 / .82) 0%, rgb(51 0 27 / .6) 38%, rgb(51 0 27 / .18) 72%, rgb(51 0 27 / .3) 100%); }
.hero-home::before { display: none; }
.hero-slide .hero-content { position: absolute; inset-inline: 0; bottom: 0; z-index: 2; padding-bottom: 130px; }
.hero-slide .hero-content > * { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.hero-slide.is-active .hero-content > * { opacity: 1; transform: none; }
.hero-slide.is-active .hero-title { transition-delay: .08s; } .hero-slide.is-active .hero-text { transition-delay: .16s; }
.hero-home .hero-grid, .hero-home .text-outline { z-index: 2; }
.hero-controls { position: absolute; inset-inline: 0; bottom: 0; z-index: 3; border-top: 1px solid rgb(255 255 255 / .12); background: linear-gradient(180deg, rgb(51 0 27 / .15), rgb(51 0 27 / .55)); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.hero-controls-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 86px; }
.hero-tabs { display: flex; gap: 6px; flex: 1; min-width: 0; }
.hero-tab { flex: 1; min-width: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: center; padding: 14px 0 12px; background: none; border: 0; color: rgb(255 255 255 / .55); text-align: start; }
.hero-tab-bar { grid-column: 1 / -1; display: block; height: 2px; border-radius: 2px; background: rgb(255 255 255 / .18); overflow: hidden; margin-bottom: 8px; }
.hero-tab-bar span { display: block; height: 100%; width: 0; background: var(--bronze-300); }
.hero-tab[aria-selected="true"] { color: var(--sand-100); }
.hero-tab[aria-selected="true"] .hero-tab-bar span { width: 100%; transition: width var(--slide-ms, 6500ms) linear; }
.hero-tab.is-seen .hero-tab-bar span { width: 100%; background: rgb(255 255 255 / .35); }
.hero-tab-num { font-size: .66rem; font-weight: 700; letter-spacing: .14em; color: var(--bronze-200); }
.hero-tab-label { font-size: .78rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-tab:hover { color: var(--sand-100); }
.hero-tab:nth-child(n+5) { display: none; }
@media (max-width: 1023px) { .hero-tab-label { display: none; } .hero-tab { grid-template-columns: 1fr; } .hero-tab-num { display: none; } .hero-tab:nth-child(n+5) { display: grid; } }
.hero-tab { transition: flex-grow .6s var(--ease), color .3s; }
@media (min-width: 1024px) {
  .hero-tabs { overflow: hidden; gap: 10px; }
  .hero-tab:nth-child(n+5) { display: grid; }
  .hero-tab { flex: 1 1 0; }
  .hero-tab[aria-selected="true"] { flex-grow: 5; }
  .hero-tab:not([aria-selected="true"]) .hero-tab-label { opacity: 0; width: 0; }
  .hero-tab-label { transition: opacity .4s .15s; font-size: .82rem; }
}
.hero-arrows { display: flex; align-items: center; gap: 10px; flex: none; }
.hero-count { font-size: .75rem; letter-spacing: .14em; color: rgb(255 255 255 / .6); margin-inline-end: 6px; font-variant-numeric: tabular-nums; }
.hero-count b { color: var(--sand-100); font-weight: 700; }
@media (max-width: 640px) { .hero-count { display: none; } .hero-controls-inner { min-height: 70px; gap: 14px; } }
.hero-slide .hero-content { padding-bottom: 150px; }
.round-btn { width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgb(255 255 255 / .3); background: rgb(74 1 40 / .2); color: var(--sand-100); display: grid; place-items: center; backdrop-filter: blur(10px); transition: background .3s, color .3s; }
.round-btn:hover { background: var(--sand-100); color: var(--burgundy-900); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }

/* ---------- Sections & programme cards ---------- */
.section { padding-block: clamp(56px, 8vw, 112px); }
.section-sand { background: var(--sand-100); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-title { font-size: clamp(2rem, 4vw, 3.25rem); }
.card-grid { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .card-grid { grid-template-columns: repeat(3, 1fr); gap: 28px; } }
.card { display: flex; flex-direction: column; background: var(--sand-50); border: 1px solid var(--sand-200); border-radius: 20px; overflow: hidden; transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.card:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -30px rgb(74 1 40 / .35); }
.card-media { display: block; aspect-ratio: 16 / 10; background: var(--sand-200); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.card:hover .card-media img { transform: scale(1.05); }
.card-body { display: flex; flex-direction: column; gap: 14px; padding: 24px 22px 22px; flex: 1; }
.card-title { font-size: 1.25rem; font-weight: 550; letter-spacing: -.02em; line-height: 1.3; }
[dir="rtl"] .card-title { letter-spacing: 0; line-height: 1.7; font-size: 1.1rem; }
.card-title a { color: var(--ink-900); text-decoration: none; }
.card-title a:hover { color: var(--burgundy-700); }
.card-text { margin: 0; color: var(--ink-500); font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-more { margin-top: auto; align-self: flex-start; }

/* ---------- Inner pages ---------- */
.page-body > .entry { background: var(--sand-50); border: 1px solid var(--sand-200); border-radius: 24px; padding: clamp(22px, 4vw, 48px); }
.entry + .entry { margin-top: 28px; }
.entry-title { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 550; letter-spacing: -.02em; line-height: 1.2; margin-bottom: 24px; }
[dir="rtl"] .entry-title { letter-spacing: 0; line-height: 1.6; }
.entry-more { margin: 28px 0 0; }
.entry-full { background: var(--sand-50); border: 1px solid var(--sand-200); border-radius: 24px; padding: clamp(22px, 4vw, 56px); margin-top: calc(-1 * clamp(40px, 6vw, 80px)); position: relative; box-shadow: 0 30px 60px -40px rgb(74 1 40 / .3); }
.hero-article + .section { padding-top: 0; }
.hero-article .hero-content { padding-bottom: clamp(96px, 12vw, 150px); }

/* Content written in the CMS editor: text kept as written, old inline fonts/colours normalised. */
.prose { overflow-wrap: break-word; color: var(--ink-700); font-size: 1.05rem; line-height: 1.8; }
[dir="rtl"] .prose { font-size: 1rem; line-height: 2; }
.prose :where(p, li, td, span, font, div) { font-family: inherit !important; font-size: inherit !important; line-height: inherit; }
.prose :where(span, font)[style*="color"], .prose font[color] { color: inherit !important; }
.prose p { margin: 0 0 1.1em; }
.prose h1, .prose h2, .prose h3, .prose h4 { margin: 1.8em 0 .6em; font-size: 1.3rem; font-weight: 600; }
.prose strong, .prose b { color: var(--ink-900); font-weight: 700; }
.prose u { text-decoration-color: var(--bronze-300); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.prose ul, .prose ol { padding-inline-start: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .4em; }
.prose li::marker { color: var(--bronze-500); }
.prose img { border-radius: 16px; height: auto !important; max-width: 100% !important; border: 0 !important; display: block; margin: 0 0 1.3em; }
.prose img.float-left, .prose img.float-right { float: none !important; width: 100% !important; margin-inline: 0 !important; }
@media (min-width: 760px) {
  .prose img.float-left { float: left !important; width: 44% !important; margin: .35em 32px 18px 0 !important; }
  .prose img.float-right { float: right !important; width: 44% !important; margin: .35em 0 18px 32px !important; }
}
.prose::after { content: ""; display: table; clear: both; }
.prose a { font-weight: 600; color: var(--burgundy-700); }
.prose a[href$=".pdf"], .prose a[href$=".PDF"] { display: inline-flex; align-items: center; gap: 8px; }
.prose a[href$=".pdf"]::before, .prose a[href$=".PDF"]::before { content: "PDF"; font-size: .64rem; font-weight: 800; letter-spacing: .06em; color: var(--sand-100); background: var(--burgundy-700); padding: 3px 7px; border-radius: 999px; }
.table-scroll { overflow-x: auto; margin: 0 0 1.4em; border-radius: 16px; border: 1px solid var(--sand-200); background: #fff; -webkit-overflow-scrolling: touch; }
.prose table { border-collapse: collapse; width: 100% !important; min-width: 520px; height: auto !important; }
.prose td, .prose th { padding: 11px 14px; border: 1px solid var(--sand-200); vertical-align: top; width: auto !important; }
.prose tr:nth-child(odd) td { background: var(--sand-50); }
.embed { position: relative; aspect-ratio: 16 / 9; margin: 0 0 1.3em; border-radius: 16px; overflow: hidden; background: var(--burgundy-950); }
.embed iframe { position: absolute; inset: 0; width: 100% !important; height: 100% !important; border: 0; }
.yt { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: var(--burgundy-950); cursor: pointer; }
.yt img { width: 100% !important; height: 100% !important; object-fit: cover; margin: 0 !important; border-radius: 0 !important; opacity: .9; transition: opacity .3s, transform .8s var(--ease); }
.yt:hover img { opacity: 1; transform: scale(1.03); }
.yt::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgb(51 0 27 / .55)); }
.yt-play { position: absolute; z-index: 1; left: 50%; top: 50%; width: 68px; height: 68px; margin: -34px 0 0 -34px; border-radius: 50%; background: rgb(255 255 255 / .92); box-shadow: 0 10px 30px rgb(0 0 0 / .3); transition: transform .4s var(--ease); }
.yt-play::before { content: ""; position: absolute; left: 27px; top: 22px; border-style: solid; border-width: 12px 0 12px 19px; border-color: transparent transparent transparent var(--burgundy-700); }
.yt:hover .yt-play { transform: scale(1.08); }


/* ---------- Contact ---------- */
.contact-layout { display: grid; gap: 28px; }
@media (min-width: 980px) { .contact-layout { grid-template-columns: .9fr 1.1fr; align-items: start; gap: 40px; } }
.contact-form { background: var(--sand-50); border: 1px solid var(--sand-200); border-radius: 24px; padding: clamp(22px, 3.4vw, 40px); display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field-row { display: grid; gap: 18px; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field label { font-weight: 700; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-700); }
[dir="rtl"] .field label { letter-spacing: 0; text-transform: none; font-size: .9rem; }
.req { color: var(--burgundy-500); }
.field input, .field textarea { width: 100%; font: inherit; color: var(--ink-900); background: #fff; border: 1px solid var(--sand-300); border-radius: 14px; padding: 13px 16px; transition: border-color .3s, box-shadow .3s; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--burgundy-500); box-shadow: 0 0 0 4px rgb(184 21 108 / .12); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #b3122e; }
.form-alert { margin: 0; padding: 12px 16px; border-radius: 14px; background: var(--burgundy-50); color: var(--burgundy-700); font-weight: 600; border: 1px solid var(--burgundy-100); }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form .btn { justify-self: start; }

/* ---------- Galleries ---------- */
.galleries { display: grid; gap: clamp(40px, 6vw, 72px); }
.gallery-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--sand-300); }
.gallery-head h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 550; letter-spacing: -.02em; }
[dir="rtl"] .gallery-head h2 { letter-spacing: 0; }
.gallery-count { color: var(--bronze-500); font-weight: 700; font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; white-space: nowrap; }
.gallery-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
@media (min-width: 768px) { .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; } }
.gallery-grid a { display: block; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--sand-200); }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.gallery-grid a:hover img { transform: scale(1.07); }
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgb(40 0 22 / .95); display: grid; grid-template-rows: auto 1fr auto; color: var(--sand-100); }
.lightbox[hidden] { display: none; }
.lightbox-bar { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; font-weight: 600; letter-spacing: .1em; font-size: .8rem; }
.lightbox-stage { display: grid; place-items: center; min-height: 0; padding: 0 12px; }
.lightbox-stage img { max-width: 100%; max-height: calc(100vh - 150px); border-radius: 12px; object-fit: contain; }
.lightbox-nav { display: flex; justify-content: center; gap: 16px; padding: 16px; }
.lightbox button { width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgb(255 255 255 / .3); background: rgb(255 255 255 / .06); color: var(--sand-100); display: grid; place-items: center; }

/* ---------- Footer ---------- */
.site-footer { position: relative; overflow: hidden; isolation: isolate; color: rgb(255 255 255 / .72); font-size: .95rem; border-top: 1px solid rgb(219 166 76 / .5);
  background: radial-gradient(900px 420px at 85% 0%, rgb(184 21 108 / .35), transparent 60%), var(--burgundy-900); }
.footer-mark { position: absolute; inset-inline-end: -60px; bottom: -80px; width: 420px; height: auto; opacity: .05; z-index: -1; pointer-events: none; }
.footer-grid { display: grid; gap: 40px; padding-block: 72px 44px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .footer-grid { grid-template-columns: 1fr 1.4fr 1fr; gap: 56px; } }
.footer-brand img { display: block; height: 78px; width: auto; margin-bottom: 26px; }
.footer-h { color: var(--bronze-300); font-family: var(--font-sans); font-size: .7rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; margin: 0 0 18px; display: flex; align-items: center; gap: 12px; }
.footer-h::after { content: ""; flex: 1; height: 1px; background: rgb(255 255 255 / .1); }
[dir="rtl"] .footer-h { letter-spacing: 0; font-size: .85rem; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-links a { color: rgb(255 255 255 / .82); text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: 10px; }
.footer-links a::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--bronze-400); }
.site-footer a:hover { color: var(--sand-100); }
.prose-invert { color: rgb(255 255 255 / .78); font-size: .95rem; }
.prose-invert strong, .prose-invert b { color: var(--sand-100); }
.prose-invert a { color: var(--sand-100); }
.contact-list ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.contact-list li { margin: 0; padding-inline-start: 14px; border-inline-start: 1px solid var(--bronze-400); color: var(--sand-100); font-weight: 600; }
.footer-video .embed { max-width: 520px; }
.footer-social { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-block: 22px; border-top: 1px solid rgb(255 255 255 / .1); }
.footer-social .footer-h { margin: 0; }
.footer-social .footer-h::after { display: none; }
.social { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.social a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 12px; border: 1px solid rgb(255 255 255 / .14); color: var(--sand-100); text-decoration: none; font-size: .8rem; font-weight: 600; transition: background .3s, color .3s; }
.social a .ic { width: 16px; height: 16px; }
.social a:hover { background: var(--sand-100); color: var(--burgundy-900); }
.copyright { padding-block: 22px 28px; border-top: 1px solid rgb(255 255 255 / .1); font-size: .82rem; color: #f9f9f9; }
.copyright a { color: #fff; font-weight: 700; }

/* ===== Design refinements (round 2) ===== */
.section-head-title { display: flex; align-items: center; gap: 18px; }
.section-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--sand-300); flex: none; }
.section-mark span { width: 8px; height: 8px; border-radius: 50%; background: var(--bronze-400); box-shadow: 0 0 0 6px rgb(219 166 76 / .15); }
.section-count { font-family: "Outfit", sans-serif; font-size: clamp(3rem, 7vw, 6rem); font-weight: 500; line-height: .8; color: transparent; -webkit-text-stroke: 1px var(--sand-300); }
.programs { position: relative; overflow: hidden; }
.programs::before { content: ""; position: absolute; inset: 0 0 auto; height: 260px; background: radial-gradient(600px 220px at 15% 0%, rgb(219 166 76 / .12), transparent 70%); pointer-events: none; }
.card-media { position: relative; }
.card-num { position: absolute; inset-inline-start: 14px; top: 14px; padding: 6px 11px; border-radius: 999px; background: rgb(74 1 40 / .55); color: var(--sand-100); font-size: .68rem; font-weight: 700; letter-spacing: .14em; backdrop-filter: blur(8px); border: 1px solid rgb(255 255 255 / .18); }
.card-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgb(51 0 27 / .28)); opacity: 0; transition: opacity .5s; }
.card:hover .card-media::after { opacity: 1; }
.card-body { gap: 16px; padding: 26px 24px 24px; }
.card-text { -webkit-line-clamp: 4; line-height: 1.7; }

/* Reveal on scroll (only when JS runs; content is visible without it) */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* Inner page entries: summary photo beside the text */
.page-body { display: grid; gap: 28px; }
.page-body > .entry { padding: 0; overflow: hidden; }
.entry + .entry { margin-top: 0; }
.entry-body { padding: clamp(24px, 4vw, 52px); position: relative; }
.entry-feature { display: grid; }
@media (min-width: 900px) { .entry-feature { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); } .narrow { max-width: 76rem; } }
.entry-media { position: relative; display: block; min-height: 280px; background: var(--sand-200); overflow: hidden; }
.entry-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.entry-feature:hover .entry-media img { transform: scale(1.04); }
.entry-media[aria-disabled] { pointer-events: none; }
.entry-num { position: absolute; inset-inline-end: clamp(20px, 3vw, 40px); top: clamp(18px, 3vw, 34px); font-family: "Outfit", sans-serif; font-size: 3.2rem; line-height: 1; color: transparent; -webkit-text-stroke: 1px var(--sand-300); }
.entry-body .entry-title { padding-inline-end: 70px; }
.contact-layout .page-body > .entry .entry-body { padding: clamp(24px, 3.4vw, 40px); }

/* Article page */
.section-article { padding-top: 0; }
.article-layout { display: grid; gap: 28px; align-items: start; }
@media (min-width: 1100px) { .article-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; } }
.article-layout .entry-full { margin-top: calc(-1 * clamp(40px, 6vw, 80px)); }
.article-side { position: relative; }
@media (min-width: 1100px) { .article-side { position: sticky; top: calc(var(--header-h) + 24px); margin-top: calc(-1 * clamp(40px, 6vw, 80px)); } }
.side-card { background: var(--burgundy-900); color: var(--sand-100); border-radius: 24px; padding: 26px 22px; position: relative; overflow: hidden; isolation: isolate; }
.side-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(320px 200px at 100% 0%, rgb(184 21 108 / .55), transparent 70%); }
.side-card .eyebrow { color: var(--bronze-200); margin-bottom: 14px; }
.side-links { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 2px; }
.side-links a { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: baseline; padding: 11px 12px; border-radius: 14px; color: rgb(255 255 255 / .8); text-decoration: none; font-weight: 600; font-size: .93rem; line-height: 1.45; transition: background .3s, color .3s; }
.side-links a:hover { background: rgb(255 255 255 / .08); color: var(--sand-100); }
.side-links a[aria-current] { background: var(--sand-100); color: var(--burgundy-900); }
.side-links a[aria-current] .side-num { color: var(--bronze-500); }
.side-num { font-size: .66rem; font-weight: 700; letter-spacing: .14em; color: var(--bronze-300); }
.side-cta { width: 100%; justify-content: space-between; background: var(--sand-100); color: var(--burgundy-900); }
.side-cta .ic { background: var(--burgundy-700); color: var(--sand-100); }
.side-cta:hover { background: #fff; color: var(--burgundy-700); }
.read-progress { position: fixed; inset-inline: 0; top: 0; height: 3px; z-index: 70; pointer-events: none; }
.read-progress span { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--bronze-400), var(--burgundy-500)); transform-origin: left; transform: scaleX(var(--p, 0)); }
[dir="rtl"] .read-progress span { transform-origin: right; }
.prose > p:first-child { font-size: 1.12em; color: var(--ink-900); }
.prose hr { border: 0; height: 1px; background: var(--sand-300); margin: 2em 0; }
.prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-inline-start: 3px solid var(--bronze-400); font-family: var(--font-display); font-size: 1.2em; color: var(--ink-900); }

.prose a[href$=".pdf"]:has(img)::before, .prose a[href$=".PDF"]:has(img)::before { display: none; }
.prose a:has(> img) { display: inline-block; }

/* Galleries: first photo large, the rest in a grid */
.gallery { background: var(--sand-50); border: 1px solid var(--sand-200); border-radius: 24px; padding: clamp(18px, 3vw, 32px); }
.gallery-head { border-bottom-color: var(--sand-200); }
.gallery-grid { grid-auto-flow: dense; }
.gallery-grid li:first-child { grid-column: span 2; grid-row: span 2; }
.gallery-grid a { position: relative; }
.gallery-grid a::after { content: ""; position: absolute; inset: 0; background: rgb(74 1 40 / 0); transition: background .4s; }
.gallery-grid a:hover::after { background: rgb(74 1 40 / .18); }
.gallery-grid li.is-more { display: none; }
.gallery.is-open .gallery-grid li.is-more { display: block; }
.gallery-toggle { margin-top: 18px; }

/* Old theme: gold (#dba64c) copyright strip under the #990253 footer */
.copyright-strip { background: #dba64c; position: relative; z-index: 1; }
.copyright-strip .copyright { border-top: 0; padding-block: 16px; text-align: center; color: #f9f9f9; font-size: .85rem; }
.copyright-strip .copyright a { text-transform: uppercase; letter-spacing: .04em; }
.site-footer { background: radial-gradient(900px 420px at 85% 0%, rgb(255 255 255 / .08), transparent 60%), #990253; border-top: 0; }
.footer-h { color: #fff; }
.footer-links a::before { background: var(--bronze-200); }
.contact-list li { border-inline-start-color: var(--bronze-200); }
.side-card { background: #990253; }
.side-card::before { background: radial-gradient(320px 200px at 100% 0%, rgb(255 255 255 / .12), transparent 70%); }
.topbar { background: #990253; }
.hero { background: var(--burgundy-950); }
.section-sand { background: var(--sand-100); }
body { background: #fff; }

/* ===== Page-level refinements ===== */
[dir="ltr"] .hero-page .hero-title { text-transform: capitalize; }
/* Old CMS sub-headings (a paragraph that is only bold/underlined text) read as headings */
.prose p:has(> u:only-child > strong:only-child),
.prose p:has(> strong:only-child > u:only-child),
.prose p:has(> b:only-child > u:only-child),
.prose p:has(> u:only-child > b:only-child) {
  margin: 1.9em 0 .7em; font-family: var(--font-display); font-size: 1.3em; line-height: 1.3; color: var(--ink-900); display: flex; align-items: center; gap: 14px;
}
.prose p:has(> u:only-child > strong:only-child)::before,
.prose p:has(> strong:only-child > u:only-child)::before,
.prose p:has(> b:only-child > u:only-child)::before,
.prose p:has(> u:only-child > b:only-child)::before { content: ""; width: 28px; height: 3px; border-radius: 3px; background: var(--bronze-400); flex: none; }
.prose p:has(> u:only-child > strong:only-child) u, .prose p:has(> strong:only-child > u:only-child) u,
.prose p:has(> b:only-child > u:only-child) u, .prose p:has(> u:only-child > b:only-child) u { text-decoration: none; }
.prose > p:first-child:has(> u:only-child, > strong:only-child) { margin-top: 0; }

/* Contact details as a tidy list of rows */
.page-contact .page-body .prose p { margin: 0; padding: 14px 0; border-bottom: 1px solid var(--sand-200); }
.page-contact .page-body .prose p:last-child { border-bottom: 0; }
.page-contact .page-body .prose u { text-decoration: none; color: var(--ink-500); font-weight: 600; font-size: .85em; letter-spacing: .04em; text-transform: uppercase; display: block; }
[dir="rtl"] .page-contact .page-body .prose u { letter-spacing: 0; text-transform: none; font-size: .9em; }
.page-contact .page-body .prose a { color: var(--burgundy-700); }
.page-contact .entry-body { padding-top: clamp(24px, 3vw, 36px); }
@media (min-width: 980px) { .page-contact .page-body { position: sticky; top: calc(var(--header-h) + 24px); } }

/* Thanks page: centred confirmation */
.page-thanks .page-body { text-align: center; justify-items: center; max-width: 40rem; margin-inline: auto; }
.page-thanks .entry { width: 100%; }
.page-thanks .entry-title { padding-inline-end: 0; }
.thanks-icon { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: var(--burgundy-700); color: #fff; box-shadow: 0 0 0 10px rgb(153 2 83 / .1); margin-bottom: 4px; }
.thanks-actions { margin: 4px 0 0; }

/* Galleries page: headings get the gold accent */
.gallery-head h2 { display: flex; align-items: center; gap: 12px; }
.gallery-head h2::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--bronze-400); box-shadow: 0 0 0 5px rgb(219 166 76 / .2); flex: none; }

/* Mobile spacing */
@media (max-width: 640px) {
  .hero-page .hero-content { min-height: 320px; padding-bottom: 44px; }
  .entry-body { padding: 22px 20px 26px; }
  .entry-num { font-size: 2.4rem; }
  .entry-body .entry-title { padding-inline-end: 52px; font-size: 1.35rem; }
  .card-body { padding: 22px 20px 20px; }
  .section { padding-block: 48px; }
  .entry-full { padding: 22px 18px; border-radius: 20px; }
  .side-card { border-radius: 20px; }
}

/* ===== Footer (old theme colours: #990253 + gold #dba64c strip) ===== */
.site-footer { position: relative; overflow: hidden; isolation: isolate; color: rgb(255 255 255 / .82); font-size: .95rem; border-top: 0;
  background: linear-gradient(180deg, #990253 0%, #7d0244 100%); }
.site-footer::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, #dba64c, #f8c331, #e1a500); }
.site-footer::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(700px 360px at 90% 10%, rgb(255 255 255 / .09), transparent 65%), radial-gradient(520px 300px at 0% 100%, rgb(0 0 0 / .14), transparent 70%); }
.footer-top { padding-block: clamp(56px, 7vw, 88px) clamp(40px, 5vw, 64px); }
.footer-grid { display: grid; gap: 40px 32px; padding-block: 0; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .footer-grid { grid-template-columns: 1fr .9fr 1.5fr 1.15fr; gap: 48px; } }
.footer-logo { display: inline-block; }
.footer-brand img { display: block; height: 84px; width: auto; margin: 0 0 28px; }
.footer-h { color: #fff; font-family: var(--font-display); font-size: .78rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; margin: 0 0 22px; display: block; padding-bottom: 12px; position: relative; }
.footer-h::after { content: ""; position: absolute; inset-inline-start: 0; bottom: 0; width: 34px; height: 2px; border-radius: 2px; background: #f8c331; flex: none; }
[dir="rtl"] .footer-h { letter-spacing: 0; font-size: .9rem; }
.footer-h-social { margin-bottom: 16px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.footer-links a { display: inline-flex; align-items: center; gap: 8px; padding: 5px 0; color: rgb(255 255 255 / .86); text-decoration: none; font-weight: 600; transition: color .3s, transform .3s var(--ease); }
.footer-links a::before { display: none; }
.footer-links a .ic { width: 14px; height: 14px; color: #f8c331; transition: transform .3s var(--ease); }
.footer-links a:hover { color: #fff; }
.footer-links a:hover .ic { transform: translateX(3px); }
[dir="rtl"] .footer-links a:hover .ic { transform: translateX(-3px); }
.footer-video .embed { max-width: none; border-radius: 18px; box-shadow: 0 24px 50px -24px rgb(0 0 0 / .5); border: 1px solid rgb(255 255 255 / .14); }
.footer-video .prose p { margin: 0; }
.contact-list ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.contact-list li { margin: 0; padding: 14px 16px; border: 1px solid rgb(255 255 255 / .14); border-inline-start: 3px solid #f8c331; border-radius: 14px; background: rgb(255 255 255 / .06); color: #fff; font-weight: 600; font-size: .92rem; line-height: 1.7; }
.contact-list a { color: #fff; text-decoration-color: rgb(255 255 255 / .35); }
.social { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; flex-wrap: wrap; }
.social a { width: 44px; height: 44px; padding: 0; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgb(255 255 255 / .28); background: rgb(255 255 255 / .06); color: #fff; transition: background .3s, color .3s, transform .3s var(--ease); }
.social a .ic { width: 18px; height: 18px; }
.social a span { display: none; }
.social a:hover { background: #f8c331; border-color: #f8c331; color: #990253; transform: translateY(-2px); }
.footer-social { display: none; }
.footer-mark { position: absolute; inset-inline-end: -70px; bottom: 40px; width: 380px; height: auto; opacity: .06; z-index: -1; pointer-events: none; }
.copyright-strip { background: #dba64c; position: relative; z-index: 1; }
.copyright-strip .copyright { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 0; padding-block: 14px; text-align: start; color: #fff; font-size: .85rem; }
.copyright-strip .copyright a { color: #fff; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.to-top { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgb(255 255 255 / .2); color: #fff !important; border: 1px solid rgb(255 255 255 / .45); transition: background .3s, color .3s; }
.to-top:hover { background: #fff; color: #990253 !important; }
@media (max-width: 699px) { .footer-brand { display: grid; justify-items: start; } }

/* ===== Arabic typography (IBM Plex Sans Arabic): balanced weights and line spacing ===== */
[dir="rtl"] body { font-size: 1.0625rem; line-height: 1.85; font-weight: 400; }
[dir="rtl"] .headline { font-weight: 700; line-height: 1.35; letter-spacing: 0; }
[dir="rtl"] .hero-title { font-size: clamp(2rem, 4.8vw, 3.9rem); line-height: 1.3; max-width: 20ch; }
[dir="rtl"] .hero-page .hero-title { font-size: clamp(2rem, 4.4vw, 3.4rem); }
[dir="rtl"] .hero-article .hero-title { font-size: clamp(1.7rem, 3.6vw, 2.8rem); line-height: 1.4; }
[dir="rtl"] .hero-text { font-size: 1.15rem; line-height: 1.9; font-weight: 400; }
[dir="rtl"] .eyebrow { font-size: .85rem; font-weight: 600; letter-spacing: 0; }
[dir="rtl"] .section-title { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
[dir="rtl"] .card-title { font-size: 1.12rem; font-weight: 600; line-height: 1.65; }
[dir="rtl"] .card-text { font-size: .98rem; line-height: 1.9; }
[dir="rtl"] .entry-title { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 700; line-height: 1.5; }
[dir="rtl"] .prose { font-size: 1.06rem; line-height: 2; }
[dir="rtl"] .prose p { margin-bottom: 1.15em; }
[dir="rtl"] .prose strong, [dir="rtl"] .prose b { font-weight: 600; }
[dir="rtl"] .prose > p:first-child { font-size: 1.08em; }
[dir="rtl"] .prose p:has(> u:only-child > strong:only-child), [dir="rtl"] .prose p:has(> strong:only-child > u:only-child) { font-size: 1.22em; font-weight: 700; line-height: 1.5; }
[dir="rtl"] .nav-list > li > a, [dir="rtl"] .sub-toggle { font-size: .9rem; font-weight: 500; }
[dir="rtl"] .dropdown a { font-weight: 500; font-size: .95rem; }
[dir="rtl"] .toplinks a, [dir="rtl"] .lang-btn { font-weight: 500; font-size: .85rem; }
[dir="rtl"] .btn { font-weight: 600; font-size: .95rem; }
[dir="rtl"] .drawer-list > li > a, [dir="rtl"] .acc-toggle { font-weight: 600; font-size: 1.05rem; }
[dir="rtl"] .acc a, [dir="rtl"] .drawer-extra a { font-weight: 500; }
[dir="rtl"] .footer-h { font-size: .95rem; font-weight: 700; }
[dir="rtl"] .footer-links a { font-weight: 500; }
[dir="rtl"] .contact-list li { font-weight: 500; line-height: 1.9; }
[dir="rtl"] .field label { font-weight: 600; font-size: .95rem; }
[dir="rtl"] .hero-tab-label { font-size: .88rem; font-weight: 500; }
[dir="rtl"] .side-links a { font-weight: 500; font-size: .98rem; line-height: 1.6; }
[dir="rtl"] .gallery-head h2 { font-weight: 700; }
[dir="rtl"] .copyright-strip .copyright { font-size: .9rem; }
/* Comfortable line length for long text */
.page-body > .entry:not(.entry-feature) .prose, .entry-full .prose { max-width: 74ch; }
[dir="rtl"] .page-body > .entry:not(.entry-feature) .prose, [dir="rtl"] .entry-full .prose { max-width: 68ch; }
.page-body > .entry:not(.entry-feature) .entry-title { max-width: 30ch; }

/* Language switch lives in one place: the header pill (desktop and mobile). The top bar holds the old quick links only. */
@media (max-width: 899px) { .topbar { display: none; } .site-header { top: 0; } }
.pill-lang { gap: 8px; }

/* Desktop: sub-menus open on mouse hover (and keyboard focus); click still works */
@media (min-width: 1180px) and (hover: hover) {
  .nav-list .has-sub:hover > .sub, .nav-list .has-sub:focus-within > .sub { display: block; animation: drop .35s var(--ease); }
  .nav-list .has-sub:hover > .sub-toggle .ic { transform: rotate(180deg); }
  .nav-list .has-sub:hover > .sub-toggle { color: var(--sand-100); background: rgb(255 255 255 / .1); }
  .is-stuck .nav-list .has-sub:hover > .sub-toggle { background: #fff; color: var(--burgundy-700); }
  /* invisible bridge so the menu stays open while the mouse moves down to it */
  .nav-list .sub::before { content: ""; position: absolute; inset-inline: 0; top: -16px; height: 16px; }
}

/* Paragraphs justified (last line aligned to the start), English and Arabic */
.prose p, .prose li, .card-text, .entry .prose p { text-align: justify !important; text-align-last: start; text-justify: inter-word; }
[lang="en"] .prose p, [lang="en"] .card-text { hyphens: auto; -webkit-hyphens: auto; }
.prose p:has(> u:only-child > strong:only-child), .prose p:has(> strong:only-child > u:only-child),
.page-contact .page-body .prose p, .contact-list li { text-align: start !important; }
