/* ----- Base resets ----- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: auto; /* Allow growth */
  overflow-x: hidden;
  overflow-y: auto; /* Enable vertical scrolling */
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Roboto", sans-serif;
  background: #e5e7eb;
  color: #0f172a;
  -webkit-font-smoothing: antialiased;
}

main {
  position: relative;
  width: 100%;
  height: auto;
  overflow: visible; /* Let content overflow */
}

/* ----- Fixed background wrapper ----- */
.bg-fixed {
  position: fixed; /* Stays in place while scrolling */
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: -2;
  pointer-events: none; /* Let clicks pass through */
}

/* 3D canvas container */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 2; /* Move this FORWARD (Middle Wall) */
}

.hero-bg canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Dusty veil / Gradients */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1; /* Move this BACKWARD (Furthest Wall) */
  /* I adjusted the opacity slightly so it looks good behind the shape */
  background:
    radial-gradient(
      circle at 20% 20%,
      rgba(255, 255, 255, 0.8),
      transparent 55%
    ),
    radial-gradient(
      circle at 80% 30%,
      rgba(224, 231, 255, 0.6), /* Slight blue tint in background */
      transparent 65%
    ),
    linear-gradient(to bottom, #fafafa, #f3f4f6 85%); /* Base background color */
}

/* ----- Sections (Replacing .slide) ----- */
/* We keep the class name 'slide' in HTML to avoid editing HTML, but we strip its effects */
section.slide {
  position: relative; /* Normal stacking */
  width: 100%;
  min-height: auto;
  height: auto;
  opacity: 1; /* Always visible */
  transform: none; /* No offsets */
  display: block;
  padding: 5rem 1.5rem; /* Add spacing between sections */
  transition: none;
  pointer-events: auto;
}

/* Hero specific override */
section.hero {
  min-height: 100vh; /* Takes full screen on load */
  display: flex;
  align-items: center;
  padding-top: 4.5rem; /* Account for navbar */
}

/* ----- Layout helpers ----- */
.section-inner {
  max-width: 960px;
  margin: 0 auto;
}

/* ----- Nav ----- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo-mark {
  width: 32px;
  height: 32px;
  
  /* Use the image directly */
  background-image: url("logo.png");
  background-size: cover; /* Cover ensures it fills the circle */
  background-position: center;
  background-repeat: no-repeat;
  
  /* Keep it round if you want a circular icon */
  border-radius: 50%; 
  
  /* Optional: Remove the background color so only the image shows */
  background-color: transparent; 
}

.nav-logo-text {
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-links {
  display: flex;
  gap: 1.25rem;
  font-size: 0.9rem;
}

.nav-links a {
  text-decoration: none;
  color: #0f172a;
  opacity: 0.7;
  transition: opacity 0.2s ease;
  cursor: pointer;
}

.nav-links a:hover {
  opacity: 1;
}

/* Language buttons */
.nav-lang {
  display: flex;
  gap: 0.3rem;
}

.lang-btn {
  border: none;
  background: transparent;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  cursor: pointer;
  color: #64748b;
  transition: background 0.15s ease, color 0.15s ease;
}

.lang-btn:hover {
  background: rgba(148, 163, 184, 0.15);
  color: #0f172a;
}

.lang-active {
  background: #0f172a;
  color: #f9fafb;
}

/* Burger menu */
.nav-burger {
  display: none;
  border: none;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
  padding: 0;
}

.nav-burger span {
  width: 18px;
  height: 2px;
  border-radius: 99px;
  background: #0f172a;
}

/* Mobile nav behavior */
@media (max-width: 768px) {
  .nav-right {
    gap: 0.75rem;
  }

  .nav-links,
  .nav-lang {
    display: none;
  }

  .nav-burger {
    display: inline-flex;
  }

  .nav.nav-open .nav-right {
    position: absolute;
    right: 1.5rem;
    top: 3.2rem;
    background: #ffffff;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.25);
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .nav.nav-open .nav-links {
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  .nav.nav-open .nav-links a {
    opacity: 1;
  }

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

  .hero-text, .card, .about-card, .about-text{
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(255, 255, 255, 0.95);
  }
}

/* ----- Hero Content ----- */
.hero-content {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.3fr);
  gap: 3rem;
  width: 100%;
}

@media (max-width: 880px) {
  .hero-content {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 2rem;
  }
}

/* Hero text */
.hero-text {
  max-width: 560px;
  /* Glass effect */
  background: rgba(255, 255, 255, 0.4); /* Very light white */
  backdrop-filter: blur(8px);           /* Blurs the 3D shape behind it */
  -webkit-backdrop-filter: blur(8px);   /* Safari support */
  padding: 2rem;                        /* Breathing room */
  border-radius: 1.5rem;                /* Smooth corners */
  border: 1px solid rgba(255, 255, 255, 0.5); /* Subtle border */
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05); /* Soft shadow for lift */
}

.hero-eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #64748b;
  margin: 0 0 0.75rem;
}

.hero-title {
  font-size: clamp(2.1rem, 4vw, 3rem);
  line-height: 1.1;
  margin: 0 0 1rem;
  color: #000000;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

.hero-subtitle {
  font-size: 0.98rem;
  line-height: 1.5;
  color: #1e293b;
  margin: 0 0 1.75rem;
  font-weight: 500;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Buttons */
.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease,
    transform 0.08s ease;
}

.btn-primary {
  background: #0f172a;
  color: #f9fafb;
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.35);
}

.btn-primary:hover {
  background: #020617;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.45);
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.85);
  color: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.6);
}

.btn-ghost:hover {
  background: #e5e7eb;
}

/* Hero side card */
.hero-card {
  align-self: center;
  padding: 1.75rem 1.5rem;
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.18);
  min-width: 260px;
}

.hero-card-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #94a3b8;
  margin-bottom: 1rem;
}

.hero-card-metric {
  margin-bottom: 1rem;
}

.hero-card-number {
  display: block;
  font-size: 2.3rem;
  font-weight: 600;
  color: #0f172a;
}

.hero-card-caption {
  font-size: 0.85rem;
  color: #64748b;
}

.hero-card-meta {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 1rem;
}

/* ----- Sections Headers & Content ----- */
.section-header {
  max-width: 640px;
  margin: 0 auto 2.5rem;
  text-align: left;
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
  color: #0f172a;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.9), 0 0 10px rgba(255, 255, 255, 0.8);
}

.section-header h2 {
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
}

.section-header p {
  margin: 0;
  font-size: 0.96rem;
  color: #1e293b;
  font-weight: 500;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

/* Grid cards */
.grid {
  display: flex;
  justify-content: center; /* Centers the 2 cards */
  flex-wrap: wrap;         /* Allows stacking on mobile */
  gap: 1.5rem;
  align-items: flex-start;
}

@media (max-width: 880px) {
  .grid {
    flex-direction: column;
  }
}

.card,
.about-card,
.hero-card {
  flex: 1;             /* Allow cards to grow evenly */
  min-width: 280px;    /* Don't get too skinny */
  max-width: 450px;

  padding: 1.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.75); /* 75% opacity */
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, background 0.2s ease;
}

.card h3 {
  font-size: 1.0rem;
  margin: 0 0 0.6rem;
  color: #0f172a;
}

.card p {
  margin: 0;
  font-size: 0.92rem;
  color: #334155;
}

.card:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
}

/* About section split */
.section-split {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr);
  gap: 2.5rem;
  align-items: flex-start;
}

@media (max-width: 880px) {
  .section-split {
    grid-template-columns: minmax(0, 1fr);
  }
}

.about-text {
  /* Glass Effect */
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.about-text h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: #000;
}

.about-text p {
  font-size: 0.96rem;
  color: #1e293b;
  margin: 0 0 0.75rem;
}

.about-list {
  margin: 1rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.94rem;
  color: #0f172a;
}

.about-list li {
  margin-bottom: 0.35rem;
}

.about-card {
  padding: 1.75rem 1.5rem;
  border-radius: 1.25rem;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 16px 46px rgba(15, 23, 42, 0.08);
}

.about-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #94a3b8;
  margin-bottom: 0.9rem;
}

.about-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: #020617;
}

.about-role {
  font-size: 0.9rem;
  color: #6b7280;
  margin-bottom: 1.1rem;
}

.about-grid {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.about-stat {
  font-size: 1.4rem;
  font-weight: 600;
}

.about-stat-label {
  font-size: 0.78rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.about-note {
  font-size: 0.9rem;
  color: #4b5563;
  margin: 0;
}

/* Reviews */
.reviews-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 880px) {
  .reviews-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.review-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.review-text {
  font-size: 0.94rem;
  color: #374151;
  font-style: italic;
}

.review-author {
  font-size: 0.86rem;
  color: #6b7280;
}

/* Students */
.students-split {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
}

#students-note{ /* FIXED TYPO */
  color: #1e293b;
}

.students-split > div:first-child {
  /* Glass Effect */
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  max-width: 600px; /* Keep it tidy */
}

/* Ensure text inside is dark */
.students-split h2 {
  margin-top: 0;
  color: #000;
}
.students-split p {
  color: #1e293b;
  margin-bottom: 0;
}

/* CTA Section */
.section-cta {
  background: #020617;
  color: #e5e7eb;
  padding: 6rem 1.5rem;
  margin-top: 4rem;
  position: relative;
  z-index: 10;
}

.section-cta-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  align-items: center;
  justify-content: space-between;
}

.section-cta-inner > div:first-child {
  max-width: 500px;
}

.section-cta-inner h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: #f9fafb;
  font-size: 2rem;
}

.section-cta-inner p {
  margin: 0;
  max-width: 480px;
  font-size: 1.1rem;
  line-height: 1.6;
  color: #cbd5f5;
}

.cta-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
  min-width: 250px;
}

.cta-note {
  font-size: 0.85rem;
  line-height: 1.4;
}

#cta-note{
  color: #94a3b8;
}

.section-cta .btn-primary {
  background: #f9fafb;
  color: #0f172a;
  box-shadow: none;
  font-weight: 600;
  padding: 0.9rem 2rem;
}

.section-cta .btn-primary:hover {
  background: #e2e8f0;
  transform: translateY(-2px);
}

.section-cta .btn-ghost {
  color: #f9fafb;
  border-color: rgba(255,255,255,0.3);
  background: transparent;
}

.section-cta .btn-ghost:hover {
  background: rgba(255,255,255,0.1);
}

/* Legal */
.legal-text {
  font-size: 0.94rem;
  color: #4b5563;
  margin-bottom: 1rem;
}

.section-legal .section-inner {
  max-width: 800px; /* Make it slightly narrower for better reading */
  /* Glass Effect */
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 2.5rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.section-legal h2 {
  margin-top: 0;
  color: #0f172a;
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
}

.legal-list {
  margin: 0.75rem 0 0;
  padding-left: 1.15rem;
  font-size: 0.9rem;
  color: #374151;
}

.legal-list li {
  margin-bottom: 0.35rem;
}

/* Footer */
.footer {
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(249, 250, 251, 0.96);
  padding: 1rem 1.5rem 1.5rem;
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  font-size: 0.85rem;
  color: #6b7280;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.footer-socials {
  display: flex;
  gap: 0.75rem;
}

.footer a {
  color: #6b7280;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}
/* ----- Vertical Stack Layout (Beautified) ----- */

.section-stack {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 1000px; /* Control overall width */
  margin: 0 auto;
  width: 100%;
}

/* Top Glass Box (Title) */
.section-stack .about-text {
  width: 100%;
  text-align: center;
}

/* Bottom White Card (Content) */
.section-stack .about-card {
  width: 100%;
  text-align: center; /* Center text */
  display: flex;
  flex-direction: column;
  align-items: center; /* Center flex children */

  padding-left: 3rem;
  padding-right: 3rem;
}

/* Reset Lists inside the stack so bullets disappear */
.section-stack .about-list {
  padding-left: 0;
  list-style: none;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* --- THE AESTHETIC FIX --- */
/* Style the items inside (Subjects, Lesson Steps, Reviews) */
.section-stack .about-grid > div,
.section-stack .about-list > li,
.section-stack .review-item {
    /* 1. Limit width for readability */
    max-width: 800px;
    width: 100%;
    
    /* 2. Add dividers between items */
    border-bottom: 1px solid rgba(148, 163, 184, 0.15); 
    
    /* 3. Spacing */
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Remove border/spacing from the very last item */
.section-stack .about-grid > div:last-child,
.section-stack .about-list > li:last-child,
.section-stack .review-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

/* Tweak titles inside the card to stand out */
.section-stack h3, 
.section-stack strong {
    font-size: 1.15rem;
    color: #0f172a;
    display: block;
    margin-bottom: 0.5rem;
}

/* Add this at the bottom of your CSS */
.section-stack .about-card {
    max-width: 100% !important; /* Let it grow to fill the 1000px container */
}
/* --- Optimized Grid for Subjects --- */
/* Ensure the grid fills the stack width */
.section-stack .grid {
    width: 100%;
    /* Keep existing grid styles (flex/grid) but ensure gap is correct */
    gap: 1.5rem;
}

/* Specific Style for Subject Cards */
.subject-card {
    /* Allow them to sit side-by-side */
    flex: 1; 
    min-width: 300px; /* Don't get too small */
    padding: 1.5rem !important; /* Slightly tighter padding */
    
    /* Remove the 'center align' from the parent stack logic so text looks good */
    text-align: left !important;
    align-items: flex-start !important;
}

/* Remove border/margin from the item inside the card since it's the only item */
.subject-card .subject-item {
    border-bottom: none;
    margin-bottom: 0;
    width: 100%;
}

/* --- Optimized Dropdown Animation --- */
.subject-body {
    max-height: 0;
    opacity: 0; /* Fade out content */
    overflow: hidden;
    /* Use a cubic-bezier for snappy feel */
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.subject-item.active .subject-body {
    /* Set this CLOSER to real height. 
       If your text is ~150px, set this to 200px. 
       500px was causing the "wait time" on close. */
    max-height: 300px; 
    opacity: 1;
    padding-top: 1rem;
}
.chevron {
    flex-shrink: 0; /* Prevent shrinking */
    margin-left: 1rem;
}