html {
  scroll-behavior: smooth;
}

:root {
  --gold: #d97706;
  --gold-dark: #b45309;
  --bg: #000000; /* Pure Black */
  --card-bg: #111827;
}

body {
  background-color: var(--bg);
  color: white;
  font-family: "Inter", sans-serif;
  overflow-x: hidden;
}

.font-serif {
  font-family: "Playfair Display", serif;
}

/* --- Hero Carousel --- */
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  z-index: 0;
}

.hero-slide.active {
  opacity: 0.7;
}

/* --- Animations --- */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 5px rgba(217, 119, 6, 0.5);
  }

  50% {
    box-shadow: 0 0 20px rgba(217, 119, 6, 0.8);
  }
}

@keyframes underline-shimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

/* Ensure the modal is strictly on top of everything else */
#videoModal {
  transition: opacity 0.3s ease;
}

/* Professional 16:9 Container */
.video-responsive-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Ratio */
  height: 0;
  overflow: hidden;
}

#videoIframe {
  border: none;
  box-shadow: 0 0 30px rgba(217, 119, 6, 0.2);
}

/* Fix for mobile/tablet scaling */
@media (max-width: 768px) {
  #videoModal > .relative {
    max-width: 95%;
  }
}

.shimmer-btn {
  background: linear-gradient(
    90deg,
    var(--gold) 0%,
    #fbbf24 50%,
    var(--gold) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 3s infinite linear;
}

/* Marquee Animation */
@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.marquee-inner {
  display: flex;
  width: max-content;
  animation: marquee 30s linear infinite;
}

.marquee-inner:hover {
  animation-play-state: paused;
}

.pulse-badge {
  animation: pulse-glow 2s infinite;
}

.hero-underline {
  position: relative;
  display: inline-block;
}

.hero-underline::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gold);
  overflow: hidden;
}

.hero-underline::before {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, white, transparent);
  z-index: 1;
  animation: underline-shimmer 2s infinite linear;
}

/* --- Card Effects --- */
.course-card {
  background-color: #0a0a0a;
  transition: all 0.3s ease;
  border: 1px solid #1f2937;
}

.course-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px -20px rgba(217, 119, 6, 0.3);
  border-color: var(--gold);
}

.read-more-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease-in-out;
}

.read-more-content.open {
  max-height: 1000px;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #000;
}

::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}

/* --- Tooltip --- */
.tooltip-container {
  position: relative;
}

.tooltip-text {
  visibility: hidden;
  background-color: #333;
  color: #fff;
  text-align: center;
  padding: 5px 10px;
  border-radius: 6px;
  position: absolute;
  z-index: 50;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.75rem;
  white-space: nowrap;
}

.tooltip-container:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* --- Intersection Observer --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.gold-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* --- Student Shorts Carousel --- */
#shortsTrack {
  padding-top: 50px;
  padding-bottom: 50px;
}

.mobile-card {
  transition: transform 0.3s ease;
}

.mobile-card:hover {
  transform: translateY(-10px) scale(1.02);
  z-index: 10;
}

.mobile-frame {
  width: 270px;
  height: 480px;
  border-radius: 25px;
  border: 1px solid #1f2937; /* gray-800 */
  background-color: #000;
  overflow: hidden;
  position: relative;
  box-shadow: 0 10px 20px rgba(102, 102, 102, 0.5);
  transition: all 0.3s ease;
}

.mobile-card:hover .mobile-frame {
  border-color: var(--gold);
  box-shadow: 0 0 25px rgba(217, 119, 6, 0.4);
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

.scrollbar-hide {
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}

/* --- Ocean Theme & Glassmorphism Additions --- */
.shadow-glow:hover {
  box-shadow:
    0 20px 25px -5px rgba(217, 119, 6, 0.15),
    0 8px 10px -6px rgba(217, 119, 6, 0.1);
  border-color: var(--gold);
}

.glass-panel {
  background: rgba(17, 24, 39, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.bg-black-900 {
  background-color: #000000;
}

/* Ensure the Course Hero matches the Home Hero height and feel */
.course-hero-carousel {
  position: relative;
  height: 80vh; /* Shorter than home, but still cinematic */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Match the Home Page card style */
.glass-panel {
  background: rgba(15, 15, 15, 0.7) !important;
  backdrop-filter: blur(15px);
  border: 1px solid rgba(217, 119, 6, 0.1) !important;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-panel:hover {
  border-color: #d97706 !important;
  box-shadow: 0 0 30px rgba(217, 119, 6, 0.2);
  transform: translateY(-10px);
}

/* Gold Gradient for the main CTA */
.bg-gold-gradient {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

/* Mobile Responsive UI Fixes */
@media (max-width: 768px) {
  /* Back Button */
  .back-btn {
    top: 15px !important;
    left: 15px !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
  }
  .back-btn-text {
    display: none !important;
  }

  /* Center Logo */
  .absolute.top-8.left-1\/2 {
    top: 20px !important;
  }

  /* Typography & Spacing */
  h1,
  .text-5xl,
  .text-7xl {
    font-size: 2rem !important;
    line-height: 1.2 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
  h2,
  .text-4xl {
    font-size: 1.8rem !important;
    line-height: 1.3 !important;
  }
  p.text-lg,
  p.text-xl {
    font-size: 1rem !important;
  }

  .relative.z-10.max-w-4xl {
    margin-top: -2rem !important;
    text-align: center !important;
  }
  .relative.z-10.max-w-4xl p {
    text-align: center !important;
    padding: 0 15px !important;
  }

  /* Universal Section Padding */
  section {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }

  /* Course & Workshop Sections */
  .course-card-buttons {
    flex-direction: row !important;
    gap: 0.5rem !important;
  }
  .course-card-buttons button {
    width: 50% !important;
    padding: 0.75rem 0.5rem !important;
    font-size: 0.7rem !important;
  }

  /* Call-to-Action Buttons (Academy Hero) */
  .flex.flex-col.sm\:flex-row.gap-4.justify-center {
    flex-direction: row !important;
    gap: 10px !important;
    padding: 0 10px !important;
  }
  .flex.flex-col.sm\:flex-row.gap-4.justify-center a,
  .flex.flex-col.sm\:flex-row.gap-4.justify-center button {
    flex: 1 !important;
    padding: 10px 5px !important;
    font-size: 0.7rem !important;
    white-space: nowrap !important;
    text-align: center !important;
  }

  .comparison-section,
  .preview-section {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
  .comparison-section .mb-16,
  .preview-section .mb-16 {
    margin-bottom: 1.5rem !important;
  }
}

@media (max-width: 600px) {
  /* 1. Reset Hero Height to fit content tightly */
  section.relative.h-screen.flex.items-center.justify-center.overflow-hidden.bg-black {
    height: auto !important; /* Allow content to define height */
    min-height: 480px !important;
    padding-top: 130px !important; /* Space for the transparent nav */
    padding-bottom: 60px !important; /* Space for the scroll indicator */
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
  }

  /* 2. Fix Carousel to match the new container height */
  #hero-carousel,
  .hero-slide {
    position: absolute !important;
    inset: 0 !important;
    height: 100% !important;
  }

  /* 3. Tighten the Text Block */
  .relative.z-10.max-w-4xl.mx-auto {
    margin: 0 auto !important;
    padding: 0 20px !important;
    gap: 0.25rem !important; /* Reduce space between H1, H2, and P */
  }

  .relative.z-10.max-w-4xl.mx-auto h1 {
    font-size: 2.2rem !important;
    margin-bottom: 5px !important;
  }

  .relative.z-10.max-w-4xl.mx-auto p {
    font-size: 0.9rem !important;
    margin-bottom: 20px !important;
  }

  /* 4. Reposition Scroll Indicator closer to the buttons */
  /* Instead of bottom-8, we move it relative to the content flow */
  section.relative.h-screen .absolute.bottom-8 {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;
    margin-top: 30px !important; /* 30px gap below the buttons */
    opacity: 0.8;
  }

  /* 5. Force transparent nav as requested */
  nav.fixed.top-0.w-full.z-50 {
    background: #000000 !important;
    backdrop-filter: none !important;
    border: none !important;
  }
}
