/* Replace your current :root */
:root {
  --bg-main: #fcfcfc;
  --bg-gradient: #f4f7fb; /* Light grayish-blue seen in their 'Our Students' section */
  --card-bg: #ffffff;
  --primary-accent: #00bfa5; /* Teal/Mint green matched from their 'Sign Up' button */
  --dark-text: #222222;
  --text-main: #4a5568;
  --text-light: #718096;
  --border: rgba(0, 0, 0, 0.08);
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  --nav-h: 70px; /* Slightly taller to match their header */
}

/* Replace your current body */
body {
  font-family:
    "Poppins", system-ui, sans-serif; /* Matched from their HTML/Brand */
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  background-color: var(--bg-main);
  /* Removed your previous heavy blue radial gradient to match their clean white/off-white backgrounds */
}

/* ─── BG ANIMATION ─── */
.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.math-shape {
  position: absolute;
  color: var(--primary-blue);
  opacity: 0;
  bottom: -100px;
  animation: floatUp linear infinite;
}
@keyframes floatUp {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.18;
  }
  90% {
    opacity: 0.18;
  }
  100% {
    transform: translateY(-120vh) rotate(360deg);
    opacity: 0;
  }
}
.math-shape:nth-child(1) {
  left: 10%;
  font-size: 2.5rem;
  animation-duration: 25s;
  animation-delay: 0s;
}
.math-shape:nth-child(2) {
  left: 25%;
  font-size: 1.8rem;
  animation-duration: 20s;
  animation-delay: 5s;
}
.math-shape:nth-child(3) {
  left: 40%;
  font-size: 3.5rem;
  animation-duration: 35s;
  animation-delay: 2s;
}
.math-shape:nth-child(4) {
  left: 60%;
  font-size: 2rem;
  animation-duration: 22s;
  animation-delay: 8s;
}
.math-shape:nth-child(5) {
  left: 75%;
  font-size: 3rem;
  animation-duration: 30s;
  animation-delay: 4s;
}
.math-shape:nth-child(6) {
  left: 90%;
  font-size: 1.8rem;
  animation-duration: 18s;
  animation-delay: 1s;
}
.math-shape:nth-child(7) {
  left: 15%;
  font-size: 2rem;
  animation-duration: 28s;
  animation-delay: 12s;
}
.math-shape:nth-child(8) {
  left: 85%;
  font-size: 2.8rem;
  animation-duration: 26s;
  animation-delay: 9s;
}
.math-shape:nth-child(9) {
  left: 50%;
  font-size: 4rem;
  animation-duration: 32s;
  animation-delay: 6s;
}
.math-shape:nth-child(10) {
  left: 35%;
  font-size: 1.6rem;
  animation-duration: 19s;
  animation-delay: 15s;
}

/* ─── NAVBAR ─── */
.navbar {
  background: #ffffff; /* Changed from dark blue to white */
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  height: var(--nav-h);
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06); /* Softer shadow */
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Poppins", sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--dark-text); /* Black text instead of white */
  text-decoration: none;
  white-space: nowrap;
}
.logo i {
  font-size: 22px;
  color: #d32f2f; /* Optional: give icon a pop of color to match their red logo elements */
}

/* ─── NAVBAR LINKS FIX ─── */
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px; /* This creates the space between the links */
}

.nav-links a {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 5px 0; /* Gives a little breathing room for clicking */
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--primary-accent);
}
.hamburger {
  color: var(--dark-text);
} /* Make hamburger visible on white bg */
.hamburger:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ─── MOBILE MENU ─── */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  width: 100%;
  background: #0047a0;
  flex-direction: column;
  z-index: 998;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  transform: translateY(-10px);
  opacity: 0;
  transition: all 0.25s ease;
}
.mobile-menu.active {
  display: flex;
  transform: translateY(0);
  opacity: 1;
}
.mobile-menu a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.2s;
}
.mobile-menu a:last-child {
  border-bottom: none;
}
.mobile-menu a:hover {
  background: rgba(255, 255, 255, 0.1);
}
.mobile-menu a i {
  width: 20px;
  text-align: center;
  opacity: 0.8;
}

/* ─── HERO ─── */
.hero {
  padding: calc(var(--nav-h) + 60px) 5% 60px;
  text-align: center;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(230, 240, 250, 0.9);
  backdrop-filter: blur(4px);
  color: var(--primary-blue);
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 20px;
  border: 1px solid rgba(0, 86, 179, 0.2);
  letter-spacing: 0.5px;
}
.hero h1 {
  font-family: "Sora", sans-serif;
  font-size: clamp(2rem, 7vw, 3.6rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  letter-spacing: -0.02em;
  color: var(--dark-blue);
}
.hero h1 span {
  color: var(--primary-blue);
}
.hero p {
  font-size: clamp(0.95rem, 3.5vw, 1.2rem);
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto 36px;
  font-weight: 500;
}
.cta-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0 16px;
}
.btn {
  padding: 10px 24px;
  border-radius: 4px; /* Squarer corners matched to their 'Sign Up' button */
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  font-family: "Poppins", sans-serif;
}
.btn-primary {
  background: var(--primary-accent);
  color: #ffffff;
  border: 1px solid var(--primary-accent);
}
.btn-primary:hover {
  background: #009e89; /* Slightly darker green on hover */
}
.btn-secondary {
  background: transparent;
  color: var(--dark-text);
  border: 1px solid #cbd5e1; /* Replicates their 'Log In' button style */
}
.btn-secondary:hover {
  background: #f8fafc;
}
/* ─── CHALLENGE SECTION ─── */
.challenge-section {
  padding: 20px 5% 80px;
}

.section-title {
  font-family: "Sora", sans-serif;
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--dark-blue);
  text-align: center;
}
.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
  text-align: center;
  margin-bottom: 40px;
}

/* ─── GRID WRAP ─── */
.grid-wrap {
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  font-family: "Sora", sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary-blue);
  margin: 36px 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--light-blue);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}

/* ─── CARD CONTAINER ─── */
.card {
  background: #ffffff;
  border: 1px solid #f0f4f8;
  border-radius: 12px;
  padding: 30px 15px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
}

/* ─── CARD ICON (Solid with colored glow) ─── */
.card-icon {
  width: 70px;
  height: 70px;
  border-radius: 18px; /* Creates the rounded square look */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #ffffff !important; /* Forces icons to be white inside the block */
  transition: transform 0.3s ease;
}

.card:hover .card-icon {
  transform: scale(1.05);
}

/* ─── CARD LABEL ─── */
.card-label {
  font-weight: 600;
  color: var(--dark-text, #333333);
  font-size: 1rem;
  text-align: center;
}

/* ─── SOLID ICON COLORS & GLOWS ─── */
/* Replaces the old light-background classes */
.ic-amber {
  background: linear-gradient(135deg, #ff6b35, #e04318);
  box-shadow: 0 10px 20px rgba(224, 67, 24, 0.35);
}
.ic-purple {
  background: linear-gradient(135deg, #9d50bb, #6e48aa);
  box-shadow: 0 10px 20px rgba(110, 72, 170, 0.35);
}
.ic-rose {
  background: linear-gradient(135deg, #e84393, #c2185b);
  box-shadow: 0 10px 20px rgba(194, 24, 91, 0.35);
}
.ic-emerald {
  background: linear-gradient(135deg, #2ed573, #059669);
  box-shadow: 0 10px 20px rgba(5, 150, 105, 0.35);
}
.ic-sky {
  background: linear-gradient(135deg, #0abde3, #0284c7);
  box-shadow: 0 10px 20px rgba(2, 132, 199, 0.35);
}
.ic-indigo {
  background: linear-gradient(
    135deg,
    #fbc531,
    #e1b12c
  ); /* Gold/Yellow matching your reference */
  box-shadow: 0 10px 20px rgba(225, 177, 44, 0.35);
}

.card-logout {
  border: 1px dashed #fda4af;
}

/* ═══════════════════════════════════
         MOBILE STYLES — the main fixes
      ═══════════════════════════════════ */

/* Tablet */
@media (max-width: 768px) {
  :root {
    --nav-h: 60px;
  }

  .hamburger {
    display: block;
  }
  .nav-links {
    display: none;
  }

  .hero {
    padding: calc(var(--nav-h) + 40px) 20px 48px;
  }
  .hero p {
    padding: 0 8px;
  }

  .cta-buttons {
    gap: 10px;
  }
  .btn {
    padding: 13px 26px;
    font-size: 0.82rem;
  }

  .challenge-section {
    padding: 12px 16px 60px;
  }

  .grid-wrap {
    padding: 0;
  }

  .section-label {
    margin: 28px 0 12px;
  }

  .grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .card {
    padding: 16px 8px 14px;
    border-radius: 14px;
    gap: 8px;
  }
  .card-icon {
    width: 46px;
    height: 46px;
    font-size: 18px;
    border-radius: 12px;
  }
  .card-icon svg {
    width: 20px;
    height: 20px;
  }
  .card-label {
    font-size: 0.82rem;
  }
}

/* Mobile Phone */
@media (max-width: 480px) {
  :root {
    --nav-h: 58px;
  }

  .logo {
    font-size: 18px;
  }
  .logo i {
    font-size: 20px;
  }

  .hero {
    padding: calc(var(--nav-h) + 28px) 16px 40px;
  }

  .badge {
    font-size: 11px;
    padding: 7px 16px;
  }

  .cta-buttons {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }
  .btn {
    text-align: center;
    padding: 15px 20px;
    font-size: 0.85rem;
  }

  .challenge-section {
    padding: 8px 14px 50px;
  }

  .section-title {
    margin-bottom: 6px;
  }
  .section-subtitle {
    font-size: 0.95rem;
    margin-bottom: 28px;
  }

  .grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
  }

  /* Cards with longer labels get slightly more room */
  .card {
    padding: 14px 6px 12px;
    border-radius: 12px;
    gap: 7px;
  }
  .card-icon {
    width: 42px;
    height: 42px;
    font-size: 16px;
    border-radius: 10px;
  }
  .card-icon svg {
    width: 18px;
    height: 18px;
  }
  .card-label {
    font-size: 0.78rem;
  }
}

/* Very small phones */
@media (max-width: 360px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .card {
    padding: 16px 10px 14px;
    border-radius: 14px;
  }
  .card-icon {
    width: 44px;
    height: 44px;
  }
  .card-label {
    font-size: 0.82rem;
  }
}
/* ─── ABACUS TRAINING MODULES ─── */
.dashboard-container {
  padding: 0 5% 80px;
  max-width: 1100px;
  margin: 0 auto;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.module-card {
  background: #ffffff;
  border: 1px solid #f0f4f8;
  border-radius: 12px;
  padding: 24px 20px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.module-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
}

.module-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 16px;
}

.module-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--dark-text);
  margin: 0 0 8px 0;
  font-family: "Poppins", sans-serif;
}

.module-desc {
  font-size: 0.85rem;
  color: var(--text-light);
  margin: 0;
  line-height: 1.4;
}

/* Mobile Adjustments for the new section */
@media (max-width: 768px) {
  .module-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .module-card {
    padding: 20px 15px;
  }
}

@media (max-width: 480px) {
  .module-grid {
    grid-template-columns: 1fr; /* Stacks them 1 per row on tiny screens */
  }
}