/* ==========================================================
   Kids Planet Academy — style.css
   Layout: a deep-space hero, then bright "planet" sections in
   the logo's four colours (blue, orange, green, yellow).
   ========================================================== */
:root {
  --blue: #1d4fb5;
  --blue-deep: #0d2462;
  --space: #0a1b4d;
  --orange: #f5821f;
  --green: #74b62e;
  --yellow: #ffc21a;
  --sky: #eaf3fb;          /* Zaki's light blue, very soft */
  --cream: #fbf8f1;        /* Zaki's body colour */
  --ink: #1b2a4a;
  --muted: #5a6683;
  --line: #dfe6f2;
  --white: #ffffff;

  --f-display: "Baloo Bhaijaan 2", "Tajawal", system-ui, sans-serif;
  --f-body-ar: "Tajawal", "Segoe UI", Tahoma, sans-serif;
  --f-body-en: "Nunito", "Segoe UI", system-ui, sans-serif;

  --radius: 22px;
  --header-h: 76px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--f-body-ar);
  font-size: 1.0625rem;
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
html[lang="en"] body { font-family: var(--f-body-en); line-height: 1.65; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--f-display); line-height: 1.2; margin: 0; text-wrap: balance; color: var(--blue-deep); }
p { margin: 0; }

.wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--f-display); font-weight: 700; font-size: 1.05rem;
  padding: .8em 1.6em; border-radius: 999px; text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--orange); color: var(--white); box-shadow: 0 6px 0 #c9620c; }
.btn-primary:hover { box-shadow: 0 8px 0 #c9620c; }
.btn-ghost { color: var(--white); border: 2px solid rgba(255,255,255,.55); }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-white { background: var(--white); color: var(--blue); box-shadow: 0 6px 0 rgba(0,0,0,.18); }

.eyebrow {
  display: inline-block; font-family: var(--f-display); font-weight: 700;
  font-size: .95rem; color: var(--orange); letter-spacing: .02em;
}
html[lang="en"] .eyebrow { text-transform: uppercase; letter-spacing: .1em; font-size: .82rem; }

/* ---------- Header ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); background: var(--white); z-index: 60; }
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: rgba(255,255,255,.96); backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent; transition: box-shadow .25s, border-color .25s;
}
.site-header.scrolled { box-shadow: 0 6px 24px rgba(13,36,98,.08); border-color: var(--line); }
.header-inner { display: flex; align-items: center; gap: 16px; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.brand img { width: 56px; height: 56px; border-radius: 14px; }
.brand-name { font-family: var(--f-display); font-weight: 800; font-size: 1.2rem; line-height: 1; color: var(--blue); direction: ltr; }
.brand-name small { display: block; font-size: .7rem; font-weight: 700; letter-spacing: .25em; color: var(--orange); margin-top: 4px; }

.main-nav { display: flex; gap: 4px; margin-inline-start: auto; }
.nav-link {
  font-family: var(--f-display); font-weight: 700; font-size: 1.02rem;
  text-decoration: none; color: var(--ink); padding: 8px 16px; border-radius: 999px;
  transition: background .2s, color .2s;
}
.nav-link:hover { background: var(--sky); color: var(--blue); }
.nav-link.active { background: var(--blue); color: var(--white); }

.header-actions { display: flex; align-items: center; gap: 8px; }
.lang-btn {
  font: 800 .95rem/1 var(--f-display); cursor: pointer;
  background: var(--yellow); color: var(--blue-deep); border: 0;
  min-width: 52px; height: 42px; padding: 0 14px; border-radius: 999px;
  box-shadow: 0 4px 0 #d79e00; transition: transform .15s;
}
.lang-btn:hover { transform: translateY(-1px); }
.lang-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #d79e00; }
.menu-btn { display: none; width: 44px; height: 42px; border: 0; border-radius: 12px; background: var(--sky); cursor: pointer; padding: 11px 10px; flex-direction: column; justify-content: space-between; }
.menu-btn span { display: block; height: 3px; border-radius: 3px; background: var(--blue); transition: transform .25s, opacity .25s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: var(--white);
  background:
    radial-gradient(circle at 85% 20%, rgba(116,182,46,.25), transparent 35%),
    radial-gradient(circle at 10% 90%, rgba(245,130,31,.22), transparent 40%),
    linear-gradient(160deg, var(--blue-deep), var(--space) 70%);
  padding-block: 64px 96px;
}
.hero::after { /* curved horizon into the next section */
  content: ""; position: absolute; inset: auto -10% -1px; height: 70px;
  background: var(--cream); border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.stars {
  position: absolute; inset: 0; pointer-events: none; opacity: .8;
  background-image:
    radial-gradient(2px 2px at 12% 18%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 30% 70%, #fff, transparent),
    radial-gradient(2px 2px at 55% 12%, #ffe37a, transparent),
    radial-gradient(1.5px 1.5px at 72% 55%, #fff, transparent),
    radial-gradient(2px 2px at 90% 80%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 44% 40%, #bfe0ff, transparent),
    radial-gradient(1px 1px at 20% 45%, #fff, transparent),
    radial-gradient(1px 1px at 82% 30%, #fff, transparent),
    radial-gradient(1px 1px at 64% 88%, #fff, transparent);
  animation: twinkle 4s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .45; } to { opacity: .95; } }

.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.hero-text { min-width: 0; }
.hero .eyebrow { color: var(--yellow); }
.hero h1 { color: var(--white); font-size: clamp(2.1rem, 4.6vw, 3.6rem); font-weight: 800; margin-block: 12px 18px; }
.hero .lead { font-size: 1.15rem; color: #d6e2fb; max-width: 34em; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero-facts { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.hero-facts li { border-inline-start: 3px solid var(--yellow); padding-inline-start: 12px; }
.hero-facts li:nth-child(2) { border-color: var(--green); }
.hero-facts li:nth-child(3) { border-color: var(--orange); }
.hero-facts strong { display: block; font-family: var(--f-display); font-size: 1.05rem; }
.hero-facts span { font-size: .9rem; color: #b9c9ee; line-height: 1.4; display: block; }

.hero-visual { position: relative; display: flex; justify-content: center; align-items: center; min-height: 420px; }
.orbit {
  position: absolute; width: min(460px, 92%); aspect-ratio: 1; border-radius: 50%;
  border: 2px dashed rgba(255,255,255,.22); animation: spin 40s linear infinite;
}
.orbit::before { content: ""; position: absolute; top: 8%; left: 12%; width: 18px; height: 18px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 18px var(--yellow); }
@keyframes spin { to { transform: rotate(360deg); } }
.hero-logo {
  position: relative; width: min(340px, 72%); height: auto; aspect-ratio: 1;
  border-radius: 50%; background: #fff; padding: 14px;
  box-shadow: 0 0 0 10px rgba(255,255,255,.08), 0 30px 60px rgba(0,0,0,.35);
  animation: float 6s ease-in-out infinite;
  margin-inline-end: 22%;
}
.zaki-bubble { position: absolute; bottom: -24px; inset-inline-end: 0; margin: 0; width: min(150px, 28%); z-index: 2; }
.zaki { width: 100%; height: auto; filter: drop-shadow(0 14px 18px rgba(0,0,0,.35)); animation: float 5s ease-in-out infinite reverse; }
.speech {
  position: absolute; top: -40px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  background: var(--white); color: var(--blue-deep); font-family: var(--f-display); font-weight: 700;
  font-size: .95rem; padding: 6px 14px; border-radius: 16px; box-shadow: 0 8px 20px rgba(0,0,0,.2);
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ---------- Sections ---------- */
.section { padding-block: 88px; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 48px; display: grid; gap: 10px; }
.section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 800; }
.section-head p { color: var(--muted); }

/* Image slots: show a friendly placeholder until a real photo exists */
.media {
  position: relative; overflow: hidden; border-radius: var(--radius);
  background:
    repeating-linear-gradient(45deg, rgba(29,79,181,.05) 0 12px, transparent 12px 24px),
    var(--sky);
  aspect-ratio: 4 / 3; max-width: 100%;
}
.ratio-4-3 { aspect-ratio: 4 / 3; }
.ratio-16-10 { aspect-ratio: 16 / 10; }
.media img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; transition: transform .5s ease; }
.media .ph-label {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px;
  color: var(--blue); font-family: var(--f-display); font-weight: 600; font-size: .9rem; text-align: center; padding: 12px;
  border: 2px dashed rgba(29,79,181,.3); border-radius: inherit;
}
.media .ph-label::before {
  content: ""; width: 44px; height: 44px; border-radius: 12px; background: var(--white) center / 26px no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d4fb5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='3'/%3E%3Ccircle cx='9' cy='10' r='2'/%3E%3Cpath d='M21 16l-5-5-8 8'/%3E%3C/svg%3E");
}
.media.empty img { display: none; }
.media:not(.empty) .ph-label { display: none; }

/* About */
.about { background: var(--cream); padding-top: 56px; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.about-text { display: grid; gap: 16px; min-width: 0; }
.about-text h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 800; }
.about-text p { color: var(--muted); }
.about-media .media { box-shadow: 14px 14px 0 var(--yellow); }
html[dir="rtl"] .about-media .media { box-shadow: -14px 14px 0 var(--yellow); }

/* Why us */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.why-card {
  --c: var(--blue);
  background: var(--white); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 28px 26px; display: grid; gap: 10px; align-content: start;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.why-card:hover { transform: translateY(-4px); border-color: var(--c); box-shadow: 0 10px 0 var(--c); }
.c-orange { --c: var(--orange); } .c-green { --c: var(--green); } .c-yellow { --c: var(--yellow); }
.why-icon { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--c); }
.why-icon svg { width: 30px; height: 30px; fill: none; stroke: var(--white); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.c-yellow .why-icon svg { stroke: var(--blue-deep); }
.why-card h3 { font-size: 1.3rem; }
.why-card p { color: var(--muted); font-size: 1rem; }

/* Discover */
.discover { background: var(--sky); }
.discover-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.place { margin: 0; display: grid; gap: 10px; }
.place .media { aspect-ratio: 1; }
.place:hover .media img { transform: scale(1.05); }
.place figcaption { font-family: var(--f-display); font-weight: 700; font-size: 1.08rem; color: var(--blue-deep); text-align: center; }

/* Programs */
.prog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.prog { background: var(--cream); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.prog .media { border-radius: 0; }
.prog-body { padding: 20px 22px 24px; display: grid; gap: 6px; }
.prog-body h3 { font-size: 1.25rem; }
.prog-body p { color: var(--muted); font-size: 1rem; }
.prog:nth-child(4n+1) .prog-body h3 { color: var(--blue); }
.prog:nth-child(4n+2) .prog-body h3 { color: var(--orange); }
.prog:nth-child(4n+3) .prog-body h3 { color: #4f8d12; }
.prog:nth-child(4n+4) .prog-body h3 { color: #b37f00; }

/* Events */
.events { background: var(--cream); }
.events-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.event { background: var(--white); border-radius: var(--radius); padding: 10px; box-shadow: 0 4px 0 var(--line); display: flex; flex-direction: column; transition: transform .25s; }
.event:hover { transform: rotate(-.6deg) translateY(-4px); }
.event .media { border-radius: calc(var(--radius) - 8px); }
.event-body { padding: 16px 12px 12px; display: grid; gap: 8px; justify-items: start; }
.event-body h3 { font-size: 1.25rem; }
.event-body p { color: var(--muted); font-size: 1rem; }
.tag { font-family: var(--f-display); font-weight: 700; font-size: .8rem; padding: 2px 12px; border-radius: 999px; background: var(--sky); color: var(--blue); }
.event:nth-child(3n+2) .tag { background: #fff0e2; color: #c25e05; }
.event:nth-child(3n+3) .tag { background: #eef7e3; color: #4f8d12; }

/* CTA */
.cta { background: var(--orange); color: var(--white); position: relative; overflow: hidden; }
.cta::before { content: ""; position: absolute; width: 420px; aspect-ratio: 1; border-radius: 50%; background: rgba(255,255,255,.1); inset-inline-end: -120px; top: -160px; }
.cta-inner { display: flex; align-items: center; gap: 40px; padding-block: 40px 0; position: relative; }
.cta-zaki { width: 170px; height: auto; flex-shrink: 0; align-self: flex-end; }
.cta-text { display: grid; gap: 14px; justify-items: start; padding-block-end: 40px; min-width: 0; }
.cta h2 { color: var(--white); font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 800; }
.cta p { color: #fff3e6; font-size: 1.1rem; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.contact-card {
  display: grid; justify-items: center; text-align: center; gap: 8px; padding: 30px 18px;
  border: 2px solid var(--line); border-radius: var(--radius); text-decoration: none; background: var(--white);
  transition: border-color .2s, transform .2s;
}
a.contact-card:hover { border-color: var(--blue); transform: translateY(-3px); }
.ci { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; }
.ci svg { width: 28px; height: 28px; fill: none; stroke: var(--white); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ci-green { background: #25d366; } .ci-blue { background: var(--blue); } .ci-orange { background: var(--orange); } .ci-yellow { background: var(--yellow); }
.ci-yellow svg { stroke: var(--blue-deep); }
.cc-label { font-family: var(--f-display); font-weight: 700; font-size: 1.1rem; color: var(--blue-deep); }
.cc-value { color: var(--muted); font-size: 1rem; font-variant-numeric: tabular-nums; }

/* Footer */
.site-footer { background: var(--space); color: #c9d5f2; padding-block: 64px 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.footer-brand { display: grid; gap: 16px; justify-items: start; }
.footer-brand img { width: 88px; height: 88px; border-radius: 22px; }
.footer-brand p { max-width: 32em; font-size: 1rem; }
.site-footer h4 { color: var(--white); font-size: 1.2rem; margin-bottom: 14px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 1rem; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--yellow); }
.socials { display: flex; gap: 12px; }
.social {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: rgba(255,255,255,.08); color: var(--white); transition: background .2s, transform .2s;
}
.social svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; }
.social svg .fill, .social svg.solid { fill: currentColor; stroke: none; }
.social:hover { transform: translateY(-3px); }
.social[aria-label="Instagram"]:hover { background: linear-gradient(45deg, #f9ce34, #ee2a7b, #6228d7); }
.social[aria-label="TikTok"]:hover { background: #000; }
.footer-bottom { margin-top: 48px; padding-block: 22px; border-top: 1px solid rgba(255,255,255,.1); font-size: .9rem; text-align: center; }

/* Floating WhatsApp — always bottom-left */
.wa-float {
  position: fixed; z-index: 70;
  left: calc(20px + env(safe-area-inset-left, 0px));
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  width: 60px; height: 60px; border-radius: 50%; background: #25d366;
  display: grid; place-items: center; box-shadow: 0 8px 24px rgba(37,211,102,.45);
  transition: transform .2s;
}
.wa-float::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #25d366; animation: pulse 2s ease-out infinite; }
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 34px; height: 34px; fill: #fff; }
@keyframes pulse { from { transform: scale(1); opacity: .8; } to { transform: scale(1.6); opacity: 0; } }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .discover-grid { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { gap: 24px; }
}

@media (max-width: 880px) {
  :root { --header-h: 68px; }
  .menu-btn { display: flex; }
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0; margin: 0;
    flex-direction: column; gap: 4px; background: var(--white);
    padding: 12px max(20px, env(safe-area-inset-right, 0px)) 18px max(20px, env(safe-area-inset-left, 0px));
    border-bottom: 1px solid var(--line); box-shadow: 0 14px 30px rgba(13,36,98,.12);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: all .25s;
  }
  .main-nav.open { transform: none; opacity: 1; visibility: visible; }
  .nav-link { padding: 12px 16px; font-size: 1.1rem; }
  .header-actions { margin-inline-start: auto; }

  .hero { padding-block: 40px 90px; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero .lead { margin-inline: auto; }
  .hero-buttons { justify-content: center; }
  .hero-facts { text-align: start; }
  .hero-visual { min-height: 340px; order: -1; }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .why-grid, .prog-grid, .events-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .section { padding-block: 64px; }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .brand img { width: 46px; height: 46px; }
  .brand-name { font-size: 1.05rem; }
  .hero-visual { min-height: 290px; }
  .hero-logo { width: min(230px, 62%); margin-inline-end: 26%; }
  .zaki-bubble { width: 92px; inset-inline-end: 2%; bottom: -8px; }
  .speech { font-size: .8rem; padding: 4px 10px; }
  .hero-facts { grid-template-columns: 1fr; gap: 14px; }
  .btn { width: 100%; }
  .why-grid, .prog-grid, .events-grid, .contact-grid { grid-template-columns: 1fr; }
  .discover-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .place figcaption { font-size: .95rem; }
  .cta-inner { flex-direction: column; text-align: center; gap: 8px; padding-top: 32px; }
  .cta-text { justify-items: center; order: -1; padding-block-end: 0; }
  .cta-zaki { width: 120px; align-self: center; }
  .footer-grid { grid-template-columns: 1fr; }
  .wa-float { width: 54px; height: 54px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
