/* ===== COURSES UPCOMING PAGE STYLES ===== */

/* Hero Section */
.courses-hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: calc(var(--navbar-height, 70px) + 3rem) 2rem 4rem;
}

.courses-hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0B1120 0%, #1E293B 50%, #0B1120 100%);
  z-index: 0;
}

.courses-grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(56, 189, 248, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridMove 20s linear infinite;
}

.courses-glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
}

.courses-glow-orb.orb-gold {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.4), transparent);
  top: -100px;
  right: 10%;
  animation: float 15s ease-in-out infinite;
}

.courses-glow-orb.orb-cyan {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.3), transparent);
  bottom: -50px;
  left: 20%;
  animation: float 12s ease-in-out infinite reverse;
}

.courses-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.courses-hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.text-gradient-gold {
  background: linear-gradient(90deg, #FFD700, #FFA500, #FFD700);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 3s ease-in-out infinite;
}

.courses-hero-subtitle {
  font-size: 1.15rem;
  color: #9CA3AF;
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.courses-hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-outline-cyan {
  background: transparent;
  border: 2px solid rgba(56, 189, 248, 0.5);
  color: #38BDF8;
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-outline-cyan:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: #38BDF8;
  color: #38BDF8;
}

/* Roadmap Section */
.courses-roadmap-section {
  background: linear-gradient(180deg, #0B1120, #1E293B);
  padding: 5rem 0;
}

.courses-timeline {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* Course Card */
.course-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(11, 17, 32, 0.9));
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-radius: 1.5rem;
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.course-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.course-number {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  font-size: 3rem;
  font-weight: 800;
  color: rgba(56, 189, 248, 0.1);
  line-height: 1;
}

.course-badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 9999px;
  margin-bottom: 1rem;
}

.course-badge.upcoming {
  background: rgba(255, 215, 0, 0.15);
  color: #FFD700;
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.course-badge.available {
  background: rgba(56, 189, 248, 0.18);
  color: #38BDF8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.course-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.course-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1rem;
}

.course-description {
  color: #9CA3AF;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.course-modules {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.course-modules h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #38BDF8;
  margin-bottom: 1rem;
}

.course-modules ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem;
}

.course-modules li {
  color: #E5E7EB;
  font-size: 0.9rem;
  padding-left: 1.25rem;
  position: relative;
}

.course-modules li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: #38BDF8;
}

.course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(56, 189, 248, 0.1);
}

.meta-item {
  font-size: 0.85rem;
  color: #9CA3AF;
}

.meta-item strong {
  color: #E5E7EB;
}

.course-cta {
  text-align: center;
}

.notify-btn {
  display: inline-block;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.2));
  border: 1px solid rgba(255, 215, 0, 0.4);
  color: #FFD700;
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.notify-btn:hover {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 165, 0, 0.3));
  transform: translateY(-2px);
  color: #FFD700;
}

/* Difference Section */
.courses-difference-section {
  background: #ffffff;
  padding: 5rem 0;
}

.difference-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.difference-card {
  text-align: center;
  padding: 2rem 1.5rem;
  background: #F7F9FC;
  border-radius: 1rem;
  transition: all 0.3s ease;
}

.difference-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.difference-icon {
  width: 64px;
  height: 64px;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin: 0 auto 1.25rem;
  color: white;
}

.difference-icon.cyan { background: linear-gradient(135deg, #38BDF8, #38BDF8); }
.difference-icon.amber { background: linear-gradient(135deg, #FFD700, #ea580c); }
.difference-icon.emerald { background: linear-gradient(135deg, #10b981, #10b981); }
.difference-icon.violet { background: linear-gradient(135deg, #8b5cf6, #8b5cf6); }

.difference-card h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #0B1120;
}

.difference-card p {
  color: #6B7280;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Free CTA Section */
.courses-free-cta-section {
  position: relative;
  padding: 5rem 0;
  overflow: hidden;
}

.courses-free-cta-section .cta-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0B1120, #1E293B);
  z-index: 0;
}

.courses-free-cta-section .cta-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.courses-free-cta-section h2 {
  color: #ffffff;
  font-size: 2rem;
  margin-bottom: 1rem;
}

.courses-free-cta-section .cta-description {
  color: #9CA3AF;
  margin-bottom: 2rem;
}

/* Fade-in Animation */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Section Labels */
.section-label-gold {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #38BDF8;
  background: rgba(56, 189, 248, 0.08);
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  border: 1px solid rgba(56, 189, 248, 0.2);
  margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  .courses-hero {
    padding: 4rem 1rem 3rem;
  }

  .courses-hero-title {
    font-size: 2rem;
  }

  .course-card {
    padding: 1.5rem;
  }

  .course-modules ul {
    grid-template-columns: 1fr;
  }

  .course-meta {
    flex-direction: column;
    gap: 0.5rem;
  }

  .difference-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .courses-hero {
    padding: calc(var(--navbar-height, 70px) + 2rem) 1rem 2.5rem;
    min-height: 40vh;
  }
  .courses-hero-title {
    font-size: 1.75rem;
  }
  .course-card {
    padding: 1.25rem;
  }
  .course-modules ul {
    gap: 0.35rem;
  }
}

/* ==========================================================================
   FADE-IN ANIMATION OVERRIDE
   Forces visibility for fade-in elements (no JS IntersectionObserver on this page)
   ========================================================================== */

.courses-hero .fade-in,
.courses-roadmap-section .fade-in,
.courses-getting-started .fade-in {
  opacity: 1 !important;
  transform: translateY(0) !important;
  visibility: visible !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PHASE 2 — COURSE CARDS AS PRODUCT CARDS
   Coursera/DataCamp/Khan style: thumbnail, instructor, badges, CTA
   ═══════════════════════════════════════════════════════════════════════════ */

.course-card-product {
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 16px rgba(0, 51, 102, 0.06);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.35s ease,
              border-color 0.35s ease;
  display: flex;
  flex-direction: column;
  margin-bottom: 2.5rem;
}

.course-card-product:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(0, 51, 102, 0.14);
  border-color: rgba(56, 189, 248, 0.4);
}

/* ──── Thumbnail header ──── */

.course-thumb {
  position: relative;
  aspect-ratio: 16 / 7;
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  color: #ffffff;
}

/* Course-specific gradient thumbnails */
.course-thumb--ds-foundations {
  background:
    radial-gradient(circle at 75% 30%, rgba(56, 189, 248, 0.35), transparent 60%),
    linear-gradient(135deg, #003366 0%, #1E3A8A 50%, #38BDF8 100%);
}

.course-thumb--prompt-engineering {
  background:
    radial-gradient(circle at 25% 75%, rgba(139, 92, 246, 0.25), transparent 60%),
    linear-gradient(135deg, #1E293B 0%, #003366 50%, #1E3A8A 100%);
}

.course-thumb--polars {
  background:
    radial-gradient(circle at 65% 20%, rgba(255, 215, 0, 0.18), transparent 55%),
    linear-gradient(135deg, #003366 0%, #38BDF8 100%);
}

.course-thumb--principles {
  background:
    radial-gradient(circle at 80% 80%, rgba(255, 215, 0, 0.22), transparent 60%),
    linear-gradient(135deg, #0B1120 0%, #1E3A8A 50%, #003366 100%);
}

/* Geometric grid overlay on all thumbnails */
.course-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

/* Thumbnail top-row badges */
.course-thumb-badges {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.course-thumb .course-badge {
  margin-bottom: 0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.course-difficulty {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  font-family: 'Poppins', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 9999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.course-difficulty.beginner {
  background: rgba(16, 185, 129, 0.2);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.course-difficulty.intermediate {
  background: rgba(56, 189, 248, 0.2);
  color: #38BDF8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.course-difficulty.all-levels {
  background: rgba(255, 215, 0, 0.2);
  color: #FFD700;
  border: 1px solid rgba(255, 215, 0, 0.4);
}

/* Thumbnail content (number + emoji + course-specific motif) */
.course-thumb-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.course-thumb-num {
  font-family: 'Poppins', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1;
  letter-spacing: -0.02em;
}

.course-thumb-emoji {
  font-size: 2.5rem;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

/* Course-specific motif: tech stack labels (foundations / polars) */
.course-thumb-stack,
.course-thumb-code {
  position: absolute;
  bottom: 1.5rem;
  left: 1.75rem;
  font-family: 'Fira Code', 'JetBrains Mono', Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.02em;
  z-index: 1;
}

/* Adjust content positioning so motif doesn't overlap emoji */
.course-thumb--ds-foundations .course-thumb-content,
.course-thumb--polars .course-thumb-content {
  padding-bottom: 1.5rem;
}

.course-thumb-stack {
  bottom: 4.5rem;
}

.course-thumb-code {
  bottom: 4.5rem;
  font-style: italic;
}

/* C.R.E.D.O. letter motif for prompt engineering */
.course-thumb-credo {
  position: absolute;
  bottom: 4.25rem;
  left: 1.75rem;
  display: flex;
  gap: 0.4rem;
  z-index: 1;
}

.course-thumb-credo span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.95);
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0;
}

/* Distribution curve motif for principles of data science */
.course-thumb-curve {
  position: absolute;
  bottom: 3.75rem;
  left: 1.75rem;
  right: 1.75rem;
  height: 30px;
  color: rgba(255, 215, 0, 0.6);
  z-index: 1;
}

.course-thumb-curve svg {
  width: 100%;
  height: 100%;
}

/* ──── Card body ──── */

.course-card-body {
  padding: 1.75rem 1.75rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.course-card-body .course-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #0B1120;
  margin: 0;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.course-card-body .course-description {
  font-family: 'Roboto', sans-serif;
  font-size: 0.95rem;
  line-height: 1.65;
  color: #374151;
  margin: 0;
}

.course-card-body .course-description strong {
  color: #003366;
  font-weight: 600;
}

.course-modules-compact h4 {
  font-family: 'Poppins', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #38BDF8;
  margin: 0 0 0.75rem 0;
}

.course-modules-compact ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.course-modules-compact li {
  position: relative;
  padding-left: 1.5rem;
  font-family: 'Roboto', sans-serif;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #374151;
}

.course-modules-compact li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #38BDF8;
  font-weight: 700;
}

.course-modules-compact li strong {
  color: #0B1120;
  font-weight: 600;
}

/* Meta pills row */
.course-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.course-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  background: #F7F9FC;
  border: 1px solid #e5e7eb;
  border-radius: 9999px;
  font-family: 'Roboto', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: #374151;
  letter-spacing: 0.01em;
}

/* ──── Card footer: instructor + CTA ──── */

.course-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.75rem;
  border-top: 1px solid #e5e7eb;
  background: #F7F9FC;
}

.course-instructor {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.instructor-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 8px rgba(0, 51, 102, 0.12);
  flex-shrink: 0;
}

.instructor-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.instructor-name {
  font-family: 'Poppins', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: #0B1120;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.instructor-role {
  font-family: 'Roboto', sans-serif;
  font-size: 0.78rem;
  color: #6B7280;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.course-enroll-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.4rem;
  background: linear-gradient(135deg, #38BDF8, #003366);
  color: #ffffff !important;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-radius: 9999px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.25);
  white-space: nowrap;
  flex-shrink: 0;
}

.course-enroll-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(56, 189, 248, 0.4);
}

.course-enroll-btn--notify {
  background: linear-gradient(135deg, #FACC15, #FFD700);
  color: #0B1120 !important;
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.course-enroll-btn--notify:hover {
  box-shadow: 0 8px 20px rgba(255, 215, 0, 0.45);
}

/* ──── Two-column grid on wide screens ──── */

@media (min-width: 992px) {
  .courses-timeline {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
  .course-card-product { margin-bottom: 0; }
}

/* ──── Mobile responsive ──── */

@media (max-width: 640px) {
  .course-thumb {
    aspect-ratio: 16 / 9;
    padding: 1.25rem 1.25rem;
  }
  .course-thumb-num { font-size: 2rem; }
  .course-thumb-emoji { font-size: 2rem; }
  .course-thumb-stack,
  .course-thumb-code {
    font-size: 0.7rem;
    bottom: 4rem;
    left: 1.25rem;
  }
  .course-thumb-credo { bottom: 3.75rem; left: 1.25rem; }
  .course-thumb-curve { bottom: 3.25rem; left: 1.25rem; right: 1.25rem; }
  .course-card-body { padding: 1.25rem 1.25rem 1rem; }
  .course-card-footer {
    padding: 1rem 1.25rem;
    flex-wrap: wrap;
  }
  .course-card-body .course-title { font-size: 1.15rem; }
  .course-card-body .course-description { font-size: 0.9rem; }
}
