@keyframes gradientMove {
  0% {background-position: 0% 50%;}
  50% {background-position: 100% 50%;}
  100% {background-position: 0% 50%;}
}

@keyframes waveShift {
  0% {transform: translateX(0);}
  100% {transform: translateX(-50%);}
}

:root {
  --bg-dark: #0b1020;
  --brand1: #7c3aed;
  --brand2: #06b6d4;
  --text: #e6edf7;
  --muted: #a9b3ca;
  --radius: 20px;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--bg-dark);
  /* The issue starts here: changing min-height 100vh to min-height 100% is also necessary */
  min-height: 100%; 
  display: flex;
  flex-direction: column;
}

/* Only the home page should have the viewport lock */
body.home-lock {
  overflow: hidden;
  height: 100vh;
  align-items: center;
  justify-content: center;
}

/* Gradient Wave Background */
.wave-bg {
  /* CHANGE: Use fixed to keep it locked to the viewport */
  position: fixed; 
  top: 0; 
  left: 0;
  /* CHANGE: Use min-height 100vh and max-height 100% to ensure it scales with content */
  width: 200vw; /* Keep this for the animation effect */
  min-height: 100vh;
  height: 100%; /* Ensure it expands to fit content height */
  
  background: linear-gradient(270deg, var(--brand1), var(--brand2), #22c55e, var(--brand1));
  background-size: 400% 400%;
  animation: gradientMove 8s ease infinite, waveShift 40s linear infinite;
  opacity: 0.12;
  z-index: -1;
  /* NEW: Use background-attachment: fixed for maximum compatibility, 
     though 'position: fixed' often handles this. */
  background-attachment: fixed;
}

/* NEW: Star Field Container for an attractive background */
.star-field {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2; /* Place it behind the wave-bg which is z-index: -1 */
  overflow: hidden;
}

.star {
  position: absolute;
  background-color: #fff;
  border-radius: 50%;
  opacity: 0;
  animation: twinkle 10s infinite ease-in-out;
}

/* Define the twinkle animation */
@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  50% { opacity: 0.8; transform: scale(1); }
}

/* Hero */
.hero {
  text-align: center;
  z-index: 10;
}

.brand-name {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(36px, 5vw, 68px);
  font-weight: 700;
  background: linear-gradient(90deg, #fff, #c7d2fe, #a7f3d0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientMove 6s ease-in-out infinite;
  background-size: 200%;
  margin-bottom: 12px;
}

.tagline {
  font-size: 18px;
  color: var(--muted);
  margin-bottom: 50px;
}
/* CTA Button Style (for index.html) */
.cta-button {
  display: inline-block;
  text-decoration: none;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 18px;
  padding: 14px 30px;
  margin-bottom: 50px; /* Space above the menu grid */
  border-radius: 12px;
  color: var(--text);
  
  /* Vibrant Gradient Background */
  background: linear-gradient(90deg, var(--brand1), var(--brand2));
  border: 1px solid var(--brand1);
  box-shadow: 0 5px 20px rgba(124,58,237,0.4);
  transition: all 0.3s ease;
}

.cta-button:hover {
  /* Increase scale and shadow on hover for attention */
  transform: scale(1.05);
  box-shadow: 0 8px 30px rgba(6,182,212,0.6);
  background: linear-gradient(90deg, var(--brand2), var(--brand1));
}

.cta-button i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.cta-button:hover i {
    transform: translateX(3px); /* Subtle arrow movement */
}

/* Ensure the hero section is vertically centered (already in your original CSS, but checking the structure) */
.hero {
    /* If your hero content is centered, these two properties should work together with body.home-lock */
    text-align: center;
    z-index: 10;
}

/* Menu Cards (Used on index.html) */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 25px;
  width: 90%;
  max-width: 700px;
  margin-inline: auto;
}

.menu-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 40px 0;
  text-align: center;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 18px;
  transition: all 0.4s ease;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  backdrop-filter: blur(8px);
}

.menu-card i {
  font-size: 32px;
  display: block;
  margin-bottom: 10px;
  color: var(--brand1);
  transition: all 0.3s;
}

.menu-card:hover {
  /* Dynamic hover effect: lift, scale, and subtle rotation */
  transform: translateY(-6px) scale(1.03) rotateZ(-1deg);
  background: linear-gradient(135deg, rgba(124,58,237,0.15), rgba(6,182,212,0.15));
  border-color: rgba(255,255,255,0.2);
}

.menu-card:hover i {
  color: var(--brand2);
  /* Added a subtle circular glow behind the icon on hover */
  background: rgba(6,182,212,0.15);
  border-radius: 50%;
  padding: 5px;
}

/* NEW: Feature Card Styling (For Solutions/Creative/Academy pages) */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  width: 90%;
  max-width: 1000px; /* Slightly wider grid for content */
  margin: 40px auto;
}

.feature-card {
  background: var(--bg-dark);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 30px;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

/* Subtle border color change and shadow on hover */
.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand1);
  box-shadow: 0 0 30px rgba(124,58,237,0.3); 
}

.feature-card i {
  font-size: 36px;
  color: var(--brand2);
  display: block;
  margin-bottom: 15px;
}

.feature-card h3 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 24px;
  margin-top: 0;
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 0;
}

/* Contact Bar */
.contact-bar {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: rgba(255,255,255,0.08);
  border-radius: 40px;
  display: flex;
  gap: 15px;
  padding: 10px 18px;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  z-index: 20;
}

.contact-bar a {
  color: var(--text);
  font-size: 20px;
  transition: color 0.3s;
}

.contact-bar a:hover {
  color: var(--brand2);
}

/* Responsive */
@media (max-width: 600px) {
  .menu-grid, .feature-grid {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
  .menu-card {
    padding: 28px 0;
    font-size: 16px;
  }
  .feature-card {
    padding: 20px;
  }
  .feature-card h3 {
    font-size: 20px;
  }
}
/* --- Page Transition Animations --- */
body {
  opacity: 0;
  transition: opacity 0.8s ease;
}

body.fade-in {
  opacity: 1;
}

.fade-out {
  opacity: 0;
  transition: opacity 0.5s ease;
}