/* =========================================================================
   Les Écoles Melrose — Design System
   Bilingual (fr / ar). All directional rules use CSS logical properties so
   the Arabic RTL pages share this single stylesheet.
   ========================================================================= */

/* ---------- Fonts ---------------------------------------------------- */
@font-face {
  font-family: 'Jakarta';
  src: url('../fonts/jakarta-latin-ext.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  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: 'Jakarta';
  src: url('../fonts/jakarta-latin.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  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: 'Cairo';
  src: url('../fonts/cairo-arabic.woff2') format('woff2');
  font-weight: 200 900;
  font-style: normal;
  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-FEFF;
}
@font-face {
  font-family: 'Cairo';
  src: url('../fonts/cairo-latin.woff2') format('woff2');
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
  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;
}

/* ---------- Tokens --------------------------------------------------- */
:root {
  /* Brand — drawn from the school crest: violet shield, gold crown */
  --violet-900: #241246;
  --violet-800: #33195f;
  --violet-700: #452380;
  --violet-600: #5a31a0;
  --violet-500: #7048c4;
  --violet-300: #b79ce6;
  --violet-100: #ece4fa;
  --violet-50:  #f6f2fd;

  --gold-600: #d99413;
  --gold-500: #f2b134;
  --gold-300: #ffd782;
  --gold-100: #fff3d8;

  /* Level accents — echo the multicolour wordmark */
  --pre-500:  #e8447f;   /* Preschool    */
  --pre-100:  #ffe6ef;
  --pri-500:  #0e9aa7;   /* Primary      */
  --pri-100:  #d9f4f6;
  --col-500:  #5a31a0;   /* Middle school */
  --col-100:  #ece4fa;

  --green-500: #3f9d54;
  --green-100: #e2f5e7;
  --red-500:   #d94040;
  --red-100:   #fde8e8;

  /* Neutrals */
  --ink:      #17122a;
  --body:     #4b4560;
  --muted:    #736c8a;
  --line:     #e7e3f0;
  --line-soft:#f1eef8;
  --surface:  #ffffff;
  --surface-2:#faf8fe;
  --surface-3:#f4f1fb;

  /* Type */
  --font-sans: 'Jakarta', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-ar:   'Cairo', ui-sans-serif, system-ui, 'Segoe UI', Tahoma, sans-serif;

  --step--1: clamp(0.82rem, 0.79rem + 0.14vw, 0.9rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.09rem);
  --step-1:  clamp(1.2rem, 1.12rem + 0.38vw, 1.44rem);
  --step-2:  clamp(1.44rem, 1.3rem + 0.7vw, 1.9rem);
  --step-3:  clamp(1.73rem, 1.5rem + 1.15vw, 2.5rem);
  --step-4:  clamp(2.07rem, 1.7rem + 1.85vw, 3.3rem);
  --step-5:  clamp(2.49rem, 1.9rem + 2.9vw, 4.4rem);

  /* Space */
  --sp-1: 0.25rem;  --sp-2: 0.5rem;   --sp-3: 0.75rem;  --sp-4: 1rem;
  --sp-5: 1.5rem;   --sp-6: 2rem;     --sp-7: 3rem;     --sp-8: 4rem;
  --sp-9: 6rem;     --sp-10: 8rem;

  --wrap: 1180px;
  --wrap-narrow: 780px;

  --r-sm: 8px;  --r-md: 14px;  --r-lg: 22px;  --r-xl: 32px;  --r-pill: 999px;

  --sh-sm: 0 1px 2px rgba(23,18,42,.06), 0 1px 3px rgba(23,18,42,.05);
  --sh-md: 0 4px 6px -1px rgba(23,18,42,.07), 0 12px 20px -8px rgba(23,18,42,.10);
  --sh-lg: 0 10px 20px -6px rgba(23,18,42,.10), 0 28px 48px -16px rgba(36,18,70,.20);
  --sh-glow: 0 12px 32px -10px rgba(90,49,160,.45);

  --header-h: 76px;
}

/* ---------- Reset ---------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

body {
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--body);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
html[lang="ar"] body { font-family: var(--font-ar); line-height: 1.85; }

img, svg, video { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: var(--violet-600); text-decoration-thickness: 1px; text-underline-offset: 3px; }

h1, h2, h3, h4, h5 {
  color: var(--ink);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
html[lang="ar"] :is(h1,h2,h3,h4,h5) { letter-spacing: 0; line-height: 1.35; }
p { text-wrap: pretty; }

:focus-visible { outline: 3px solid var(--violet-500); outline-offset: 3px; border-radius: 4px; }

::selection { background: var(--violet-100); color: var(--violet-900); }

/* ---------- Layout --------------------------------------------------- */
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2.5rem, var(--wrap-narrow)); margin-inline: auto; }
@media (max-width: 600px) { .wrap, .wrap-narrow { width: min(100% - 2rem, var(--wrap)); } }

.section { padding-block: clamp(3.5rem, 7vw, 6.5rem); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section--alt { background: var(--surface-2); }
.section--deep { background: var(--violet-900); color: #cfc6e6; }
.section--deep :is(h1,h2,h3,h4) { color: #fff; }

.stack > * + * { margin-block-start: var(--flow, 1rem); }

/* Grid/flex children default to a min-content floor, which lets one wide word
   or nowrap button push the whole track past the viewport. Opt out globally. */
.grid > *, .hero-grid > *, .footer-grid > *, .btn-row > * { min-inline-size: 0; }

.grid { display: grid; gap: var(--sp-5); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }

/* ---------- Typography helpers --------------------------------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: var(--step--1); font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--violet-600);
}
html[lang="ar"] .eyebrow { letter-spacing: 0; }
.eyebrow::before {
  content: ""; inline-size: 1.6rem; block-size: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--gold-500), var(--pre-500));
}

.title-xl { font-size: var(--step-5); }
.title-lg { font-size: var(--step-4); }
.title-md { font-size: var(--step-3); }
.title-sm { font-size: var(--step-2); }

.lead { font-size: var(--step-1); color: var(--muted); line-height: 1.6; font-weight: 400; }
.muted { color: var(--muted); }
.center { text-align: center; }
.section-head { max-width: 62ch; margin-inline: auto; text-align: center; }
.section-head > * + * { margin-block-start: var(--sp-4); }
.section-head--start { margin-inline: 0; text-align: start; }

/* Gradient text used sparingly for a single key word */
.grad {
  background: linear-gradient(100deg, var(--violet-600) 0%, var(--pre-500) 55%, var(--gold-600) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Buttons -------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: .85rem 1.6rem; border-radius: var(--r-pill);
  font-weight: 700; font-size: var(--step-0); line-height: 1.2;
  text-decoration: none; white-space: nowrap; border: 2px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn svg { inline-size: 1.15em; block-size: 1.15em; flex: none; }

.btn-primary { background: var(--violet-600); color: #fff; box-shadow: var(--sh-glow); }
.btn-primary:hover { background: var(--violet-700); }

.btn-gold { background: var(--gold-500); color: var(--violet-900); box-shadow: 0 12px 28px -10px rgba(217,148,19,.6); }
.btn-gold:hover { background: var(--gold-300); }

.btn-ghost { background: transparent; color: var(--violet-700); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--violet-300); background: var(--violet-50); }

.btn-on-dark { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.32); }
.btn-on-dark:hover { background: rgba(255,255,255,.18); border-color: #fff; }

.btn-wa { background: #1faa54; color: #fff; box-shadow: 0 12px 28px -10px rgba(31,170,84,.6); }
.btn-wa:hover { background: #17944a; }

.btn-sm { padding: .6rem 1.15rem; font-size: var(--step--1); }
.btn-lg { padding: 1.05rem 2.1rem; font-size: var(--step-1); }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-4); }
.btn-row--center { justify-content: center; }

/* Very narrow phones: a nowrap button with a long label is wider than the
   column and drags the whole grid past the viewport. Let labels wrap there. */
@media (max-width: 430px) {
  .btn { white-space: normal; text-align: center; }
  .btn-lg { padding: .95rem 1.4rem; font-size: var(--step-0); }
}

/* ---------- Header --------------------------------------------------- */
.site-header {
  position: sticky; inset-block-start: 0; z-index: 100;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-block-end: 1px solid var(--line-soft);
  transition: box-shadow .2s ease;
}
.site-header.is-stuck { box-shadow: var(--sh-md); }

.nav {
  display: flex; align-items: center; gap: var(--sp-5);
  block-size: var(--header-h);
}
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; flex: none; }
.brand img { block-size: 46px; inline-size: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 800; font-size: 1.02rem; color: var(--violet-800); letter-spacing: -.02em; }
.brand-tag { font-size: .68rem; font-weight: 600; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
html[lang="ar"] .brand-tag { letter-spacing: 0; }

.nav-links { display: flex; align-items: center; gap: .2rem; margin-inline-start: auto; list-style: none; padding: 0; }
.nav-links a {
  display: block; padding: .55rem .8rem; border-radius: var(--r-sm);
  font-size: .95rem; font-weight: 600; color: var(--body); text-decoration: none;
  transition: color .15s ease, background-color .15s ease;
}
.nav-links a:hover { color: var(--violet-700); background: var(--violet-50); }
.nav-links a[aria-current="page"] { color: var(--violet-700); background: var(--violet-100); }

/* Dropdown — opens on hover and on keyboard focus */
.has-sub { position: relative; }
.has-sub > a::after {
  content: ""; display: inline-block; margin-inline-start: .4rem;
  inline-size: .38rem; block-size: .38rem; vertical-align: middle;
  border-inline-end: 2px solid currentColor; border-block-end: 2px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px); opacity: .6;
}
.sub {
  position: absolute; inset-block-start: calc(100% + .35rem); inset-inline-start: 0;
  min-inline-size: 230px; padding: .45rem; margin: 0; list-style: none;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--sh-lg);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.has-sub:hover > .sub, .has-sub:focus-within > .sub { opacity: 1; visibility: visible; transform: none; }
.sub a { display: flex; align-items: center; gap: .6rem; padding: .6rem .75rem; font-weight: 600; }
.sub .swatch { inline-size: .55rem; block-size: .55rem; border-radius: 50%; flex: none; }

.nav-actions { display: flex; align-items: center; gap: .6rem; flex: none; }

.lang-switch { display: inline-flex; align-items: center; gap: .25rem; padding: .2rem; background: var(--surface-3); border-radius: var(--r-pill); }
.lang-switch a {
  padding: .32rem .7rem; border-radius: var(--r-pill); font-size: .82rem; font-weight: 700;
  color: var(--muted); text-decoration: none; transition: all .15s ease;
}
.lang-switch a[aria-current="true"] { background: #fff; color: var(--violet-700); box-shadow: var(--sh-sm); }

.nav-toggle { display: none; padding: .55rem; border-radius: var(--r-sm); color: var(--violet-800); }
.nav-toggle svg { inline-size: 26px; block-size: 26px; }

@media (max-width: 1040px) {
  .nav-links, .nav-actions .btn { display: none; }
  .nav-toggle { display: inline-flex; margin-inline-start: auto; }
  .nav-actions { margin-inline-start: 0; }
}

/* Narrow phones: the brand lockup would otherwise push the language switcher
   and the menu button past the right edge. Shed the least useful parts first. */
@media (max-width: 480px) {
  .nav { gap: var(--sp-3); }
  .brand { gap: .5rem; min-inline-size: 0; }
  .brand img { block-size: 38px; }
  .brand-text { min-inline-size: 0; }
  .brand-name { font-size: .92rem; }
  .brand-tag { display: none; }
  .lang-switch a { padding: .3rem .55rem; font-size: .78rem; }
}
@media (max-width: 370px) {
  .brand-text { display: none; }
}

/* Mobile drawer */
.drawer {
  position: fixed; inset: 0; z-index: 200; visibility: hidden;
}
.drawer[data-open="true"] { visibility: visible; }
.drawer-scrim {
  position: absolute; inset: 0; background: rgba(23,18,42,.5);
  opacity: 0; transition: opacity .25s ease;
}
.drawer[data-open="true"] .drawer-scrim { opacity: 1; }
.drawer-panel {
  position: absolute; inset-block: 0; inset-inline-end: 0;
  inline-size: min(88vw, 380px); background: #fff;
  padding: var(--sp-5); overflow-y: auto;
  display: flex; flex-direction: column; gap: var(--sp-4);
  transform: translateX(100%); transition: transform .3s cubic-bezier(.4,0,.2,1);
  box-shadow: var(--sh-lg);
}
html[dir="rtl"] .drawer-panel { transform: translateX(-100%); }
.drawer[data-open="true"] .drawer-panel { transform: translateX(0); }

.drawer-head { display: flex; align-items: center; justify-content: space-between; }
.drawer-close { padding: .5rem; border-radius: var(--r-sm); color: var(--violet-800); }
.drawer-close svg { inline-size: 24px; block-size: 24px; }
.drawer-links { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .15rem; }
.drawer-links a {
  display: block; padding: .8rem .9rem; border-radius: var(--r-md);
  font-weight: 600; color: var(--ink); text-decoration: none;
}
.drawer-links a:hover, .drawer-links a[aria-current="page"] { background: var(--violet-50); color: var(--violet-700); }
.drawer-foot { margin-block-start: auto; display: flex; flex-direction: column; gap: .7rem; }

/* ---------- Hero ----------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 560px at 88% -10%, rgba(232,68,127,.20), transparent 62%),
    radial-gradient(900px 520px at 8% 8%, rgba(14,154,167,.20), transparent 60%),
    linear-gradient(165deg, var(--violet-900) 0%, var(--violet-800) 48%, #3d1f6e 100%);
  color: #d6cdea;
  padding-block: clamp(4rem, 10vw, 7.5rem);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.10) 1px, transparent 1px);
  background-size: 30px 30px; mask-image: linear-gradient(to bottom, #000, transparent 75%);
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 75%);
}
.hero > * { position: relative; z-index: 1; }
.hero h1 { color: #fff; font-size: var(--step-5); }
.hero .lead { color: #cbc0e4; max-width: 56ch; }

.hero-grid { display: grid; gap: clamp(2.5rem, 5vw, 4rem); align-items: center; grid-template-columns: 1.05fr .95fr; }
@media (max-width: 940px) { .hero-grid { grid-template-columns: 1fr; } }

.hero-badge {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .45rem 1rem; border-radius: var(--r-pill);
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  font-size: var(--step--1); font-weight: 600; color: #efe9fb;
}
.hero-badge .dot { inline-size: .5rem; block-size: .5rem; border-radius: 50%; background: var(--gold-500); flex: none; }

.hero-points { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; }
.hero-points li { display: flex; align-items: center; gap: .5rem; font-size: .95rem; color: #cbc0e4; font-weight: 500; }
.hero-points svg { inline-size: 1.15rem; block-size: 1.15rem; color: var(--gold-500); flex: none; }

/* Hero level cards */
.hero-cards { display: grid; gap: var(--sp-4); }
.hero-card {
  display: flex; align-items: center; gap: var(--sp-4);
  padding: var(--sp-5); border-radius: var(--r-lg);
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  text-decoration: none; color: inherit;
  transition: transform .2s ease, background-color .2s ease, border-color .2s ease;
}
.hero-card:hover { transform: translateY(-3px); background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); }
.hero-card-icon {
  inline-size: 3rem; block-size: 3rem; border-radius: var(--r-md); flex: none;
  display: grid; place-items: center; color: #fff;
}
.hero-card-icon svg { inline-size: 1.5rem; block-size: 1.5rem; }
.hero-card h3 { color: #fff; font-size: 1.05rem; margin-block-end: .15rem; }
.hero-card p { font-size: .87rem; color: #b9addb; line-height: 1.45; }
.hero-card .arrow { margin-inline-start: auto; color: rgba(255,255,255,.5); flex: none; }
html[dir="rtl"] .hero-card .arrow { transform: scaleX(-1); }

/* ---------- Cards ---------------------------------------------------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: var(--sp-6);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card--hover:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); border-color: transparent; }
.card h3 { font-size: var(--step-1); margin-block-end: .5rem; }
.card p { font-size: .97rem; }

.card-icon {
  inline-size: 3.25rem; block-size: 3.25rem; border-radius: var(--r-md);
  display: grid; place-items: center; margin-block-end: var(--sp-4);
}
.card-icon svg { inline-size: 1.6rem; block-size: 1.6rem; }

/* Tinted variants — used for the four pillars & programme cards */
.t-violet { background: var(--violet-100); color: var(--violet-700); }
.t-gold   { background: var(--gold-100);   color: var(--gold-600); }
.t-pre    { background: var(--pre-100);    color: var(--pre-500); }
.t-pri    { background: var(--pri-100);    color: var(--pri-500); }
.t-col    { background: var(--col-100);    color: var(--col-500); }
.t-green  { background: var(--green-100);  color: var(--green-500); }
.t-red    { background: var(--red-100);    color: var(--red-500); }

/* Level card with a coloured top rule */
.level-card { position: relative; overflow: hidden; padding-block-start: calc(var(--sp-6) + 6px); }
.level-card::before { content: ""; position: absolute; inset-block-start: 0; inset-inline: 0; block-size: 6px; background: var(--accent, var(--violet-500)); }
.level-card--pre { --accent: var(--pre-500); }
.level-card--pri { --accent: var(--pri-500); }
.level-card--col { --accent: var(--col-500); }

.pill {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .3rem .75rem; border-radius: var(--r-pill);
  font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
html[lang="ar"] .pill { letter-spacing: 0; text-transform: none; }

.tick-list { list-style: none; padding: 0; display: grid; gap: .7rem; }
.tick-list li { display: flex; align-items: flex-start; gap: .65rem; font-size: .97rem; }
.tick-list svg { inline-size: 1.25rem; block-size: 1.25rem; flex: none; margin-block-start: .18rem; color: var(--green-500); }

/* ---------- Stats ---------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: var(--sp-5); }
.stat { text-align: center; padding: var(--sp-5) var(--sp-4); }
.stat-num { font-size: var(--step-4); font-weight: 800; line-height: 1; color: var(--violet-700); letter-spacing: -.03em; }
.section--deep .stat-num { color: var(--gold-500); }
.stat-label { margin-block-start: .5rem; font-size: .92rem; font-weight: 600; color: var(--muted); }
.section--deep .stat-label { color: #b3a6d0; }

/* ---------- Gallery -------------------------------------------------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: var(--sp-4); }
.gal-item {
  position: relative; display: block; padding: 0; border: 0;
  border-radius: var(--r-md); overflow: hidden; background: var(--surface-3);
  aspect-ratio: 4 / 3; cursor: zoom-in; inline-size: 100%;
}
.gal-item img { inline-size: 100%; block-size: 100%; object-fit: cover; transition: transform .4s ease; }
.gal-item:hover img { transform: scale(1.05); }
.gal-item figcaption {
  position: absolute; inset-block-end: 0; inset-inline: 0;
  padding: 1.6rem .9rem .8rem; text-align: start;
  background: linear-gradient(to top, rgba(23,18,42,.85), transparent);
  color: #fff; font-size: .87rem; font-weight: 600;
  opacity: 0; transition: opacity .25s ease;
}
.gal-item:hover figcaption, .gal-item:focus-visible figcaption { opacity: 1; }

.lightbox {
  position: fixed; inset: 0; z-index: 300; display: none;
  place-items: center; padding: var(--sp-5);
  background: rgba(15,10,28,.92); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.lightbox[data-open="true"] { display: grid; }
.lightbox img { max-block-size: 82vh; max-inline-size: 100%; border-radius: var(--r-md); box-shadow: var(--sh-lg); }
.lightbox-cap { color: #d8cfe9; text-align: center; margin-block-start: var(--sp-4); font-size: .95rem; }
.lightbox-close, .lightbox-nav {
  position: absolute; display: grid; place-items: center;
  inline-size: 3rem; block-size: 3rem; border-radius: 50%;
  background: rgba(255,255,255,.12); color: #fff; transition: background-color .2s ease;
}
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255,255,255,.25); }
.lightbox-close { inset-block-start: var(--sp-5); inset-inline-end: var(--sp-5); }
.lightbox-nav svg { inline-size: 1.5rem; block-size: 1.5rem; }
.lb-prev { inset-inline-start: var(--sp-5); }
.lb-next { inset-inline-end: var(--sp-5); }
html[dir="rtl"] .lightbox-nav svg { transform: scaleX(-1); }

/* ---------- Steps / timeline ----------------------------------------- */
.steps { display: grid; gap: var(--sp-5); counter-reset: step; }
.step {
  position: relative; padding-inline-start: 4.25rem; counter-increment: step;
}
.step::before {
  content: counter(step); position: absolute; inset-inline-start: 0; inset-block-start: 0;
  inline-size: 2.9rem; block-size: 2.9rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--violet-600); color: #fff; font-weight: 800; font-size: 1.1rem;
  box-shadow: var(--sh-glow);
}
.step::after {
  content: ""; position: absolute; inset-inline-start: 1.44rem; inset-block-start: 3.3rem;
  inline-size: 2px; block-size: calc(100% - 2.4rem); background: var(--line);
}
.step:last-child::after { display: none; }
.step h3 { font-size: var(--step-1); margin-block-end: .35rem; }

/* ---------- Accordion (FAQ) ------------------------------------------ */
.faq { display: grid; gap: var(--sp-3); }
.faq details {
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); overflow: hidden;
}
.faq details[open] { border-color: var(--violet-300); box-shadow: var(--sh-sm); }
.faq summary {
  padding: 1.1rem 1.4rem; font-weight: 700; color: var(--ink); cursor: pointer;
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; inline-size: .65rem; block-size: .65rem; flex: none;
  border-inline-end: 2px solid var(--violet-500); border-block-end: 2px solid var(--violet-500);
  transform: rotate(45deg); transition: transform .2s ease; margin-block-start: -.25rem;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-block-start: .15rem; }
.faq .faq-body { padding: 0 1.4rem 1.3rem; color: var(--body); font-size: .97rem; }

/* ---------- Forms ---------------------------------------------------- */
.form { display: grid; gap: var(--sp-4); }
.field { display: grid; gap: .4rem; }
.field label { font-size: .9rem; font-weight: 700; color: var(--ink); }
.field .req { color: var(--red-500); }
.field input, .field select, .field textarea {
  inline-size: 100%; padding: .8rem 1rem;
  border: 1.5px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--violet-500); box-shadow: 0 0 0 4px var(--violet-100);
}
.field textarea { min-block-size: 130px; resize: vertical; }
.field-hint { font-size: .82rem; color: var(--muted); }
.field-row { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }

.form-note { font-size: .85rem; color: var(--muted); }
.hp { position: absolute; inset-inline-start: -9999px; opacity: 0; pointer-events: none; }

.alert { padding: 1rem 1.2rem; border-radius: var(--r-md); font-size: .95rem; border: 1px solid; }
.alert-ok { background: var(--green-100); border-color: #b6e2c2; color: #1f6b33; }
.alert-err { background: var(--red-100); border-color: #f3bcbc; color: #972929; }

/* ---------- Contact blocks ------------------------------------------- */
.contact-row { display: flex; align-items: flex-start; gap: var(--sp-4); }
.contact-row .ic {
  inline-size: 2.75rem; block-size: 2.75rem; border-radius: var(--r-md); flex: none;
  display: grid; place-items: center; background: var(--violet-100); color: var(--violet-700);
}
.contact-row .ic svg { inline-size: 1.35rem; block-size: 1.35rem; }
.contact-row .k { font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
html[lang="ar"] .contact-row .k { letter-spacing: 0; text-transform: none; }
/* The e-mail address is one long unbreakable token — let it break on narrow phones. */
.contact-row > div { min-inline-size: 0; }
.contact-row .v { font-size: 1.05rem; font-weight: 600; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.contact-row a.v:hover { color: var(--violet-600); }

.map-frame { border: 0; inline-size: 100%; block-size: clamp(300px, 45vw, 460px); border-radius: var(--r-lg); }

/* ---------- CTA band ------------------------------------------------- */
.cta-band {
  position: relative; overflow: hidden;
  border-radius: var(--r-xl); padding: clamp(2.5rem, 5vw, 4.5rem);
  background:
    radial-gradient(700px 340px at 85% 0%, rgba(232,68,127,.28), transparent 60%),
    linear-gradient(140deg, var(--violet-800), var(--violet-600));
  color: #d9d0ee; text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.12) 1px, transparent 1px);
  background-size: 26px 26px; opacity: .6;
}
.cta-band > * { position: relative; z-index: 1; }

/* ---------- Footer --------------------------------------------------- */
.site-footer { background: var(--violet-900); color: #a89bc6; padding-block: var(--sp-8) var(--sp-5); }
.site-footer h4 { color: #fff; font-size: 1rem; margin-block-end: var(--sp-4); letter-spacing: .02em; }
.footer-grid { display: grid; gap: var(--sp-6); grid-template-columns: 1.4fr 1fr 1fr 1.2fr; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); } }
.footer-brand img { block-size: 54px; inline-size: auto; background: #fff; padding: .4rem .6rem; border-radius: var(--r-sm); }
.footer-list { list-style: none; padding: 0; display: grid; gap: .6rem; }
.footer-list a { color: #a89bc6; text-decoration: none; font-size: .94rem; transition: color .15s ease; }
.footer-list a:hover { color: #fff; }
.social { display: flex; gap: .6rem; }
.social a {
  inline-size: 2.5rem; block-size: 2.5rem; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255,255,255,.09); color: #fff;
  transition: background-color .2s ease, transform .2s ease;
}
.social a:hover { background: var(--violet-600); transform: translateY(-2px); }
.social svg { inline-size: 1.2rem; block-size: 1.2rem; }
.footer-bottom {
  margin-block-start: var(--sp-7); padding-block-start: var(--sp-5);
  border-block-start: 1px solid rgba(255,255,255,.12);
  display: flex; flex-wrap: wrap; gap: var(--sp-4); justify-content: space-between;
  font-size: .87rem;
}
.footer-bottom a { color: #a89bc6; text-decoration: none; }
.footer-bottom a:hover { color: #fff; }

/* ---------- Floating WhatsApp ---------------------------------------- */
.wa-float {
  position: fixed; inset-block-end: 1.25rem; inset-inline-end: 1.25rem; z-index: 90;
  inline-size: 3.5rem; block-size: 3.5rem; border-radius: 50%;
  display: grid; place-items: center; background: #25d366; color: #fff;
  box-shadow: 0 8px 24px -6px rgba(37,211,102,.65);
  transition: transform .2s ease;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { inline-size: 1.85rem; block-size: 1.85rem; }

/* ---------- Page header (interior pages) ----------------------------- */
.page-head {
  position: relative; overflow: hidden;
  background:
    radial-gradient(760px 380px at 82% -20%, rgba(232,68,127,.18), transparent 62%),
    linear-gradient(150deg, var(--violet-900), var(--violet-700));
  color: #cbc0e4; padding-block: clamp(3rem, 6vw, 5rem);
}
.page-head::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.09) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, #000, transparent);
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent);
}
.page-head > * { position: relative; z-index: 1; }
.page-head h1 { color: #fff; font-size: var(--step-4); }
.page-head .lead { color: #c3b7e0; max-width: 60ch; }

.crumbs { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; padding: 0; font-size: .87rem; margin-block-end: var(--sp-4); }
.crumbs a { color: #b3a6d0; text-decoration: none; }
.crumbs a:hover { color: #fff; }
.crumbs li + li::before { content: "/"; margin-inline-end: .45rem; color: rgba(255,255,255,.35); }
.crumbs [aria-current="page"] { color: #fff; font-weight: 600; }

/* ---------- Prose (long-form text) ----------------------------------- */
.prose > * + * { margin-block-start: 1.15rem; }
.prose h2 { font-size: var(--step-2); margin-block-start: 2.5rem; }
.prose h3 { font-size: var(--step-1); margin-block-start: 1.8rem; }
.prose ul, .prose ol { padding-inline-start: 1.3rem; display: grid; gap: .5rem; }

/* ---------- Reveal on scroll -----------------------------------------
   Fails open: content is visible by default and only starts hidden once the
   inline snippet in <head> has set html.js. If scripting is blocked or errors,
   the page still renders fully instead of staying at opacity 0. */
.reveal { opacity: 1; transform: none; }
html.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
html.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; }
}

/* ---------- Utilities ------------------------------------------------ */
.visually-hidden {
  position: absolute !important; inline-size: 1px; block-size: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; inset-block-start: -100px; inset-inline-start: 1rem; z-index: 999;
  padding: .75rem 1.25rem; background: var(--violet-700); color: #fff;
  border-radius: 0 0 var(--r-sm) var(--r-sm); text-decoration: none; font-weight: 700;
}
.skip-link:focus { inset-block-start: 0; }

.divider { block-size: 1px; background: var(--line); border: 0; }
.mt-0{margin-block-start:0}.mt-2{margin-block-start:var(--sp-2)}.mt-3{margin-block-start:var(--sp-3)}
.mt-4{margin-block-start:var(--sp-4)}.mt-5{margin-block-start:var(--sp-5)}.mt-6{margin-block-start:var(--sp-6)}
.mt-7{margin-block-start:var(--sp-7)}
.print-only { display: none; }

@media print {
  .site-header, .drawer, .wa-float, .cta-band, .site-footer, .nav-toggle { display: none !important; }
  body { color: #000; }
  .print-only { display: block; }
}
