:root {
  /* Color System */
  --color-primary: #3f3f95; /* Navy Blue */
  --color-secondary: #4299e1; /* Sky Blue */
  --color-secondary-light: #DFF4FF;
  --color-accent: #3182ce;
  --color-accent-light: #a4ccf1;
  --color-light: #f7fafc;
  --color-white: #ffffff;
  --color-gray-light: #edf2f7;
  --color-gray: #718096;
  --color-gray-dark: #2d3748;

  --color-accent-yellow: #FFD700; /* Gold yellow */
  --color-accent-red: #FF6B6B; /* Soft coral red */
  --color-accent-gold: #FFC107; /* Warm gold */
  --color-accent-coral: #FF8A80; /* Light coral */
  
  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Outfit', system-ui, sans-serif;
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  
  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  line-height: 1.6;
  color: var(--color-gray-dark);
  background-color: var(--color-secondary-light);
  margin: 0;
  padding: 0;
}

html, body {
    overflow-x: hidden;
}


main {
  flex: 1 0 auto; /* This pushes footer down */
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-primary);
  margin-bottom: var(--space-md);
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
  margin-top: var(--space-xl);
}

h3 {
  font-size: 1.5rem;
}

p {
  margin-bottom: var(--space-md);
}

a {
  color: var(--color-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-accent);
}

/* Layout - REUSABLE */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

section {
  padding: var(--space-lg) 0;
}

section:nth-child(even) {
  background-color: var(--color-light);
}

.section-title {
  text-align: center;
  color: var(--color-primary); /* Navy blue */
  margin-bottom: var(--space-2xl);
  font-size: 2.5rem;
  font-weight: 600;
}

@media (max-width: 768px) {
  .section-title{
    font-size: 2rem;
  }

  section {
    padding: 0;
  }
}

/* Buttons - REUSABLE */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 3rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--color-secondary);
  color: var(--color-white);
}

.btn-primary:hover {
  background-color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--color-white);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
}

/* Grid - REUSABLE */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Cards - REUSABLE */
.card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

/* ============ HEADER STYLES ============ */

/* Header - Desktop First */
header {
  background: transparent;
  top: 0;
  z-index: 1000; /* Increased for mobile menu */
  position: absolute;
}

.nav-container {
  display: flex;
  justify-content: flex-end;
  padding: 2rem;
  min-width: 90vw;
}

/* Desktop Navigation - Visible by default */
.nav-links {
  display: flex;
  gap: var(--space-xs);
  list-style: none;
}

.nav-links a {
  color: var(--color-gray-light);
  font-weight: 500;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.nav-links a:hover {
  color: var(--color-secondary);
  background-color: var(--color-light);
}


/* Mobile Menu Toggle - Hidden by default */
.mobile-menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  z-index: 1001;
  position: fixed;
  top: var(--space-2xl);
  right: var(--space-lg);
  width: 40px;
  height: 40px;
  background-color: transparent;
  transition: background-color 0.2s ease;
}

/* Custom Hamburger Design */
.hamburger {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  align-items: self-start;
}

.hamburger span {
  display: block;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
  border: 2px solid var(--color-accent-light);
}

/* Line 1: Medium length (longer than line 2, shorter than line 3) */
.hamburger span:nth-child(1) {
  width: 24px; /* Medium length */
}

/* Line 2: Shortest length */
.hamburger span:nth-child(2) {
  width: 16px; /* Shortest length */
}

/* Line 3: Longest length */
.hamburger span:nth-child(3) {
  width: 28px; /* Longest length */
}

.hamburger.active span {
  opacity: 0;
}

/* Full Screen Mobile Menu */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--color-secondary);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* X Button in top middle */
.mobile-menu-close {
  position: absolute;
  top: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 2.5rem;
  color: var(--color-white);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: var(--color-white) solid 1px;
  transition: background-color 0.2s ease;
}

.mobile-menu-close:hover {
  background-color: var(--color-primary);
}

/* Mobile Menu Links */
.mobile-menu-links {
  list-style: none;
  text-align: center;
  width: 100%;
  max-width: 300px;
  padding: 0 var(--space-md);
}

.mobile-menu-links li {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.mobile-menu-overlay.active .mobile-menu-links li {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered animation for links */
.mobile-menu-overlay.active .mobile-menu-links li:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-overlay.active .mobile-menu-links li:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu-overlay.active .mobile-menu-links li:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu-overlay.active .mobile-menu-links li:nth-child(4) { transition-delay: 0.25s; }
.mobile-menu-overlay.active .mobile-menu-links li:nth-child(5) { transition-delay: 0.3s; }
.mobile-menu-overlay.active .mobile-menu-links li:nth-child(6) { transition-delay: 0.35s; }
.mobile-menu-overlay.active .mobile-menu-links li:nth-child(7) { transition-delay: 0.4s; }

.mobile-menu-links a {
  color: var(--color-white);
  font-size: 1.5rem;
  font-weight: 600;
  display: block;
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.mobile-menu-links a:hover {
  color: var(--color-secondary);
  background-color: var(--color-light);
  transform: scale(1.05);
}

/* Mobile Header - Hide logo and desktop nav */
@media (max-width: 768px) {
  /* Hide desktop elements on mobile */
  .nav-links {
    display: none;
  }
  
  /* Show mobile menu toggle */
  .mobile-menu-toggle {
    display: block;
  }
 
}

/* Desktop Header - Show logo and nav */
@media (min-width: 769px) {
  /* Hide mobile elements on desktop */
  .mobile-menu-toggle,
  .mobile-menu-overlay {
    display: none;
  }
  
  /* Show desktop elements */
  .nav-links {
    display: flex;
  }
}

/* Responsive Base - REUSABLE */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  section {
    padding: var(--space-lg) 0;
  }
}

/* FOOTER STYLES - Using your existing variables */
.school-footer {
  background-image: url("/images/cta-bg.jpg"); /* Navy Blue */
  background-size: cover;
  color: var(--color-white);
  padding-top: var(--space-2xl);
  padding-bottom: 0;
  font-family: var(--font-body);
  margin-top: auto; /* Pushes footer to bottom if page is short */
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-xl);
}

.footer-column {
  padding: var(--space-sm);
}

.footer-logo {
  margin-bottom: var(--space-md);
}

.footer-logo-img {
  max-width: 140px;
  height: auto;
  margin-bottom: var(--space-sm);
  filter: brightness(0) invert(1); /* Makes logo white if it's dark */
}

.school-name {
  color: var(--color-secondary); /* Sky Blue */
  font-family: var(--font-heading);
  font-size: 1.4rem;
  margin: 0 0 var(--space-xs) 0;
  line-height: 1.3;
}

.tagline {
  color: var(--color-white);
  opacity: 0.9;
  font-size: 0.95rem;
  margin-top: var(--space-xs);
  line-height: 1.5;
}

.footer-heading {
  color: var(--color-secondary); /* Sky Blue */
  font-family: var(--font-heading);
  font-size: 1.2rem;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-xs);
  border-bottom: 2px solid rgba(66, 153, 225, 0.3); /* Using your sky blue with opacity */
}

/* Quick Links Styles */
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: var(--space-sm);
}

.footer-links a {
  color: var(--color-white);
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
  font-size: 1rem;
  position: relative;
  padding-left: 0;
}

.footer-links a:hover {
  color: var(--color-secondary); /* Sky Blue */
  transform: translateX(8px);
  padding-left: var(--space-xs);
}

.footer-links a::before {
  content: "›";
  position: absolute;
  left: -15px;
  opacity: 0;
  transition: all 0.3s ease;
  color: var(--color-accent-yellow); /* Gold accent */
}

.footer-links a:hover::before {
  opacity: 1;
  left: -10px;
}

/* Contact Info Styles */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
}

.contact-icon {
  color: var(--color-secondary); /* Sky Blue */
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.contact-item p {
  margin: 0;
  line-height: 1.5;
}

.contact-item a {
  color: var(--color-white);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

.contact-item a:hover {
  color: var(--color-secondary); /* Sky Blue */
}

.contact-item a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--color-secondary);
  transition: width 0.3s ease;
}

.contact-item a:hover::after {
  width: 100%;
}

/* Social Media Styles */
.social-icons {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  flex-wrap: wrap;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: var(--color-white);
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-icon:hover {
  background-color: var(--color-secondary); /* Sky Blue */
  color: var(--color-primary); /* Navy Blue */
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-secondary);
}

.social-icon svg {
  width: 20px;
  height: 20px;
}

/* Footer Bottom Styles */
.footer-bottom {
  margin-top: var(--space-2xl);
  padding: var(--space-lg) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
  text-align: center;
}

.copyright {
  color: var(--color-white);
  opacity: 0.8;
  margin-bottom: var(--space-xs);
  font-size: 0.9rem;
  font-weight: 300;
}


/* Responsive Design */
@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }
  
  .footer-bottom-content {
    text-align: center;
  }
  
  .footer-column {
    padding: var(--space-xs);
  }
}

@media (max-width: 480px) {
  .footer-container {
    grid-template-columns: 1fr;
    gap: var(--space-md);
    text-align: center;
  }
  
  .contact-item {
    justify-content: center;
  }
  
  .social-icons {
    justify-content: center;
  }
  
  .footer-links a:hover {
    transform: translateX(0);
    padding-left: 0;
  }
  
  .footer-links a:hover::before {
    display: none;
  }
}

/* Animation for subtle entrance */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.school-footer {
  animation: fadeInUp 0.6s ease-out;
}