/* Qalam CMS — public site styles.
 * Theme colours come from /theme.css: --brand (primary), --accent (highlights, calls to action), --dark (header bar, footer, text on light).
 */
/* Self-hosted copies of Cairo (Arabic) and Inter (English) from Google Fonts (SIL OFL, assets/fonts/*/OFL.txt).
 * Named "… Self" so that the Google Fonts service, when switched on (Settings → Branding), provides "Cairo"/"Inter"
 * and these files are the fallback. */
@font-face { font-family: "Cairo Self"; font-style: normal; font-display: swap; font-weight: 200 1000; src: url(../fonts/cairo/cairo-arabic-wght-normal.woff2) format("woff2"); unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC,U+102E0-102FB,U+10E60-10E7E,U+10EC2-10EC4,U+10EFC-10EFF,U+1EE00-1EE03,U+1EE05-1EE1F,U+1EE21-1EE22,U+1EE24,U+1EE27,U+1EE29-1EE32,U+1EE34-1EE37,U+1EE39,U+1EE3B,U+1EE42,U+1EE47,U+1EE49,U+1EE4B,U+1EE4D-1EE4F,U+1EE51-1EE52,U+1EE54,U+1EE57,U+1EE59,U+1EE5B,U+1EE5D,U+1EE5F,U+1EE61-1EE62,U+1EE64,U+1EE67-1EE6A,U+1EE6C-1EE72,U+1EE74-1EE77,U+1EE79-1EE7C,U+1EE7E,U+1EE80-1EE89,U+1EE8B-1EE9B,U+1EEA1-1EEA3,U+1EEA5-1EEA9,U+1EEAB-1EEBB,U+1EEF0-1EEF1; }
@font-face { font-family: "Cairo Self"; font-style: normal; font-display: swap; font-weight: 200 1000; src: url(../fonts/cairo/cairo-latin-ext-wght-normal.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Cairo Self"; font-style: normal; font-display: swap; font-weight: 200 1000; src: url(../fonts/cairo/cairo-latin-wght-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Inter Self"; font-style: normal; font-display: swap; font-weight: 100 900; src: url(../fonts/inter/inter-latin-ext-wght-normal.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Inter Self"; font-style: normal; font-display: swap; font-weight: 100 900; src: url(../fonts/inter/inter-latin-wght-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  --brand: #0b5394;
  --accent: #c8102e;
  --dark: #1b2430;
  --brand-dark: color-mix(in srgb, var(--brand) 78%, #000);
  --brand-light: color-mix(in srgb, var(--brand) 70%, #fff);
  --brand-soft: color-mix(in srgb, var(--brand) 9%, #fff);
  --brand-softer: color-mix(in srgb, var(--brand) 4%, #fff);
  --accent-dark: color-mix(in srgb, var(--accent) 82%, #000);
  --on-accent: #fff;           /* text on accent backgrounds (theme.css: dark for light accents such as gold) */
  --accent-ink: var(--accent); /* accent-coloured text on white (theme.css: darkened when needed) */
  --ink: color-mix(in srgb, var(--dark) 92%, #000);
  --muted: #59606b;
  --line: #e4e7eb;
  --radius: .9rem;
  --shadow: 0 .5rem 1.5rem rgba(16, 24, 32, .08);
  --shadow-lg: 0 1rem 2.5rem rgba(16, 24, 32, .12);
  --font-ar: "Cairo", "Cairo Self", "Segoe UI", Tahoma, "Noto Sans Arabic", "Geeza Pro", Arial, sans-serif;
  --font-en: "Inter", "Inter Self", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
html[lang="ar"] body { font-family: var(--font-ar); line-height: 1.8; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] .h1, html[lang="ar"] .h2, html[lang="ar"] .h3, html[lang="ar"] .display-6 { letter-spacing: 0; line-height: 1.45; }
html[lang="en"] body { font-family: var(--font-en); line-height: 1.65; }
body.site-body { color: var(--ink); background: #fff; }
a { color: var(--brand-dark); text-underline-offset: .18em; }
a:hover { color: var(--brand); }
:focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; }
.skip-link:focus { position: fixed; top: .5rem; inset-inline-start: .5rem; z-index: 2000; background: #fff; padding: .5rem 1rem; border-radius: .5rem; box-shadow: var(--shadow); }
h1, h2, h3, .h1, .h2, .h3 { color: var(--ink); letter-spacing: -.01em; }

/* Buttons */
.btn { border-radius: .6rem; font-weight: 600; }
.btn-primary { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand-dark); --bs-btn-hover-border-color: var(--brand-dark); --bs-btn-active-bg: var(--brand-dark); --bs-btn-active-border-color: var(--brand-dark); --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand); }
.btn-outline-primary { --bs-btn-color: var(--brand-dark); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand); --bs-btn-active-bg: var(--brand-dark); }
.btn-accent { --bs-btn-color: var(--on-accent); --bs-btn-bg: var(--accent); --bs-btn-border-color: var(--accent); --bs-btn-hover-color: var(--on-accent); --bs-btn-hover-bg: var(--accent-dark); --bs-btn-hover-border-color: var(--accent-dark); --bs-btn-active-color: var(--on-accent); --bs-btn-active-bg: var(--accent-dark); --bs-btn-focus-shadow-rgb: 200, 16, 46; }
.btn-ghost-light { --bs-btn-color: #fff; --bs-btn-border-color: rgba(255,255,255,.7); --bs-btn-hover-color: var(--dark); --bs-btn-hover-bg: #fff; --bs-btn-hover-border-color: #fff; }
.text-primary { color: var(--brand-dark) !important; }
.text-accent { color: var(--accent-ink) !important; }
.badge.text-bg-primary { background-color: var(--brand) !important; }
.nav-pills .nav-link.active { background: var(--brand); }
.pagination { --bs-pagination-active-bg: var(--brand); --bs-pagination-active-border-color: var(--brand); --bs-pagination-color: var(--brand-dark); }
.form-control:focus, .form-select:focus { border-color: var(--brand-light); box-shadow: 0 0 0 .25rem color-mix(in srgb, var(--brand) 22%, transparent); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }

/* Header */
.site-topbar { background: var(--dark); color: #e9ecef; font-size: .85rem; }
.site-topbar a { color: #fff; text-decoration: none; }
.site-topbar a:hover { color: #fff; text-decoration: underline; }
.site-topbar .bi { color: var(--brand-light); }
.site-topbar .topbar-social a { opacity: .85; }
.site-navbar { background: #fff; border-bottom: 1px solid var(--line); padding-block: .55rem; }
.site-header.is-stuck .site-navbar { box-shadow: 0 6px 18px rgba(0,0,0,.06); }
.site-navbar .nav-link { font-weight: 600; color: var(--ink); white-space: nowrap; padding: .55rem .7rem !important; border-radius: .5rem; position: relative; }
.site-navbar .nav-link:hover, .site-navbar .nav-link:focus { color: var(--brand-dark); background: var(--brand-softer); }
.site-navbar .nav-link.active { color: var(--brand-dark); }
@media (min-width: 992px) {
  .site-navbar .nav-link.active::after { content: ""; position: absolute; inset-inline: .8rem; bottom: .1rem; height: 3px; border-radius: 3px; background: var(--accent); }
}
.site-navbar .dropdown-menu { border: 1px solid var(--line); border-radius: .75rem; box-shadow: var(--shadow-lg); padding: .4rem; min-width: 15rem; border-top: 3px solid var(--brand); }
.site-navbar .dropdown-item { border-radius: .45rem; padding: .45rem .8rem; white-space: normal; }
.site-navbar .dropdown-item:hover, .site-navbar .dropdown-item:focus { background: var(--brand-soft); color: var(--brand-dark); }
.site-navbar .dropdown-item.active, .site-navbar .dropdown-item:active { background: var(--brand); color: #fff; }
.site-logo { height: 56px; width: auto; max-width: 240px; }
.brand-icon { font-size: 2rem; color: var(--brand); }
.brand-name { font-weight: 700; color: var(--ink); }
.site-search .form-control { min-width: 11rem; border-radius: .6rem; }
.site-search .btn { border-radius: .6rem; }
.btn-apply { white-space: nowrap; }

/* Hero */
.hero { position: relative; color: #fff; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(60rem 30rem at 85% -10%, color-mix(in srgb, var(--brand) 55%, transparent), transparent 60%),
    radial-gradient(40rem 25rem at -10% 110%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%),
    linear-gradient(135deg, var(--dark) 0%, color-mix(in srgb, var(--dark) 55%, var(--brand)) 55%, var(--brand-dark) 100%); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .08;
  background-image: radial-gradient(#fff 1px, transparent 1px); background-size: 22px 22px; }
.hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .22; z-index: -2; }
.hero-content { min-height: 26rem; display: flex; flex-direction: column; justify-content: center; padding-block: 4rem 3rem; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; font-size: .9rem; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 2rem; padding: .3rem .9rem; margin-bottom: 1.25rem; align-self: flex-start; }
.hero-eyebrow .dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent); }
.hero h1 { color: #fff; font-weight: 800; max-width: 22ch; line-height: 1.15; }
html[lang="ar"] .hero h1 { line-height: 1.35; }
.hero .lead { color: rgba(255,255,255,.88); max-width: 60ch; font-size: 1.2rem; }
.hero-stats { position: relative; margin-top: -3rem; z-index: 2; }
.stat-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 1.25rem 1rem; text-align: center; height: 100%; border-bottom: 4px solid var(--brand); }
.stat-card:nth-child(even) { border-bottom-color: var(--accent); }
.stat-value { display: block; font-size: 1.85rem; font-weight: 800; color: var(--brand-dark); line-height: 1.1; }
.stat-label { display: block; color: var(--muted); font-size: .95rem; margin-top: .35rem; }

/* Sections */
.section { padding-block: 4.5rem; }
.section-alt { background: var(--brand-softer); border-block: 1px solid color-mix(in srgb, var(--brand) 10%, #fff); }
.eyebrow { display: block; color: var(--accent-ink); font-weight: 700; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .4rem; }
html[lang="ar"] .eyebrow { letter-spacing: 0; font-size: .95rem; }
.section-title { font-weight: 800; position: relative; padding-bottom: .7rem; margin-bottom: 1rem; }
.section-title::after { content: ""; position: absolute; bottom: 0; inset-inline-start: 0; width: 3.25rem; height: 4px; background: linear-gradient(90deg, var(--brand) 60%, var(--accent) 60%); border-radius: 2px; }
.text-center .section-title::after, .section-title.text-center::after { inset-inline-start: 50%; transform: translateX(-50%); }
html[dir="rtl"] .text-center .section-title::after { transform: translateX(50%); }
.section-intro { color: var(--muted); max-width: 60ch; font-size: 1.08rem; }
.text-center .section-intro { margin-inline: auto; }

/* Welcome block */
.welcome-card { position: relative; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 2rem; border-inline-start: 5px solid var(--brand); }
.welcome-card .quote-icon { position: absolute; top: -1.2rem; inset-inline-end: 1.5rem; width: 3rem; height: 3rem; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-size: 1.4rem; }
.welcome-media img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; height: auto; object-fit: cover; }
.welcome-points li { display: flex; gap: .6rem; margin-bottom: .55rem; }
.welcome-points .bi { color: var(--brand); flex: 0 0 auto; margin-top: .15rem; }

/* Cards */
.feature-card { display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease; text-decoration: none; color: inherit; }
.feature-card:hover, .feature-card:focus-visible { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: color-mix(in srgb, var(--brand) 35%, #fff); color: inherit; }
.feature-icon { width: 3.25rem; height: 3.25rem; border-radius: .9rem; display: grid; place-items: center; font-size: 1.5rem; background: var(--brand-soft); color: var(--brand-dark); margin-bottom: 1rem; }
.feature-card.feature-alt .feature-icon { background: color-mix(in srgb, var(--accent) 10%, #fff); color: var(--accent-ink); }
.feature-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: .5rem; }
.feature-card p { color: var(--muted); margin-bottom: 1rem; }
.feature-card .more { margin-top: auto; font-weight: 600; color: var(--brand-dark); }
.feature-media { margin: -1.6rem -1.6rem 1.2rem; border-radius: var(--radius) var(--radius) 0 0; aspect-ratio: 16 / 9; object-fit: cover; width: calc(100% + 3.2rem); }
.news-card, .staff-card, .fb-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .2s ease, transform .2s ease; }
.news-card:hover, .staff-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.news-card .card-img-top, .fb-card .card-img-top { aspect-ratio: 16 / 9; object-fit: cover; }
.news-card-placeholder { aspect-ratio: 16 / 9; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-size: 2.5rem; }
.news-card .card-title a { color: var(--ink); text-decoration: none; }
.news-card .card-title a:hover { color: var(--brand-dark); }
.fb-message { white-space: normal; overflow-wrap: anywhere; }
.staff-card { text-align: center; padding: 1.75rem 1rem 1.4rem; height: 100%; background: #fff; display: flex; flex-direction: column; align-items: center; border-top: 4px solid var(--brand); }
.staff-card a { text-decoration: none; }
.staff-card .staff-name { color: var(--ink); font-weight: 700; font-size: 1.02rem; margin-bottom: .2rem; }
.staff-card .staff-position { color: var(--brand); font-weight: 600; font-size: .9rem; line-height: 1.45; }
.staff-dept { display: inline-block; margin-top: auto; padding: .28rem .75rem; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-size: .76rem; font-weight: 700; letter-spacing: .02em; }
.staff-card .staff-position + .staff-dept { margin-top: .75rem; }
.staff-card .staff-dept { position: relative; }
.staff-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.staff-search { position: relative; display: flex; gap: .5rem; flex: 1 1 22rem; max-width: 34rem; }
.staff-search .bi-search { position: absolute; inset-inline-start: .9rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.staff-search .form-control { padding-inline-start: 2.4rem; }
.staff-count { color: var(--muted); font-weight: 600; }
.dept-filter { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.dept-chip { display: inline-flex; align-items: center; gap: .45rem; padding: .42rem .9rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: .88rem; font-weight: 600; text-decoration: none; transition: background .15s ease, border-color .15s ease, color .15s ease; }
.dept-chip span { display: inline-grid; place-items: center; min-width: 1.5rem; height: 1.5rem; padding: 0 .35rem; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-size: .75rem; }
.dept-chip:hover, .dept-chip:focus-visible { border-color: var(--brand); color: var(--brand-dark); }
.dept-chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.dept-chip.active span { background: rgba(255, 255, 255, .2); color: #fff; }
.staff-photo { width: 128px; height: 128px; border-radius: 50%; overflow: hidden; background: var(--brand-soft); display: grid; place-items: center; color: var(--brand); font-size: 4rem; margin-inline: auto; box-shadow: 0 0 0 4px #fff, 0 0 0 6px color-mix(in srgb, var(--brand) 35%, #fff); }
.staff-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.staff-photo-lg { width: 220px; height: 220px; font-size: 7rem; }
.dept-heading { display: flex; align-items: center; gap: .75rem; margin: 2.5rem 0 1.25rem; }
.dept-heading::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.dept-heading h2 { font-size: 1.25rem; font-weight: 700; margin: 0; }

/* Call to action band */
.cta-band { background: linear-gradient(120deg, var(--brand-dark), var(--brand)); color: #fff; border-radius: calc(var(--radius) * 1.5); padding: 2.75rem; position: relative; overflow: hidden; }
.cta-band::before { content: ""; position: absolute; width: 18rem; height: 18rem; border-radius: 50%; inset-inline-end: -5rem; top: -7rem; background: rgba(255,255,255,.08); }
.cta-band h2 { color: #fff; font-weight: 800; }
.cta-band p { color: rgba(255,255,255,.9); max-width: 55ch; }

/* Inner page header */
.page-hero { background: linear-gradient(135deg, var(--brand-softer), color-mix(in srgb, var(--brand) 12%, #fff)); border-bottom: 1px solid color-mix(in srgb, var(--brand) 14%, #fff); padding-block: 2.25rem 2rem; position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; inset-inline-end: -4rem; top: -4rem; width: 14rem; height: 14rem; border-radius: 50%; border: 28px solid color-mix(in srgb, var(--brand) 10%, transparent); }
.page-hero .breadcrumb { --bs-breadcrumb-divider-color: var(--muted); margin-bottom: .6rem; font-size: .9rem; }
.page-hero .breadcrumb a { color: var(--brand-dark); text-decoration: none; }
.page-hero h1 { font-weight: 800; margin: 0; }
.page-hero .lead { color: var(--muted); margin: .6rem 0 0; max-width: 70ch; }

/* Content */
.content-body { font-size: 1.06rem; overflow-wrap: break-word; max-width: 78ch; }
.content-body > p:first-child { font-size: 1.15rem; color: color-mix(in srgb, var(--ink) 85%, #fff); }
.content-body img { max-width: 100%; height: auto; border-radius: .6rem; }
.content-body iframe { max-width: 100%; aspect-ratio: 16 / 9; width: 100%; height: auto; border: 0; border-radius: .6rem; }
.content-body blockquote { border-inline-start: 4px solid var(--accent); background: var(--brand-softer); padding: 1rem 1.25rem; border-radius: .5rem; color: var(--ink); font-size: 1.1rem; }
.content-body h2 { margin-top: 2.25rem; font-size: 1.5rem; font-weight: 800; color: var(--ink); }
.content-body h3 { margin-top: 1.75rem; font-size: 1.2rem; font-weight: 700; color: var(--brand-dark); }
.content-body ul { list-style: none; padding-inline-start: 0; }
.content-body ul > li { position: relative; padding-inline-start: 1.75rem; margin-bottom: .55rem; }
.content-body ul > li::before { content: ""; position: absolute; inset-inline-start: .2rem; top: .62em; width: .55rem; height: .55rem; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.content-body ul ul > li::before { background: var(--accent); box-shadow: none; width: .4rem; height: .4rem; }
.content-body ol > li { margin-bottom: .45rem; }
.content-body strong { color: var(--ink); }
.content-body table { width: 100%; margin-bottom: 1.25rem; border-collapse: collapse; }
.content-body th, .content-body td { border: 1px solid var(--line); padding: .6rem .8rem; vertical-align: top; }
.content-body th { background: var(--brand-soft); }
.content-body hr { margin-block: 2rem; opacity: .15; }
.content-body .signature { font-weight: 700; color: var(--brand-dark); }
.featured-image { width: 100%; height: auto; }
.section-nav { border: 0; border-radius: var(--radius); box-shadow: var(--shadow); border-top: 4px solid var(--brand); position: sticky; top: 1rem; }
.section-nav h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: .75rem; }
.section-nav a { display: block; padding: .45rem .7rem; border-radius: .5rem; color: var(--ink); text-decoration: none; font-weight: 500; }
.section-nav a:hover { background: var(--brand-softer); color: var(--brand-dark); }
.section-nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; border-inline-start: 3px solid var(--brand); }
.aside-cta { border-radius: var(--radius); background: var(--dark); color: #fff; padding: 1.4rem; }
.aside-cta h2 { color: #fff; font-size: 1.1rem; }
.aside-cta p { color: rgba(255,255,255,.8); font-size: .95rem; }
.hp-field { position: absolute; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-list li { display: flex; gap: .8rem; align-items: flex-start; margin-bottom: 1rem; }
.contact-list .icon { flex: 0 0 2.5rem; height: 2.5rem; border-radius: .7rem; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-dark); }
.contact-list .label { display: block; font-size: .85rem; color: var(--muted); }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 2rem; }
.form-section-title { font-size: 1.05rem; font-weight: 700; color: var(--brand-dark); border-bottom: 1px solid var(--line); padding-bottom: .5rem; margin: 1.5rem 0 1rem; }
.form-section-title:first-of-type { margin-top: 0; }

/* Footer */
.site-footer { background: var(--dark); color: rgba(255,255,255,.75); border-top: 5px solid var(--brand); position: relative; }
.site-footer::before { content: ""; position: absolute; top: -5px; inset-inline-start: 0; width: 30%; height: 5px; background: var(--accent); }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--brand-light); text-decoration: underline; }
.site-footer .footer-title { color: #fff; font-weight: 700; font-size: 1.05rem; margin-bottom: 1rem; }
.footer-brand { color: #fff; font-weight: 800; font-size: 1.25rem; }
.footer-links li { margin-bottom: .55rem; }
.footer-links a::before { content: "›"; color: var(--brand-light); margin-inline-end: .45rem; }
html[dir="rtl"] .footer-links a::before { content: "‹"; }
.footer-contact li { display: flex; gap: .6rem; margin-bottom: .6rem; }
.footer-contact .bi { color: var(--brand-light); margin-top: .2rem; }
.social-links a { display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: rgba(255,255,255,.08); font-size: 1.1rem; }
.social-links a:hover { background: var(--brand); text-decoration: none; color: #fff; }
.footer-bottom { background: color-mix(in srgb, var(--dark) 80%, #000); color: rgba(255,255,255,.6); }
.footer-bottom a { color: rgba(255,255,255,.85); }
.error-page { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; }

@media (max-width: 991.98px) {
  .site-search { width: 100%; }
  .site-search .form-control { min-width: 0; }
  .hero-content { min-height: 20rem; padding-block: 3rem 4.5rem; }
  .site-logo { height: 44px; }
  .section { padding-block: 3.25rem; }
  .cta-band { padding: 2rem 1.5rem; }
  .section-nav { position: static; }
}
@media (max-width: 575.98px) {
  .hero .lead { font-size: 1.05rem; }
  .stat-value { font-size: 1.5rem; }
  .form-card { padding: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .share, .skip-link, .section-nav, .aside-cta { display: none !important; }
  .page-hero { background: none; border: 0; }
}

/* Social Feed: Facebook Page posts (synchronised cards or Meta's Page Plugin) */
.fb-icon { color: #1877f2; }
.lead-sm { font-size: 1.1rem; color: var(--muted, #5b6470); line-height: 1.7; }
.fb-embed iframe { display: block; width: 100%; max-width: 500px; border: 0; margin-inline: auto; background: #fff; }
.fb-embed.is-loaded .btn, .fb-embed.is-loaded .fb-embed-loading { display: none; }
@media (max-width: 991.98px) { .social-feed-intro { position: static; } }

/* Social Feed — masonry wall of Facebook posts.
   Without JavaScript the cards form a regular grid; site.js turns it into a masonry layout
   (CSS grid with small rows and a measured row span per card, keeping newest-first reading order). */
.feed-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 2rem; }
.feed-header .section-title { margin-bottom: .75rem; }
.feed-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.feed-grid { --feed-gap: 1.5rem; display: grid; grid-template-columns: 1fr; gap: var(--feed-gap); align-items: start; }
@media (min-width: 576px) { .feed-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 992px) { .feed-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1400px) { .feed-grid.feed-grid-wide { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.feed-grid.is-masonry { grid-auto-rows: 4px; row-gap: 0; }
.feed-grid.is-masonry .feed-item { padding-bottom: var(--feed-gap); }
.feed-item { min-width: 0; }
.feed-item.is-new { animation: feed-in .45s ease both; }
@keyframes feed-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .feed-item.is-new { animation: none; } .feed-card, .feed-media img { transition: none !important; } }

.feed-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 2px rgba(16, 24, 32, .04); transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease; }
.feed-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: color-mix(in srgb, var(--brand) 25%, var(--line)); }
.feed-media { display: block; position: relative; background: var(--brand-softer); overflow: hidden; }
.feed-media img { display: block; width: 100%; height: auto; transition: transform .5s ease; }
.feed-card:hover .feed-media img { transform: scale(1.03); }
.feed-play { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); width: 3.5rem; height: 3.5rem; border-radius: 50%; display: grid; place-items: center; background: rgba(22, 23, 29, .72); color: #fff; font-size: 1.9rem; box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .3); }
.feed-body { padding: 1rem 1.15rem .4rem; }
.feed-head { display: flex; align-items: center; gap: .65rem; margin-bottom: .7rem; }
.feed-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: contain; background: #fff; border: 1px solid var(--line); padding: 2px; flex: none; }
.feed-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.feed-author { font-weight: 700; color: var(--ink); font-size: .92rem; overflow-wrap: anywhere; }
.feed-date { color: var(--muted); font-size: .8rem; }
.feed-source { margin-inline-start: auto; color: #1877f2; font-size: 1.15rem; }
.feed-text { color: var(--ink); font-size: .96rem; line-height: 1.65; overflow-wrap: anywhere; margin-bottom: .6rem; }
.feed-text.is-clamped { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; line-clamp: 6; overflow: hidden; }
.feed-text a { color: var(--brand-dark); font-weight: 600; text-decoration: none; }
.feed-text a:hover, .feed-text a:focus-visible { text-decoration: underline; }
.feed-toggle { border: 0; background: none; padding: 0; margin: -.2rem 0 .6rem; color: var(--muted); font-weight: 600; font-size: .9rem; }
.feed-toggle:hover, .feed-toggle:focus-visible { color: var(--brand-dark); text-decoration: underline; }
.feed-foot { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; padding: .7rem 1.15rem; border-top: 1px solid var(--line); background: var(--brand-softer); font-size: .875rem; }
.feed-foot a { color: var(--brand-dark); font-weight: 600; text-decoration: none; }
.feed-foot a:hover, .feed-foot a:focus-visible { text-decoration: underline; }
.feed-load-more { min-width: 14rem; }
.feed-load-more.is-loading { pointer-events: none; opacity: .7; }
.section-alt .feed-card { box-shadow: var(--shadow); }

/* News & Activities page */
.news-hero { padding-block: 2.5rem 2.75rem; }
.news-hero .lead { font-size: 1.15rem; line-height: 1.75; }
.news-hero-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem; }
.news-highlights { padding-block: 3rem; }
.highlight-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem 1.5rem; position: relative; overflow: hidden; transition: box-shadow .25s ease, transform .25s ease; }
.highlight-card::before { content: ""; position: absolute; inset-block-start: 0; inset-inline: 0; height: 4px; background: linear-gradient(90deg, var(--brand), var(--brand-light)); }
.col-md-4:nth-child(2) .highlight-card::before { background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #fff)); }
.col-md-4:nth-child(3) .highlight-card::before { background: linear-gradient(90deg, var(--dark), color-mix(in srgb, var(--dark) 55%, #fff)); }
.highlight-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.highlight-card h2 { font-weight: 800; margin-bottom: .6rem; }
.highlight-card p { color: var(--muted); line-height: 1.75; }
.highlight-icon { display: inline-grid; place-items: center; width: 3rem; height: 3rem; border-radius: .8rem; background: var(--brand-soft); color: var(--brand-dark); font-size: 1.35rem; margin-bottom: 1rem; }
.col-md-4:nth-child(2) .highlight-icon { background: color-mix(in srgb, var(--accent) 10%, #fff); color: var(--accent-ink); }
.col-md-4:nth-child(3) .highlight-icon { background: color-mix(in srgb, var(--dark) 8%, #fff); color: var(--dark); }

/* Live Facebook feed (Meta Page Plugin) */

.follow-card { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow); }
.follow-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: contain; border: 1px solid var(--line); padding: 3px; background: #fff; flex: none; }
.follow-meta { display: flex; flex-direction: column; min-width: 0; flex: 1 1 12rem; line-height: 1.35; }
.follow-name { font-weight: 800; color: var(--ink); }
.follow-name .bi { color: #1877f2; font-size: .9em; }
.follow-handle { color: var(--muted); font-size: .9rem; }
.follow-handle .bi { color: #1877f2; }
.follow-actions { flex: none; }
.social-feed-frame { background: #fff; border: 1px solid var(--line); border-radius: calc(var(--radius) + .2rem); box-shadow: var(--shadow-lg); overflow: hidden; max-width: 502px; margin-inline: auto; }
@media (min-width: 992px) { .social-feed-frame { margin-inline: auto 0; } }
.feed-frame-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 1rem; border-bottom: 1px solid var(--line); background: var(--brand-softer); font-size: .85rem; }
.feed-frame-title { color: var(--ink); font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-frame-title .bi { color: #1877f2; }
.feed-live { display: inline-flex; align-items: center; gap: .4rem; color: var(--accent-ink); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; }
html[lang="ar"] .feed-live { letter-spacing: 0; font-size: .8rem; }
.feed-live-dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 50%, transparent); animation: feed-pulse 1.8s ease-out infinite; }
@keyframes feed-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 50%, transparent); } 100% { box-shadow: 0 0 0 .55rem transparent; } }
.fb-embed { min-height: 140px; display: flex; flex-direction: column; justify-content: center; }
.fb-embed iframe { border-radius: 0; }
.fb-embed-loading { display: flex; flex-direction: column; align-items: center; gap: 1rem; margin: 0; padding: 2.5rem 1.5rem; color: var(--muted); }
.feed-skeleton { display: grid; gap: .6rem; width: 100%; }
.feed-skeleton span { display: block; height: .8rem; border-radius: .4rem; background: linear-gradient(90deg, #eef1f3 25%, #f7f9fa 50%, #eef1f3 75%); background-size: 200% 100%; animation: feed-shimmer 1.4s linear infinite; }
.feed-skeleton span:first-child { height: 9rem; border-radius: .6rem; }
.feed-skeleton span:last-child { width: 60%; }
@keyframes feed-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .feed-live-dot, .feed-skeleton span { animation: none; } }
@media (max-width: 991.98px) { .social-feed-intro { position: static; } }
.fb-embed.is-loaded > .p-3 { display: none; }

.feed-highlights { list-style: none; padding: 0; margin: 1.75rem 0 0; display: grid; gap: 1.1rem; }
.feed-highlights li { display: flex; gap: 1rem; align-items: flex-start; }
.feed-highlights .highlight-icon { margin: 0; flex: none; width: 2.6rem; height: 2.6rem; font-size: 1.15rem; }
.feed-highlights li:nth-child(2) .highlight-icon { background: color-mix(in srgb, var(--accent) 10%, #fff); color: var(--accent-ink); }
.feed-highlights li:nth-child(3) .highlight-icon { background: color-mix(in srgb, var(--dark) 8%, #fff); color: var(--dark); }
.feed-highlights h3 { font-weight: 800; margin: .15rem 0 .3rem; }
.feed-highlights p { color: var(--muted); line-height: 1.7; margin: 0; font-size: .95rem; }

/* Live feed layout: intro + highlights beside the feed on desktop; on phones the feed follows the intro. */
.social-feed { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro" "live" "extra"; }
.social-feed-intro { grid-area: intro; }
.social-feed-live { grid-area: live; }
.social-feed-extra { grid-area: extra; }
.social-feed-extra .feed-highlights { margin-top: 0; }
@media (min-width: 992px) {
  .social-feed { grid-template-columns: minmax(0, 1fr) minmax(0, 502px); grid-template-rows: auto 1fr; grid-template-areas: "intro live" "extra live"; column-gap: clamp(2.5rem, 6vw, 6rem); row-gap: 1.75rem; align-items: start; }
}
main:has(> .section-alt:last-child) + .site-footer { margin-top: 0 !important; }

/* Admission form: date of birth as day / month / year drop-downs */
.dob-field legend { float: none; width: auto; }
.dob-selects { display: grid; grid-template-columns: minmax(4.75rem, 1fr) minmax(7.5rem, 2fr) minmax(5.75rem, 1.3fr); gap: .5rem; }
.dob-selects .form-select { padding-inline: .6rem 1.9rem; }

/* ===== 1.9 design refresh ===================================================== */
:root {
  --on-dark: color-mix(in srgb, var(--brand) 30%, #fff);      /* icons/links on navy backgrounds */
  --shadow-sm: 0 1px 2px rgba(16, 24, 32, .05), 0 1px 3px rgba(16, 24, 32, .06);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
body.site-body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] .display-4, html[lang="en"] .display-6 { letter-spacing: -.022em; }
html[lang="ar"] body { font-feature-settings: "kern"; }
html[lang="ar"] .btn, html[lang="ar"] .nav-link, html[lang="ar"] .dropdown-item { font-weight: 700; }
::selection { background: color-mix(in srgb, var(--brand) 22%, #fff); }

/* Contrast on dark backgrounds */
.site-topbar .bi, .site-footer .bi, .footer-contact .bi, .footer-links a::before { color: var(--on-dark); }
.site-footer a:hover { color: var(--on-dark); }

/* Buttons */
.btn { transition: background-color .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease); }
.btn-primary, .btn-accent { box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--brand) 70%, transparent); }
.btn-accent { box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--accent) 80%, transparent); }
.btn-primary:hover, .btn-accent:hover { transform: translateY(-1px); }
.btn .bi-arrow-right, .btn .bi-arrow-left, .more .bi { transition: transform .2s var(--ease); display: inline-block; }
.btn:hover .bi-arrow-right, a:hover > .more .bi-arrow-right, .feature-card:hover .more .bi-arrow-right { transform: translateX(3px); }
.btn:hover .bi-arrow-left, a:hover > .more .bi-arrow-left, .feature-card:hover .more .bi-arrow-left { transform: translateX(-3px); }

/* Header */
.site-header { position: relative; z-index: 1030; } /* keeps drop-down menus above the hero and page header */
.site-navbar .nav-link { transition: color .15s ease, background-color .15s ease; }

/* Home hero with quick-access panel */
.hero-content { min-height: 30rem; }
.hero .lead { line-height: 1.75; }
.hero-panel { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); border-radius: 1.2rem; padding: 1.4rem; backdrop-filter: blur(10px); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .55); }
.hero-panel-title { color: #fff; font-weight: 700; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .9rem; opacity: .9; }
html[lang="ar"] .hero-panel-title { letter-spacing: 0; font-size: .95rem; }
.hero-panel li + li { margin-top: .55rem; }
.hero-panel ul a { display: flex; align-items: center; gap: .9rem; padding: .8rem .9rem; border-radius: .9rem; background: rgba(255, 255, 255, .95); color: var(--ink); text-decoration: none; transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s; }
.hero-panel ul a:hover, .hero-panel ul a:focus-visible { transform: translateX(4px); box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .5); background: #fff; color: var(--ink); }
html[dir="rtl"] .hero-panel ul a:hover, html[dir="rtl"] .hero-panel ul a:focus-visible { transform: translateX(-4px); }
.hp-icon { flex: none; width: 2.6rem; height: 2.6rem; border-radius: .75rem; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-dark); font-size: 1.2rem; }
.hero-panel li:nth-child(even) .hp-icon { background: color-mix(in srgb, var(--accent) 10%, #fff); color: var(--accent-ink); }
.hp-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.hp-text strong { font-size: .98rem; }
.hp-text small { color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-go { margin-inline-start: auto; color: var(--brand); }
.hero-panel-foot { margin-top: 1rem; color: rgba(255, 255, 255, .8); font-size: .9rem; }
.hero-panel-foot a { color: #fff; font-weight: 700; text-decoration: none; }
.hero-panel-foot .bi { color: var(--on-dark); }

/* Stats */
.stat-card { transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.stat-card:hover { transform: translateY(-3px); }
.stat-value { font-size: 2.1rem; letter-spacing: -.02em; background: linear-gradient(135deg, var(--brand-dark), var(--brand)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Inner page header: navy, consistent with the home hero */
.page-hero { color: #fff; border-bottom: 0; padding-block: 3rem 2.75rem; isolation: isolate;
  background:
    radial-gradient(40rem 20rem at 90% -20%, color-mix(in srgb, var(--brand) 60%, transparent), transparent 60%),
    linear-gradient(135deg, var(--dark) 0%, color-mix(in srgb, var(--dark) 45%, var(--brand)) 100%); }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .07; background-image: radial-gradient(#fff 1px, transparent 1px); background-size: 22px 22px; }
.page-hero::after { border-color: rgba(255, 255, 255, .06); }
.page-hero h1 { color: #fff; }
.page-hero .lead { color: rgba(255, 255, 255, .82); }
.page-hero .eyebrow { color: color-mix(in srgb, var(--accent) 45%, #fff); }
.page-hero .breadcrumb { --bs-breadcrumb-divider-color: rgba(255, 255, 255, .45); }
.page-hero .breadcrumb-item, .page-hero .breadcrumb-item.active { color: rgba(255, 255, 255, .7); }
.page-hero .breadcrumb a { color: #fff; }
.page-hero .breadcrumb a:hover { text-decoration: underline; }
.page-hero .btn-outline-primary { --bs-btn-color: #fff; --bs-btn-border-color: rgba(255, 255, 255, .6); --bs-btn-hover-bg: #fff; --bs-btn-hover-color: var(--dark); --bs-btn-hover-border-color: #fff; }
.page-hero .btn-primary { --bs-btn-color: var(--on-accent); --bs-btn-hover-color: var(--on-accent); --bs-btn-bg: var(--accent); --bs-btn-border-color: var(--accent); --bs-btn-hover-bg: var(--accent-dark); --bs-btn-hover-border-color: var(--accent-dark); }

/* Cards */
.feature-card { box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.feature-card::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--brand), var(--brand-light)); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
html[dir="rtl"] .feature-card::before { transform-origin: right; }
.feature-card.feature-alt::before { background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #fff)); }
.feature-card:hover::before, .feature-card:focus-visible::before { transform: scaleX(1); }
.feature-card h2, .feature-card h3 { font-weight: 700; }
.feature-icon { transition: transform .3s var(--ease); }
.feature-card:hover .feature-icon { transform: scale(1.06) rotate(-3deg); }
.section-nav, .aside-cta { box-shadow: var(--shadow-sm); }

/* Footer */
.site-footer { background: radial-gradient(50rem 20rem at 10% 0%, color-mix(in srgb, var(--brand) 35%, transparent), transparent 70%), var(--dark); }
.footer-logo { display: inline-block; background: #fff; border-radius: .9rem; padding: .55rem .9rem; margin-bottom: 1rem; box-shadow: 0 10px 25px -15px rgba(0, 0, 0, .6); }
.footer-logo img { height: 46px; width: auto; display: block; }
.site-footer .social-links a { display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: rgba(255, 255, 255, .08); transition: background-color .2s, transform .2s; }
.site-footer .social-links a:hover { background: var(--accent); transform: translateY(-2px); text-decoration: none; }
.site-footer .social-links a:hover .bi { color: var(--on-accent); }
.footer-links a { display: inline-block; transition: transform .15s ease; }
.footer-links a:hover { transform: translateX(3px); }
html[dir="rtl"] .footer-links a:hover { transform: translateX(-3px); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .06); }

/* Back to top */
.back-to-top { position: fixed; inset-inline-end: 1.25rem; bottom: 1.25rem; z-index: 1030; width: 2.9rem; height: 2.9rem; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .45); opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .25s, transform .25s, visibility .25s, background-color .2s; text-decoration: none; }
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover, .back-to-top:focus-visible { background: var(--accent); color: var(--on-accent); }

/* Scroll reveal (only when JavaScript is available and motion is allowed) */
.js-reveal .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: var(--reveal-delay, 0s); }
.js-reveal .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js-reveal .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .feature-card, .feature-card::before, .stat-card, .hero-panel ul a, .back-to-top { transition: none !important; }
}
@media print { .back-to-top { display: none !important; } }

/* Hero photo slider (photos supplied by the "Hero Slider" plugin) */
.hero-has-slides { background: var(--dark); }
.hero-has-slides .hero-content { min-height: 36rem; padding-bottom: 8.5rem; }
.hero-slides { position: absolute; inset: 0; z-index: -3; overflow: hidden; }
.hero-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.4s ease; }
.hero-slide.is-active { opacity: 1; }
.hero-slide.focus-top { object-position: 50% 15%; }
.hero-slide.focus-center { object-position: 50% 50%; }
.hero-slide.focus-bottom { object-position: 50% 85%; }
.hero-effect-fade-zoom .hero-slide.is-active { animation: hero-zoom 14s ease-out both; }
@keyframes hero-zoom { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero-has-slides::before { content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--dark) var(--ov-start, 88%), transparent) 0%, color-mix(in srgb, var(--dark) var(--ov-mid, 55%), transparent) 55%, color-mix(in srgb, var(--dark) var(--ov-end, 25%), transparent) 100%),
    linear-gradient(0deg, color-mix(in srgb, var(--dark) 70%, transparent) 0%, transparent 35%); }
html[dir="rtl"] .hero-has-slides::before {
  background:
    linear-gradient(270deg, color-mix(in srgb, var(--dark) var(--ov-start, 88%), transparent) 0%, color-mix(in srgb, var(--dark) var(--ov-mid, 55%), transparent) 55%, color-mix(in srgb, var(--dark) var(--ov-end, 25%), transparent) 100%),
    linear-gradient(0deg, color-mix(in srgb, var(--dark) 70%, transparent) 0%, transparent 35%); }
.hero-overlay-light { --ov-start: 75%; --ov-mid: 35%; --ov-end: 5%; }
.hero-overlay-strong { --ov-start: 94%; --ov-mid: 75%; --ov-end: 50%; }
.hero-has-slides::after { opacity: .04; }
.hero-has-slides h1, .hero-has-slides .lead { text-shadow: 0 2px 18px rgba(0, 0, 0, .35); }
.hero-slider-bar { position: absolute; inset-inline: 0; bottom: 4.25rem; z-index: 1; }
.hero-caption { color: rgba(255, 255, 255, .92); font-size: .9rem; font-weight: 600; display: inline-flex; align-items: center; gap: .5rem; min-height: 1.5rem; }
.hero-caption:not(:empty)::before { content: ""; width: 1.6rem; height: 2px; background: var(--accent); border-radius: 2px; }
.hero-caption a { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .5); }
.hero-caption a:hover { border-bottom-color: #fff; }
.hero-controls { display: flex; align-items: center; gap: .45rem; margin-inline-start: auto; }
.hero-dot { width: .7rem; height: .7rem; padding: 0; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .45); transition: width .3s var(--ease), background-color .3s; }
.hero-dot.is-active { width: 2rem; background: #fff; }
.hero-dot:hover { background: rgba(255, 255, 255, .8); }
.hero-pause { width: 2rem; height: 2rem; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .45); background: rgba(0, 0, 0, .2); color: #fff; display: grid; place-items: center; padding: 0; margin-inline-start: .35rem; }
.hero-pause:hover { background: rgba(255, 255, 255, .15); }
@media (max-width: 991.98px) {
  .hero-has-slides .hero-content { min-height: 30rem; padding-bottom: 8rem; }
  .hero-has-slides::before { background: linear-gradient(0deg, color-mix(in srgb, var(--dark) 92%, transparent) 0%, color-mix(in srgb, var(--dark) 70%, transparent) 60%, color-mix(in srgb, var(--dark) 45%, transparent) 100%); }
  .hero-slider-bar { bottom: 4rem; }
  .hero-caption { font-size: .8rem; }
}
@media (prefers-reduced-motion: reduce) { .hero-slide { transition: none; } .hero-effect-fade-zoom .hero-slide.is-active { animation: none; } }

/* ---- Photography: consistent image treatment ------------------------------------------- */
:root { --photo-radius: .85rem; --photo-shadow: 0 14px 32px -18px rgba(11, 37, 57, .45); }
picture { display: contents; }

/* Inner page header with the page's featured photo behind a navy overlay */
.page-hero-photo { padding-block: 5.5rem 3.25rem; min-height: 21rem; display: flex; align-items: flex-end; }
.page-hero-photo > .container { width: 100%; }
.page-hero-media { position: absolute; inset: 0; z-index: -2; }
.page-hero-img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.page-hero-photo::before { opacity: 1; z-index: -1; background:
  linear-gradient(0deg, color-mix(in srgb, var(--dark) 92%, transparent) 0%, color-mix(in srgb, var(--dark) 55%, transparent) 55%, color-mix(in srgb, var(--dark) 35%, transparent) 100%); background-size: auto; }
.page-hero-photo h1, .page-hero-photo .lead { text-shadow: 0 2px 16px rgba(0, 0, 0, .35); }
@media (max-width: 767.98px) { .page-hero-photo { min-height: 16rem; padding-block: 4rem 2.25rem; } }

/* Image cards (sub-pages, home sections, life-at-school categories) */
.image-card.has-photo { padding: 0; }
.image-card-media { display: block; position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--brand-soft); }
.image-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.image-card:hover .image-card-media img, .image-card:focus-visible .image-card-media img { transform: scale(1.05); }
.image-card-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(11, 37, 57, .35), transparent 45%); pointer-events: none; }
.image-card-badge { position: absolute; z-index: 1; bottom: .75rem; inset-inline-start: .75rem; background: rgba(255, 255, 255, .94); color: var(--brand-dark); font-size: .78rem; font-weight: 700; padding: .25rem .65rem; border-radius: 999px; }
.image-card-body { display: flex; flex-direction: column; flex: 1; }
.image-card.has-photo .image-card-body { padding: 1.35rem 1.5rem 1.5rem; }
.image-card .h5 { font-weight: 700; margin-bottom: .45rem; }

/* News cards: photo zoom on hover, consistent crop */
.news-card .card-img-top { aspect-ratio: 16 / 10; object-fit: cover; transition: transform .6s var(--ease); }
.news-card { overflow: hidden; transition: box-shadow .25s var(--ease), transform .25s var(--ease); }
.news-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.news-card:hover .card-img-top { transform: scale(1.04); }
.news-card:focus-within { box-shadow: 0 0 0 3px #ffbf47; }
.news-date { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 600; color: var(--brand-dark); background: var(--brand-soft); border-radius: 999px; padding: .15rem .6rem; }

/* Photo gallery grid (masonry with CSS columns: keeps each photo's natural shape) */
.photo-grid { columns: 3 18rem; column-gap: 1rem; }
.photo-grid.is-compact { columns: 4 14rem; }
.photo-item { break-inside: avoid; margin: 0 0 1rem; }
.photo-link { display: block; position: relative; border-radius: var(--photo-radius); overflow: hidden; box-shadow: var(--photo-shadow); background: var(--brand-soft); color: #fff; text-decoration: none; }
.photo-link img { display: block; width: 100%; height: auto; transition: transform .6s var(--ease); }
.photo-link::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(11, 37, 57, .82), rgba(11, 37, 57, 0) 55%); opacity: .55; transition: opacity .3s var(--ease); }
.photo-link:hover img, .photo-link:focus-visible img { transform: scale(1.04); }
.photo-link:hover::after, .photo-link:focus-visible::after { opacity: 1; }
.photo-caption { position: absolute; z-index: 1; inset-inline: 0; bottom: 0; padding: .9rem 1rem .8rem; font-size: .9rem; font-weight: 600; line-height: 1.35; text-shadow: 0 1px 8px rgba(0, 0, 0, .4); }
.photo-caption small { display: block; font-weight: 500; opacity: .85; font-size: .75rem; margin-top: .15rem; }
.photo-zoom { position: absolute; z-index: 1; top: .7rem; inset-inline-end: .7rem; width: 2.1rem; height: 2.1rem; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .92); color: var(--brand-dark); opacity: 0; transform: scale(.85); transition: opacity .25s, transform .25s; }
.photo-link:hover .photo-zoom, .photo-link:focus-visible .photo-zoom { opacity: 1; transform: none; }
.filter-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.filter-chip { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: .4rem .95rem; font-weight: 600; font-size: .9rem; text-decoration: none; transition: background-color .2s, border-color .2s, color .2s; }
.filter-chip:hover { border-color: var(--brand); color: var(--brand-dark); }
.filter-chip[aria-current="page"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.filter-chip .count { font-size: .75rem; opacity: .75; }
.gallery-follow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; border: 1px dashed color-mix(in srgb, var(--brand) 35%, #fff); border-radius: var(--radius); padding: 1.1rem 1.35rem; background: var(--brand-softer); }

/* Lightbox (photo viewer) */
.lightbox { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; max-width: none; max-height: none; background: transparent; color: #fff; }
.lightbox::backdrop { background: rgba(6, 18, 28, .92); }
.lightbox[open] { display: block; }
.lightbox-inner { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 3.5rem 4.5rem; }
.lightbox-figure { margin: 0; display: flex; flex-direction: column; align-items: center; max-width: 100%; max-height: 100%; }
.lightbox-img { max-width: 100%; max-height: calc(100vh - 9rem); width: auto; height: auto; border-radius: .5rem; box-shadow: 0 25px 60px -20px rgba(0, 0, 0, .7); background: rgba(255, 255, 255, .04); }
.lightbox-caption { margin-top: .9rem; text-align: center; font-size: .95rem; max-width: 60rem; }
.lightbox-count { opacity: .7; font-size: .85rem; margin-inline-start: .5rem; white-space: nowrap; }
.lightbox-btn { position: absolute; width: 3rem; height: 3rem; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08); color: #fff; display: grid; place-items: center; font-size: 1.25rem; transition: background-color .2s; }
.lightbox-btn:hover, .lightbox-btn:focus-visible { background: rgba(255, 255, 255, .22); }
.lightbox-close { top: 1rem; inset-inline-end: 1rem; }
.lightbox-prev { inset-inline-start: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { inset-inline-end: 1rem; top: 50%; transform: translateY(-50%); }
html[dir="rtl"] .lightbox-prev .bi, html[dir="rtl"] .lightbox-next .bi { transform: scaleX(-1); }
html.lightbox-open { overflow: hidden; }
@media (max-width: 767.98px) {
  .lightbox-inner { padding: 3.5rem .75rem 5rem; }
  .lightbox-prev, .lightbox-next { top: auto; bottom: 1rem; transform: none; }
  .lightbox-prev { inset-inline-start: calc(50% - 3.5rem); }
  .lightbox-next { inset-inline-end: calc(50% - 3.5rem); }
}

/* Contact quick actions */
.contact-actions { margin-top: -2rem; position: relative; z-index: 2; }
.contact-action { display: flex; align-items: center; gap: .9rem; background: #fff; border-radius: var(--radius); padding: 1.1rem 1.25rem; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); height: 100%; border: 1px solid var(--line); transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.contact-action:hover, .contact-action:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow-lg); color: var(--ink); }
.contact-action .icon { flex: none; width: 2.9rem; height: 2.9rem; border-radius: .8rem; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-dark); font-size: 1.3rem; }
.contact-action strong { display: block; font-size: .95rem; }
.contact-action span.sub { display: block; color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) {
  .image-card-media img, .photo-link img, .news-card, .news-card .card-img-top, .contact-action, .photo-zoom { transition: none !important; }
  .image-card:hover .image-card-media img, .photo-link:hover img, .news-card:hover .card-img-top { transform: none; }
}
@media print { .lightbox { display: none !important; } }
@media (max-width: 767.98px) {
  .contact-action { flex-direction: column; text-align: center; gap: .45rem; padding: .85rem .5rem; }
  .contact-action strong { font-size: .85rem; }
  .contact-action span.sub { display: none; }
}
/* Uniform photo tiles (e.g. a [gallery] inside a page): same shape, faces kept in view */
.photo-grid.is-strip { columns: auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11.5rem), 1fr)); gap: .85rem; margin-block: 1.25rem .5rem; }
.photo-grid.is-strip .photo-item { margin: 0; }
.photo-grid.is-strip .photo-link img { aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 30%; height: auto; }
.photo-grid.is-strip .photo-caption { font-size: .8rem; padding: .6rem .7rem; }
@media (max-width: 575.98px) { .photo-grid.is-strip { grid-template-columns: repeat(auto-fit, minmax(6.25rem, 1fr)); gap: .5rem; } .photo-grid.is-strip .photo-caption { display: none; } }
