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

html {
  scroll-behavior: smooth;
}

/* ======================================================== */
/*                     BASE STYLING                         */
/* ======================================================== */
body {
  font-family: "Poppins", sans-serif;
  background-color: #f4f6f8;
  color: #333;
  line-height: 1.6;
}

main {
  max-width: 1000px;
  margin: auto;
  padding: 40px 20px;
}

section {
  background: white;
  padding: 30px;
  margin-bottom: 25px;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

section h2 {
  margin-bottom: 15px;
  color: #0f172a;
  position: relative;
  display: inline-block;
}

section h2::after {
  content: "";
  display: block;
  height: 3px;
  width: 100%;
  background: #38bdf8;
}

/* ======================================================== */
/*                 HEADER & NAVIGATION                      */
/* ======================================================== */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  background: #0a0e1a;
  color: white;
  padding: 10px 40px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 5px;
}

.logo {
  width: 180px;
  height: auto;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  color: white;
}

nav {
  justify-self: end;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 25px;
}

nav ul li {
  white-space: nowrap;
}

nav a {
  text-decoration: none;
  color: white;
  font-weight: bold;
  transition: 0.3s;
}

nav a:hover {
  color: #38bdf8;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  font-size: 28px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

footer {
  text-align: center;
  padding: 20px;
  background: #0f172a;
  color: white;
}

/* ======================================================== */
/*                UNIFIED HERO BANNERS                      */
/* ======================================================== */

/* 1. Base layout for ALL hero sections */
.hero,
.admissions-hero,
.team-hero,
.contact-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  padding: 20px;
  margin-bottom: 25px;
  border-radius: 0;
  box-shadow: none;
}

/* 2. Set Heights */
.hero,
.admissions-hero {
  min-height: 70vh;  /* Changed from height to min-height */
  height: auto;      /* Allows it to grow if needed */
  padding: 60px 20px; /* Adds breathing room so it doesn't touch the header */
}

.team-hero,
.contact-hero {
  min-height: 40vh;  /* Changed from height to min-height */
  height: auto;
  padding: 40px 20px;
}

/* 3. Background Images & Gradients */
.hero {
  background: linear-gradient(rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.8)), url("../images/hero-bg.png");
  background-size: cover;
  background-position: center;
}

.admissions-hero {
  background: linear-gradient(rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.85)), url("../images/Admission.png");
  background-size: cover;
  background-position: center;
}

.team-hero {
  background: linear-gradient(rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.8)), url("../images/team.png");
  background-size: cover;
  background-position: center;
}

.contact-hero {
  background: linear-gradient(rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.8)), url("../images/contact.png");
  background-size: cover;
  background-position: center;
}

/* 4. Hero Content Styling */
.hero-content,
.admissions-hero-content {
  max-width: 700px;
}

.hero h1,
.admissions-hero h1,
.team-hero h1,
.contact-hero h1 {
  font-size: 48px;
  margin-bottom: 20px;
}

.hero p,
.admissions-hero p {
  font-size: 18px;
  line-height: 1.8;
  margin-bottom: 30px;
}

.admissions-hero p:first-of-type {
  margin-bottom: 10px;
  color: #38bdf8; /* Adds a nice blue highlight to this specific line */
  font-weight: 600;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.team-hero p {
  font-size: 18px;
  margin-top: -10px;
  opacity: 0.9;
}
.contact-hero p {
  font-size: 18px;
  margin-top: -10px;
  opacity: 0.9;
}

/* Buttons */
.btn-primary {
  background: #38bdf8;
  color: white;
  padding: 12px 25px;
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
  transition: 0.3s;
}

.btn-primary:hover {
  background: #0ea5e9;
}

.btn-secondary {
  border: 2px solid white;
  color: white;
  padding: 12px 25px;
  text-decoration: none;
  border-radius: 6px;
  transition: 0.3s;
}

.btn-secondary:hover {
  background: white;
  color: #0f172a;
}


/* ================= PRICING PREVIEW ================= */

.pricing-preview {
  text-align: center;
  background: linear-gradient(135deg, #0f172a, #020617);
  color: white;
}

.pricing-preview h2 {
  color: white;
}

.pricing-preview h2::after {
  background: #38bdf8;
}

.pricing-highlight-line {
  font-size: 22px;
  margin: 20px 0;
  color: #38bdf8;
  font-weight: 600;
}

.pricing-points {
  margin: 20px 0;
}

.pricing-points p {
  margin: 8px 0;
  font-size: 15px;
}

.pricing-preview .btn-primary {
  margin-top: 15px;
}

.pricing-preview .hero-buttons {
  margin-top: 20px;
}

/* ================= MODE TABLE ================= */

.mode-table-wrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  margin-top: 20px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  -webkit-overflow-scrolling: touch; /* Adds buttery-smooth swipe scrolling on iPhones */
}

.mode-table {
  width: 100%;
  min-width: 650px; /* Forces the table to stay wide so text NEVER squishes */
  border-collapse: collapse;
  background: white;
}

/* Header */
.mode-table thead {
  background: #0f172a;
  color: #0ea5e9;
}

.mode-table th {
  padding: 15px;
  text-align: center;
  font-weight: 600;
}

/* Force the 3 pricing columns to be exactly equal width (22% each) */
.mode-table th:not(:first-child) {
  width: 22%;
}

/* First column (features) */
.mode-table td:first-child {
  text-align: left;
  font-weight: 500;
  color: #0f172a;
}

/* Cells */
.mode-table td {
  padding: 12px 15px;
  text-align: center;
  border-bottom: 1px solid #e5e7eb;
  font-size: 14px;
}

/* Remove bottom border from the very last row so it looks clean */
.mode-table tbody tr:last-child td {
  border-bottom: none;
}

/* Row hover */
.mode-table tbody tr:hover {
  background: #f8fafc;
}

/* Highlight the Hybrid Column (Data cells only) */
.mode-table td:nth-child(4) {
  background: #f0f9ff;
  font-weight: 600;
}

/* Make hover effect look nice over the highlighted Hybrid column */
.mode-table tbody tr:hover td:nth-child(4) {
  background: #e0f2fe; 
}

/* --- PRICING TABLE SPECIFIC FIXES --- */
.pricing-table {
  min-width: 800px; /* Gives the 5 columns more room to breathe on Desktop */
}

/* 1. Completely turn OFF the vertical column highlight from index.html */
.pricing-table td:nth-child(4) {
  background: transparent !important; 
  font-weight: normal !important;
}
  
/* 2. Force the entire 3rd ROW (Hybrid) to be highlighted */
.pricing-table tbody tr:nth-child(3) td { 
  background-color: #f0f9ff !important;
  font-weight: 600 !important;
}

/* 3. Hover effect for the highlighted row */
.pricing-table tbody tr:nth-child(3):hover td {
  background-color: #e0f2fe !important; 
}

.pricing-policy {
  text-align: center;
  margin: 15px 0;
  font-weight: 500;
  color: #0f172a;
  font-size: 15px;
}

.sub-note {
  font-size: 0.85em; /* This ensures it is always 15% smaller than the main text */
  color: #64748b;
  display: block; /* Naturally pushes it below the price without needing <br> tags */
  margin-top: 2px;
  font-weight: 400; /* Keeps it looking light and unobtrusive */
}

.highlight-value {
  text-align: center;
  margin: 25px auto 0 auto;
  padding: 15px 20px;
  font-weight: 500;
  color: #0369a1;
  background-color: #f0f9ff; /* Soft blue background */
  border: 1px solid #bae6fd; /* Light blue border */
  border-radius: 8px;
  max-width: 750px; /* Prevents it from getting too wide on PC */
}

/* Responsive */
@media (max-width: 768px) {
  .mode-table th,
  .mode-table td {
    padding: 12px 10px;
    font-size: 13px;
  }
}

/* ================= PAYMENT COMPARISON ================= */

.comparison-table {
  min-width: 600px;
}

/* Remove inherited blue highlight from "Total Payable" (4th column) - EXCEPT for the green row */
.comparison-table tr:not(.highlight-best) td:nth-child(4) {
  background: transparent !important;
  font-weight: normal !important;
}
.comparison-table tbody tr:not(.highlight-best):hover td:nth-child(4) {
  background: transparent !important;
}

/* 1. Highlight the Installment column (BUT NOT the header 'th') */
.comparison-table td.installment-col {
  background-color: #f0f9ff !important;
  font-weight: 600;
  color: #0f172a !important; 
}
.comparison-table tbody tr:not(.highlight-best):hover td.installment-col {
  background-color: #e0f2fe !important;
}

/* 2. The Green "Annual" Row - Force ALL cells to be solid green */
.comparison-table tr.highlight-best td,
.comparison-table tr.highlight-best td.installment-col,
.comparison-table tr.highlight-best td:nth-child(4) {
  background-color: #dcfce7 !important;
  font-weight: 700 !important;
  color: #166534 !important;
}

/* 3. Freeze the Green Row so it DOES NOT change color on hover */
.comparison-table tbody tr.highlight-best:hover td,
.comparison-table tbody tr.highlight-best:hover td.installment-col,
.comparison-table tbody tr.highlight-best:hover td:nth-child(4) {
  background-color: #dcfce7 !important; 
}

/* The Grayed-out Row */
.disabled-row td {
  color: #9ca3af;
  font-style: italic;
}

.payment-comparison h3 {
  text-align: center;
  margin-top: 30px;
}

.section-title {
  margin-top: 30px;   /* space from above */
  margin-bottom: 15px;
  color: #0f172a;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: "";
  display: block;
  height: 3px;
  width: 100%;
  background: #38bdf8;
}


/* ======================================================== */
/*                     CARDS & GRIDS                        */
/* ======================================================== */

/* Courses */
.course-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.course-card {
  display: block;
  min-width: 220px;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
}

.course-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.course-card:active {
  transform: scale(0.97);
}

.course-img {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.course-img img,
.course-card img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  padding: 15px;
  display: block;
  margin: auto;
}

.course-card h3, .course-card p {
  text-align: center;
}

.course-card p {
  padding-bottom: 15px;
  font-size: 14px;
  color: #555;
}

/* Team */
.team-section {
  text-align: center;
  padding: 40px 20px;
}

.team-container {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.team-card {
  width: 220px;
  background: white;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 20px;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.team-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.team-card::after {
  content: "Click to view profile";
  font-size: 12px;
  color: #38bdf8;
  display: block;
  margin-top: 8px;
  opacity: 0;
  transition: 0.3s;
}

.team-card:hover::after {
  opacity: 1;
}

.team-card img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #38bdf8;
  padding: 3px;
}

.team-card h4 {
  margin-top: 15px;
}

.teacher-tag {
  font-size: 13px;
  font-weight: 500;
  color: #38bdf8;
  margin-top: 5px;
}

.team-card p {
  font-size: 13px;
  color: #555;
}


.modal-content {
  animation: modalFade 0.3s ease;
}

@keyframes modalFade {
  from {
    transform: translate(-50%, -60%);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%);
    opacity: 1;
  }
}

/* Contact */
.contact-section {
  text-align: center;
}

.contact-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: auto;
  padding-top: 10px;
}

.contact-card {
  background: white;
  padding: 25px;
  text-decoration: none;
  color: inherit;
  display: block;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);;
}

.contact-card h4 {
  margin-bottom: 10px;
  font-weight: 600;
}

.contact-card p {
  font-size: 14px;
  line-height: 1.6;
}

.contact-logo {
  height: 140px;
}

/* Admissions specific grids */
.batch-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.batch-card {
  background: #f8fafc;
  padding: 25px;
  border-radius: 10px;
  border-left: 5px solid #38bdf8;
  transition: transform 0.25s, box-shadow 0.25s;
}

.batch-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.subjects-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.subject-card {
  background: white;
  padding: 20px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.25s, box-shadow 0.25s;
}

.subject-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.subject-img {
  width: 100%;
  max-width: 120px;   /* Prevents the image from getting too wide */
  height: 120px;      /* Forces a strict height so it can never blow up */
  object-fit: contain; /* Ensures the whole image fits neatly inside the box without stretching */
  margin-bottom: 15px;
  display: block;
}

.admission-steps {
  margin-top: 15px;
  padding-left: 20px;
}

.admission-steps li {
  margin-bottom: 10px;
}

.admission-cta {
  text-align: center;
  background: #0f172a;
  color: white;
}

.admission-btn {
  display: inline-block;
  margin-top: 20px;
  background: #38bdf8;
  color: white;
  padding: 12px 25px;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: 0.3s;
}

.admission-btn:hover {
  background: #0ea5e9;
}

.note {
  margin-top: 20px;
  text-align: center;
  font-style: italic;
  color: #555;
}

/* Custom Styles for index.html Intro Section */
.highlight-line {
  font-size: 18px;
  font-weight: 600;
  color: #000000;
  margin-bottom: 15px;
}

.intro-points {
  margin-left: 25px;
  margin-bottom: 20px;
  list-style-type: disc;
}

.intro-points li {
  margin-bottom: 8px;
}

.subjects-line {
  font-size: 13px;
  color: #777;
  margin-top: 15px;
  margin-bottom: 20px;
}

/* ======================================================== */
/*                        MODALS                            */
/* ======================================================== */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
}

.modal-content {
  background: white;
  padding: 30px;
  max-width: 500px;
  width: 90%;
  border-radius: 10px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: modalFade 0.3s ease;
  
  /* --- THESE TWO LINES FIX THE MOBILE ISSUE --- */
  max-height: 85vh; /* Prevents the box from being taller than the screen */
  overflow-y: auto; /* Adds a scrollbar inside the box if text is too long */
}

/* Optional: Make the close button stick to the top right corner even when scrolling */
.close {
  position: sticky;
  top: -10px;
  float: right;
  font-size: 28px;
  cursor: pointer;
  background: white; /* Prevents text from overlapping it */
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: -10px;
}

.admission-modal-content {
  max-width: 750px;
  height: 80vh;
}

.admission-modal-content iframe {
  width: 100%;
  height: 100%;
  border: none;
}


/* ======================================================== */
/*                    MEDIA QUERIES                         */
/* ======================================================== */
@media (max-width: 1024px) and (min-width: 769px) {
  header {
    grid-template-columns: auto 1fr;
  }
  nav ul {
    gap: 18px;
    font-size: 14px;
  }
  .hero h1,
  .admissions-hero h1 {
    font-size: 40px;
  }
  .hero p,
  .admissions-hero p {
    font-size: 16px;
  }

  .admissions-hero p:first-of-type {
  margin-bottom: 10px;
  color: #38bdf8; /* Adds a nice blue highlight to this specific line */
  font-weight: 600;
}
  
  .course-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  /* --- EDGE-TO-EDGE MOBILE LAYOUT --- */
  main {
    padding: 0; /* Removes the gray gap around the edges of the screen */
  }

  section {
    padding: 35px 20px; /* Keeps text breathing room, but removes side gaps */
    margin-bottom: 0; /* Stacks sections directly on top of each other */
    border-radius: 0; /* Removes rounded corners so it sits flush with the screen */
    box-shadow: none; /* Removes the floating shadow */
    border-bottom: 1px solid #e5e7eb; /* Adds a clean, app-like separator line */
  }

  /* Make sure hero banners also stack flush */
  .hero, .admissions-hero, .team-hero, .contact-hero {
    margin-bottom: 0; 
  }

  /* Make tables swipe edge-to-edge beautifully */
  .mode-table-wrapper {
    margin-left: -10px; /* Pulls the table out of the section padding */
    margin-right: -10px;
    width: calc(100% + 40px); /* Stretches it to the exact screen width */
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  /* Allow columns to size naturally on mobile instead of forcing 22% width */
  .mode-table th:not(:first-child) {
    width: auto;
  }
  
  header {
    grid-template-columns: 1fr auto;
    padding: 15px 20px; /* Slightly less padding on mobile */
  }
  
  /* Shrink logo slightly on mobile so it doesn't crowd the menu button */
  .logo {
    width: 140px;
  }

  nav {
    grid-column: 1 / -1;
    justify-self: center;
    width: 100%; /* Ensures the menu takes full width */
  }
  
  nav ul {
    display: none;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
    padding-bottom: 15px; /* Adds breathing room at the bottom of the open menu */
    align-items: center;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1); /* Adds a subtle divider line above links */
    padding-top: 15px;
  }
  
  nav ul.active {
    display: flex;
  }
  
  .menu-toggle {
    display: block;
  }

  /* Make titles smaller on mobile for all banners */
  .hero h1,
  .admissions-hero h1,
  .team-hero h1,
  .contact-hero h1 {
    font-size: 32px;
  }
  
  .hero-buttons {
    flex-direction: column;
    width: 100%;
    padding: 0 20px; /* Keeps buttons from touching screen edges */
  }

  /* Makes buttons full width for easy thumb tapping */
  .btn-primary,
  .btn-secondary {
    width: 100%;
  }

  .course-container {
    justify-items: center;
  }
  
  .course-card, .team-card, .contact-card {
    width: 100%; /* Makes cards take full available width on mobile */
    max-width: 350px; /* But prevents them from getting comically large on iPads */
  }

 /* --- MOBILE TABLE UX TWEAKS --- */
  
  /* 1. Reduce total width and force columns to be perfectly equal */
  .mode-table {
    min-width: 360px; /* Reduced to pull the 'Hybrid' column into view */
    table-layout: fixed; /* Forces Online, Offline, and Hybrid to be equal narrow widths */
  }

  /* 2. Tighten padding and drop font size slightly to fit narrow columns */
  .mode-table th,
  .mode-table td {
    padding: 10px 4px; /* Less horizontal padding */
    font-size: 11.5px; /* Slightly smaller text so words don't overflow */
    word-wrap: break-word;
    hyphens: auto; /* Allows long words to break nicely if needed */
  }

  /* 3. Shrink the frozen Features column a tiny bit more */
  .mode-table th:first-child,
  .mode-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    width: 95px; /* Shrunk from 105px to give data columns more room */
    min-width: 95px;
    max-width: 95px;
    white-space: normal; 
    border-right: 1px solid #e5e7eb;
    box-shadow: 4px 0 6px rgba(0, 0, 0, 0.05); 
  }

  /* Keep the sticky header dark navy */
  .mode-table th:first-child {
    background: #0f172a;
    z-index: 3;
  }

  /* Keep the sticky cells white so sliding text doesn't overlap */
  .mode-table td:first-child {
    background: white;
  }

  /* Maintain the hover effect on the sticky column */
  .mode-table tbody tr:hover td:first-child {
    background: #f8fafc;
  }

 /* Ensure the 5-column pricing table doesn't squish too much on mobile */
  .pricing-table {
    min-width: 580px; 
  }

  /* Force the highlighted row's sticky column to stay blue on mobile */
  .pricing-table tbody tr:nth-child(3) td:first-child {
    background-color: #f0f9ff !important;
  }
  
  .pricing-table tbody tr:nth-child(3):hover td:first-child {
    background-color: #e0f2fe !important;
  }

  /* --- MOBILE MODAL FIXES --- */
  .modal-content {
    padding: 20px; 
    width: 82%;       /* Shrunk from 90% to give more side clicking room */
    max-height: 70vh; /* Shrunk from 80vh to give more top/bottom clicking room */
  }

  #course-modal-body h2 {
    font-size: 22px; 
  }
  /* Ensure the mobile sticky column also stays green on the Annual row */
  .comparison-table tr.highlight-best td:first-child,
  .comparison-table tbody tr.highlight-best:hover td:first-child {
    background-color: #dcfce7 !important;
  }

  /* Ensure the 6-column comparison table doesn't squish on mobile */
  .comparison-table {
    min-width: 650px; 
  }

  /* Give the first "sticky" column a tiny bit more room for the longer words like "Half-Yearly" */
  .comparison-table th:first-child,
  .comparison-table td:first-child {
    width: 110px; 
    min-width: 110px;
    max-width: 110px;
  }
}