/* --- THEME VARIABLES --- */
:root {
  --bg: #050a14;
  --bg2: #080f1e;
  --surface: #0d1829;
  --surface2: #111e33;
  --border: rgba(99, 179, 237, 0.12);
  --accent: #4fa3e8;
  --accent2: #7c3aed;
  --accent3: #f59e0b;
  --text: #e2e8f0;
  --text-muted: #8aadcc;
  --text-dim: #4a6fa5;
  --glow: rgba(79, 163, 232, 0.15);

  /* Added these two missing variables */
  --nav-bg: rgba(5, 10, 20, 0.8);
  --star-color: 200, 220, 255;
}

[data-theme="light"] {
  --bg: #f4f7fb;
  --bg2: #e2e8f0;
  --surface: #ffffff;
  --surface2: #f8fafc;
  --border: rgba(15, 23, 42, 0.1);

  --accent: #0284c7;
  --accent2: #6366f1;
  --accent3: #ea580c;

  --text: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --glow: rgba(2, 132, 199, 0.12);

  /* Light mode nav background and glowing blue particles */
  --nav-bg: rgba(255, 255, 255, 0.85);
  --star-color: 56, 189, 248;
}

/* Ensure smooth transitions */
body,
nav,
footer,
.stat,
.program-card,
.branch-card,
.ticker-wrap,
.contact-form,
input,
textarea,
select {
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease,
    box-shadow 0.3s ease;
}

/* Fix the navbar to use the new variable */

body,
nav,
footer,
.stat,
.program-card,
.branch-card,
.ticker-wrap,
.contact-form,
input,
textarea,
select {
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease,
    box-shadow 0.3s ease;
}
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}
#stars-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
/* --- NAVBAR --- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Larger initial padding */
  padding: 1.5rem 5%;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  /* Smooth transition for the shrinking effect */
  transition:
    padding 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.4s ease,
    border-color 0.4s ease;
}

/* The state when user scrolls down */
nav.nav-scrolled {
  /* Smaller padding */
  padding: 0.6rem 5%;
  /* Optional: Adds a slight shadow to separate it from content */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* Add a transition to the logo so it scales smoothly too */
nav .logo {
  transition: transform 0.4s ease;
  transform-origin: left center;
}

/* Shrink the logo slightly when scrolled */
nav.nav-scrolled .logo {
  transform: scale(0.9);
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.logo em {
  color: var(--accent);
  font-style: normal;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover {
  color: var(--accent);
}
.nav-cta {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff !important;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  font-weight: 600 !important;
}
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 5% 4rem;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 70% 60% at 50% 40%,
    rgba(79, 163, 232, 0.08) 0%,
    transparent 70%
  );
  pointer-events: none;
}
.hero-content {
  max-width: 820px;
  position: relative;
  z-index: 2;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(79, 163, 232, 0.1);
  border: 1px solid rgba(79, 163, 232, 0.25);
  color: var(--accent);
  border-radius: 100px;
  padding: 0.35rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.75rem;
}
.hero h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}
.hero h1 .gradient {
  background: linear-gradient(135deg, var(--accent), #a78bfa, var(--accent3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  color: var(--text-muted);
  font-size: 1.15rem;
  line-height: 1.7;
  max-width: 580px;
  margin: 0 auto 2.5rem;
}
.hero-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  padding: 0.85rem 2rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  box-shadow: 0 0 30px rgba(79, 163, 232, 0.25);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(79, 163, 232, 0.4);
}
.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.85rem 2rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition:
    border-color 0.2s,
    background 0.2s;
}
.btn-secondary:hover {
  border-color: var(--accent);
  background: var(--glow);
}
.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-dim);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: bounce 2s infinite;
}
.hero-scroll::after {
  content: "";
  display: block;
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--text-dim), transparent);
}
@keyframes bounce {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(6px);
  }
}
.stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat {
  background: var(--bg2);
  padding: 2.5rem 2rem;
  text-align: center;
}
.stat-num {
  font-family: "Space Grotesk", sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.stat-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.4rem;
}
section {
  position: relative;
  z-index: 1;
  padding: 6rem 5%;
}
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.section-tag::before {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background: var(--accent);
}
h2.section-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 560px;
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 1200px;
  margin: 3rem auto 0;
}
.about-imgs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.aimg {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--surface);
}
.aimg.tall {
  grid-column: 1/3;
  height: 220px;
}
.aimg.short {
  height: 150px;
}
.aimg span {
  font-size: 2.5rem;
}
.aimg p {
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.about-text p {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  font-size: 1rem;
}
.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 2rem;
}
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--text);
  font-size: 0.95rem;
}
.feature-list li::before {
  content: "✦";
  color: var(--accent);
  font-size: 0.7rem;
  margin-top: 0.3rem;
  flex-shrink: 0;
}
.programs-bg {
  background: var(--bg2);
}
.programs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1200px;
  margin: 3rem auto 0;
}
.program-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.25s,
    box-shadow 0.25s,
    border-color 0.25s;
}
.program-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--card-accent, linear-gradient(90deg, #4fa3e8, #7c3aed));
}
.program-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  border-color: rgba(79, 163, 232, 0.3);
}
.program-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--icon-bg, rgba(79, 163, 232, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}
.program-card h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.program-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}
.program-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tag {
  background: rgba(79, 163, 232, 0.08);
  border: 1px solid rgba(79, 163, 232, 0.15);
  color: var(--accent);
  padding: 0.25rem 0.7rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}
.ticker-wrap {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  overflow: hidden;
  position: relative;
  z-index: 1;
}
.ticker-inner {
  display: flex;
  gap: 4rem;
  white-space: nowrap;
  animation: ticker 35s linear infinite;
}
.ticker-item {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.ticker-item span {
  color: var(--accent);
  font-weight: 600;
  margin-right: 0.5rem;
}
@keyframes ticker {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}
#gallery {
  background: linear-gradient(
    135deg,
    rgba(79, 163, 232, 0.08),
    rgba(124, 58, 237, 0.08)
  );
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}
.gallery-item {
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border);
  cursor: pointer;
  transition:
    transform 0.25s,
    box-shadow 0.25s;
}
.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
}
.g-img {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--surface);
}
.gallery-item:nth-child(1) .g-img {
  height: 320px;
}
.gallery-item:nth-child(1) {
  grid-column: 1/3;
}
.gallery-item:nth-child(2) .g-img {
  height: 320px;
}
.gallery-item:nth-child(3) .g-img,
.gallery-item:nth-child(4) .g-img,
.gallery-item:nth-child(5) .g-img {
  height: 210px;
}
.g-img span {
  font-size: 3rem;
}
.g-img p {
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.g-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(5, 10, 20, 0.85) 0%,
    transparent 55%
  );
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
}
.gallery-item:hover .g-overlay {
  opacity: 1;
}
.g-overlay span {
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
}
.branches-bg {
  background: var(--bg2);
}
.branches-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  max-width: 1200px;
  margin: 3rem auto 0;
}
.branch-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.75rem;
  transition:
    transform 0.25s,
    border-color 0.25s;
  cursor: pointer;
}
.branch-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}
.branch-num {
  font-family: "Space Grotesk", sans-serif;
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}
.branch-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.branch-card p {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
}
.cta-section {
  background: linear-gradient(
    135deg,
    rgba(79, 163, 232, 0.08),
    rgba(124, 58, 237, 0.08)
  );
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.cta-inner {
  max-width: 640px;
  margin: 0 auto;
}
.cta-section h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
}
.cta-section p {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 2rem;
}
.cta-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 1200px;
  margin: 3rem auto 0;
  align-items: start;
}
.contact-info h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.contact-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  background: rgba(79, 163, 232, 0.1);
  border: 1px solid rgba(79, 163, 232, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.contact-item p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}
.contact-item strong {
  color: var(--text);
  display: block;
  margin-bottom: 0.2rem;
}
.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem;
}
.form-group {
  margin-bottom: 1.25rem;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  color: var(--text);
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 163, 232, 0.1);
}
.form-group textarea {
  resize: vertical;
  min-height: 120px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 4rem 5% 2rem;
  position: relative;
  z-index: 1;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto 3rem;
}
.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-top: 1rem;
  max-width: 280px;
}
.footer-col h4 {
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  color: var(--text);
}
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.footer-col ul a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.footer-col ul a:hover {
  color: var(--accent);
}
.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}
.social-links {
  display: flex;
  gap: 0.75rem;
}
.social-link {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--text-muted);
  transition:
    border-color 0.2s,
    color 0.2s;
}
.social-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}
@media (max-width: 1024px) {
  .programs-grid {
    grid-template-columns: 1fr 1fr;
  }
  .branches-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 768px) {
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .programs-grid {
    grid-template-columns: 1fr;
  }
  .gallery-item:nth-child(1) {
    grid-column: 1;
  }
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }
  .branches-grid {
    grid-template-columns: 1fr 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
  }
  .nav-links {
    display: none;
  }
}
/* --- ASTRONOMY THEME SLIDER --- */
.astro-switch {
  position: relative;
  display: inline-block;
  width: 64px;
  height: 32px;
  margin-left: 0.5rem;
}

/* Hide the default checkbox */
.astro-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The track (Night Sky by default) */
.astro-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #0f172a;
  transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  overflow: hidden;
}

/* The background icons (Stars for night) */
.astro-slider::after {
  content: "✨";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  transition: 0.4s;
}

/* The thumb (Crescent Moon by default) */
.astro-slider::before {
  position: absolute;
  content: "";
  height: 24px;
  width: 24px;
  left: 3px;
  bottom: 3px;
  background-color: #e2e8f0;
  transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  z-index: 2;
  /* This inset shadow creates the crescent moon effect */
  box-shadow: inset -4px -2px 0px 0px #94a3b8;
}

/* --- LIGHT MODE STATES --- */
/* The track (Day Sky) */
[data-theme="light"] .astro-slider {
  background-color: #38bdf8;
  border-color: rgba(0, 0, 0, 0.1);
}

/* The background icons (Cloud for day) */
[data-theme="light"] .astro-slider::after {
  content: "☁️";
  right: 36px; /* Moves the cloud to the left side */
  font-size: 12px;
  opacity: 0.9;
}

/* The thumb (Sun) */
[data-theme="light"] .astro-slider::before {
  transform: translateX(32px); /* Slide to the right */
  background-color: #fef08a; /* Turn yellow */
  /* Remove the crescent shadow and add a glowing sun effect */
  box-shadow:
    0 0 10px #fde047,
    inset 0 0 0 0 transparent;
}
