/* ==========================================================================
   Ahl Al Arabiyah — feuille de style principale
   ========================================================================== */

:root {
  /* Palette issue du logo */
  --color-teal: #16A0A0;
  --color-teal-dark: #0C7373;
  --color-teal-10: rgba(22, 160, 160, 0.10);
  --color-navy: #103C46;
  --color-navy-dark: #0A2830;
  --color-navy-10: rgba(16, 60, 70, 0.08);
  --color-orange: #EE9A45;
  --color-orange-10: rgba(238, 154, 69, 0.14);
  --color-harakat-red: #C6362E;

  --color-bg: #F6FAFA;
  --color-bg-alt: #EFF6F6;
  --color-white: #FFFFFF;
  --color-text: #16262A;
  --color-text-light: #55696D;
  --color-border: #E1EBEB;

  --font-heading: 'Poppins', 'Cairo', sans-serif;
  --font-body: 'Inter', 'Cairo', sans-serif;
  --font-arabic: 'Amiri Quran', 'Amiri', 'Cairo', 'Inter', serif;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 26px;
  --shadow-sm: 0 2px 10px rgba(16, 60, 70, 0.06);
  --shadow-md: 0 12px 32px rgba(16, 60, 70, 0.10);
  --shadow-lg: 0 24px 60px rgba(16, 60, 70, 0.16);
  --container-w: 1180px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-navy);
  line-height: 1.2;
  margin: 0 0 .6em;
}
p { margin: 0 0 1em; }

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-navy);
  color: #fff;
  padding: 10px 16px;
  z-index: 999;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

section[id] { scroll-margin-top: 88px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn svg { flex-shrink: 0; }
.btn:hover { transform: translateY(-2px); }
.btn-sm { padding: 10px 20px; font-size: 0.88rem; }

.btn-primary {
  background: linear-gradient(135deg, var(--color-teal), var(--color-teal-dark));
  color: #fff;
  box-shadow: 0 10px 24px rgba(12, 115, 115, 0.28);
}
.btn-primary:hover { box-shadow: 0 14px 30px rgba(12, 115, 115, 0.36); }

.btn-outline {
  background: transparent;
  color: var(--color-navy);
  border-color: var(--color-border);
}
.btn-outline:hover { border-color: var(--color-teal); color: var(--color-teal-dark); }

.btn-white { background: #fff; color: var(--color-teal-dark); }
.btn-outline-white { background: transparent; border-color: rgba(255,255,255,0.55); color: #fff; }
.btn-outline-white:hover { border-color: #fff; background: rgba(255,255,255,0.08); }
.btn-ghost-white { background: rgba(255,255,255,0.12); color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .2s ease, border-color .2s ease;
}
.site-header.is-scrolled {
  box-shadow: var(--shadow-sm);
  border-bottom-color: var(--color-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.brand-logo {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-navy);
  white-space: nowrap;
}
.brand-tagline {
  font-family: var(--font-arabic);
  font-size: 0.8rem;
  color: var(--color-teal-dark);
}

.main-nav ul { display: flex; gap: 30px; }
.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-text-light);
  position: relative;
  padding: 6px 0;
}
.nav-link:hover { color: var(--color-navy); }
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--color-teal);
  transition: width .2s ease;
}
.nav-link:hover::after { width: 100%; }
.nav-link.is-active { color: var(--color-navy); }
.nav-link.is-active::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 14px; }

.lang-switch {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: .02em;
  color: var(--color-navy);
  transition: border-color .18s ease, color .18s ease;
}
.lang-switch:hover { border-color: var(--color-teal); color: var(--color-teal-dark); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--color-navy);
  transition: transform .25s ease, opacity .25s ease;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 76px 0 100px;
  background: linear-gradient(180deg, var(--color-bg) 0%, #ffffff 100%);
}
.hero-decor {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 420px at 88% -8%, var(--color-teal-10), transparent 60%),
    radial-gradient(480px 380px at 8% 30%, var(--color-orange-10), transparent 65%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  grid-template-areas: "intro visual" "details visual";
  gap: 56px;
  align-items: center;
}
.hero-intro { grid-area: intro; }
.hero-details { grid-area: details; }
.eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--color-teal-dark);
  background: var(--color-teal-10);
  padding: 7px 16px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.eyebrow-center { display: block; width: fit-content; margin-left: auto; margin-right: auto; }
.eyebrow-invert { background: rgba(255,255,255,0.16); color: #fff; }

.hero h1 {
  font-size: clamp(2.1rem, 4vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.text-accent-teal { color: var(--color-teal); }

.hero-arabic {
  font-family: var(--font-arabic);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--color-navy);
  direction: rtl;
  margin-bottom: 18px;
}
.hero-text {
  color: var(--color-text-light);
  font-size: 1.05rem;
  max-width: 540px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 40px; }

.hero-stats {
  display: flex;
  gap: 34px;
  flex-wrap: wrap;
  border-top: 1px solid var(--color-border);
  padding-top: 24px;
}
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-navy);
}
.hero-stats span { font-size: 0.85rem; color: var(--color-text-light); }

.hero-visual {
  grid-area: visual;
  position: relative;
  min-height: 420px;
}
.hero-card {
  position: absolute;
  width: 78%;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 6px solid #fff;
  background: #fff;
}
.hero-card img { width: 100%; height: 100%; object-fit: cover; }
.hero-card-back {
  right: 0;
  top: 10px;
  transform: rotate(6deg);
  opacity: 0.85;
  z-index: 1;
}
.hero-card-front {
  left: 0;
  top: 40px;
  transform: rotate(-4deg);
  z-index: 2;
  aspect-ratio: 3/4;
}
.hero-card-front img { height: 100%; }

.floating-badge {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 9px;
  background: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--color-navy);
}
.badge-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--color-teal); flex: none; }
.badge-dot-orange { background: var(--color-orange); }
.badge-top { top: 8px; left: 6%; }
.badge-bottom { bottom: 18px; right: 2%; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--color-bg-alt); }
.section-head { max-width: 680px; margin: 0 auto 56px; text-align: center; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.section-lead { color: var(--color-text-light); font-size: 1.05rem; }

/* ---------- Feature grid ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 72px;
}
.feature-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 30px 26px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--icon-bg);
  color: var(--icon-fg);
  margin-bottom: 18px;
}
.feature-icon svg { width: 24px; height: 24px; }
.feature-card h3 { font-size: 1.08rem; margin-bottom: 8px; }
.feature-card p { color: var(--color-text-light); font-size: 0.94rem; margin: 0; }

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}
.step {
  position: relative;
  padding: 26px 20px 22px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.step-index {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-teal);
  margin-bottom: 10px;
}
.step h4 { font-size: 0.98rem; margin-bottom: 6px; }
.step p { font-size: 0.86rem; color: var(--color-text-light); margin: 0; }

/* ---------- Programmes ---------- */
.program-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.program-card {
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.program-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.program-thumb {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--color-bg-alt);
}
.program-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.program-thumb-letters {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  background: linear-gradient(160deg, var(--color-teal-10), var(--color-bg-alt) 75%);
}
.program-thumb-letters span {
  font-family: var(--font-arabic);
  direction: rtl;
  font-size: 1.9rem;
  line-height: 1.7;
  color: var(--color-navy);
}
.program-card-free { border-color: var(--color-orange); }
.program-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  background: var(--color-orange);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.program-body { padding: 22px; }
.program-btn-row { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.program-download {
  width: 100%;
  border-color: var(--color-orange);
  color: var(--color-orange);
}
.program-download:hover { background: var(--color-orange-10); border-color: var(--color-orange); color: var(--color-orange); }
.program-number {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--color-teal-dark);
  background: var(--color-teal-10);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.program-range {
  font-family: var(--font-arabic);
  direction: rtl;
  text-align: left;
  font-size: 0.92rem;
  color: var(--color-orange);
  font-weight: 600;
  margin-bottom: 8px;
}
.program-body h3 { font-size: 1.02rem; margin-bottom: 8px; }
.program-body p:not(.program-range) { font-size: 0.88rem; color: var(--color-text-light); margin: 0; }

/* ---------- Hub (accueil -> modules / jeux) ---------- */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.hub-card {
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  padding: 36px 30px;
  text-align: center;
}
.hub-card h3 { margin-bottom: 10px; }
.hub-card p { color: var(--color-text-light); margin-bottom: 22px; }

/* ---------- Pages Modules / Jeux (intro + retour) ---------- */
.page-intro { padding-top: 48px; }
.page-cta-back { text-align: center; margin: 40px 0 0; }
.game-types {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 18px;
}
.game-type-pill {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--color-navy);
  background: var(--color-teal-10);
  padding: 8px 16px;
  border-radius: 999px;
}

/* ---------- Modules ---------- */
.module-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.module-card {
  min-width: 0;
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  padding: 22px 18px;
  text-align: center;
  transition: transform .2s ease, box-shadow .2s ease;
}
.module-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.module-card-bonus { border-color: rgba(238,154,69,0.4); background: linear-gradient(180deg, rgba(238,154,69,0.06), #fff 60%); }
.module-number {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--color-teal-dark);
  background: var(--color-teal-10);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.module-letters {
  font-family: var(--font-arabic);
  direction: rtl;
  font-size: 2.1rem;
  line-height: 1.7;
  color: var(--color-navy);
  margin: 0 0 14px;
}
.module-progress {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.76rem;
  color: var(--color-orange);
  margin: -6px 0 14px;
}
.module-status {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.76rem;
  margin: -8px 0 14px;
}
.module-status-available, .module-status-unlocked { color: var(--color-teal-dark); }
.module-status-locked { color: var(--color-text-light); }
.module-status-override { color: var(--color-orange); }
.module-listen { width: 100%; white-space: normal; }
.btn-outline.module-listen { border-color: rgba(22,160,160,0.35); color: var(--color-teal-dark); }
.btn-outline.module-listen:hover { border-color: var(--color-teal); background: var(--color-teal-10); color: var(--color-teal-dark); }
.module-formlab { width: 100%; white-space: normal; margin-top: 8px; border-color: rgba(16,60,70,0.55); color: var(--color-navy); }
.module-formlab:hover { border-color: var(--color-navy); background: var(--color-navy-10); color: var(--color-navy); }
.module-shadda { width: 100%; white-space: normal; margin-top: 8px; border-color: rgba(238,154,69,0.45); color: var(--color-orange); }
.module-shadda:hover { border-color: var(--color-orange); background: var(--color-orange-10); color: var(--color-orange); }
.module-sunmoon { width: 100%; white-space: normal; margin-top: 8px; }

/* ---------- Audience ---------- */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.audience-card {
  text-align: center;
  padding: 34px 22px;
  border-radius: var(--radius-md);
  background: #fff;
  border: 1px solid var(--color-border);
  transition: transform .2s ease, box-shadow .2s ease;
}
.audience-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.audience-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--color-navy-10);
  color: var(--color-navy);
  display: flex;
  align-items: center;
  justify-content: center;
}
.audience-icon svg { width: 26px; height: 26px; }
.audience-card h3 { font-size: 1rem; margin-bottom: 8px; }
.audience-card p { font-size: 0.88rem; color: var(--color-text-light); margin: 0; }

/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.gallery-item {
  position: relative;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
  padding: 0;
  cursor: zoom-in;
  aspect-ratio: 3/4;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.gallery-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform .35s ease;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 12px 14px;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  text-align: left;
  background: linear-gradient(0deg, rgba(10,40,48,0.82), transparent);
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(10, 30, 35, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: min(90vw, 620px);
  max-height: 86vh;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}
.lightbox-close {
  position: absolute;
  top: 24px;
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.14);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(255,255,255,0.24); }

/* ---------- Reader (lecture en ligne du fascicule) ---------- */
.reader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(9, 26, 31, 0.96);
  display: none;
  flex-direction: column;
}
.reader.is-open { display: flex; }
.reader-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  flex: none;
}
.reader-title {
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reader-page-indicator {
  color: rgba(255,255,255,0.7);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  flex: none;
  white-space: nowrap;
}
.reader-close {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.14);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.reader-close:hover { background: rgba(255,255,255,0.24); }

.reader-body {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 0 20px 24px;
}
.reader-nav {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  transition: background .18s ease, opacity .18s ease;
}
.reader-nav:hover { background: rgba(255,255,255,0.24); }
.reader-nav:disabled { opacity: 0.3; cursor: default; background: rgba(255,255,255,0.12); }
.reader-page-wrap {
  max-width: min(680px, 82vw);
  max-height: 100%;
  overflow-y: auto;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}
.reader-page-wrap img { width: 100%; display: block; }

@media (max-width: 680px) {
  .reader-title { display: none; }
  .reader-bar { justify-content: flex-end; }
  .reader-nav { width: 38px; height: 38px; font-size: 1.4rem; }
  .reader-body { gap: 8px; padding: 0 10px 16px; }
  .reader-page-wrap { max-width: 100%; }
}

/* ---------- Letter lab (prononciation interactive) ---------- */
.letterlab-body {
  flex: 1;
  min-height: 0;
  display: flex;
  gap: 20px;
  padding: 0 20px 24px;
}
.letterlab-tabs {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}
.letterlab-tab {
  width: 56px;
  height: 56px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border-radius: 14px;
  border: 2px solid transparent;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-family: var(--font-arabic);
  font-size: 1.6rem;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.letterlab-tab-char { display: block; transform: translateY(-50%); }
.letterlab-tab:hover { background: rgba(255,255,255,0.16); }
.letterlab-tab.is-active { background: var(--color-teal); border-color: #fff; }

.letterlab-panel {
  flex: 1;
  min-width: 0;
  background: #fff;
  border-radius: var(--radius-md);
  padding: 28px;
  overflow-y: auto;
}
.letterlab-hint { color: var(--color-text-light); font-size: 0.88rem; margin: 0 0 14px; }
.letterlab-name {
  font-family: var(--font-arabic);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 22px;
  direction: rtl;
}
.letterlab-group { margin-bottom: 22px; }
.letterlab-group h4 {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--color-text-light);
  margin: 0 0 12px;
}
.letterlab-group[data-group="tanwin"] h4 { color: var(--color-orange); }
.letterlab-group[data-group="harakat"] h4 { color: var(--color-teal-dark); }
.letterlab-group[data-group="sukun"] h4 { color: var(--color-teal-dark); }
.letterlab-group[data-group="shadda"] h4 { color: var(--color-orange); }
.letterlab-group-arabic { font-family: var(--font-arabic); text-transform: none; letter-spacing: 0; font-size: 2.3em; }
.letterlab-grid { display: flex; gap: 10px; flex-wrap: wrap; direction: rtl; }
.letterlab-cell {
  min-width: 64px;
  padding: 13px 16px;
  border-radius: 14px;
  border: 2px solid var(--color-border);
  background: var(--color-bg);
  font-family: var(--font-arabic);
  font-size: 1.4rem;
  color: var(--color-navy);
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease, color .15s ease;
  direction: rtl;
}
.letterlab-cell:hover { border-color: var(--color-teal); transform: translateY(-2px); }
.letterlab-cell.is-playing { background: var(--color-teal); border-color: var(--color-teal); color: #fff; transform: scale(1.06); }
.letterlab-mark { color: var(--color-harakat-red); font-weight: 700; }
.letterlab-cell.is-playing .letterlab-mark { color: #fff; }
.letterlab-mark-raised { position: relative; top: -0.34em; }
.letterlab-mark-tightened { position: relative; top: 0.1em; }
.letterlab-mark-widened { position: relative; top: 0.3em; }
.letterlab-mark-widened-tailed { position: relative; top: 0.55em; }

@media (max-width: 680px) {
  .letterlab-body { flex-direction: column; padding: 0 12px 16px; }
  .letterlab-tabs { flex-direction: row; overflow-x: auto; padding-bottom: 2px; }
  .letterlab-tab { width: 44px; height: 44px; font-size: 1.25rem; }
  .letterlab-panel { padding: 16px; }
  .letterlab-name { font-size: 1.7rem; margin-bottom: 14px; }
  .letterlab-cell { min-width: 52px; padding: 10px 12px; font-size: 1.15rem; }
}

/* ---------- Formes des lettres selon leur position ---------- */
.formlab-panel {
  max-width: min(560px, 82vw);
  max-height: 100%;
  overflow-y: auto;
  background: #fff;
  border-radius: var(--radius-md);
  padding: 28px;
}
.formlab-current { text-align: center; margin-bottom: 22px; }
.formlab-letter {
  display: block;
  font-family: var(--font-arabic);
  font-size: 3.2rem;
  line-height: 1.3;
  color: var(--color-navy);
  direction: rtl;
}
.formlab-name {
  display: block;
  font-family: var(--font-arabic);
  font-size: 1.1rem;
  color: var(--color-text-light);
  direction: rtl;
}
.formlab-examples { display: flex; flex-direction: column; gap: 14px; }
.formlab-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 16px 18px;
  text-align: center;
}
.formlab-card-label {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--color-teal-dark);
  margin: 0 0 8px;
}
.formlab-word {
  font-family: var(--font-arabic);
  direction: rtl;
  font-size: 2.1rem;
  line-height: 1.6;
  color: var(--color-navy);
  margin: 0;
  word-break: break-word;
}
.formlab-highlight { color: var(--color-harakat-red); }
.formlab-note {
  font-family: var(--font-heading);
  font-size: 0.76rem;
  color: var(--color-text-light);
  text-align: center;
  margin: -2px 0 0;
}
.formlab-sunmoon {
  display: block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.82rem;
  margin-top: 4px;
}
.formlab-sunmoon-sun { color: var(--color-orange); }
.formlab-sunmoon-moon { color: var(--color-teal-dark); }

/* ---------- Lettres solaires et lunaires ---------- */
.sunmoon-table {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}
.sunmoon-table-col {
  flex: 1 1 220px;
  border-radius: 14px;
  padding: 16px 18px;
  text-align: center;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
}
.sunmoon-table-sun { border-color: rgba(238,154,69,0.35); }
.sunmoon-table-moon { border-color: rgba(22,160,160,0.3); }
.sunmoon-table-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.88rem;
  margin: 0 0 10px;
}
.sunmoon-table-sun .sunmoon-table-title { color: var(--color-orange); }
.sunmoon-table-moon .sunmoon-table-title { color: var(--color-teal-dark); }
.sunmoon-table-letters {
  font-family: var(--font-arabic);
  direction: rtl;
  font-size: 1.7rem;
  line-height: 1.9;
  color: var(--color-navy);
  margin: 0;
  word-spacing: 4px;
}
.sunmoon-intro {
  color: var(--color-text-light);
  font-size: 0.92rem;
  text-align: center;
  margin: 0 0 22px;
}
.sunmoon-section-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  margin: 0 0 14px;
}
.sunmoon-section-title:not(:first-of-type) { margin-top: 28px; }
.sunmoon-section-sun { color: var(--color-orange); }
.sunmoon-section-moon { color: var(--color-teal-dark); }
.sunmoon-grid { flex-direction: row; flex-wrap: wrap; justify-content: center; }
.sunmoon-grid .formlab-card { flex: 1 1 140px; max-width: 200px; }
.sunmoon-grid .formlab-word { font-size: 1.6rem; }
.sunmoon-word-card {
  cursor: pointer;
  font: inherit;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .15s ease, transform .15s ease;
}
.sunmoon-word-card:hover, .sunmoon-word-card:focus-visible { border-color: var(--color-teal); transform: translateY(-2px); }
.sunmoon-word-play { display: block; font-size: 0.9rem; margin-top: 6px; opacity: 0.6; }

/* ---------- Jeux : cartes de la section JEUX ---------- */
.module-card-locked { opacity: .6; }
.module-badge-soon {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.7rem;
  color: var(--color-text-light);
  background: var(--color-bg-alt);
  padding: 8px 14px;
  border-radius: 999px;
  width: 100%;
  box-sizing: border-box;
}

/* ---------- Jeux : modale "Quel son as-tu entendu ?" ---------- */
.game-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  justify-content: center;
  padding: 0 20px 32px;
}
.game-body[hidden] { display: none; }
.game-panel { width: 100%; max-width: 620px; align-self: flex-start; background: #fff; border-radius: var(--radius-md); padding: 30px; text-align: center; }
.game-score {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--color-teal-dark);
  background: var(--color-teal-10);
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.game-level-info { color: var(--color-orange); font-family: var(--font-heading); font-weight: 600; font-size: 0.8rem; margin: 0 0 6px; }
.game-back-btn {
  display: block;
  width: fit-content;
  margin: 0 0 16px;
  background: none;
  border: none;
  color: var(--color-teal-dark);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 4px 0;
}
.game-back-btn:hover { text-decoration: underline; }
.game-end-back-btn {
  display: block;
  margin: 18px auto 0;
  background: none;
  border: none;
  color: rgba(255,255,255,0.75);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
}
.game-end-back-btn:hover { color: #fff; text-decoration: underline; }
.game-instruction { color: var(--color-text-light); font-size: 0.95rem; margin: 0 0 22px; }
.game-play-btn { margin: 0 auto 26px; }

/* ---------- Menu des jeux (ecran intermediaire module -> jeu) ---------- */
.game-menu-screen {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  justify-content: center;
  padding: 20px 20px 32px;
}
.game-menu-screen[hidden] { display: none; }
.game-menu-panel { width: 100%; max-width: 820px; align-self: flex-start; text-align: center; }
.game-menu-heading { color: #fff; font-family: var(--font-heading); font-weight: 700; font-size: 1.35rem; margin: 6px 0 6px; }
.game-menu-level-info { color: rgba(255,255,255,0.75); margin-bottom: 26px; }
.game-menu-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}
.game-menu-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex: 0 1 230px;
  min-height: 150px;
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  padding: 26px 16px;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
.game-menu-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.game-menu-icon { font-size: 2.8rem; line-height: 1; }
.game-menu-label { font-family: var(--font-heading); font-weight: 600; font-size: 0.95rem; color: var(--color-navy); }
.game-menu-card.is-disabled, .game-menu-card:disabled { opacity: 0.4; cursor: not-allowed; }
.game-menu-card.is-disabled:hover, .game-menu-card:disabled:hover { transform: none; box-shadow: var(--shadow-sm); }
.game-answers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.game-answers.game-answers-word { grid-template-columns: repeat(2, 1fr); }
.game-answer {
  min-width: 0;
  width: 100%;
  padding: 20px 8px;
  font-size: 1.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.game-answer-word { font-size: 1.4rem; padding: 18px 12px; }
.game-answer-script { font-size: 1.9rem; padding: 22px 14px; }
.game-answer.is-correct { background: var(--color-teal); border-color: var(--color-teal); color: #fff; }
.game-answer.is-correct .letterlab-mark { color: #fff; }
.game-answer.is-wrong { background: #E4534B; border-color: #E4534B; color: #fff; }
.game-answer.is-wrong .letterlab-mark { color: #fff; }
.game-answer:disabled { cursor: default; }
.game-answer:disabled:hover { transform: none; }
.game-feedback { font-family: var(--font-heading); font-weight: 600; font-size: 1rem; margin-bottom: 18px; min-height: 1.4em; }
#gameNextBtn[hidden] { display: none; }
#gamePlayBtn[hidden] { display: none; }
.game-feedback.is-correct { color: var(--color-teal-dark); }
.game-feedback.is-wrong { color: #C6362E; }
.game-read-panel { padding: 8px 0 4px; }
.game-read-hint { color: var(--color-text-light); font-size: 0.95rem; margin: 0 0 28px; }
.game-read-word {
  font-family: var(--font-arabic);
  direction: rtl;
  font-size: 3.4rem;
  line-height: 1.5;
  color: var(--color-navy);
  margin: 0 0 32px;
  word-break: break-word;
}
.game-read-panel .btn { margin: 0 auto; }
#gameReadListenBtn { margin-bottom: 16px; }
#gameReadNextBtn[hidden] { display: none; }
#gameDicteeRevealBtn[hidden] { display: none; }
#gameDicteeNextBtn[hidden] { display: none; }
.game-end {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 20px 32px;
}
.game-end[hidden] { display: none; }
.game-end h3 { color: #fff; font-family: var(--font-heading); margin-bottom: 10px; }
.game-end p { color: rgba(255,255,255,0.85); margin-bottom: 24px; font-size: 1.3rem; }
.game-end-message {
  max-width: 420px;
  font-size: 1rem !important;
  line-height: 1.5;
  background: rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 14px 18px;
  margin: -8px 0 24px !important;
}
.game-end-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.game-end-actions[hidden] { display: none; }
#gameContinueBtn[hidden] { display: none; }

.game-harakat-panel { padding: 8px 0 4px; }
.game-harakat-panel[hidden] { display: none; }
.game-harakat-panel .btn { margin: 0 auto; }
#gameHarakatListenBtn { margin-bottom: 24px; }
.harakat-slots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  direction: rtl;
  margin-bottom: 24px;
}
.harakat-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  font-family: var(--font-arabic);
}
/* line-height genereux : certaines lettres (ex. le point sous le baa)
   descendent sous la ligne de base et se faisaient rogner avec un
   line-height trop serre. */
.harakat-slot-base { font-size: 2.6rem; color: var(--color-navy); line-height: 1.6; }
.harakat-slot-placeholder {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 2px dashed var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--color-teal-dark);
  background: #fff;
}
.harakat-slot.is-armed .harakat-slot-placeholder { border-color: var(--color-orange); border-style: solid; }
.harakat-slot.is-correct .harakat-slot-placeholder { border-color: var(--color-teal); border-style: solid; background: var(--color-teal); color: #fff; }
.harakat-slot.is-wrong .harakat-slot-placeholder { border-color: #E4534B; border-style: solid; background: #E4534B; color: #fff; }
.harakat-picker { display: flex; justify-content: center; gap: 10px; margin-bottom: 22px; }
.harakat-picker-btn {
  font-family: var(--font-arabic);
  font-size: 1.5rem;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  border: 2px solid var(--color-border);
  background: #fff;
  color: var(--color-navy);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.harakat-picker-btn:hover { border-color: var(--color-teal); }
.harakat-picker-btn.is-armed { background: var(--color-orange); border-color: var(--color-orange); color: #fff; }
/* La kasra (marque sous la lettre) deborde sous le carre si on la centre
   comme fatha/damma (marques au-dessus) : on remonte son contenu pour
   qu'elle reste visible dans le cadre. */
.harakat-picker-btn-kasra { padding-bottom: 16px; }
.harakat-slot-placeholder-kasra { padding-bottom: 16px; }
#gameHarakatCheckBtn[hidden] { display: none; }
#gameHarakatNextBtn[hidden] { display: none; }

/* "Solaire ou lunaire ?" : une lettre a classer, deux colonnes avec un
   logo au-dessus de chacune (soleil / lune). */
.game-sort-panel { padding: 8px 0 4px; text-align: center; }
.game-sort-letter {
  font-family: var(--font-arabic);
  font-size: 4rem;
  color: var(--color-navy);
  margin: 4px 0 26px;
}
.game-sort-columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.game-sort-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 26px 12px;
  border-radius: 16px;
  border: 2px solid var(--color-border);
  background: #fff;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .1s ease;
}
.game-sort-column:hover { transform: translateY(-2px); border-color: var(--color-teal); }
.game-sort-icon { font-size: 2.4rem; line-height: 1; }
.game-sort-label { font-family: var(--font-heading); font-weight: 600; color: var(--color-navy); }
.game-sort-column.is-correct { background: var(--color-teal); border-color: var(--color-teal); }
.game-sort-column.is-correct .game-sort-label { color: #fff; }
.game-sort-column.is-wrong { background: #E4534B; border-color: #E4534B; }
.game-sort-column.is-wrong .game-sort-label { color: #fff; }
.game-sort-column:disabled { cursor: default; }
.game-sort-column:disabled:hover { transform: none; border-color: var(--color-border); }
.game-sort-column.is-correct:disabled:hover, .game-sort-column.is-wrong:disabled:hover { border-color: inherit; }
#gameSortNextBtn[hidden] { display: none; }

/* "Trie toutes les lettres" : pool des 28 lettres + deux colonnes de
   depot (soleil / lune), remplies au fur et a mesure. */
.game-sortall-panel { text-align: center; padding: 8px 0 4px; }
.sortall-pool {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 22px;
}
.sortall-letter.is-armed { background: var(--color-orange); border-color: var(--color-orange); color: #fff; }
.sortall-columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 12px;
}
.sortall-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 120px;
  padding: 14px 10px;
  border-radius: 16px;
  border: 2px dashed var(--color-border);
  background: var(--color-bg);
  cursor: pointer;
  transition: border-color .15s ease;
}
.sortall-column:hover { border-color: var(--color-teal); }
.sortall-column-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-navy);
}
.sortall-icon { font-size: 1.4rem; line-height: 1; }
.sortall-column-body { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.sortall-tile {
  font-family: var(--font-arabic);
  font-size: 1.3rem;
  padding: 6px 10px;
  border-radius: 10px;
  background: #fff;
  border: 2px solid var(--color-border);
}
.sortall-tile.is-correct { background: var(--color-teal); border-color: var(--color-teal); color: #fff; }
.sortall-tile.is-wrong { background: #E4534B; border-color: #E4534B; color: #fff; }
.game-end-message-inline {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-teal-dark);
  font-size: 1.1rem;
  margin: 10px 0 18px;
}
#sortAllReplayBtn[hidden] { display: none; }

@media (max-width: 680px) {
  .game-sort-letter { font-size: 3rem; margin-bottom: 18px; }
  .game-sort-column { padding: 18px 8px; }
  .game-sort-icon { font-size: 1.9rem; }
  .sortall-tile { font-size: 1.1rem; padding: 5px 8px; }
  .sortall-column { min-height: 100px; }
  .game-answer { font-size: 1.5rem; padding: 16px 6px; }
  .game-answer-word { font-size: 1.1rem; padding: 14px 8px; }
  .game-answer-script { font-size: 1.5rem; padding: 18px 10px; }
  .game-panel { padding: 20px 16px; }
  .game-read-word { font-size: 2.4rem; margin-bottom: 24px; }
  .game-menu-grid { gap: 14px; }
  .game-menu-card { flex-basis: 150px; min-height: 130px; padding: 20px 10px; }
  .game-menu-icon { font-size: 2.3rem; }
  .game-menu-heading { font-size: 1.15rem; }
}

/* ---------- CTA ---------- */
.cta {
  background: linear-gradient(135deg, var(--color-navy), var(--color-teal-dark));
  padding: 90px 0;
  text-align: center;
  color: #fff;
}
.cta-inner { max-width: 680px; margin: 0 auto; }
.cta h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.1rem); }
.cta-text { color: rgba(255,255,255,0.82); font-size: 1.02rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 12px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--color-navy-dark); color: rgba(255,255,255,0.75); }
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  padding-top: 64px;
  padding-bottom: 44px;
}
.footer-logo {
  width: 64px;
  height: 64px;
  background: #fff;
  border-radius: 16px;
  padding: 6px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.footer-logo img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.footer-arabic {
  font-family: var(--font-arabic);
  font-size: 1.1rem;
  color: var(--color-teal);
  margin-bottom: 10px;
}
.footer-desc { font-size: 0.92rem; max-width: 320px; }
.footer-col h4 {
  color: #fff;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 18px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 12px; }
.footer-col a { font-size: 0.92rem; }
.footer-col a:hover { color: var(--color-teal); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  font-size: 0.82rem;
  text-align: center;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .program-grid { grid-template-columns: repeat(2, 1fr); }
  .module-grid { grid-template-columns: repeat(3, 1fr); }
  .audience-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .hero-inner {
    grid-template-columns: 1fr;
    grid-template-areas: "intro" "visual" "details";
  }
  .hero-visual { aspect-ratio: 4 / 5; width: 100%; max-width: 480px; margin: 12px auto 8px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }

  .site-header.nav-open .main-nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    padding: 10px 24px 24px;
    max-height: calc(100vh - 100%);
    overflow-y: auto;
  }
  .site-header.nav-open .main-nav ul { flex-direction: column; gap: 4px; }
  .site-header.nav-open .main-nav .nav-link { display: block; padding: 12px 4px; }
}

@media (max-width: 680px) {
  .section { padding: 68px 0; }
  .hero { padding: 52px 0 72px; }
  .feature-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .step:last-child { grid-column: 1 / -1; }
  .program-grid { grid-template-columns: 1fr; }
  .hub-grid { grid-template-columns: 1fr; }
  .module-grid { grid-template-columns: repeat(2, 1fr); }
  .module-listen { font-size: 0.72rem; padding: 8px 10px; gap: 5px; }
  .module-formlab { font-size: 0.72rem; padding: 8px 10px; gap: 5px; }
  .module-shadda { font-size: 0.72rem; padding: 8px 10px; gap: 5px; }
  .module-sunmoon { font-size: 0.72rem; padding: 8px 10px; gap: 5px; }
  .audience-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .hero-stats { gap: 22px; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .header-inner { gap: 10px; }
  .brand { gap: 8px; }
  .brand-logo { width: 38px; height: 38px; border-radius: 10px; }
  .brand-name { font-size: 0.82rem; white-space: normal; line-height: 1.1; }
  .brand-tagline { display: none; }
  .header-actions { gap: 8px; }
  .header-actions .btn-primary { padding: 9px 14px; font-size: 0.78rem; }
  .steps { grid-template-columns: 1fr; }
}

@media (max-width: 360px) {
  .brand-text { display: none; }
  .header-actions { gap: 6px; }
  .header-actions .btn-primary { padding: 8px 12px; font-size: 0.72rem; }
  .lang-switch { padding: 7px 10px; font-size: 0.72rem; }
}
