:root {
  --primary: #6a5cff;
  --secondary: #00d2ff;
  --dark: #0f172a;
  --light: #f8fafc;
}

/* GLOBAL RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background: var(--dark);
  color: var(--light);
  padding-top: 80px; /* fixed navbar offset */
}

/* NAVBAR */
nav {
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  background: rgba(15,23,42,0.6);
  backdrop-filter: blur(12px);
}

.nav-container {
  max-width: 1200px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
}

.logo { font-size: 22px; font-weight: 700; color: white; }

.nav-links a {
  color: #cbd5f5;
  margin-left: 24px;
  text-decoration: none;
  font-weight: 500;
  transition: 0.3s;
}

.nav-links a:hover { color: white; }

/* HERO */
.courses-hero {
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 20px 80px;
  background: radial-gradient(circle at top left, #1e1b4b, transparent 60%),
              radial-gradient(circle at bottom right, #0ea5e9, transparent 55%);
}

.courses-hero h1 { font-size: 52px; margin-bottom: 16px; }
.courses-hero span {
  background: linear-gradient(90deg, var(--secondary), var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.courses-hero p {
  max-width: 650px;
  margin: auto;
  font-size: 18px;
  color: #cbd5f5;
}

/* COURSES SECTION */
.courses-section { padding: 40px 20px; }
.category-title { text-align: center; color: var(--primary); margin: 40px 0 10px; font-size: 1.8rem; }
.section-desc { text-align: center; margin-bottom: 30px; font-size: 1rem; color: #94a3b8; }

/* CAROUSEL */
.carousel-wrapper { overflow: hidden; position: relative; padding: 20px 0; }
.carousel-track {
  display: flex;
  gap: 20px;
  animation: scroll 25s linear infinite;
}

/* FIXED CARD SIZE */
/* FIXED CARD SIZE - COMPACT */
.course-card {
  background: rgba(255,255,255,0.08);
  border-radius: 26px;
  min-width: 280px;
  max-width: 280px;
  height: 260px; /* reduced from 320px to 260px */
  flex-shrink: 0;
  text-align: center;
  padding: 20px 16px; /* reduced padding to fit height */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition: 0.35s;
}

.course-card:hover {
  transform: translateY(-6px);
  background: rgba(255,255,255,0.1);
}

.course-card p {
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-grow: 1; /* keeps all cards equal height */
}

/* RESPONSIVE ADJUSTMENTS */
@media (max-width: 900px) { 
  .course-card { 
    min-width: 240px; 
    max-width: 240px; 
    height: 220px; /* smaller height for tablets */
  } 
}
@media (max-width: 480px) { 
  .course-card { 
    min-width: 200px; 
    max-width: 200px; 
    height: 200px; /* smaller height for mobile */
  } 
}


.course-card:hover {
  transform: translateY(-8px);
  background: rgba(255,255,255,0.1);
}

.course-icon {
  font-size: 42px;
  margin-bottom: 18px;
  background: linear-gradient(90deg, var(--secondary), var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.course-card h3 { font-size: 20px; margin-bottom: 8px; }
.course-card p {
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-grow: 1; /* makes all cards equal height */
}

/* SCROLL ANIMATION */
@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.carousel-track:hover { animation-play-state: paused; }

/* CTA */
.courses-cta { text-align: center; padding: 100px 20px; background: rgba(255,255,255,0.03); }
.courses-cta h2 { font-size: 36px; margin-bottom: 16px; }
.cta-btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  color: #000;
  background: linear-gradient(90deg, var(--secondary), var(--primary));
  transition: 0.3s;
}
.cta-btn:hover { opacity: 0.85; }

/* ================= FOOTER ================= */
    footer {
      background: #020617;
      padding: 40px 80px;
      text-align: center;
      color: #94a3b8;
    }
    footer a:hover {
    color: #00d2ff;
    transform: translateY(-2px);
    transition: 0.3s;
    }
    .footer-social a:hover {
      color: #00d2ff; 
      transform: translateY(-3px);
    }
    
/* RESPONSIVE */
@media (max-width: 1024px) { .courses-hero h1 { font-size: 44px; } }
@media (max-width: 900px) { .courses-hero h1 { font-size: 36px; } .course-card { min-width: 240px; max-width: 240px; height: 300px; } }
@media (max-width: 480px) { .courses-hero h1 { font-size: 24px; } .course-card { min-width: 200px; max-width: 200px; height: 280px; } }
