/* ============================================================
   TechnoKids Algeria — Shared Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Arimo:ital,wght@0,400..700;1,400..700&family=Barriecito&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Noto+Kufi+Arabic:wght@100..900&family=Noto+Sans+Arabic:wght@100..900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

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

:root {
  --red:       #e8211a;
  --red-dark:  #b81812;
  --red-pale:  #fff1f0;
  --black:     #111010;
  --grey:      #555;
  --light:     #f7f7f5;
  --white:     #ffffff;
  --border:    #e8e8e8;

  --font-display: 'Arimo', sans-serif;
  --font-body:    'Arimo', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--black);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* RTL support */
body[dir="rtl"] { font-family: 'Noto Kufi Arabic', 'Noto Sans Arabic', sans-serif; }

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
hr { border: none; border-top: 1px solid var(--border); }

/* ── NOISE OVERLAY ── */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

.page { position: relative; z-index: 1; }

/* ════════════════════════════════
   NAV
════════════════════════════════ */
nav {
  position: sticky; top: 0; z-index: 200;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: .9rem 3rem;
}
.nav-brand {
  display: flex; align-items: center; gap: .55rem;
  font-family: var(--font-display); font-weight: 800; font-size: 1.15rem;
  letter-spacing: -.02em; color: var(--black);
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--red); /* keep fallback background */
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  font-size: .84rem; font-weight: 500; color: var(--grey);
  transition: color .18s; position: relative;
}
.nav-links a.active { color: var(--black); font-weight: 700; }
.nav-links a::after {
  content: ''; position: absolute; bottom: -3px; left: 0; right: 0; height: 2px;
  background: var(--red); transform: scaleX(0); transform-origin: left;
  transition: transform .22s ease;
}
.nav-links a:hover { color: var(--red); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-register {
  background: var(--red); color: #fff;
  padding: .45rem 1.2rem; border-radius: 50px;
  font-size: .83rem; font-weight: 700;
  transition: background .18s, transform .15s;
}
.nav-register:hover { background: var(--red-dark); transform: translateY(-1px); }

/* Lang switcher toggle */
.lang-toggle {
  display: flex; align-items: center;
  border: 1.5px solid var(--border); border-radius: 50px;
  overflow: hidden; flex-shrink: 0;
}
.lang-toggle a {
  padding: .32rem .85rem; font-size: .78rem; font-weight: 700;
  color: var(--grey); transition: background .18s, color .18s;
  line-height: 1;
}
.lang-toggle a:hover { color: var(--red); }
.lang-toggle a.lang-active {
  background: var(--red); color: #fff;
}
.lang-toggle .lang-sep {
  width: 1px; background: var(--border); height: 18px; flex-shrink: 0;
}
/* nav right group */
.nav-right {
  display: flex; align-items: center; gap: .8rem;
}

/* ════════════════════════════════
   BUTTONS
════════════════════════════════ */
.btn-primary {
  display: inline-block;
  background: var(--red); color: #fff;
  padding: .7rem 1.8rem; border-radius: 50px;
  font-weight: 700; font-size: .92rem;
  box-shadow: 0 4px 20px rgba(232,33,26,.28);
  transition: background .18s, transform .15s, box-shadow .18s;
  border: none; cursor: pointer; font-family: var(--font-body);
}
.btn-primary:hover {
  background: var(--red-dark); transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(232,33,26,.38);
}
.btn-outline {
  display: inline-block;
  border: 1.5px solid var(--border); color: var(--black);
  padding: .7rem 1.8rem; border-radius: 50px;
  font-weight: 600; font-size: .92rem;
  transition: border-color .18s, color .18s;
  background: transparent; cursor: pointer; font-family: var(--font-body);
}
.btn-outline:hover { border-color: var(--red); color: var(--red); }
.btn-white {
  display: inline-block;
  background: #fff; color: var(--red);
  padding: .7rem 2rem; border-radius: 50px;
  font-weight: 700; font-size: .92rem;
  transition: transform .15s, box-shadow .15s;
}
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.15); }

/* ════════════════════════════════
   LAYOUT HELPERS
════════════════════════════════ */
.section { padding: 5rem 3rem; }
.section-inner { max-width: 960px; margin: 0 auto; }
.section-label {
  font-size: .7rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--red); margin-bottom: .6rem;
}
.section-title {
  font-family: var(--font-display); font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 800; line-height: 1.15; letter-spacing: -.025em; margin-bottom: 1rem;
}
.section-sub { color: var(--grey); font-size: .93rem; line-height: 1.75; margin-bottom: 1.5rem; }
.text-red { color: var(--red); }
.bg-light { background: var(--light); }
.text-center { text-align: center; }

/* Split layout */
.split-layout {
  display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center;
}
.split-layout.flip { direction: rtl; }
.split-layout.flip > * { direction: ltr; }

/* Illustration panel */
.illo-panel {
  background: var(--light); border-radius: 20px; overflow: hidden;
  aspect-ratio: 4/3;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.illo-panel::before {
  content: ''; position: absolute; bottom: -30px; right: -30px;
  width: 140px; height: 140px; border-radius: 50%;
  background: rgba(232,33,26,.08);
}
.illo-panel svg { width: 70%; height: auto; position: relative; z-index: 1; }

/* ════════════════════════════════
   AGE STRIP / CTA BAND
════════════════════════════════ */
.cta-band {
  background: var(--red); color: #fff;
  padding: 3.5rem 3rem; text-align: center;
}
.cta-band h3 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; margin-bottom: .5rem;
}
.cta-band p { font-size: .95rem; opacity: .88; margin-bottom: 1.6rem; }

/* ════════════════════════════════
   VIDEO HERO
════════════════════════════════ */
.hero-video-section {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  background: #0a0a0a; /* fallback while video loads */
}

/* The video itself */
.hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Dark gradient overlay — stronger at top/bottom for nav & scroll readability */
.hero-video-overlay {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(to bottom,
      rgba(0,0,0,.55) 0%,
      rgba(0,0,0,.35) 40%,
      rgba(0,0,0,.45) 100%);
}

/* Text content sits above video */
.hero-video-content {
  position: relative; z-index: 2;
  text-align: center;
  padding: 8rem 2rem 5rem;
  max-width: 720px;
  margin: 0 auto;
}

/* Ghost button for video hero (white outline) */
.hero-btn-ghost {
  display: inline-block;
  border: 2px solid rgba(255,255,255,.7);
  color: #fff;
  padding: .68rem 1.8rem; border-radius: 50px;
  font-weight: 600; font-size: .92rem;
  transition: background .18s, border-color .18s;
  backdrop-filter: blur(4px);
}
.hero-btn-ghost:hover {
  background: rgba(255,255,255,.15);
  border-color: #fff;
}

/* Scroll bounce indicator */
.hero-scroll {
  position: absolute; bottom: 2rem; left: 50%;
  transform: translateX(-50%); z-index: 2;
  display: flex; align-items: center; justify-content: center;
}
.hero-scroll span {
  display: block; width: 24px; height: 38px;
  border: 2px solid rgba(255,255,255,.5);
  border-radius: 12px; position: relative;
}
.hero-scroll span::after {
  content: '';
  position: absolute; top: 6px; left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 8px;
  background: rgba(255,255,255,.8);
  border-radius: 2px;
  animation: scrollBounce 1.6s ease infinite;
}
@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
  80%       { transform: translateX(-50%) translateY(12px); opacity: 0; }
}

/* Mobile: reduce min-height */
@media (max-width: 640px) {
  .hero-video-section { min-height: 92vh; }
  .hero-video-content { padding: 7rem 1.5rem 4rem; }
}

/* ════════════════════════════════
   HAMBURGER MENU
════════════════════════════════ */
.hamburger {
  display: none;
  flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer;
  padding: .3rem; margin-left: .4rem;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--black); border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none;
  position: fixed; top: 57px; left: 0; right: 0; z-index: 199;
  background: #fff; border-bottom: 1px solid var(--border);
  padding: 1rem 1.2rem 1.4rem;
  flex-direction: column; gap: .2rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-size: .95rem; font-weight: 500; color: var(--black);
  padding: .65rem .5rem; border-bottom: 1px solid var(--border);
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a.active { color: var(--red); font-weight: 700; }
.mobile-nav a:hover { color: var(--red); }

/* ════════════════════════════════
   HERO DOTS
════════════════════════════════ */
.hero-dots {
  position: absolute; top: 20px; right: 60px; opacity: .18;
  display: grid; grid-template-columns: repeat(6,1fr); gap: 6px;
  pointer-events: none;
}
.hero-dots span {
  width: 4px; height: 4px; background: var(--red); border-radius: 50%; display: block;
}

/* ════════════════════════════════
   PROGRAMS GRID
════════════════════════════════ */
.programs-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem;
}
.prog-card {
  background: var(--white); border-radius: 16px;
  padding: 1.6rem 1.4rem; border: 1.5px solid transparent;
  transition: border-color .22s, transform .22s, box-shadow .22s;
  position: relative; overflow: hidden;
}
.prog-card::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: var(--red); transform: scaleX(0); transform-origin: left;
  transition: transform .28s ease;
}
.prog-card:hover {
  border-color: rgba(232,33,26,.2); transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0,0,0,.08);
}
.prog-card:hover::after { transform: scaleX(1); }
.prog-num {
  font-family: var(--font-display); font-size: 2.5rem; font-weight: 800;
  line-height: 1; margin-bottom: .5rem;
  -webkit-text-stroke: 1.5px rgba(232,33,26,.2); color: transparent;
}
.prog-name { font-weight: 700; font-size: .95rem; margin-bottom: .4rem; }
.prog-desc { font-size: .83rem; color: var(--grey); line-height: 1.6; }
.prog-card-wide { grid-column: span 2; }

/* ════════════════════════════════
   HOW IT WORKS
════════════════════════════════ */
.how-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem;
}
.how-card {
  text-align: center; padding: 2rem 1.2rem;
  border-radius: 16px; background: var(--light);
  transition: transform .22s;
}
.how-card:hover { transform: translateY(-5px); }
.how-icon {
  width: 64px; height: 64px; border-radius: 18px;
  background: var(--white); border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.1rem; font-size: 1.6rem;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  transition: background .2s, border-color .2s;
}
.how-card:hover .how-icon { background: var(--red); border-color: var(--red); }
.how-step {
  font-size: .68rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--red); margin-bottom: .3rem;
}
.how-title { font-weight: 700; font-size: .9rem; margin-bottom: .5rem; }
.how-desc { font-size: .82rem; color: var(--grey); line-height: 1.6; }

/* ════════════════════════════════
   FOOTER
════════════════════════════════ */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 3rem;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
}
.footer-brand {
  font-family: var(--font-display); font-weight: 800; font-size: 1.05rem;
  letter-spacing: -.02em;
}
.footer-contact { font-size: .8rem; color: var(--grey); line-height: 1.85; }
.footer-social { display: flex; gap: .5rem; }
.footer-social a {
  width: 34px; height: 34px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 800; color: #fff;
  transition: opacity .18s, transform .15s;
}
.footer-social a:hover { opacity: .85; transform: translateY(-2px); }
.s-ig { background: var(--red); }
.s-fb { background: #1877f2; }
.s-li { background: #0a66c2; }

/* ════════════════════════════════
   FORM STYLES (register page)
════════════════════════════════ */
.form-card {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: 20px; padding: 2.5rem; max-width: 600px; margin: 0 auto;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.form-group { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.2rem; }
.form-group label { font-size: .83rem; font-weight: 700; color: var(--black); }
.form-group input,
.form-group select,
.form-group textarea {
  border: 1.5px solid var(--border); border-radius: 10px;
  padding: .65rem 1rem; font-size: .9rem; font-family: var(--font-body);
  color: var(--black); background: var(--white);
  transition: border-color .18s, box-shadow .18s; outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--red); box-shadow: 0 0 0 3px rgba(232,33,26,.1);
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-note { font-size: .78rem; color: var(--grey); margin-top: .2rem; }
.form-divider { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }
.form-submit { width: 100%; padding: .85rem; font-size: 1rem; border-radius: 50px; }

/* ════════════════════════════════
   TESTIMONIALS
════════════════════════════════ */
.testi-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem;
}
.testi-card {
  background: var(--light); border-radius: 16px; padding: 1.8rem;
  border: 1.5px solid transparent;
  transition: border-color .22s, transform .22s;
  position: relative;
}
.testi-card:hover { border-color: rgba(232,33,26,.2); transform: translateY(-4px); }
.testi-quote {
  font-family: var(--font-display); font-size: 3rem; color: var(--red);
  line-height: .8; margin-bottom: .8rem; opacity: .4;
}
.testi-text { font-size: .9rem; color: var(--grey); line-height: 1.7; margin-bottom: 1.2rem; }
.testi-author { display: flex; align-items: center; gap: .8rem; }
.testi-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--red); display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .85rem; color: #fff; flex-shrink: 0;
}
.testi-name { font-weight: 700; font-size: .88rem; }
.testi-role { font-size: .77rem; color: var(--grey); }
.stars { color: var(--red); font-size: .85rem; margin-bottom: .6rem; }

/* ════════════════════════════════
   PAGE HERO (inner pages)
════════════════════════════════ */
.page-hero {
  padding: 4.5rem 3rem 3.5rem; text-align: center;
  position: relative; overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; top: -100px; left: 50%; transform: translateX(-50%);
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(232,33,26,.05) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero .hero-eyebrow {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--red-pale); border: 1px solid rgba(232,33,26,.2);
  color: var(--red); border-radius: 50px; padding: .28rem .9rem;
  font-size: .75rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  margin-bottom: 1rem;
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 800;
  letter-spacing: -.03em; line-height: 1.1; margin-bottom: .8rem;
}
.page-hero p { color: var(--grey); max-width: 480px; margin: 0 auto; font-size: .97rem; }

/* ════════════════════════════════
   PRIVACY / SIMPLE TEXT PAGE
════════════════════════════════ */
.prose { max-width: 720px; margin: 0 auto; padding: 0 3rem 5rem; }
.prose h2 {
  font-family: var(--font-display); font-size: 1.3rem; font-weight: 800;
  margin: 2.2rem 0 .6rem; color: var(--black);
}
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { font-size: .93rem; color: var(--grey); line-height: 1.8; margin-bottom: .7rem; }
.prose ul { padding-left: 1.4rem; }
.prose li::marker { color: var(--red); }
.prose a { color: var(--red); text-decoration: underline; }

/* ════════════════════════════════
   ANIMATIONS
════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.anim-1 { animation: fadeUp .5s ease both; }
.anim-2 { animation: fadeUp .5s .1s ease both; }
.anim-3 { animation: fadeUp .5s .18s ease both; }
.anim-4 { animation: fadeUp .5s .26s ease both; }

/* ════════════════════════════════
   RESPONSIVE — TABLET (≤860px)
════════════════════════════════ */
@media (max-width: 860px) {
  .split-layout,
  .split-layout.flip      { grid-template-columns: 1fr; gap: 2rem; direction: ltr; }
  .split-layout.flip > * { direction: ltr; }
  .illo-panel             { aspect-ratio: 3/2; max-width: 420px; margin: 0 auto; }
  .programs-grid          { grid-template-columns: 1fr 1fr; }
  .prog-card-wide         { grid-column: span 2; }
  .how-grid               { grid-template-columns: 1fr 1fr; }
  .testi-grid             { grid-template-columns: 1fr 1fr; }
  .form-row               { grid-template-columns: 1fr; }
  .form-card              { padding: 2rem 1.5rem; }
}

/* ════════════════════════════════
   RESPONSIVE — MOBILE (≤640px)
════════════════════════════════ */
@media (max-width: 640px) {
  /* Nav */
  nav                     { padding: .85rem 1.2rem; gap: .5rem; }
  .nav-links              { display: none; }
  .hamburger              { display: flex; }
  .nav-right              { gap: .5rem; }
  .lang-toggle a          { padding: .28rem .6rem; font-size: .75rem; }
  .nav-register           { padding: .4rem .9rem; font-size: .78rem; }

  /* Spacing */
  .section                { padding: 2.8rem 1.2rem; }
  .page-hero              { padding: 2.8rem 1.2rem 2rem; }
  .prose                  { padding: 0 1.2rem 3rem; }
  .cta-band               { padding: 2.5rem 1.2rem; }
  .hero-dots              { display: none; }

  /* Split */
  .split-layout           { gap: 1.5rem; }
  .illo-panel             { display: none; }

  /* Programs — single column, NO span */
  .programs-grid          { grid-template-columns: 1fr; gap: 1rem; }
  .prog-card-wide         { grid-column: span 1; }
  .prog-card              { padding: 1.3rem 1.2rem; }
  .prog-num               { font-size: 2rem; }

  /* Programs header */
  .programs-header        { flex-direction: column; align-items: flex-start; gap: 1rem; }

  /* How it works */
  .how-grid               { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .how-card               { padding: 1.4rem .9rem; }
  .how-icon               { width: 52px; height: 52px; font-size: 1.3rem; margin-bottom: .8rem; }

  /* Testimonials */
  .testi-grid             { grid-template-columns: 1fr; }
  .testi-card             { padding: 1.4rem; }

  /* Stats strip */
  .stats-strip-grid       { grid-template-columns: 1fr !important; gap: 1.2rem !important; }

  /* Footer */
  footer                  { padding: 2rem 1.2rem; flex-direction: column; align-items: flex-start; gap: 1.2rem; }

  /* Form */
  .form-card              { padding: 1.5rem 1.2rem; border-radius: 14px; }
  .form-submit            { font-size: .92rem; }

  /* Buttons */
  .btn-primary,
  .btn-outline            { padding: .65rem 1.4rem; font-size: .88rem; }
}
  .portal-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  background: #fde8e4;
  color: #b01f05;
  border: 0.5px solid #f5b5a8;
  transition: background 0.15s;
}

.portal-badge:hover {
  background: #fad6d0;
}

.portal-badge i {
  font-size: 14px;
}
.portal-badge:hover {
  background: #fad6d0;
  text-decoration: none;
}
.nav-links a.portal-badge::after {
  display: none;
}

.nav-links a.portal-badge:hover {
  color: #b01f05;
}

/* ════════════════════════════════
   RESPONSIVE — SMALL (≤400px)
════════════════════════════════ */
@media (max-width: 400px) {
  .how-grid               { grid-template-columns: 1fr; }
  .section-title          { font-size: 1.5rem; }
}
