:root {
  --color-primary: #4f46e5;
  --color-primary-dark: #3730a3;
  --color-secondary: #f59e0b;
  --color-accent: #10b981;
  --color-pink: #f472b6;
  --color-sky: #38bdf8;
  --color-bg: #fffbf2;
  --color-card: #ffffff;
  --color-text: #2d2a32;
  --color-muted: #6b6570;
  --color-border: #e7e2d8;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 8px 24px rgba(45, 42, 50, 0.08);
  --shadow-hover: 0 14px 34px rgba(45, 42, 50, 0.14);
  --font-urdu: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', serif;
  --font-en: 'Nunito', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-urdu);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.8;
}

body[dir="ltr"] {
  font-family: var(--font-en);
  line-height: 1.6;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: var(--color-card);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(45, 42, 50, 0.05);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--color-primary);
  font-weight: 800;
  font-size: 1.35rem;
  white-space: nowrap;
}

.logo-icon {
  font-size: 1.8rem;
}

.main-nav {
  display: flex;
  gap: 8px;
}

.main-nav a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: background 0.2s, color 0.2s;
}

.main-nav a:hover,
.main-nav a:focus {
  background: #eef2ff;
  color: var(--color-primary);
}

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

.lang-toggle {
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.lang-toggle:hover {
  background: var(--color-primary-dark);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--color-text);
}

/* Hero */
.hero {
  padding: 70px 0 60px;
  background: linear-gradient(135deg, #e0e7ff 0%, #fef3c7 100%);
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero-content h1 {
  font-size: 2.6rem;
  font-weight: 800;
  margin: 0 0 18px;
  color: var(--color-primary-dark);
  line-height: 1.3;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--color-muted);
  margin: 0 0 28px;
  max-width: 540px;
}

.age-selector {
  margin-bottom: 28px;
}

.age-label {
  display: block;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--color-text);
}

.age-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.age-btn {
  background: #fff;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  border-radius: 30px;
  padding: 10px 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.age-btn:hover,
.age-btn:focus {
  background: var(--color-primary);
  color: #fff;
}

.cta-button {
  display: inline-block;
  background: var(--color-secondary);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.1rem;
  padding: 16px 32px;
  border-radius: 40px;
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.45);
}

.hero-illustration {
  position: relative;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-card {
  position: absolute;
  width: 90px;
  height: 90px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  box-shadow: var(--shadow);
  animation: float 5s ease-in-out infinite;
}

.card-books { top: 10%; left: 10%; animation-delay: 0s; }
.card-pencil { top: 55%; left: 0; animation-delay: 0.8s; }
.card-star { top: 5%; right: 15%; animation-delay: 1.4s; }
.card-rocket { top: 45%; right: 5%; animation-delay: 2s; }
.card-palette { bottom: 5%; left: 35%; animation-delay: 2.6s; }

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

/* Sections */
section {
  padding: 64px 0;
}

section h2 {
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
  margin: 0 0 12px;
  color: var(--color-primary-dark);
}

.section-intro {
  text-align: center;
  color: var(--color-muted);
  font-size: 1.05rem;
  margin: 0 auto 36px;
  max-width: 620px;
}

/* Subject grid */
.subject-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
}

.subject-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 28px 18px;
  background: var(--color-card);
  border-radius: var(--radius);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  border-top: 5px solid var(--color-primary);
}

.subject-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.subject-card.urdu { border-top-color: #6366f1; }
.subject-card.english { border-top-color: #f59e0b; }
.subject-card.math { border-top-color: #10b981; }
.subject-card.science { border-top-color: #38bdf8; }
.subject-card.islamic { border-top-color: #14b8a6; }
.subject-card.art { border-top-color: #f472b6; }

.subject-icon {
  font-size: 2.6rem;
}

.subject-name {
  font-weight: 700;
  color: var(--color-text);
  font-size: 1.1rem;
}

/* Content cards */
.content-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
}

.content-card {
  background: var(--color-card);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.content-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.card-visual {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 2.2rem;
  background: #eef2ff;
}

.content-card h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
  color: var(--color-primary-dark);
}

.content-card p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.98rem;
}

/* Activities / Games */
.activities {
  background: #f0fdf4;
}

.activity .card-visual { background: #dcfce7; }

.games {
  background: #fff7ed;
}

.game .card-visual { background: #ffedd5; }

.library .card-visual.story { background: #eef2ff; }
.library .card-visual.islamic-story { background: #f0fdfa; }
.library .card-visual.worksheet { background: #fef3c7; }

/* Parents */
.parent-resources {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.resource {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--color-card);
  padding: 22px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-weight: 700;
  color: var(--color-text);
}

.resource-icon {
  font-size: 1.8rem;
}

/* Trust */
.trust {
  background: #1e1b4b;
  color: #fff;
  padding: 44px 0;
}

.trust-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
}

.trust-badge span:first-child {
  font-size: 1.5rem;
}

/* Footer */
.site-footer {
  background: #fff;
  border-top: 1px solid var(--color-border);
  padding: 40px 0 30px;
  text-align: center;
}

.footer-tagline {
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 16px;
  font-size: 1.1rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin-bottom: 18px;
}

.footer-nav a {
  text-decoration: none;
  color: var(--color-muted);
  font-weight: 600;
}

.footer-nav a:hover {
  color: var(--color-primary);
}

.copyright {
  color: var(--color-muted);
  font-size: 0.92rem;
  margin: 0;
}

/* Responsive */
@media (max-width: 860px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .age-buttons {
    justify-content: center;
  }

  .hero-illustration {
    min-height: 260px;
    order: -1;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--color-card);
    flex-direction: column;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 8px 20px rgba(45, 42, 50, 0.08);
  }

  .main-nav.open {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 1.7rem;
  }

  .subject-grid,
  .content-cards,
  .parent-resources {
    grid-template-columns: 1fr 1fr;
  }

  .content-card {
    padding: 20px;
  }

  .hero-card {
    width: 64px;
    height: 64px;
    font-size: 1.8rem;
  }
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-secondary);
  outline-offset: 3px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-card {
    animation: none;
  }
}
