/* 1. VARIABLES & RESET */
:root {
  --primary: #0b5ed7;
  --primary-glow: rgba(11, 94, 215, 0.5);
  --primary-dark: #0848a5;
  --accent: #ffd700;
  --light: #f8faff;
  --dark: #0f172a;
  --text-muted: #64748b;
  --white: #ffffff;
  --shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --glass: rgba(255, 255, 255, 0.7);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background: var(--light);
  color: var(--dark);
  line-height: 1.6;
}

/* 2. BACKGROUND ANIMATIONS */
.bg-vortex {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  background: radial-gradient(circle at 50% 50%, #f0f4ff 0%, #ffffff 100%);
}

.mesh-sphere {
  position: fixed;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  filter: blur(80px);
  z-index: -1;
  border-radius: 50%;
  animation: meshMove 25s infinite alternate ease-in-out;
}

@keyframes meshMove {
  0% { transform: translate(-10%, -10%) scale(1); }
  50% { transform: translate(30%, 20%) scale(1.2); }
  100% { transform: translate(-5%, 40%) scale(0.9); }
}

/* 3. HEADER & NAVIGATION */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--glass);
  backdrop-filter: blur(12px);
  padding: 1.2rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  transition: padding 0.3s ease;
}

header.scrolled {
  padding: 0.8rem 5%;
}

.logo-text {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--dark);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: -1px;
}

.logo-text span {
  color: var(--primary);
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-img {
  height: 65px;
  width: auto;
  border-radius: 8px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.logo-img:hover {
  transform: scale(1.05);
}

nav { 
  display: flex; 
  gap: 0.5rem; 
  align-items: center; 
}

/* Unified styling for Links and the Contact Button */
nav a, .nav-btn {
  text-decoration: none;
  color: var(--dark);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.6rem 1.2rem;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

/* Hover Effect for Header Elements */
nav a:hover, .nav-btn:hover {
  background: rgba(11, 94, 215, 0.08);
  color: var(--primary);
  transform: translateY(-2px);
}

/* 4. HERO SECTION */
.hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 1.5rem;
  perspective: 1000px;
}

.hero-h1 {
  font-size: clamp(3rem, 10vw, 5.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(50px);
  animation: fadeInUp 1s forwards cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-h1 span {
  display: block;
  background: linear-gradient(90deg, var(--dark), var(--primary), var(--dark));
  background-size: 200% auto;
  -webkit-text-fill-color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 5s linear infinite;
}

@keyframes shine {
  to { background-position: 200% center; }
}

@keyframes fadeInUp {
  to { opacity: 1; transform: translateY(0); }
}

.hero-p {
  max-width: 700px;
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeInUp 1s 0.3s forwards cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-container {
  opacity: 0;
  animation: fadeInUp 1s 0.5s forwards cubic-bezier(0.22, 1, 0.36, 1);
}

/* 5. COURSE CARDS & GRID */
.section-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.section-reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  padding: 2rem 0;
}

.course-card {
  background: var(--white);
  border-radius: 35px;
  padding: 2.5rem;
  position: relative;
  border: 1px solid rgba(0,0,0,0.03);
  box-shadow: 0 10px 30px rgba(0,0,0,0.02);
  transition: transform 0.1s ease, box-shadow 0.3s ease;
  transform-style: preserve-3d;
  display: flex;
  flex-direction: column;
}

.card-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: #dcfce7;
  color: #166534;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  transform: translateZ(50px);
}

.course-card:hover {
  box-shadow: 0 30px 60px rgba(11, 94, 215, 0.1);
}

.card-icon {
  width: 70px;
  height: 70px;
  background: #f1f5f9;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  transform: translateZ(40px);
  transition: all 0.5s ease;
}

.course-card:hover .card-icon {
  background: white;
  transform: translateZ(60px) rotate(10deg);
  box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.course-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
  font-weight: 800;
  transform: translateZ(30px);
}

.course-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  flex-grow: 1;
  transform: translateZ(20px);
}

/* 6. BUTTONS */
.btn-cta {
  padding: 1.2rem 2.5rem;
  background: var(--dark);
  color: white;
  border-radius: 16px;
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: none;
  cursor: pointer;
}

.btn-cta:hover {
  transform: scale(1.05) translateY(-5px);
  background: var(--primary);
  box-shadow: 0 20px 40px var(--primary-glow);
}

.register-btn {
  width: 100%;
  padding: 1.1rem;
  background: var(--dark);
  color: white;
  border-radius: 18px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s ease;
  transform: translateZ(10px);
}

.register-btn svg { width: 18px; transition: transform 0.3s; }

.register-btn:hover {
  background: var(--primary);
  transform: translateZ(25px) translateY(-3px);
}

.register-btn:hover svg { transform: translateX(5px); }

/* 7. CONTACT BANNER & FOOTER */
.contact-banner {
  background: var(--dark);
  color: white;
  padding: 5rem 3rem;
  border-radius: 40px;
  text-align: center;
  margin: 4rem auto;
  max-width: 1200px;
  position: relative;
  overflow: hidden;
}

footer {
  text-align:center; 
  padding: 4rem 2rem; 
  color: var(--text-muted); 
  font-size: 0.9rem;
}

/* 8. MODALS & FORMS */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(10px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.modal-overlay.open { display: flex; opacity: 1; }

.modal-content {
  background: white;
  padding: 3rem;
  border-radius: 35px;
  width: 90%;
  max-width: 460px;
  transform: scale(0.8) translateY(20px);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 30px 60px rgba(0,0,0,0.2);
}

.modal-overlay.open .modal-content { transform: scale(1) translateY(0); }

.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.4rem; }
.form-group input, .form-group textarea {
  width: 100%; padding: 1rem; border-radius: 12px; border: 2px solid #f1f5f9; background: #f8fafc; outline: none; transition: 0.3s;
}
.form-group input:focus { border-color: var(--primary); background: white; }

/* 9. TOAST NOTIFICATION */
#toast {
  position: fixed; bottom: 40px; left: 50%; transform: translateX(-50%) translateY(100px);
  background: #10b981; color: white; padding: 1rem 2rem; border-radius: 20px; font-weight: 600;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); z-index: 10000;
}
#toast.show { transform: translateX(-50%) translateY(0); }

/* 10. RESPONSIVE DESIGN */
@media (max-width: 768px) {
  .hero-h1 { font-size: 3.2rem; }
  header { padding: 1rem 5%; }
  nav a, .nav-btn { padding: 0.5rem 0.8rem; font-size: 0.9rem; }
}