/* =========================================================
   شمس وسعادة — Sunshine Kids Nursery
   Claymorphism • RTL/LTR • متجاوب • إتاحة الوصول
   ========================================================= */

/* ---------- الرموز التصميمية ---------- */
:root {
  --primary: #2563eb;
  --primary-700: #1d4ed8;
  --primary-100: #dbeafe;
  --secondary: #f59e0b;
  --secondary-700: #b45309;
  --accent: #ec4899;
  --accent-700: #be185d;
  --bg: #eff6ff;
  --fg: #0f172a;
  --muted: #f1f5fd;
  --muted-fg: #475569;
  --card: #ffffff;
  --border: #bfdbfe;
  --border-strong: #93c5fd;
  --ring: #2563eb;
  --danger: #dc2626;
  --shadow-soft: rgba(147, 197, 253, 0.5);
  --shadow-blue: rgba(37, 99, 235, 0.16);

  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;

  --font: "Playpen Sans Arabic", "Playpen Sans", "Segoe UI", Tahoma, sans-serif;
  --maxw: 1160px;
  --header-h: 76px;
}

/* ---------- أساسيات ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 14px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--fg);
  background: var(--bg);
  min-height: 100vh;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 0.5em; font-weight: 800; }
p { margin: 0 0 1em; }
a { color: var(--primary); }
ul { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 3px dashed var(--ring);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---------- أدوات عامة ---------- */
.container {
  width: min(var(--maxw), 100% - clamp(2rem, 6vw, 4rem));
  margin-inline: auto;
}

.icon { width: 1.25em; height: 1.25em; flex: none; }

.skip-link {
  position: fixed;
  top: 12px; inset-inline-start: 12px;
  z-index: 200;
  background: var(--primary);
  color: #fff;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  transform: translateY(-200%);
  transition: transform 0.2s ease-out;
}
.skip-link:focus { transform: none; }

.section {
  padding-block: clamp(3.5rem, 8vw, 6rem);
  scroll-margin-top: calc(var(--header-h) + 10px);
}
.section-alt { background: var(--muted); }

/* ترويسة الأقسام */
.sec-head { max-width: 46rem; margin-inline: auto; text-align: center; margin-bottom: clamp(2.2rem, 5vw, 3.5rem); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--accent); color: var(--fg);
  font-weight: 700; font-size: 0.92rem;
  padding: 0.35rem 1.1rem;
  border: 3px solid var(--accent-700);
  border-radius: 999px;
  box-shadow: 0 4px 0 var(--accent-700);
  margin-bottom: 1.1rem;
}
.sec-head .eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--accent); color: var(--fg);
  font-weight: 700; font-size: 0.92rem;
  padding: 0.35rem 1.1rem;
  border: 3px solid var(--accent-700);
  border-radius: 999px;
  box-shadow: 0 4px 0 var(--accent-700);
  margin-bottom: 1.1rem;
}
.sec-head h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); color: var(--fg); }
.sec-head .sub { color: var(--muted-fg); font-size: 1.05rem; margin: 0; }

/* ظهور عند التمرير */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 0.6s ease, transform 0.6s ease; }
[data-reveal].in-view { opacity: 1; transform: none; }

/* ---------- أزرار (Claymorphism) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  font-family: inherit; font-size: 1rem; font-weight: 700;
  padding: 0.85rem 1.6rem;
  border: 3px solid;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out, background-color 0.2s ease-out, color 0.2s ease-out;
}
.btn-primary { background: var(--primary); border-color: var(--primary-700); color: #fff; box-shadow: 0 5px 0 var(--primary-700); }
.btn-accent  { background: var(--accent);  border-color: var(--accent-700);  color: var(--fg);     box-shadow: 0 5px 0 var(--accent-700); }
.btn-ghost   { background: var(--card);    border-color: var(--border-strong); color: var(--primary); box-shadow: 0 5px 0 var(--border-strong); }

.btn:hover { transform: translateY(-2px); }
.btn-primary:hover { box-shadow: 0 7px 0 var(--primary-700); }
.btn-accent:hover  { box-shadow: 0 7px 0 var(--accent-700); }
.btn-ghost:hover   { box-shadow: 0 7px 0 var(--border-strong); background: var(--primary-100); }

.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--primary-700); }
.btn-accent:active { box-shadow: 0 1px 0 var(--accent-700); }
.btn-ghost:active { box-shadow: 0 1px 0 var(--border-strong); }

.btn-sm { padding: 0.55rem 1.15rem; font-size: 0.95rem; }
.btn-block { width: 100%; }

/* ---------- رأس الصفحة ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 3px solid var(--border);
  transition: box-shadow 0.25s ease-out;
}
.site-header.scrolled { box-shadow: 0 8px 24px var(--shadow-blue); }

.header-row { display: flex; align-items: center; gap: 1rem; min-height: var(--header-h); }

.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  text-decoration: none; color: var(--fg);
  margin-inline-end: auto;
}
.brand-logo {
  display: grid; place-items: center;
  width: 46px; height: 46px;
  background: var(--secondary);
  border: 3px solid var(--secondary-700);
  border-radius: 14px;
  color: var(--fg);
  box-shadow: 0 4px 0 var(--secondary-700);
}
.brand-logo .icon { width: 26px; height: 26px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.15rem; font-weight: 800; }
.brand-text small { color: var(--muted-fg); font-weight: 600; }

.nav-links { display: flex; align-items: center; gap: 0.25rem; }
.nav-links a {
  display: inline-flex; align-items: center;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  text-decoration: none; font-weight: 700; color: var(--fg);
  transition: background-color 0.2s ease-out, color 0.2s ease-out;
}
.nav-links a:hover { background: var(--primary-100); color: var(--primary); }
.nav-links a.active { background: var(--primary); color: #fff; }

.header-actions { display: flex; align-items: center; gap: 0.6rem; }

.btn-lang {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-family: inherit; font-weight: 700; font-size: 0.95rem;
  background: var(--card); color: var(--primary);
  border: 3px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--border-strong);
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}
.btn-lang:hover { transform: translateY(-2px); }
.btn-lang:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--border-strong); }

.nav-toggle {
  display: none;
  place-items: center;
  width: 46px; height: 46px;
  background: var(--card);
  border: 3px solid var(--border-strong);
  border-radius: 14px;
  color: var(--primary);
  cursor: pointer;
  box-shadow: 0 4px 0 var(--border-strong);
}
.nav-toggle .icon { width: 24px; height: 24px; }
.nav-toggle .icon-x { display: none; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon-x { display: block; }

.enroll-btn { margin-inline-start: 0.25rem; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-top: clamp(2.5rem, 6vw, 4.5rem); padding-bottom: clamp(3rem, 7vw, 5rem); }
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(closest-side at 12% 20%, rgba(37, 99, 235, 0.12), transparent),
    radial-gradient(closest-side at 88% 80%, rgba(236, 72, 153, 0.12), transparent),
    radial-gradient(closest-side at 70% 15%, rgba(245, 158, 11, 0.12), transparent);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--card); color: var(--primary);
  border: 3px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.4rem 1.1rem;
  font-weight: 700;
  box-shadow: 0 4px 0 var(--shadow-soft);
}
.hero-badge .icon { color: var(--secondary); }

.hero-title { font-size: clamp(2rem, 5.2vw, 3.4rem); font-weight: 800; color: var(--fg); margin: 1rem 0 1.1rem; }
.hero-title .hl { position: relative; color: var(--accent); white-space: nowrap; }
.hero-title .hl::after {
  content: "";
  position: absolute; inset-inline: 0; bottom: 0.06em;
  height: 0.4em; background: var(--secondary); opacity: 0.35;
  border-radius: 999px; z-index: -1;
}

.hero-sub { color: var(--muted-fg); font-size: 1.08rem; max-width: 34rem; }

.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.9rem; margin: 1.6rem 0 2rem; }

.hero-badges { display: grid; gap: 0.7rem; max-width: 30rem; }
.hero-badges li { display: flex; align-items: center; gap: 0.7rem; font-weight: 700; }
.hero-badges .icon { color: var(--primary); }

/* بطاقة الصورة */
.hero-visual { position: relative; }
.hero-card {
  background: var(--card);
  border: 4px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 0 var(--shadow-soft), 0 24px 40px var(--shadow-blue);
  overflow: hidden;
}
.hero-card img { width: 100%; height: auto; display: block; }

.chip {
  position: absolute;
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--card);
  border: 3px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-weight: 700; font-size: 0.92rem;
  box-shadow: 0 5px 0 var(--shadow-soft), 0 10px 20px var(--shadow-blue);
  animation: floaty 5s ease-in-out infinite;
}
.chip .icon { color: var(--secondary); }
.chip-1 { top: 8%; inset-inline-start: -6%; }
.chip-2 { bottom: 12%; inset-inline-end: -4%; animation-delay: 1.2s; }
.chip-3 { top: 42%; inset-inline-end: -8%; animation-delay: 2.2s; }
.chip-2 .icon, .chip-3 .icon { color: var(--accent); }
.chip-1 .icon { color: var(--secondary); }

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ---------- شريط الإحصائيات ---------- */
.band-stats { background: linear-gradient(140deg, #1e40af, var(--primary)); color: #fff; }
.band-stats .sec-head h2 { color: #fff; }
.band-stats .sec-head .sub { color: #dbeafe; }
.band-stats .sec-head .eyebrow { border-color: #fff; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}
.card-stat {
  background: rgba(255, 255, 255, 0.12);
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1rem;
  text-align: center;
  backdrop-filter: blur(4px);
}
.stat-value { display: block; font-size: clamp(2rem, 4vw, 2.7rem); font-weight: 800; color: #fff; }
.stat-label { color: #dbeafe; font-weight: 600; }

/* ---------- بطاقات عامة ---------- */
.card {
  background: var(--card);
  border: 3px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 6px 0 var(--shadow-soft), 0 16px 28px rgba(37, 99, 235, 0.08);
  padding: 1.6rem;
}
.card-title { font-size: 1.18rem; margin-bottom: 0.35rem; }
.card p { color: var(--muted-fg); margin-bottom: 0; font-size: 0.98rem; }

.icon-badge {
  display: grid; place-items: center;
  width: 56px; height: 56px;
  border-radius: 18px;
  border: 3px solid;
  margin-bottom: 1rem;
  box-shadow: 0 4px 0 rgba(15, 23, 42, 0.08);
}
.icon-badge .icon { width: 28px; height: 28px; }

/* ألوان شارات الأيقونات */
.b-p1 { background: #dbeafe; border-color: #93c5fd; color: #1d4ed8; }
.b-p2 { background: #fef3c7; border-color: #fcd34d; color: #b45309; }
.b-p3 { background: #fce7f3; border-color: #f9a8d4; color: #be185d; }
.b-p4 { background: #d1fae5; border-color: #6ee7b7; color: #047857; }
.b-a1 { background: #fce7f3; border-color: #f9a8d4; color: #be185d; }
.b-a2 { background: #ede9fe; border-color: #c4b5fd; color: #6d28d9; }
.b-a3 { background: #dbeafe; border-color: #93c5fd; color: #1d4ed8; }
.b-a4 { background: #dcfce7; border-color: #86efac; color: #15803d; }
.b-a5 { background: #fef3c7; border-color: #fcd34d; color: #b45309; }
.b-a6 { background: #ffe4e6; border-color: #fecdd3; color: #be123c; }
.b-f1 { background: #dbeafe; border-color: #93c5fd; color: #1d4ed8; }
.b-f2 { background: #e0e7ff; border-color: #a5b4fc; color: #4338ca; }
.b-f3 { background: #fce7f3; border-color: #f9a8d4; color: #be185d; }
.b-f4 { background: #dcfce7; border-color: #86efac; color: #15803d; }
.b-f5 { background: #cffafe; border-color: #67e8f9; color: #0e7490; }
.b-f6 { background: #d1fae5; border-color: #6ee7b7; color: #047857; }
.b-r1 { background: #fef3c7; border-color: #fcd34d; color: #b45309; }
.b-r2 { background: #fce7f3; border-color: #f9a8d4; color: #be185d; }
.b-r3 { background: #dbeafe; border-color: #93c5fd; color: #1d4ed8; }

.pill {
  display: inline-block;
  background: var(--primary-100); color: var(--primary-700);
  font-weight: 700; font-size: 0.85rem;
  padding: 0.25rem 0.9rem;
  border: 2px solid var(--border-strong);
  border-radius: 999px;
  margin-bottom: 0.85rem;
}
.pill-accent { background: #fce7f3; color: var(--accent-700); border-color: #f9a8d4; }

/* ---------- من نحن ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}
.about-text h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
.about-text > p { color: var(--muted-fg); }

.vm-grid { display: grid; gap: 1rem; margin-top: 1.4rem; }
.vm-card {
  display: flex; gap: 1rem; align-items: flex-start;
  background: var(--card);
  border: 3px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 5px 0 var(--shadow-soft);
  padding: 1.1rem 1.2rem;
}
.vm-card .icon-badge { width: 46px; height: 46px; margin-bottom: 0; border-radius: 14px; }
.vm-card .icon-badge .icon { width: 24px; height: 24px; }
.vm-card h3 { margin-bottom: 0.25rem; font-size: 1.05rem; }
.vm-card p { margin: 0; font-size: 0.95rem; }

/* ---------- البرامج ---------- */
.programs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.3rem; }
.program { transition: transform 0.2s ease-out, box-shadow 0.2s ease-out; }
.program:hover { transform: translateY(-6px); box-shadow: 0 12px 0 var(--shadow-soft), 0 20px 32px var(--shadow-blue); }

/* ---------- الأنشطة ---------- */
.acts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
.act {
  background: var(--card);
  border: 3px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 6px 0 var(--shadow-soft);
  padding: 1.5rem;
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}
.act:hover { transform: translateY(-6px) rotate(-0.8deg); box-shadow: 0 12px 0 var(--shadow-soft), 0 18px 30px var(--shadow-blue); }
.act p { color: var(--muted-fg); margin: 0; font-size: 0.97rem; }

.chips-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.7rem; margin-bottom: 2.4rem; }
.chips-row span {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--card); color: var(--fg);
  border: 3px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  font-weight: 700; font-size: 0.92rem;
  box-shadow: 0 4px 0 var(--shadow-soft);
}
.chips-row .icon { color: var(--primary); }

/* ---------- الفريق ---------- */
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.3rem; }
.team { text-align: center; }
.team .icon-badge { margin-inline: auto; }
.avatar {
  display: grid; place-items: center;
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 3px solid;
  font-weight: 800; font-size: 1.5rem;
  box-shadow: 0 4px 0 rgba(15, 23, 42, 0.08);
}
.av-t1 { background: #fce7f3; border-color: #f9a8d4; color: #be185d; }
.av-t2 { background: #dbeafe; border-color: #93c5fd; color: #1d4ed8; }
.av-t3 { background: #fef3c7; border-color: #fcd34d; color: #b45309; }
.av-t4 { background: #dcfce7; border-color: #86efac; color: #15803d; }
.av-s1 { background: #fce7f3; border-color: #f9a8d4; color: #be185d; }
.av-s2 { background: #dbeafe; border-color: #93c5fd; color: #1d4ed8; }
.av-s3 { background: #fef3c7; border-color: #fcd34d; color: #b45309; }

/* ---------- المرافق ---------- */
.fac-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
.fac {
  display: flex; gap: 1rem; align-items: flex-start;
  background: var(--card);
  border: 3px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 6px 0 var(--shadow-soft);
  padding: 1.3rem;
  transition: transform 0.2s ease-out;
}
.fac:hover { transform: translateX(-4px); }
.fac .icon-badge { width: 50px; height: 50px; margin-bottom: 0; flex: none; border-radius: 15px; }
.fac .icon-badge .icon { width: 25px; height: 25px; }
.fac h3 { font-size: 1.05rem; margin-bottom: 0.25rem; }
.fac p { color: var(--muted-fg); margin: 0; font-size: 0.94rem; }

/* ---------- آراء أولياء الأمور ---------- */
.tests-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
.test { position: relative; padding-top: 2.2rem; }
.quote-mark {
  position: absolute; top: -22px; inset-inline-start: 1.4rem;
  display: grid; place-items: center;
  width: 44px; height: 44px;
  background: var(--secondary);
  border: 3px solid var(--secondary-700);
  border-radius: 50%;
  color: var(--fg);
  box-shadow: 0 4px 0 var(--secondary-700);
}
.quote-mark .icon { width: 22px; height: 22px; }
.stars { display: flex; gap: 0.15rem; color: var(--secondary); margin-bottom: 0.8rem; }
.stars .icon { width: 1rem; height: 1rem; }
.test blockquote { margin: 0 0 1.2rem; color: var(--fg); font-size: 0.98rem; }
.test figcaption { display: flex; align-items: center; gap: 0.8rem; }
.test figcaption .avatar { width: 48px; height: 48px; font-size: 1.1rem; flex: none; }
.who { display: flex; flex-direction: column; line-height: 1.3; }
.who strong { font-size: 1rem; }
.who small { color: var(--muted-fg); }
.test { border-top: 4px solid var(--border-strong); }
.test:nth-child(2) { border-top-color: var(--secondary); }
.test:nth-child(3) { border-top-color: var(--accent); }

/* ---------- الأسعار ---------- */
.price-row { display: grid; grid-template-columns: 1fr 1.1fr 1fr; gap: 1.3rem; align-items: stretch; }
.price { position: relative; display: flex; flex-direction: column; }
.price-value { font-size: 0.95rem; color: var(--muted-fg); margin: 0.3rem 0 1rem; }
.price .amount { font-size: 2rem; font-weight: 800; color: var(--fg); }
.price-value small { display: block; }
.price-featured { border-color: var(--accent); box-shadow: 0 8px 0 var(--accent), 0 20px 36px var(--shadow-blue); transform: translateY(-6px); }
.price-featured .card-title { color: var(--accent-700); }
.badge-pop {
  position: absolute; top: -16px; inset-inline-start: 50%;
  transform: translateX(-50%);
  background: var(--accent); color: var(--fg);
  border: 3px solid var(--accent-700);
  border-radius: 999px;
  padding: 0.3rem 1rem;
  font-weight: 700; font-size: 0.85rem;
}
.feat { margin: 0.4rem 0 1.4rem; display: grid; gap: 0.6rem; }
.feat li { display: flex; align-items: center; gap: 0.6rem; font-size: 0.95rem; }
.feat .icon { color: #10b981; }
.price .btn { margin-top: auto; }

.sched-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; margin-top: 2.4rem; }
.sched-card {
  display: flex; align-items: center; gap: 1rem;
  background: var(--card);
  border: 3px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 6px 0 var(--shadow-soft);
  padding: 1.2rem 1.4rem;
}
.sched-card .icon-badge { margin-bottom: 0; width: 48px; height: 48px; border-radius: 14px; flex: none; }
.sched-card h3 { font-size: 1rem; margin-bottom: 0.15rem; }
.sched-card p { margin: 0; color: var(--muted-fg); font-size: 0.95rem; }

/* ---------- المعرض ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
.gallery-item {
  position: relative;
  margin: 0;
  border: 3px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 6px 0 var(--shadow-soft);
  cursor: pointer;
}
.gallery-item:focus-visible { outline: 3px solid var(--primary); outline-offset: 4px; }
.gallery-item img { width: 100%; height: auto; display: block; background: var(--surface); transition: transform 0.35s ease-out; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item figcaption {
  position: absolute; inset-inline: 0; bottom: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  padding: 0.9rem 1rem;
  background: rgba(15, 23, 42, 0.62);
  color: #fff; font-weight: 700; font-size: 0.93rem;
  opacity: 0; transition: opacity 0.25s ease-out;
}
.gallery-item:hover figcaption, .gallery-item:focus-within figcaption { opacity: 1; }
.gallery-item figcaption .icon { color: var(--secondary); }

/* ---------- Lightbox عرض الصور ---------- */
.lightbox {
  position: fixed; inset: 0;
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(1rem, 4vw, 2.5rem);
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: lb-fade 0.25s ease-out;
}
.lightbox[hidden] { display: none; }
@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }

.lb-stage {
  margin: 0;
  display: flex; flex-direction: column;
  background: var(--card);
  border: 4px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 14px 0 var(--shadow-soft), 0 30px 60px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  animation: lb-pop 0.3s ease-out;
}
@keyframes lb-pop {
  from { opacity: 0; transform: scale(0.94) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.lb-img {
  display: block;
  max-width: min(1080px, 94vw);
  max-height: 76vh;
  width: auto; height: auto;
  object-fit: contain;
  background: #0B1220;
}
.lb-stage figcaption {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.85rem 1.2rem;
  color: var(--fg); font-weight: 700;
}
.lb-title { font-size: 1rem; }
.lb-count { color: var(--muted-fg); font-size: 0.85rem; direction: ltr; }

.lb-btn {
  position: absolute;
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  border: 3px solid var(--border-strong);
  border-radius: 50%;
  background: var(--card);
  color: var(--fg);
  box-shadow: 0 4px 0 var(--shadow-soft);
  cursor: pointer;
  transition: transform 0.2s ease-out, background 0.2s ease-out;
}
.lb-btn:hover { transform: translateY(-2px); background: var(--surface); }
.lb-btn:disabled { opacity: 0.45; cursor: default; transform: none; }
.lb-btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.lb-close { top: 1rem; inset-inline-end: 1rem; }
.lb-close:hover { transform: scale(1.06); }
.lb-prev { top: 50%; inset-inline-start: 1rem; transform: translateY(-50%); }
.lb-prev:hover { transform: translateY(-50%) translateY(-2px); }
.lb-next { top: 50%; inset-inline-end: 1rem; transform: translateY(-50%); }
.lb-next:hover { transform: translateY(-50%) translateY(-2px); }
.lb-btn .icon { width: 22px; height: 22px; }
.chev {
  width: 0; height: 0;
  border-block-start: 9px solid transparent;
  border-block-end: 9px solid transparent;
}
/* أسهم منطقية: بتتبدل تلقائيًا مع اتجاه القراءة (LTR/RTL) */
.lb-prev .chev { border-inline-end: 14px solid currentColor; border-inline-start: 0; }
.lb-next .chev { border-inline-start: 14px solid currentColor; border-inline-end: 0; }

body.lb-open { overflow: hidden; }

@media (max-width: 640px) {
  .lb-btn { width: 40px; height: 40px; }
  .lb-prev { inset-inline-start: 0.5rem; }
  .lb-next { inset-inline-end: 0.5rem; }
  .lb-close { top: 0.5rem; inset-inline-end: 0.5rem; }
  .lb-stage figcaption { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
}

/* ---------- اتصل بنا / التسجيل ---------- */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 5vw, 3.2rem); align-items: start; }
.info-list { display: grid; gap: 0.9rem; }
.info-item {
  display: flex; align-items: center; gap: 0.9rem;
  background: var(--card);
  border: 3px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 5px 0 var(--shadow-soft);
  padding: 0.9rem 1.1rem;
}
.info-item .icon-badge { width: 46px; height: 46px; margin: 0; border-radius: 14px; flex: none; }
.info-item .icon-badge .icon { width: 24px; height: 24px; }
.info-item b { display: block; font-size: 0.9rem; }
.info-item a { font-weight: 700; text-decoration: none; }
.info-item a:hover { text-decoration: underline; }

.map-card {
  margin-top: 1rem;
  background: var(--card);
  border: 3px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 6px 0 var(--shadow-soft);
  padding: 1.1rem;
  text-align: center;
  color: var(--muted-fg); font-size: 0.95rem;
}
.map-card .icon { color: var(--primary); margin-inline: auto; margin-bottom: 0.4rem; width: 2rem; height: 2rem; }

.form-card { padding: 1.8rem; }
.form-card h3 { font-size: 1.3rem; }
.form-card > p { color: var(--muted-fg); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.1rem; }
.field { display: grid; gap: 0.4rem; }
.field-full { grid-column: 1 / -1; }
.field label { font-weight: 700; font-size: 0.95rem; }
.field label .req { color: var(--accent-700); }
.field input, .field select, .field textarea {
  font-family: inherit; font-size: 1rem;
  color: var(--fg);
  background: var(--muted);
  border: 3px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
  transition: border-color 0.2s ease-out, background-color 0.2s ease-out;
  width: 100%;
}
.field textarea { min-height: 100px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--card);
}
.field input::placeholder, .field textarea::placeholder { color: #94a3b8; }

.form-submit { margin-top: 1.2rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
#form-status { font-weight: 700; color: #047857; }
#form-status[role="alert"] { color: var(--danger); }

/* ---------- Footer ---------- */
.site-footer { background: #0f172a; color: #cbd5e1; padding-top: 3.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; padding-bottom: 2.5rem; }
.site-footer .brand { color: #fff; margin: 0; }
.site-footer .brand small { color: #94a3b8; }
.site-footer h4 { color: #fff; font-size: 1.05rem; margin-bottom: 1rem; }
.footer-grid ul { display: grid; gap: 0.55rem; }
.footer-grid a { color: #cbd5e1; text-decoration: none; font-weight: 600; }
.footer-grid a:hover { color: #fff; text-decoration: underline; }
.footer-grid li { display: flex; align-items: center; gap: 0.5rem; }
.footer-grid .icon { color: var(--secondary); }
.socials { display: flex; gap: 0.6rem; margin-top: 1rem; }
.socials a {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  background: #1e293b;
  border: 2px solid #334155;
  border-radius: 14px;
  color: #e2e8f0;
  transition: background-color 0.2s ease-out, transform 0.2s ease-out;
}
.socials a:hover { background: var(--primary); color: #fff; transform: translateY(-3px); text-decoration: none; }
.socials .icon { width: 22px; height: 22px; color: currentColor; }

.footer-bottom {
  border-top: 2px solid #1e293b;
  padding-block: 1.3rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.92rem;
}

/* ---------- عناصر عائمة ---------- */
.float-wa, .back-top {
  position: fixed;
  z-index: 70;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 3px solid;
  box-shadow: 0 6px 0 rgba(15, 23, 42, 0.12), 0 14px 28px rgba(15, 23, 42, 0.22);
  transition: transform 0.2s ease-out;
}
.float-wa:hover, .back-top:hover { transform: translateY(-4px) scale(1.05); }
.float-wa {
  bottom: 22px; inset-inline-end: 22px;
  width: 58px; height: 58px;
  background: #22c55e; border-color: #15803d; color: #fff;
}
.float-wa .icon { width: 30px; height: 30px; }
.back-top {
  bottom: 92px; inset-inline-end: 30px;
  width: 46px; height: 46px;
  background: var(--primary); border-color: var(--primary-700); color: #fff;
  opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s ease-out, visibility 0.25s ease-out, transform 0.2s ease-out;
}
.back-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top .icon { width: 22px; height: 22px; }

/* ---------- استجابة الشاشات ---------- */
@media (max-width: 1024px) {
  .programs-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .price-row { grid-template-columns: 1fr; max-width: 30rem; margin-inline: auto; }
  .price-featured { transform: none; }
  .chip-2 { inset-inline-end: 0; }
  .chip-3 { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .nav-toggle { display: grid; }
  .nav-links {
    position: absolute; top: calc(var(--header-h) + 6px);
    inset-inline: clamp(1rem, 4vw, 2rem);
    display: none;
    flex-direction: column; align-items: stretch;
    background: var(--card);
    border: 3px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 0 var(--shadow-soft), 0 20px 36px var(--shadow-blue);
    padding: 0.9rem;
    gap: 0.2rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.8rem 1rem; }
  .nav-links a.active { background: var(--primary-100); color: var(--primary); }
  .enroll-btn { display: none; }
  .nav-links .enroll-btn { display: inline-flex; margin-top: 0.6rem; }
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 30rem; margin-inline: auto; width: 100%; }
  .chip-1 { inset-inline-start: -2%; }
  .chip-2 { inset-inline-end: -2%; }
  .about-grid { grid-template-columns: 1fr; }
  .acts-grid, .fac-grid, .tests-grid, .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .sched-row { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .acts-grid, .fac-grid, .tests-grid, .gallery-grid { grid-template-columns: 1fr; }
  .programs-grid, .team-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .brand-text small { display: none; }
  .btn-lang { padding: 0.45rem 0.8rem; }
}

/* ---------- تقليل الحركة ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .chip { animation: none; }
}