/* =========================
   Reset & Base Styles (Enhanced with better font loading and system preferences)
========================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:wght@600;700&display=swap');

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  font-size: 16px; /* Base for rem units */
  /* Enhanced: Respect user's font size preferences */
  font-size: max(16px, 1rem);
}

body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.7;
  color: #2d3748;
  background: #f7fafc;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Enhanced: Better text rendering */
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
}

/* Enhanced Dark mode support with reduced transparency */
@media (prefers-color-scheme: dark) {
  body {
    color: #e2e8f0;
    background: #1a202c;
  }
  
  /* Invert gradients and cards for dark mode */
  .card,
  .testimonial,
  .faq-item,
  .process-step {
    background: rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.1);
  }
  
  h2 {
    background: linear-gradient(135deg, #63b3ed, #4299e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
}

/* Enhanced: Support for reduced transparency */
@media (prefers-reduced-transparency: reduce) {
  .card,
  .testimonial,
  .faq-item,
  .process-step,
  header,
  .hero-arrow,
  .newsletter input,
  .newsletter button {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: none !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
  }
  
  .hero-overlay {
    background: rgba(0, 0, 0, 0.4) !important;
  }
}

.container {
  width: 90%;
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
}

h1, h2, h3, h4 {
  font-weight: 700;
  color: #1a202c;
  letter-spacing: -0.025em;
}

h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  text-align: center;
  margin-bottom: 3.5rem;
  position: relative;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: var(--primary-gradient);
  margin: 1rem auto;
  border-radius: 2px;
  box-shadow: 0 2px 10px var(--border-light);
}

.btn { 
  display: inline-flex; 
  align-items: center; 
  gap: 0.5rem; 
  padding: 16px 40px; 
  background: var(--primary-gradient); 
  color: white; 
  font-weight: 600; 
  border-radius: 50px; 
  text-decoration: none; 
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease; 
  border: none; 
  cursor: pointer; 
  box-shadow: 0 6px 20px var(--border-light); 
  position: relative; 
  overflow: hidden; 
  /* Enhanced: Better focus for accessibility */
  -webkit-tap-highlight-color: transparent;
}
.btn::before { 
  content: ''; 
  position: absolute; 
  top: 0; 
  left: -100%; 
  width: 100%; 
  height: 100%; 
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); 
  transition: left 0.5s ease; 
}
.btn:hover::before { left: 100%; }
.btn:hover { 
  transform: translateY(-3px) scale(1.02); 
  box-shadow: 0 12px 30px rgba(66, 153, 225, 0.4); 
  background: linear-gradient(135deg, #3182ce, #2b6cb0); 
}
.btn:active {
  transform: translateY(-1px) scale(1.01);
}
.btn-secondary { 
  background: transparent; 
  color: var(--primary-color); 
  border: 2px solid var(--primary-color); 
  box-shadow: none; 
}
.btn-secondary:hover { 
  background: var(--primary-color); 
  color: white; 
  box-shadow: 0 6px 20px var(--border-light); 
}

/* =========================
   CSS Variables (Enhanced with more theme options and semantic colors)
========================= */
:root {
  --primary-color: #4299e1;
  --primary-gradient: linear-gradient(135deg, #4299e1, #63b3ed);
  --secondary-color: #667eea;
  --accent-color: #ffd700;
  --text-dark: #2d3748;
  --text-gray: #718096;
  --bg-light: #f7fafc;
  --bg-secondary: #edf2f7;
  --shadow-light: 0 12px 50px rgba(0,0,0,0.08);
  --shadow-hover: 0 25px 70px rgba(0,0,0,0.15);
  --border-light: rgba(66, 153, 225, 0.1);
  --border-secondary: rgba(0, 0, 0, 0.05);
  --transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
  --border-radius: 24px;
  --spacing-lg: 6rem;
  --spacing-md: 3rem;
  --z-index-overlay: 10;
  --z-index-modal: 1000;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text-dark: #e2e8f0;
    --text-gray: #a0aec0;
    --bg-light: #1a202c;
    --bg-secondary: #2d3748;
    --shadow-light: 0 12px 50px rgba(0,0,0,0.4);
    --shadow-hover: 0 25px 70px rgba(0,0,0,0.5);
    --border-light: rgba(66, 153, 225, 0.2);
    --border-secondary: rgba(255, 255, 255, 0.05);
  }
}

/* Enhanced: High contrast mode variables */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #0066cc;
    --border-light: rgba(0, 102, 204, 0.3);
    --shadow-light: 0 4px 8px rgba(0, 0, 0, 0.2);
  }
}

/* =========================
   Header - Premium sticky with glassmorphism (Enhanced with smooth scroll listener integration)
========================= */
header { 
  background: rgba(255, 255, 255, 0.92); 
  backdrop-filter: blur(20px); 
  -webkit-backdrop-filter: blur(20px); 
  padding: 1rem 0; 
  box-shadow: 0 4px 30px rgba(0,0,0,0.1); 
  position: sticky; 
  top: 0; 
  z-index: 100; 
  transition: var(--transition); 
}
header::before { /* Fallback for no backdrop-filter */
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: inherit;
  border-radius: inherit;
}
header.scrolled { 
  padding: 0.75rem 0; 
  background: rgba(255, 255, 255, 0.95); 
  box-shadow: 0 8px 40px var(--border-light);
  border-bottom: 1px solid var(--border-light);
}
header .container { display: flex; align-items: center; justify-content: space-between; }
.logo { 
  display: flex; 
  align-items: center; 
  gap: 0.75rem; 
  text-decoration: none; 
  color: var(--text-dark); 
  font-weight: 800; 
  font-size: 1.75rem; 
  transition: var(--transition); 
  background: var(--primary-gradient); 
  -webkit-background-clip: text; 
  -webkit-text-fill-color: transparent; 
  background-clip: text; 
}
.logo-img { 
  height: 55px; 
  width: 55px; 
  object-fit: contain; 
  border-radius: 12px; 
  box-shadow: 0 4px 15px var(--border-light); 
  transition: var(--transition); 
  /* Enhanced: Lazy loading hint */
}
header.scrolled .logo-img { height: 45px; width: 45px; }
header.scrolled .logo { font-size: 1.5rem; }
nav ul { display: flex; gap: 2.5rem; list-style: none; align-items: center; }
nav a { 
  text-decoration: none; 
  color: var(--text-gray); 
  font-weight: 500; 
  transition: var(--transition); 
  position: relative; 
  padding: 0.5rem 0; 
}
nav a:hover, nav a:focus-visible { 
  color: var(--primary-color); 
  transform: translateY(-1px); 
  outline: none;
}
nav a:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  border-radius: 4px;
}
nav a::after { 
  content: ''; 
  /* position: absolute;  */
  bottom: 0; 
  left: 50%; 
  width: 0; 
  height: 2px; 
  background: var(--primary-gradient); 
  transition: width 0.3s ease; 
  transform: translateX(-50%); 
}
nav a:hover::after { width: 100%; }
#menuToggle { 
  display: none; 
  font-size: 1.5rem; 
  background: none; 
  border: none; 
  cursor: pointer; 
  color: #051a37; 
  padding: 0.5rem; 
  border-radius: 8px; 
  transition: background-color 0.3s ease; 
}
#menuToggle:hover, #menuToggle:focus-visible { 
  background: var(--border-light); 
  outline: none;
}
#menuToggle:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* =========================
   Hero Section - Parallax slider with enhanced overlays (Enhanced with CSS parallax hint and better image optimization)
========================= */
.hero {
  width: 100%;
  height: clamp(70vh, 90vh, 100vh);
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1a202c, #2d3748);
  color: #fff;
  /* Enhanced: Parallax container hint */
  transform-style: preserve-3d;
}
.hero-slider {
  display: flex;
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  height: 100%;
  will-change: transform;
}
.slide {
  flex: 0 0 100%;
  height: 100%;
  position: relative;
}
.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  will-change: transform;
  filter: brightness(0.7) contrast(1.1); /* Enhanced contrast */
  border-radius: 0 0 40px 40px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  /* Enhanced: Image optimization */
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}
.slide:hover img { transform: scale(1.02); }
.hero-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.3));
  z-index: 1;
}
.hero-content {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  text-align: center;
  max-width: 900px;
  animation: fadeInUp 1.2s ease;
}
.hero h2 {
  font-size: clamp(3rem, 8vw, 4.5rem);
  margin: 0 0 1.5rem;
  font-weight: 800;
  text-shadow: 0 4px 20px rgba(0,0,0,0.5);
  animation: slideInDown 1s ease 0.2s both;
  background: rgba(255,255,255,0.9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 1.4rem;
  margin: 0 0 2.5rem;
  opacity: 0.95;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
  animation: slideInUp 1s ease 0.4s both;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: #fff;
  border: none;
  padding: 20px 25px;
  cursor: pointer;
  font-size: 1.8rem;
  z-index: var(--z-index-overlay);
  border-radius: 50%;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.hero-arrow::before { /* Fallback for blur */
  content: '';
  position: absolute;
  inset: 0;
  background: inherit;
  border-radius: 50%;
}
.hero-arrow:hover, .hero-arrow:focus-visible { 
  background: rgba(255,255,255,0.25); 
  transform: translateY(-50%) scale(1.1); 
  box-shadow: 0 8px 30px rgba(0,0,0,0.3); 
  outline: none;
}
.hero-arrow:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.hero-arrow.prev { left: 3rem; }
.hero-arrow.next { right: 3rem; }
.hero-dots {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: var(--z-index-overlay);
}
.hero-dots button {
  width: 16px; height: 16px;
  border-radius: 50%; border: none;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.hero-dots button.active { 
  background: var(--primary-gradient); 
  transform: scale(1.3); 
  box-shadow: 0 4px 15px var(--border-light); 
}
.hero-dots button:hover, .hero-dots button:focus-visible { 
  background: var(--primary-color); 
  transform: scale(1.2); 
  outline: none;
}
.hero-dots button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* =========================
   Sections - Premium spacing, gradients, and micro-animations (Enhanced with CSS containment for performance)
========================= */
section { 
  /* padding: var(--spacing-lg) 0;  */
  position: relative; 
  /* Enhanced: Contain layout for better performance */
  contain: layout style;
}
section:nth-child(even) { 
  background: linear-gradient(135deg,#2d3748, #4a5568);

}

/* Dark mode for sections */
@media (prefers-color-scheme: dark) {
  section:nth-child(even) {
    background: linear-gradient(135deg,#2d3748, #4a5568);
    
  }
}

/* =========================
   Shared Card Styles (base for sections like about, benefits, universities) - Consolidated & Optimized with better hover states
========================= */
.card {
  background: #fff;
  padding: 2.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  transition: var(--transition);
  opacity: 0;
  transform: translateY(50px);
  border: 1px solid transparent; /* For hover effects */
  /* Enhanced: Better content isolation */
  contain: content;
}
.card.visible {
  opacity: 1;
  transform: translateY(0);
    transition-delay: 0.1s; /* Staggered reveal */
}
.card:hover {
  transform: translateY(-14px) scale(1.03);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-light);
  /* Enhanced: Subtle glow on hover */
  outline: none;
}
.card i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
  animation: float 3s ease-in-out infinite;
  display: block; /* Ensure consistent sizing */
  /* Enhanced: Better icon rendering */
  -webkit-font-smoothing: antialiased;
}
.card h3, .card h4 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
  font-weight: 700;
}
.card p {
  color: var(--text-gray);
  font-size: 1rem;
  line-height: 1.7;
}

/* Dark mode for cards */
@media (prefers-color-scheme: dark) {
  .card {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-dark);
    border-color: rgba(255, 255, 255, 0.1);
  }
  
  .card h3, .card h4 {
    color: var(--text-dark);
  }
  
  .card p {
    color: var(--text-gray);
  }
}

/* =========================
   About Section - Premium (Fixed gradient text issues, enhanced particles with better performance)
========================= */
.about-section {
  position: relative;
  padding: var(--spacing-lg) 2rem;
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #4b0082 0%, #6a11cb 50%, #2575fc 100%);
  color: #fff; /* Fixed: Direct color, not gradient */
  overflow: hidden;
  /* Enhanced: Performance optimization */
  contain: paint;
}

/* Diagonal Overlay */
.about-section::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(0,0,0,0.05) 100%);
  pointer-events: none;
  z-index: 1;
}

/* Floating Shapes (Optimized animation for performance with will-change) */
.floating-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.floating-shapes .shape {
  position: absolute;
  opacity: 0.15;
  animation: floatShape 12s ease-in-out infinite;
  will-change: transform;
}

.floating-shapes .circle {
  width: 120px; height: 120px;
  border-radius: 50%;
  background: #ffd700;
  top: 10%; left: 15%;
}

.floating-shapes .triangle {
  width: 0; height: 0;
  border-left: 60px solid transparent;
  border-right: 60px solid transparent;
  border-bottom: 120px solid #ffffff;
  top: 55%; left: 80%;
}

.floating-shapes .square {
  width: 90px; height: 90px;
  background: #ffdd59;
  top: 75%; left: 40%;
}

/* Intro Text (Fixed gradient application) */
.about-intro {
  text-align: justify;
  max-width: 800px;
  margin: 0 auto 5rem;
  position: relative;
  z-index: 2;
}

.about-intro h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 6vw, 3rem);
  font-weight: 700;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, #1f1883, #5972ff, #ffffff); /* Fixed: Proper gradient for text */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 1s ease forwards;
}

.about-intro p {
  font-size: 1.15rem;
  line-height: 1.8;
  margin-bottom: 2.5rem;
  color: rgba(255,255,255,0.9);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s ease forwards;
}

.about-intro p:nth-child(2) { animation-delay: 0.3s; }
.about-intro p:nth-child(3) { animation-delay: 0.6s; }

strong { color: #ffd700; }

/* Highlight Cards - Glass & Particles (Enhanced z-index and performance) */
.about-highlights {
  position: relative;
  z-index: 2;
}

.about-highlights .cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  position: relative;
  z-index: 2;
}

.about-highlights .card {
  background: rgba(255,255,255,0.08);
  color: #fff;
  text-align: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 14px 45px rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.1);
}

.about-highlights .card .icon-wrap i {
  background: linear-gradient(135deg, #ffd700, #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-highlights .card h3 { color: #fff; }
.about-highlights .card p { color: rgba(255,255,255,0.9); }

/* Particle Animation (behind cards) - Optimized size for perf with contain */
.about-highlights .cards::before {
  content: '';
  position: absolute;
  width: 100%; height: 100%;
  top: 0; left: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 1%, transparent 1%) repeat;
  background-size: 20px 20px;
  animation: particleMove 20s linear infinite;
  z-index: 1;
  pointer-events: none;
  contain: paint;
}

/* =========================
   Benefits Section (Consolidated with about styles, fixed strong color, enhanced with CSS Grid improvements)
===================== */
.benefits {
  position: relative;
  padding: var(--spacing-lg) 2rem;
  background: linear-gradient(135deg,#2d3748, #4a5568);
  color: #fff;
  overflow: hidden;
  font-family: 'Inter', sans-serif;
  /* Enhanced: Better grid performance */
  contain: layout;
}

.benefits .container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* Section Title */
.benefits h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 6vw, 3rem);
  font-weight: 700;
  margin-bottom: 4rem;
  background: linear-gradient(135deg, #4299e1, #fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
}

/* Cards (Reuses .card base) */
.benefits .cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  /* Enhanced: Explicit grid-auto-rows for better alignment */
  grid-auto-rows: min-content;
}

.benefits .card {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-align: center;
  box-shadow: 0 14px 45px rgba(0,0,0,0.25);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.1);
}

.benefits .card i {
  background: linear-gradient(135deg, #4299e1, #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.benefits .card h3 {
  color: #fff; /* Fixed: Consistent white for dark bg */
  font-weight: 700;
}

.benefits .card p {
  color: rgba(255,255,255,0.9);
}

.benefits .card p strong { 
  color: #ffd700; /* Fixed: Gold for emphasis, not dark */
  font-weight: 700;
}

/* Diagonal Overlay & Particles (Reused from about) */
.benefits::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(0,0,0,0.05) 100%);
  pointer-events: none;
  z-index: 1;
}

.benefits::before {
  content: '';
  position: absolute;
  width: 100%; height: 100%;
  top: 0; left: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 1%, transparent 1%) repeat;
  background-size: 20px 20px;
  animation: particleMove 20s linear infinite;
  z-index: 1;
  pointer-events: none;
}

/* Floating Shapes for Benefits (Reused) */
.benefits .floating-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.benefits .floating-shapes .shape {
  position: absolute;
  opacity: 0.12;
  animation: floatShape 12s ease-in-out infinite;
  will-change: transform;
}

.benefits .floating-shapes .circle { 
  width: 120px; height: 120px; 
  border-radius: 50%; 
  background: #ffd700; 
  top: 5%; left: 10%; 
}

.benefits .floating-shapes .triangle { 
  width: 0; height: 0; 
  border-left: 60px solid transparent; 
  border-right: 60px solid transparent; 
  border-bottom: 120px solid #fff; 
  top: 50%; left: 85%; 
}

.benefits .floating-shapes .square { 
  width: 90px; height: 90px; 
  background: #ffdd59; 
  top: 80%; left: 30%; 
}

/* =========================
   Process Timeline Section (Enhanced with better alignment on mobile and CSS custom properties for steps)
===================== */
.process {
  padding: var(--spacing-lg) 2rem;
  text-align: center;
  background: linear-gradient(135deg, var(--bg-light), #e2e8f0);
  position: relative;
  overflow: hidden;
  /* Enhanced: Custom property for step count */
  --step-count: 4;
}

.process::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50%, var(--border-light), transparent 70%);
  z-index: 0;
  pointer-events: none;
}

.process-timeline {
  display: flex;
  flex-direction: column;
  gap: 4rem;
  max-width: 900px;
  margin: auto;
  position: relative;
  z-index: 1;
}

.process-timeline::before {
  content: '';
  /* position: absolute; */
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--primary-gradient);
  transform: translateX(-50%);
  border-radius: 2px;
  box-shadow: 0 0 10px var(--border-light);
}

.process-step {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  background: #fff;
  padding: 2.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  transition: var(--transition);
  opacity: 0;
  transform: translateY(40px);
  position: relative;
  border: 1px solid var(--border-light);
  z-index: 1;
  /* Enhanced: Counter for step numbering */
  counter-increment: step;
}

.process-step:nth-child(even) { 
  flex-direction: row-reverse; 
}

.process-step:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-hover);
}

.process-step::after {
  content: '';
  position: absolute;
  left: -12px; top: 50%;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--primary-gradient);
  transform: translateY(-50%);
  animation: pulse 2s infinite;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.2);
}

.process-step:nth-child(even)::after { 
  left: auto; 
  right: -12px; 
}

.process-step.visible { 
  opacity: 1; 
  transform: translateY(0); 
  transition: var(--transition); 
}

.step-icon {
  font-size: 2.8rem;
  font-weight: bold;
  color: white;
  flex-shrink: 0;
  width: 70px;
  height: 70px;
  background: var(--primary-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px var(--border-light);
  z-index: 2;
  position: relative;
  animation: pulse 2s infinite;
  /* Enhanced: Use counter for dynamic numbering */
  content: counter(step);
}

.step-content {
  flex: 1;
  text-align: left;
}

.step-content h3 {
  font-size: 1.5rem;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.step-content p {
  color: var(--text-gray);
  font-size: 1.15rem;
  line-height: 1.8;
}

/* Dark mode for process */
@media (prefers-color-scheme: dark) {
  .process {
    background: linear-gradient(135deg, #2d3748, #4a5568);
  }
  
  .process-step {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-dark);
    border-color: rgba(255, 255, 255, 0.1);
  }
  
  .step-content h3 {
    color: var(--text-dark);
  }
  
  .step-content p {
    color: var(--text-gray);
  }
}

/* =========================
   Universities Section (Reuses .card, enhanced with university-specific colors)
===================== */
.universities {
  padding: var(--spacing-lg) 2rem;
  background: linear-gradient(135deg, var(--bg-light), #edf2f7);
  text-align: center;
}

.universities .cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
}

/* Enhanced: University-specific accent colors */
.universities .card:nth-child(1) .card i { color: #a6192e; } /* Harvard red */
.universities .card:nth-child(2) .card i { color: #002147; } /* Oxford blue */
.universities .card:nth-child(3) .card i { color: #0066cc; } /* Melbourne blue */
.universities .card:nth-child(4) .card i { color: #ff0000; } /* NUS red */

/* Dark mode for universities */
@media (prefers-color-scheme: dark) {
  .universities {
    background: linear-gradient(135deg, #2d3748, #4a5568);
  }
}

/* =========================
   Blogs & Services - Enhanced with badges and image overlays (Optimized image loading with aspect ratios)
===================== */
.blogs, .services { 
  padding: var(--spacing-lg) 2rem; 
  background: linear-gradient(135deg, var(--bg-light), #edf2f7); 
}

.blog-container, .service-container { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
  gap: 2.5rem; 
}

.blog-card, .service-card {
  background: #fff;
  padding: 0 1.5rem 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  transition: var(--transition);
  overflow: hidden;
  position: relative;
  /* Enhanced: Fixed aspect ratio for images */
  --aspect-ratio: 16/9;
}

.blog-card::before, .service-card::before {
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.blog-card:hover::before, .service-card:hover::before {
  transform: scaleX(1);
}

.blog-card:hover, .service-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
}

.blog-card img, .service-card img { 
  width: auto; 
  height: 240px; 
  object-fit: cover; 
  border-radius: 16px 16px 0 0; 
  transition: transform 0.4s ease, box-shadow 0.4s ease; 
  position: relative; 
  overflow: hidden; 
  margin: -1.5rem -1.5rem 1.5rem; /* Negative margin for full bleed */
  will-change: transform;
    /* Enhanced: Aspect ratio preservation */
  aspect-ratio: var(--aspect-ratio);
}

.blog-card img::after, .service-card img::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--border-light), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.blog-card:hover img::after, .service-card:hover img::after { 
  opacity: 1; 
}

.blog-card:hover img, .service-card:hover img { 
  transform: scale(1.08); 
  box-shadow: 0 12px 40px rgba(0,0,0,0.1); 
}

.blog-card .tag { 
  background: var(--primary-gradient); 
  color: white; 
  display: inline-block; 
  padding: 8px 16px; 
  border-radius: 25px; 
  font-weight: 600; 
  margin-bottom: 1.25rem; 
  font-size: 0.95rem; 
  box-shadow: 0 4px 15px var(--border-light); 
  transition: transform 0.3s ease;
}

.blog-card:hover .tag {
  transform: translateY(-2px);
}

.blog-card .date { 
  font-size: 1rem; 
  color: var(--text-gray); 
  margin-top: 0.75rem; 
  font-style: italic; 
}

.blog-card .blog-info { 
  text-align: left; 
}

.blog-card h3, .service-card h4 { 
  font-size: 1.3rem; 
  color: var(--text-dark); 
  margin-bottom: 0.75rem; 
  font-weight: 600; 
  line-height: 1.4;
}

.service-card p {
  color: var(--text-gray);
  margin-bottom: 0;
}

/* Dark mode for blogs/services */
@media (prefers-color-scheme: dark) {
  .blogs, .services {
    background: linear-gradient(135deg, #2d3748, #4a5568);
  }
  
  .blog-card, .service-card {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-dark);
  }
  
  .blog-card h3, .service-card h4 {
    color: var(--text-dark);
  }
  
  .blog-card .date, .service-card p {
    color: var(--text-gray);
  }
  
  .blog-card .tag {
    background: var(--primary-gradient);
  }
}

/* =========================
   Testimonials - Glassmorphism cards with quotes (Enhanced grid for responsiveness and quote animations)
===================== */
.testimonials { 
  padding: var(--spacing-lg) 2rem; 
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); 
  color: white; 
  position: relative; 
  overflow: hidden; 
  /* Enhanced: Better content containment */
  contain: layout paint;
}

.testimonials::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
  animation: subtleFloat 15s ease-in-out infinite;
}

.testimonials h2 { 
  color: white; 
  text-shadow: 0 2px 10px rgba(0,0,0,0.3); 
  position: relative;
  z-index: 1;
}

.testimonials h2::after { 
  background: rgba(255,255,255,0.8); 
}

.testimonial-cards { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
  gap: 2.5rem;
  position: relative;
  z-index: 1;
}

.testimonial { 
  background: rgba(255,255,255,0.1); 
  backdrop-filter: blur(20px); 
  -webkit-backdrop-filter: blur(20px); 
  padding: 2.5rem; 
  border-radius: var(--border-radius); 
  border: 1px solid rgba(255,255,255,0.2); 
  position: relative; 
  transition: var(--transition); 
  /* Enhanced: Quote animation trigger */
  overflow: hidden;
}

.testimonial::before {
  content: '"';
  font-size: 6rem;
  color: rgba(255,255,255,0.3);
  position: absolute;
  top: -10px;
  left: 20px;
  font-family: 'Playfair Display', serif;
  z-index: 0;
  line-height: 1;
  transition: transform 0.3s ease;
}

.testimonial:hover::before {
  transform: scale(1.1);
}

.testimonial:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  border-color: rgba(255,255,255,0.3);
}

.testimonial p { 
  margin-bottom: 1.5rem; 
  font-style: italic; 
  font-size: 1.2rem; 
  line-height: 1.7; 
  margin-top: 1rem; 
  position: relative; 
  z-index: 1; 
  /* Enhanced: Typing effect hint (for JS) */
  overflow: hidden;
}

.testimonial span { 
  font-weight: 600; 
  font-size: 1.1rem; 
  opacity: 0.9; 
  display: block; 
  text-align: right; 
}

/* Dark mode for testimonials (already light-on-dark, minimal changes) */
@media (prefers-color-scheme: dark) {
  .testimonials {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
  }
  
  .testimonial {
    background: rgba(0,0,0,0.2);
    border-color: rgba(255,255,255,0.1);
  }
  
  .testimonial p, .testimonial span {
    color: #fff;
  }
}

/* =========================
   FAQ - Enhanced accordion with icons and smooth expand (Better ARIA integration via CSS and max-height optimization)
===================== */
.faq { 
  padding: var(--spacing-lg) 2rem; 
  background: linear-gradient(135deg, var(--bg-light), #edf2f7); 
}

.faq-item { 
  background: #fff; 
  margin: 2rem auto; 
  padding: 2.5rem; 
  border-radius: var(--border-radius); 
  max-width: 1000px; 
  box-shadow: var(--shadow-light); 
  cursor: pointer; 
  transition: var(--transition); 
  border: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
  /* Enhanced: Better expand performance */
  contain: content;
}

.faq-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: var(--primary-gradient);
  transition: width 0.4s ease;
  z-index: 0;
}

.faq-item:hover::before { 
  width: 4px; 
}

.faq-item:hover, .faq-item:focus-within { 
  box-shadow: var(--shadow-hover); 
  transform: translateY(-4px); 
  outline: none;
}

.faq-item[aria-expanded="true"]::before {
  width: 6px;
}

.faq-item h3 { 
  color: var(--primary-color); 
  font-size: 1.4rem; 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  margin-bottom: 0; 
  position: relative; 
  z-index: 1; 
  font-weight: 600; 
  padding: 0.5rem 0;
}

.faq-item h3 i { 
  margin-left: 1rem; 
  color: var(--primary-color); 
  transition: transform 0.3s ease;
}

.faq-item[aria-expanded="true"] h3 i {
  transform: rotate(180deg);
}

.faq-item p { 
  margin-top: 1.5rem; 
  color: var(--text-gray); 
  font-size: 1.15rem; 
  line-height: 1.8; 
  padding-left: 2.5rem; 
  border-left: 4px solid var(--primary-color); 
  position: relative; 
  z-index: 1; 
  animation: slideDown 0.4s ease; 
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
  opacity: 0;
}

.faq-item[aria-expanded="true"] p { 
  max-height: 500px;
  opacity: 1;
  margin-top: 1.5rem;
}

.faq-item h3 span { 
  transition: all 0.3s ease; 
  font-size: 1.2rem; 
  color: var(--primary-color); 
}

/* Dark mode for FAQ */
@media (prefers-color-scheme: dark) {
  .faq {
    background: linear-gradient(135deg, #2d3748, #4a5568);
  }
  
  .faq-item {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
  }
  
  .faq-item h3 {
    color: var(--primary-color);
  }
  
  .faq-item p {
    color: var(--text-gray);
    border-left-color: var(--primary-color);
  }
}

/* =========================
   Newsletter - Animated form with particles (Enhanced form validation styles and loading states)
===================== */
.newsletter { 
  padding: var(--spacing-lg) 2rem; 
  text-align: center; 
  background: var(--primary-gradient); 
  color: #fff; 
  position: relative; 
  overflow: hidden; 
}

.newsletter::before { 
  content: ''; 
  position: absolute; 
  top: -50%; 
  left: -50%; 
  width: 200%; 
  height: 200%; 
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%); 
  animation: rotate 20s linear infinite; 
  pointer-events: none;
}

.newsletter::after {
  content: '';
  position: absolute;
  width: 15px; height: 15px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  top: 50%; left: 50%;
  animation: float 8s infinite alternate;
  pointer-events: none;
}

.newsletter h2 {
  font-size: clamp(2rem, 5vw, 2.5rem);
  margin-bottom: 1rem;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
  background: rgba(255,255,255,0.9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 1;
}

.newsletter p {
  font-size: 1.1rem;
  margin-bottom:  2.5rem;
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

.newsletter form { 
  display: flex; 
  justify-content: center; 
  gap: 1.25rem; 
  align-items: center; 
  flex-wrap: wrap; 
  max-width: 600px; 
  margin: 2.5rem auto; 
  position: relative; 
  z-index: 1; 
}

.newsletter input { 
  padding: 18px 24px; 
  border-radius: 50px; 
  border: none; 
  width: 100%; 
  max-width: 350px; 
  font-size: 1.1rem; 
  background: rgba(255,255,255,0.95); 
  backdrop-filter: blur(20px); 
  -webkit-backdrop-filter: blur(20px); 
  transition: var(--transition); 
  box-shadow: 0 4px 20px rgba(0,0,0,0.1); 
  color: #2d3748;
}

.newsletter input:focus { 
  outline: none; 
  transform: scale(1.02); 
  box-shadow: 0 6px 25px rgba(0,0,0,0.15), 0 0 0 3px rgba(66, 153, 225, 0.2); 
}

/* Invalid/valid states */
.newsletter input:invalid {
  border: 2px solid #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.newsletter input:valid {
  border: 2px solid #28a745;
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.newsletter button { 
  padding: 18px 40px; 
  border-radius: 50px; 
  border: none; 
  background: rgba(255,255,255,0.95); 
  color: var(--primary-color); 
  font-weight: 700; 
  cursor: pointer; 
  transition: var(--transition); 
  box-shadow: 0 4px 20px rgba(0,0,0,0.1); 
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.newsletter button:hover, .newsletter button:focus-visible { 
  transform: scale(1.05) translateY(-2px); 
  box-shadow: 0 8px 30px rgba(0,0,0,0.2); 
  background: white; 
  outline: none;
}

.newsletter button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.newsletter button:active {
  transform: scale(0.98);
}

/* Enhanced: Loading state */
.newsletter button.loading {
  pointer-events: none;
  opacity: 0.7;
}

.newsletter button.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Dark mode for newsletter */
@media (prefers-color-scheme: dark) {
  .newsletter {
    background: linear-gradient(135deg, #3182ce, #2b6cb0);
  }
  
  .newsletter input {
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
  }
  
  .newsletter button {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
  }
  
  .newsletter button:hover {
    background: rgba(255, 255, 255, 0.2);
  }
}

/* =========================
   Contact - Floating labels and better validation (Enhanced with floating labels via CSS and error messaging)
===================== */
.contact { 
  padding: var(--spacing-lg) 2rem; 
  text-align: center; 
  background: linear-gradient(135deg, var(--bg-light),  #edf2f7); 
}

.contact form { 
  max-width: 800px; 
  margin: auto; 
  display: flex; 
  flex-direction: column; 
  gap: 2rem; 
}

.contact label { 
  font-size: 1.1rem; 
  text-align: left; 
  color: var(--text-dark); 
  font-weight: 600; 
  transition: all 0.3s ease; 
  position: absolute;
  top: 18px;
  left: 18px;
  pointer-events: none;
  transform: translateY(0) scale(1);
  transform-origin: left top;
  z-index: 2;
}

/* Enhanced: Floating label effect (CSS-only, enhanced for accessibility) */
.contact input:focus + label,
.contact textarea:focus + label,
.contact input:not(:placeholder-shown) + label,
.contact textarea:not(:placeholder-shown) + label {
  transform: translateY(-1.5rem) scale(0.85);
  color: var(--primary-color);
  font-weight: 700;
}

.contact input, .contact textarea { 
  padding: 18px; 
  border-radius: 16px; 
  border: 2px solid #e2e8f0; 
  font-size: 1.1rem; 
  resize: vertical; 
  transition: var(--transition); 
  background: #fff; 
  box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
  color: var(--text-dark);
  width: 100%;
  position: relative;
  z-index: 1;
}

.contact input:focus, .contact textarea:focus { 
  outline: none; 
  border-color: var(--primary-color); 
  box-shadow: 0 0 0 4px var(--border-light), 0 8px 25px rgba(0,0,0,0.1); 
  transform: translateY(-2px); 
}

/* Validation states */
.contact input:invalid:focus, .contact textarea:invalid:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.1);
}

.contact input:valid:focus, .contact textarea:valid:focus {
  border-color: #28a745;
  box-shadow: 0 0 0 4px rgba(40, 167, 69, 0.1);
}

.contact textarea { 
  min-height: 140px; 
}

/* Enhanced: Error message container (for JS integration) */
.contact .error-message {
  color: #dc3545;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  text-align: left;
}

.contact .error-message.show {
  opacity: 1;
  transform: translateY(0);
}

/* Dark mode for contact */
@media (prefers-color-scheme: dark) {
  .contact {
    background: linear-gradient(135deg, #2d3748, #4a5568);
  }
  
  .contact label {
    color: var(--text-dark);
  }
  
  .contact input, .contact textarea {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-dark);
  }
  
  .contact input:focus, .contact textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--border-light);
  }
  
  .contact .error-message {
    color: #ff6b6b;
  }
}

/* =========================
   Footer - Enhanced with icons and subtle animation (Added social media hover effects and better spacing)
===================== */
footer { 
  padding: 4rem 0 2rem; 
  text-align: center; 
  background: linear-gradient(135deg, #1a202c, #2d3748); 
  color: #e2e8f0; 
  position: relative; 
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

footer .container { 
  border-top: none; 
  padding-top: 0; 
}

footer p {
  margin-bottom: 1.5rem;
  opacity: 0.8;
  font-size: 0.95rem;
}

footer .socials {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

footer a { 
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-gray); 
  text-decoration: none; 
  transition: var(--transition); 
  font-size: 1rem;
  padding: 0.5rem;
  border-radius: 8px;
}

footer a:hover, footer a:focus-visible { 
  color: var(--primary-color); 
  transform: translateY(-2px) scale(1.05); 
  background: rgba(66, 153, 225, 0.1);
  outline: none;
}

footer a:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  border-radius: 4px;
}

footer a i { 
  font-size: 1.2rem; 
  /* Enhanced: Icon-specific animations */
  transition: transform 0.3s ease;
}

footer a:hover i {
  transform: rotate(10deg) scale(1.1);
}

/* Dark mode for footer (already dark, minimal) */
@media (prefers-color-scheme: dark) {
  footer {
    background: linear-gradient(135deg, #0f1419, #1a202c);
  }
  
  footer p, footer a {
    color: var(--text-gray);
  }
  
  footer a:hover {
    color: var(--primary-color);
    background: rgba(66, 153, 225, 0.2);
  }
}

/* =========================
   Toast - Slide-in with icons (Enhanced positioning, stacking, and auto-dismiss)
===================== */
.toast-wrap { 
  position: fixed; 
  right: 2rem; 
  bottom: 2rem; 
  z-index: var(--z-index-modal); 
  display: flex; 
  flex-direction: column; 
  gap: 1.25rem; 
  max-width: 90vw;
  /* Enhanced: Better stacking with max-height */
  max-height: 80vh;
  overflow-y: auto;
}

.toast {
  opacity: 0;
  transform: translateY(20px) translateX(100%);
  transition: opacity 0.4s ease, transform 0.4s ease;
  padding: 12px 20px;
  border-radius: 8px;
  color: #fff;
  min-width: 300px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  font-size: 1rem;
  max-width: 400px;
  /* Enhanced: Auto-dismiss progress bar */
  position: relative;
  overflow: hidden;
}

.toast::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgba(255,255,255,0.3);
  width: 100%;
  animation: toastProgress 3s linear forwards;
}

.toast.show {
  opacity: 1;
  transform: translateY(0) translateX(0);
}

.toast.success { 
  background: linear-gradient(135deg, #28a745, #20c997); 
}

.toast.error { 
  background: linear-gradient(135deg, #dc3545, #fd7e14); 
}

.toast.info { 
  background: var(--primary-gradient); 
}

.toast i { 
  margin-right: 0.75rem; 
  font-size: 1.2rem; 
  vertical-align: middle; 
  flex-shrink: 0;
}

.toast .close {
  margin-left: auto;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 1.2rem;
  opacity: 0.7;
  transition: opacity 0.3s ease;
  padding: 0 0.5rem;
}

.toast .close:hover {
  opacity: 1;
}

/* Dark mode for toast (high contrast) */
@media (prefers-color-scheme: dark) {
  .toast {
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  }
  
  .toast::after {
    background: rgba(255,255,255,0.2);
  }
}

/* =========================
   Animations (All keyframes consolidated and optimized with better easing)
===================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInDown {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes pulse {
  0%, 100% { 
    box-shadow: 0 0 0 0 rgba(66, 153, 225, 0.4); 
    transform: scale(1); 
  }
  70% { 
    box-shadow: 0 0 0 10px rgba(66, 153, 225, 0); 
    transform: scale(1.05); 
  }
  100% { 
    box-shadow: 0 0 0 0 rgba(66, 153, 225, 0); 
    transform: scale(1); 
  }
}

@keyframes slideDown {
  from { opacity: 0; max-height: 0; padding: 0; }
  to { opacity: 1; max-height: 500px; padding: 1.5rem 0 0 2.5rem; }
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes floatShape {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-25px) rotate(20deg); }
}

@keyframes particleMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(100px, 100px); }
}

@keyframes subtleFloat {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-5px) scale(1.02); }
}

@keyframes toastProgress {
  from { width: 100%; }
  to { width: 0; }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Scroll reveal classes (for JS intersection observer) */
.scroll-reveal,
.fade-up,
.slide-in,
.zoom-in {
  opacity: 0;
  transform: translateY(30px);
  transition: var(--transition);
  will-change: opacity, transform;
}

.scroll-reveal.visible,
.fade-up.visible {
  opacity: 1;
  /* transform: translateY(0); */
  will-change: opacity, transform;
}

.slide-in {
  transform: translateX(-30px);
  will-change: transform;
}

.slide-in.visible {
  transform: translateX(0);
  will-change: transform;
}

.zoom-in {
  transform: scale(0.95);
  will-change: transform;
}

.zoom-in.visible {
  transform: scale(1);
  will-change: transform;
}
/* =========================
   Accessibility Enhancements (Focus styles, reduced motion, and high contrast support)
===================== */
/* =========================
   Focus styles for accessibility (Enhanced with focus-visible and keyboard navigation)
===================== */
body:not(.show-focus) *:focus-visible { 
  outline: 2px solid var(--primary-color); 
  outline-offset: 2px; 
  border-radius: 4px; 
}

/* Enhanced: Keyboard navigation indicators */
*:focus-visible {
  background: rgba(66, 153, 225, 0.1);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .btn,
  .card,
  .testimonial,
  .faq-item,
  .process-step {
    border: 2px solid var(--primary-color);
  }
  
  nav a:focus-visible,
  .hero-arrow:focus-visible,
  #menuToggle:focus-visible {
    border: 2px solid #fff;
  }
  
  h2::after {
    height: 6px;
    background: var(--primary-color);
  }
}

/* Reduced motion for accessibility (Comprehensive) */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  
  .hero-slider,
  .hero-dots button,
  nav a::after,
  .btn::before,
  .floating-shapes .shape,
  .particleMove,
  .subtleFloat,
  .toast::after {
    transition: none;
    animation: none;
  }
  
  .card:hover,
  .process-step:hover,
  .testimonial:hover,
  .blog-card:hover,
  .service-card:hover {
    transform: none;
  }
}

/* =========================
   Responsive Design - Premium mobile experience (Refined breakpoints, touch targets, and fluid typography)
===================== */
@media (max-width: 1200px) {
  .container {
    width: 92%;
  }
  
  .cards, .blog-container, .service-container, .testimonial-cards, .about-highlights .cards {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
  }
  
  .process-timeline::before {
    left: 45%;
  }
}

@media (max-width: 1024px) {
  .container {
    width: 94%;
  }
  
  section {
    padding: calc(var(--spacing-lg) - 1rem) 0;
  }
  
  .hero-dots {
    gap: 10px;
  }
  
  .hero-dots button {
    width: 14px;
    height: 14px;
  }
  
  /* Enhanced: Fluid typography for smaller screens */
  h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
  }
}

@media (max-width: 768px) { 
  :root {
    --spacing-lg: 4rem;
    --spacing-md: 2rem;
  }
  
  .container {
    width: 95%;
  }
  
  h2 { 
    font-size: 2.25rem; 
    margin-bottom: 2.5rem; 
  }
  
  section { 
    padding: var(--spacing-lg) 1rem; 
  }
  
  .hero { 
    height: 75vh; 
    min-height: 550px; 
  }
  
  .hero h2 { 
    font-size: clamp(2.5rem, 7vw, 3rem); 
  }
  
  .hero p { 
    font-size: 1.2rem; 
    padding: 0 1rem; 
  }
  
  .hero-content {
    padding: 0 1rem;
  }
  
  .hero-arrow { 
    padding: 15px 20px; 
    font-size: 1.5rem; 
  }
  
  .hero-arrow.prev { 
    left: 1rem; 
  }
  
  .hero-arrow.next { 
    right: 1rem; 
  }
  
  .hero-dots {
    bottom: 2rem;
    gap: 8px;
  }
  
  .hero-dots button {
    width: 12px;
    height: 12px;
  }
  
  #menuToggle { 
    display: block; 
    padding: 0.75rem; /* Larger touch target */
  }
  
  nav ul { 
    position: absolute; 
    top: 100%; 
    right: 0; 
    background: rgba(255,255,255,0.98); 
    backdrop-filter: blur(20px); 
    -webkit-backdrop-filter: blur(20px); 
    flex-direction: column; 
    width: 280px; 
    padding: 2rem; 
    gap: 1.5rem; 
    border-radius: 0 0 24px 24px; 
    box-shadow: 0 15px 50px rgba(0,0,0,0.15); 
    display: none; 
    animation: slideDown 0.3s ease; 
  }
  
  nav ul.show { 
    display: flex; 
  }
  
  nav a {
    display: block;
    padding: 0.75rem 0;
    font-size: 1.1rem; /* Larger text for touch */
  }
  
  .cards, .blog-container, .service-container, .testimonial-cards, .about-highlights .cards { 
    grid-template-columns: 1fr; 
    gap: 2rem; 
  }
  
  .about-intro { 
    text-align: center; 
    padding: 0 1rem; 
  }
  
  .about-intro h2 { 
    font-size: 2.4rem; 
  }
  
  .about-intro p { 
    font-size: 1rem; 
    text-align: justify;
  }
  
  .benefits h2 {
    font-size: 2.4rem;
  }
  
  .process-timeline::before { 
    left: 3.5rem; 
    width: 3px; 
  }
  
  .process-step, .process-step:nth-child(even) { 
    flex-direction: column; 
    text-align: center; 
    padding: 2rem; 
    gap: 1.5rem; 
  }
  
  .process-step::after {
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
  }
  
  .process-step:nth-child(even)::after {
    right: auto;
  }
  
  .step-content { 
    text-align: center; 
    margin-top: 1.5rem; 
  }
  
  .step-icon {
    margin: 0 auto;
  }
  
  .newsletter form { 
    flex-direction: column; 
    align-items: stretch; 
    gap: 1rem; 
  }
  
  .newsletter input { 
    max-width: none; 
  }
  
  .newsletter button {
    align-self: center;
    width: auto;
    padding: 16px 32px; /* Touch-friendly */
  }
  
  .faq-item {
    padding: 2rem;
    margin: 1.5rem auto;
  }
  
  .faq-item h3 {
    font-size: 1.2rem;
  }
  
  .testimonial-cards {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .blog-container, .service-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .blog-card img, .service-card img {
    height: 250px;
  }
  
  footer .socials {
    flex-direction: column;
    gap: 1rem;
  }
  
  footer .socials a {
    justify-content: center;
    margin: 0;
  }
  
  .toast-wrap { 
    right: 1rem; 
    bottom: 1rem; 
    left: 1rem;
    max-width: none;
  }
  
  .toast { 
    min-width: auto;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
  }
  
  /* Enhanced: Touch-friendly adjustments */
  .btn {
    padding: 16px 32px;
    min-height: 48px; /* WCAG touch target */
  }
  
  .hero-arrow {
    min-width: 48px;
    min-height: 48px;
  }
}

@media (max-width: 480px) { 
  :root {
    --spacing-lg: 3rem;
  }
  
  .container { 
    width: 98%; 
  }
  
  section { 
    padding: var(--spacing-lg) 0.5rem; 
  }
  
  .hero { 
    height: 65vh; 
    min-height: 500px; 
  }
  
  .hero h2 { 
    font-size: 2.5rem; 
  }
  
  .hero p { 
    font-size: 1.1rem; 
  }
  
  .btn { 
    padding: 14px 32px; 
    font-size: 1rem; 
    gap: 0.25rem;
  }
  
  .card, .process-step, .faq-item { 
    padding: 2rem; 
  }
  
  .card i, .benefits .card i {
    font-size: 2.5rem; 
  }
  
  .step-icon {
    width: 60px;
    height: 60px;
    font-size: 2rem;
  }
  
  .logo {
    font-size: 1.4rem;
  }
  
  .logo-img {
    height: 45px;
    width: 45px;
  }
  
  nav ul {
    width: 100%;
    right: 0;
    left: 0;
    border-radius: 0 0 20px 20px;
    padding: 1.5rem;
    gap: 1rem;
  }
  
  nav a {
    font-size: 1rem;
    padding: 0.5rem 0;
  }
  
  .about-intro h2 {
    font-size: 2rem;
  }
  
  .benefits h2 {
    font-size: 2rem;
  }
  
  .newsletter h2 {
    font-size: 2rem;
  }
  
  .newsletter input, .newsletter button {
    padding: 16px 20px;
  }
  
  .newsletter button {
    width: 100%;
    max-width: none;
  }
  
  .contact form {
    gap: 1.5rem;
  }
  
  .contact input, .contact textarea {
    padding: 16px;
    font-size: 1rem;
  }
  
  .contact label {
    font-size: 1rem;
  }
  
  footer {
    padding: 3rem 0 1.5rem;
  }
  
  .blog-card .tag {
    padding: 8px 16px;
    font-size: 0.9rem;
  }
  
  .service-card h4 {
    font-size: 1.2rem;
  }
  
  .testimonial {
    padding: 2rem;
  }
  
  .testimonial::before {
    font-size: 4rem;
    left: 10px;
  }
  
  .testimonial p {
    font-size: 1.1rem;
  }
  
  .faq-item {
    padding: 1.5rem;
    margin: 1rem auto;
  }
  
  .faq-item h3 {
    font-size: 1.1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .faq-item p {
    padding-left: 2rem;
    font-size: 1rem;
  }
  
  /* Enhanced: Extra small screen optimizations */
  .process-timeline {
    gap: 3rem;
  }
  
  .process-step {
    padding: 1.5rem;
  }
}

@media (max-width: 320px) {
  .hero-content {
    padding: 0 0.5rem;
  }
  
  .hero h2 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
    padding: 0 0.5rem;
  }
  
  .btn {
    padding: 12px 28px;
    font-size: 0.95rem;
  }
  
  .card, .process-step, .faq-item {
    padding: 1.5rem;
  }
  
  .card i, .benefits .card i {
    font-size: 2rem;
  }
  
  .about-intro h2, .benefits h2, .newsletter h2 {
    font-size: 1.8rem;
  }
  
  .process-timeline {
    gap: 2rem;
  }
  
  .blog-card img, .service-card img {
    height: 200px;
  }
  
  .newsletter form {
    gap: 0.75rem;
  }
  
  .newsletter input, .newsletter button {
    padding: 14px 18px;
  }
  
  .contact input, .contact textarea {
    padding: 14px;
    font-size: 0.95rem;
  }
  
  footer a {
    gap: 0.25rem;
    font-size: 0.95rem;
  }
  
  .toast {
    padding: 10px 16px;
    font-size: 0.95rem;
  }
  
  .hero-arrow {
    padding: 12px 16px;
    font-size: 1.2rem;
  }
  
  /* Enhanced: Ultra-small screen text scaling */
  body {
    font-size: 0.95rem;
  }
}

/* =========================
   Additional Utility Classes (For JS/HTML integration, enhanced with semantic utilities)
===================== */
.header-spacer {
  height: 80px; /* Space for sticky header */
  display: block;
}

#mainNav.desktop {
  display: flex !important;
}

/* Enhanced: Loading utilities */
.loading {
  pointer-events: none;
  opacity: 0.6;
}

.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Enhanced: Visibility utilities */
.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Ensure smooth scrolling and prevent layout shifts */
html {
  scroll-margin-top: 80px;
}

/* Loading states for forms (CSS-only spinner) */
.newsletter button:disabled::after,
.contact button:disabled::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -15px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.newsletter button:disabled,
.contact button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  position: relative;
  color: transparent;
}

/* =========================
   Print Styles (Enhanced for better readability and layout with media queries)
===================== */
@media print {
  * {
    color: #000 !important;
    background: #fff !important;
    box-shadow: none !important;
    border-color: #000 !important;
  }
  
  header, 
  .hero-arrow, 
  .hero-dots, 
  nav ul, 
  .btn, 
  footer .socials,
  .floating-shapes,
  .toast-wrap,
  .hero-overlay,
  .newsletter form,
  .contact form {
    display: none !important;
  }
  
  section {
    break-inside: avoid;
    padding: 1rem 0;
    background: white !important;
    box-shadow: none !important;
    page-break-inside: avoid;
  }
  
  .container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 1rem;
  }
  
  body {
    background: white;
    color: black;
    font-size: 12pt;
    line-height: 1.5;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  
  .card, 
  .process-step, 
  .faq-item, 
  .testimonial, 
  .blog-card, 
  .service-card {
    box-shadow: none;
    border: 1px solid #ccc;
    background: white;
    margin-bottom: 1rem;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  
  h2 {
    font-size: 18pt;
    page-break-after: avoid;
    background: none;
    -webkit-text-fill-color: black;
    color: black;
  }
  
  h2::after {
    display: none;
  }
  
  img {
    max-width: 100%;
    height: auto;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  
  .hero {
    height: auto;
    min-height: auto;
  }
  
  .hero-content {
    position: static;
    transform: none;
    text-align: left;
  }
  
  .hero h2, .hero p {
    color: black;
    text-shadow: none;
  }
  
  /* Ensure forms print as static */
  form {
    page-break-inside: avoid;
  }
  
  /* High contrast for print */
  a {
    color: #000;
    text-decoration: underline;
  }
  
  /* Enhanced: Print-specific gradients fallback */
  [style*="background: linear-gradient"] {
    background: #f5f5f5 !important;
  }
}

/* =========================
   End of Enhanced CSS
===================== */
/* =========================
   Additional Enhancements: Custom Scrollbar Styling (Modern browsers support)
========================= */
/* Custom scrollbar for WebKit browsers */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-light);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 10px;
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: #3182ce;
}

::-webkit-scrollbar-corner {
  background: var(--bg-light);
}

/* Firefox scrollbar customization (limited support) */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) var(--bg-light);
}

/* Dark mode scrollbar */
@media (prefers-color-scheme: dark) {
  ::-webkit-scrollbar-track {
    background: var(--bg-secondary);
  }
  
  ::-webkit-scrollbar-corner {
    background: var(--bg-secondary);
  }
  
  * {
    scrollbar-color: var(--primary-color) var(--bg-secondary);
  }
}

/* =========================
   Performance Optimizations: Critical CSS and Media Query Consolidation
========================= */
/* Critical above-the-fold styles (could be inlined for faster loading) */
@media (max-width: 768px) {
  .hero {
    background-attachment: scroll; /* Disable parallax on mobile for perf */
  }
  
  .floating-shapes,
  .benefits::before,
  .about-highlights .cards::before {
    display: none; /* Disable heavy animations on mobile */
  }
}

/* Enhanced: Lazy loading for offscreen images */
img[loading="lazy"] {
  /* opacity: 0; */
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

img[loading="lazy"].img[loading="lazy"].loaded {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   SEO and Accessibility Enhancements: Better contrast and semantic styling
========================= */
/* Ensure minimum contrast for text */
@media (prefers-contrast: more) {
  :root {
    --text-dark: #000;
    --text-gray: #333;
    --primary-color: #0056b3;
  }
  
  body {
    background: #fff;
  }
  
  .card,
  .testimonial,
  .faq-item {
    background: #fff;
    border: 2px solid #000;
  }
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-color);
  color: white;
  padding: 8px;
  text-decoration: none;
  z-index: 1000;
  border-radius: 0 0 4px 4px;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

/* =========================
   Experimental Features: CSS Grid Masonry Layout for Cards (Future-proof)
========================= */
/* For future masonry support in cards sections */
@supports (grid-template-rows: masonry) {
  .cards,
  .blog-container,
  .service-container {
    grid-template-rows: masonry;
  }
}

/* =========================
   Vendor Prefixes and Fallbacks (Comprehensive coverage)
========================= */
/* Flexbox fallbacks */
@supports not (display: flex) {
  .hero-content,
  .btn,
  nav ul {
    display: block;
  }
  
  .hero-content {
    text-align: center;
  }
}

/* Gradient fallbacks */
.no-gradient-fallback {
  background: #4299e1 !important;
  color: #fff !important;
}
.gradient-text-fallback {
  color: #4299e1 !important;
}