/* polish.css - visual refinement layer. To revert: remove the <link> to polish.css from the pages. */
:root { --shadow-soft: 0 10px 30px rgba(22,50,79,.08); --shadow-lift: 0 18px 44px rgba(22,50,79,.16); --ease: cubic-bezier(.2,.7,.2,1); }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--orange-soft); color: var(--navy); }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

/* Typography: Arabic must not use negative tracking (it breaks letter joins) */
html[lang^="ar"] h1, html[lang^="ar"] h2, html[lang^="ar"] h3, html[lang^="ar"] h4,
html[lang^="ar"] .hero h1, html[lang^="ar"] .stats-grid strong { letter-spacing: 0 !important; }
html:not([lang^="ar"]) h1, html:not([lang^="ar"]) h2, html:not([lang^="ar"]) .hero h1 { letter-spacing: -.025em !important; }
html[lang^="ar"] .hero h1 { line-height: 1.2; }
.hero__lead, .about__copy > p:not(.overline), .section-heading > p, .campus__copy > p:not(.overline) { font-size: 16px !important; line-height: 2; color: #56636a; }
.overline { letter-spacing: .06em; font-weight: 700; }
html[lang^="ar"] .overline { letter-spacing: 0; text-transform: none; }

/* Header */
.site-header { position: sticky !important; top: 0; background: rgba(251,247,242,.92); box-shadow: 0 1px 0 rgba(22,50,79,.06), 0 8px 24px rgba(22,50,79,.04); }
.main-nav a { font-size: 14px; font-weight: 500; }
.nav-cta, .button { border-radius: 12px; box-shadow: 0 6px 16px rgba(233,139,95,.28); font-weight: 600; }
.nav-cta { font-size: 14px; padding: 11px 20px; }
.button, .nav-cta, .value-card, .program-card, .testimonial, .activity-tile { transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s; }
.button:hover, .nav-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(233,139,95,.34); }
.announcement { font-size: 13px; }
.language-switcher, #language-switcher { border-radius: 10px; font-size: 13px; }

/* Cards */
.value-card, .program-card, .testimonial, .core-value { box-shadow: var(--shadow-soft); border-radius: 20px; }
.value-card:hover, .program-card:hover, .core-value:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.hero-image-wrap img, .campus__frame img { box-shadow: 0 24px 60px rgba(22,50,79,.18); }
.floating-card { border-radius: 14px; box-shadow: var(--shadow-lift); }
.floating-card small, .floating-card span { font-size: 12px; }

/* Section rhythm */
.section-space { padding: 104px 0; }
.section-heading { margin-bottom: 44px; }
.section-heading h2, .about h2, .method h2, .contact h2, .voices h2 { margin-bottom: 18px; }
.stats-grid span { font-size: 13px; color: rgba(255,255,255,.72); }
.stats-grid strong { font-size: 48px; }

/* Activity capsules */
.activity-tile { box-shadow: var(--shadow-soft); }
.activity-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }

/* Footer */
.site-footer { padding: 72px 0 28px; }
.footer-brand p { font-size: 14px; color: rgba(255,255,255,.66); }
.footer-links, .footer-social { font-size: 14px; gap: 10px; }
.footer-links > span:first-child, .footer-social > span { font-size: 14px; }
.footer-links a, .footer-links span:last-child { color: rgba(255,255,255,.68); }
.footer-bottom { font-size: 12px; color: rgba(255,255,255,.5); }
.footer-social a { width: 36px; height: 36px; font-size: 12px; }

/* Forms */
input, textarea, select { border-radius: 10px; }
input:focus, textarea:focus, select:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(233,139,95,.2); outline: none; }

@media (max-width: 700px) {
  .section-space { padding: 68px 0; }
  .hero__lead, .about__copy > p:not(.overline), .section-heading > p, .campus__copy > p:not(.overline) { font-size: 15px !important; }
  .value-card p { font-size: 13px; line-height: 1.8; }
  .value-card h3 { font-size: 18px; }
  .activity-card p, .life-ribbon, .signal-strip__inner { font-size: 13px; }
  .hero__content { padding: 52px 0 28px; }
  .hero h1 { font-size: clamp(44px, 13.5vw, 64px); }
  .stats-grid strong { font-size: 38px; }
  .footer-links, .footer-social, .footer-brand p { font-size: 14px; }
  .footer-bottom { font-size: 12px; }
  .site-footer { padding: 54px 0 24px; }
  .button { width: auto; }
  .announcement { font-size: 12.5px; }
}
@media (prefers-reduced-motion: reduce) { .value-card:hover, .program-card:hover, .activity-tile:hover, .button:hover { transform: none; } }

/* Keep the desktop nav on one line in every language */
@media (min-width: 701px) {
  .nav-wrap { gap: 18px; }
  .main-nav { gap: 16px; flex-wrap: nowrap; }
  .main-nav a, .nav-cta { white-space: nowrap; }
  html:not([lang^="ar"]) .main-nav a { font-size: 13px; }
  html:not([lang^="ar"]) .nav-cta { font-size: 13px; padding: 10px 16px; gap: 8px; }
  html:not([lang^="ar"]) .brand-copy small { max-width: 150px; line-height: 1.3; }
}
@media (min-width: 701px) and (max-width: 1100px) { .main-nav { gap: 11px; } html:not([lang^="ar"]) .main-nav a { font-size: 12px; } .brand-copy small { display: none; } }

/* ===== Islamic / Moroccan ornament layer (zellige, eight-point stars, arch). Revert: delete this block. ===== */
:root {
  --zellige-navy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%2316324f' stroke-opacity='.07' stroke-width='1'%3E%3Cpolygon points='32,4 38,18 52,12 46,26 60,32 46,38 52,52 38,46 32,60 26,46 12,52 18,38 4,32 18,26 12,12 26,18'/%3E%3Ccircle cx='32' cy='32' r='6'/%3E%3Cpath d='M0 0l8 8M64 0l-8 8M0 64l8-8M64 64l-8-8'/%3E%3C/g%3E%3C/svg%3E");
  --zellige-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23ccebd8' stroke-opacity='.12' stroke-width='1'%3E%3Cpolygon points='32,4 38,18 52,12 46,26 60,32 46,38 52,52 38,46 32,60 26,46 12,52 18,38 4,32 18,26 12,12 26,18'/%3E%3Ccircle cx='32' cy='32' r='6'/%3E%3Cpath d='M0 0l8 8M64 0l-8 8M0 64l8-8M64 64l-8-8'/%3E%3C/g%3E%3C/svg%3E");
  --star-divider: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='20' viewBox='0 0 200 20'%3E%3Cg fill='none' stroke='%23e98b5f' stroke-width='1.2'%3E%3Cpath d='M0 10h78M122 10h78' stroke-opacity='.55'/%3E%3Cpolygon points='100,1 104,7 111,4 108,10 111,16 104,13 100,19 96,13 89,16 92,10 89,4 96,7'/%3E%3C/g%3E%3Ccircle cx='82' cy='10' r='1.6' fill='%23e98b5f'/%3E%3Ccircle cx='118' cy='10' r='1.6' fill='%23e98b5f'/%3E%3C/svg%3E");
}
/* backgrounds */
.section-grid { background-image: var(--zellige-navy) !important; background-size: 64px 64px !important; }
.stats-band { background-image: var(--zellige-light); background-size: 64px 64px; }
.site-footer { background-image: var(--zellige-light); background-size: 64px 64px; position: relative; }
.site-footer::before { content: ""; display: block; position: absolute; top: 0; left: 0; right: 0; height: 14px; background: repeating-linear-gradient(90deg, var(--orange) 0 18px, var(--navy-deep) 18px 22px, var(--mint-deep) 22px 40px, var(--navy-deep) 40px 44px); opacity: .85; }
/* section header ornament: eight-point star divider under each heading */
.section-heading h2::after, .about h2::after, .method h2::after, .voices h2::after, .goals-values h2::after, .campus h2::after, .contact h2::after, .contact-aside__block h2::after {
  content: ""; display: block; width: 150px; height: 15px; margin-top: 16px;
  background: var(--star-divider) no-repeat center / contain;
}
html[lang^="ar"] .section-heading h2::after, html[lang^="ar"] .about h2::after, html[lang^="ar"] .method h2::after, html[lang^="ar"] .voices h2::after, html[lang^="ar"] .campus h2::after, html[lang^="ar"] .contact h2::after { margin-right: 0; margin-left: auto; }
/* arch frame on the hero image */
.hero-image-wrap img { border-radius: 220px 220px 24px 24px !important; box-shadow: 0 0 0 8px var(--paper), 0 0 0 10px var(--orange-soft), 0 28px 60px rgba(22,50,79,.2); }
.campus__frame img { border-radius: 160px 160px 18px 18px !important; }
.signal-strip { background-image: var(--zellige-light); background-size: 64px 64px; }
@media (max-width: 700px) {
  .hero-image-wrap img { border-radius: 120px 120px 20px 20px !important; box-shadow: 0 0 0 6px var(--paper), 0 0 0 8px var(--orange-soft), 0 20px 40px rgba(22,50,79,.18); }
  .campus__frame img { border-radius: 90px 90px 14px 14px !important; }
  .section-heading h2::after, .about h2::after, .method h2::after, .voices h2::after { width: 120px; }
}

/* Hero eyebrow: no letter-spacing on Arabic (it clipped the text), allow wrapping, sit above the heading */
html[lang^="ar"] .eyebrow, html[lang^="ar"] .eyebrow * { letter-spacing: 0 !important; }
.eyebrow { position: relative; z-index: 2; flex-wrap: nowrap; font-size: 13px; line-height: 1.6; margin-bottom: 24px; }
.eyebrow-line { flex: 0 0 25px; }
.hero__content { overflow: visible; }

.footer-social a svg { display: block; }
.footer-social a[aria-label="Facebook"]:hover { background: #1877f2; border-color: #1877f2; }

/* promo video */
.promo-video{text-align:center}
.promo-video__head{max-width:680px;margin:0 auto 28px}
.promo-video__head p:last-child{opacity:.85}
.promo-video__frame{max-width:960px;margin:0 auto;border-radius:20px;overflow:hidden;border:3px solid #c9a24b;box-shadow:0 18px 50px rgba(15,40,60,.25);background:#0f2a3d}
.promo-video__frame video{display:block;width:100%;height:auto;aspect-ratio:16/9;background:#0f2a3d}

.promo-video__frame video{object-fit:contain}

/* mobile spacing tightening */
@media (max-width: 700px) {
  .section-space { padding: 52px 0 !important; }
  .hero__content { padding: 34px 0 20px !important; }
  .hero h1 { font-size: clamp(40px, 12.5vw, 60px); }
  .hero__proof { margin-top: 22px !important; }
  .hero__visual { padding: 12px 22px 44px !important; }
  .hero-video { margin-top: 0 !important; }
  .section-kicker { margin-bottom: 18px !important; }
  .about__copy h2, .method h2, .contact h2 { font-size: 36px; }
  .values-grid { margin-top: 28px !important; }
  .value-card--dark { min-height: 240px !important; }
  .value-card { min-height: 120px !important; }
  .section-heading { margin-bottom: 20px !important; }
  .program-card { min-height: 260px !important; }
  .program-card { padding: 22px 22px 20px !important; }
  .program-icon { margin: 18px 0 14px !important; }
  .program-meta { margin-top: 18px !important; }
  .program-card > a { bottom: 16px; }
  .method__intro .section-kicker { margin-bottom: 20px !important; }
  .steps { padding-top: 30px; }
  .stats-grid { min-height: 150px !important; padding: 22px 0 !important; row-gap: 16px !important; }
  .testimonial, .testimonial--large { min-height: 200px !important; }
  .goals-values__heading .section-kicker { margin-bottom: 18px !important; }
  .goals-values__body { margin-top: 28px !important; }
  .core-values { margin-top: 28px !important; }
  .core-value { min-height: 120px !important; }
  .life-feature { min-height: 320px !important; }
  .life-feature__label { margin-top: 24px !important; }
  .activity-card { min-height: 190px !important; }
  .activity-card__icon { margin-bottom: 18px !important; }
  .campus__layout { gap: 28px !important; }
  .contact__intro { padding-bottom: 22px; }
  .contact-panel { padding: 34px 20px 20px !important; }
  .footer-grid { gap: 26px 18px !important; }
  .contact-hero__inner { min-height: 280px !important; }
  .contact-hero__copy { padding: 36px 0 14px !important; }
  .contact-main__layout { gap: 30px !important; }
  .map-frame { height: 240px !important; }
  .sitemap-box { padding: 26px 20px !important; }
}

/* levels: single swipe row on mobile */
@media (max-width: 700px) {
  .programs-grid--levels { display: flex !important; flex-wrap: nowrap; gap: 12px !important; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding: 4px 2px 14px; margin-inline: -2px; overscroll-behavior-x: contain; scrollbar-width: none; }
  .programs-grid--levels::-webkit-scrollbar { display: none; }
  .programs-grid--levels .program-card { flex: 0 0 78%; scroll-snap-align: center; min-height: 270px !important; }
}
@media (max-width: 700px) {
  .program-card { padding-bottom: 66px !important; }
  .program-meta { margin-top: 16px !important; }
}

/* registration buttons: same look as hero .button */
.reg-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 17px; margin-top: 16px; direction: rtl; }
.reg-cta a { display: inline-flex; justify-content: center; align-items: center; gap: 22px; border: 0; border-radius: 8px; padding: 14px 20px; background: var(--navy); color: #fff; font-size: 13px; font-weight: 600; text-decoration: none; transition: transform .2s, box-shadow .2s, background .2s; }
.reg-cta a:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(22,50,79,.16); background: var(--navy-deep); }
.lang-ltr .reg-cta { direction: ltr; }

/* day-at-school cards: single swipe row on mobile, no overlap */
@media (max-width: 700px) {
  .activity-grid { display: flex !important; flex-wrap: nowrap; gap: 10px !important; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding: 2px 2px 12px; margin-top: 12px !important; overscroll-behavior-x: contain; scrollbar-width: none; }
  .activity-grid::-webkit-scrollbar { display: none; }
  .activity-grid .activity-card { flex: 0 0 62%; scroll-snap-align: center; min-height: 0 !important; padding: 16px 16px 40px !important; }
  .activity-card__icon { margin-bottom: 12px !important; font-size: 24px; }
  .activity-card h3 { font-size: 16px !important; line-height: 1.5; }
  .activity-card p { font-size: 12px !important; line-height: 1.7; }
  .activity-card__tag { bottom: 12px !important; }
}

/* core values: single swipe row on mobile */
@media (max-width: 700px) {
  .core-values { display: flex !important; flex-wrap: nowrap; gap: 10px !important; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding: 2px 2px 12px; overscroll-behavior-x: contain; scrollbar-width: none; margin-top: 20px !important; }
  .core-values::-webkit-scrollbar { display: none; }
  .core-values .core-value { flex: 0 0 56%; scroll-snap-align: center; min-height: 0 !important; padding: 16px !important; }
  .core-value__icon { margin-bottom: 10px !important; }
  .core-value h3 { font-size: 17px !important; }
  .core-value p { font-size: 12px !important; line-height: 1.7; }
}

/* values cards: keep the icon clear of the title */
@media (max-width: 700px) { .value-card { padding-top: 62px !important; } .value-card--dark { padding-top: 22px !important; } }
/* campus block: text only after the photo was removed */
.campus__layout { display: block !important; max-width: 760px; margin-inline: auto; }

/* core values grid as a swipe row (fix) */
@media (max-width: 700px) {
  .core-values { display: block !important; }
  .core-values__grid { display: flex !important; flex-wrap: nowrap; gap: 10px !important; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding: 2px 2px 12px; overscroll-behavior-x: contain; scrollbar-width: none; margin-top: 14px; }
  .core-values__grid::-webkit-scrollbar { display: none; }
  .core-values__grid .core-value { flex: 0 0 56%; scroll-snap-align: center; min-height: 0 !important; }
}

/* Parent voices: swipe strip of small capsule cards (real quotes, Arabic in all languages) */
.voices-strip { display: flex; flex-wrap: nowrap; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding: 4px 4px 14px; overscroll-behavior-x: contain; scrollbar-width: none; }
.voices-strip::-webkit-scrollbar { display: none; }
.voice-card { flex: 0 0 78%; max-width: 340px; scroll-snap-align: center; direction: rtl; background: var(--white); border-radius: 22px; box-shadow: var(--shadow); padding: 20px 22px; margin: 0; display: flex; flex-direction: column; }
.voice-card blockquote { font-family: Tajawal, sans-serif; font-size: 15px; line-height: 1.9; color: var(--navy); text-align: right; margin: 0 0 14px; }
.voice-card blockquote::before { content: "« "; color: var(--orange); }
.voice-card blockquote::after { content: " »"; color: var(--orange); }
.voice-card figcaption { margin-top: auto; font-size: 12px; font-weight: 700; color: var(--muted); }
@media (min-width: 701px) { .voice-card { flex-basis: 320px; } }
.voices-sub { font-family: Tajawal, sans-serif; color: var(--navy); font-size: 22px; letter-spacing: -.02em; margin: 36px 0 16px; }

/* Floating glyph layer on the splash screen (decorative, behind the logo block) */
.splash-glyphs { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
#splash .splash__inner { position: relative; z-index: 1; }
