/* ==========================================================================
   Umeed Skills Institute - Scroll Animation Stylesheet
   ========================================================================== */

/* Design Tokens & Theme Variables */
:root {
  --font-primary: 'Plus Jakarta Sans', sans-serif;
  
  /* Modern Dark Palette */
  --bg-dark: #000000;
  --bg-card: rgba(10, 10, 10, 0.65);
  --border-light: rgba(255, 255, 255, 0.08);
  
  /* Academy Brand Colors */
  --brand-red: #ff3b30;
  --brand-green: #34c759;
  
  /* Glow Colors */
  --border-glow: rgba(52, 199, 89, 0.25); /* green glow */
  --border-glow-red: rgba(255, 59, 48, 0.25); /* red glow */
  
  /* Premium Accent Gradients */
  --gradient-red-green: linear-gradient(135deg, var(--brand-red), var(--brand-green));
  --gradient-green-red: linear-gradient(135deg, var(--brand-green), var(--brand-red));
  
  /* Text Colors */
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.4);
}

/* Global Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  background-color: var(--bg-dark);
  font-family: var(--font-primary);
  color: var(--text-primary);
  min-height: 100%;
  overflow-x: clip;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-blue) var(--bg-dark);
}

/* Widescreen Cinematic Letterbox (Black Bars at Top/Bottom) */
body::before, body::after {
  content: '';
  position: fixed;
  left: 0;
  width: 100%;
  height: 8vh;
  background-color: #000000;
  z-index: 999; /* Above scroller, just below navbar content */
  pointer-events: none;
  transition: opacity 0.5s ease;
  opacity: 0;
}

body.experience-ready::before, body.experience-ready::after {
  opacity: 1;
}

body::before {
  top: 0;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.95);
}

body::after {
  bottom: 0;
  box-shadow: 0 -15px 30px rgba(0, 0, 0, 0.95);
}

/* Custom Scrollbar for Chrome/Safari/Edge */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--brand-red), var(--brand-green));
  border-radius: 4px;
}

/* ==========================================================================
   1. Premium Preloader
   ========================================================================== */
.loader-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-dark);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.8s cubic-bezier(0.85, 0, 0.15, 1), visibility 0.8s;
}

.loader-container.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.loader-logo {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: 2px;
  background: linear-gradient(135deg, var(--brand-red), var(--brand-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 2rem;
  animation: logo-pulse 2s infinite ease-in-out;
}

.loader-spinner {
  width: 60px;
  height: 60px;
  border: 2px solid rgba(255, 255, 255, 0.03);
  border-top: 2px solid var(--brand-red);
  border-right: 2px solid var(--brand-green);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1.5rem;
}

.loader-text {
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.loader-percentage {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(to right, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.5rem;
}

.loader-progress-bar {
  width: 240px;
  height: 3px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
}

.loader-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--brand-red), var(--brand-green));
  box-shadow: 0 0 10px rgba(52, 199, 89, 0.5);
  transition: width 0.1s ease-out;
}

/* Animations */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes logo-pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(52, 199, 89, 0)); }
  50% { transform: scale(1.08); filter: drop-shadow(0 0 20px rgba(52, 199, 89, 0.4)); }
}


/* ==========================================================================
   2. Background Canvas & Layout
   ========================================================================== */
.canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1; /* Sit behind the scroll content */
  background-color: var(--bg-dark);
  pointer-events: none;
}

#scroll-canvas {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* Adds a vignette/cinematic fade to pure black around borders to hide corner watermarks */
.canvas-gradient-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    /* Vignette: darkens corners */
    radial-gradient(circle at center, transparent 35%, rgba(0, 0, 0, 0.65) 75%, #000000 100%),
    /* Left & Right edge fade */
    linear-gradient(to right, #000000 0%, transparent 12%, transparent 88%, #000000 100%),
    /* Top & Bottom edge fade (blending with letterbox) */
    linear-gradient(to bottom, #000000 0%, transparent 10%, transparent 90%, #000000 100%);
  pointer-events: none;
  z-index: 2; /* Sit above the canvas element */
}

/* Scroll Wrapper to hold pages */
#scroll-wrapper {
  position: relative;
  z-index: 10; /* Render overlays above canvas */
  pointer-events: auto;
}


/* ==========================================================================
   3. Scroll Sections
   ========================================================================== */
.scroll-section {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 2rem;
  box-sizing: border-box;
}


/* Initial Section (Starts Solid Black) */
.hero-initial {
  background-color: #000000; /* Solid black to cover canvas when loaded */
  z-index: 20; /* Keep on top of others initially */
  transition: background-color 0.3s ease-out;
}

.hero-content {
  text-align: center;
  max-width: 800px;
}
/* Centered spacer for the animating logo */
.logo-center-spacer {
  height: 180px;
  width: 100%;
  margin-bottom: 2rem;
}

/* Animated Logo styling */
.animated-logo {
  position: fixed;
  z-index: 1500;
  width: 280px; /* Starting width in the center */
  height: auto;
  max-height: 25vh;
  object-fit: contain;
  pointer-events: none; /* Let clicks pass through to scroller */
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  opacity: 0; /* Hidden initially while page loading */
  transition: opacity 0.5s ease;
}

.animated-logo.loaded {
  opacity: 1;
}

/* Transparent Header Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 90px;
  background: transparent;
  z-index: 1000;
  padding: 0 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none; /* Let clicks pass through except to child items */
}

/* Center: Capsule/Pill Menu */
.nav-pill-container {
  background: rgba(15, 15, 15, 0.45);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50px;
  padding: 6px 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  
  /* Initially hidden to keep intro screen minimalist */
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.nav-pill-container.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 4px;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 9px 20px;
  border-radius: 50px;
  display: block;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-links a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-links a.active {
  background: var(--brand-green);
  color: #ffffff;
  font-weight: 700;
}

/* Right Side: CTA Action Button */
.nav-right-actions {
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.nav-right-actions.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.btn-nav-cta {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-radius: 50px;
  padding: 10px 24px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
}

.btn-nav-cta:hover {
  background: var(--brand-red);
  border-color: var(--brand-red);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(255, 59, 48, 0.3);
}

/* Invisible placeholder where the logo will land */
.logo-placeholder {
  width: 130px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

/* Mobile Toggle & Overlay hidden on desktop */
.nav-toggle, .mobile-overlay {
  display: none;
}

/* Bouncing Biaxial Mouse Wheel Scroll Hint */
.scroll-down-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.scroll-down-hint p {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.mouse-icon {
  width: 24px;
  height: 40px;
  border: 2px solid var(--text-muted);
  border-radius: 20px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.mouse-icon .wheel {
  width: 4px;
  height: 8px;
  background-color: var(--brand-green);
  border-radius: 2px;
  animation: scroll-wheel 1.6s infinite ease-in-out;
}

/* Arrows animation */
.arrow-down {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.arrow-down span {
  display: block;
  width: 10px;
  height: 10px;
  border-bottom: 2px solid var(--text-muted);
  border-right: 2px solid var(--text-muted);
  transform: rotate(45deg);
  margin: -4px;
  animation: arrow-bounce 2s infinite ease-in-out;
}

.arrow-down span:nth-child(2) {
  animation-delay: 0.2s;
}

@keyframes scroll-wheel {
  0% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(6px); opacity: 0.3; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes arrow-bounce {
  0%, 100% { transform: translateY(0) rotate(45deg); border-color: var(--text-muted); }
  50% { transform: translateY(6px) rotate(45deg); border-color: var(--brand-red); }
}


/* ==========================================================================
   4. Glassmorphism Scroll Cards
   ========================================================================== */
.overlay-text-card {
  background-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  box-shadow: none;
  padding: 0;
  max-width: 580px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  
  /* Animation states controlled in JS */
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.overlay-text-card h2 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  color: #ffffff;
  margin-bottom: 1.5rem;
  text-align: left;
}

.overlay-text-card p {
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 2.2rem;
  text-align: left;
  max-width: 480px;
  font-weight: 400;
}

/* Rounded Pill CTA button inside cards */
.btn-card-cta {
  background-color: #ffffff;
  color: #000000;
  border-radius: 50px;
  padding: 12px 28px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.15);
  letter-spacing: 0.5px;
}

.btn-card-cta:hover {
  background-color: #ffffff;
  color: var(--brand-red);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(255, 59, 48, 0.35);
}

.btn-card-cta .arrow {
  font-size: 1.1rem;
  transition: transform 0.3s;
}

.btn-card-cta:hover .arrow {
  transform: translateX(4px);
}

/* Card Alignments & Layout Adjustments */
.left-align {
  margin-right: auto;
  margin-left: 5%;
}

.right-align {
  margin-left: auto;
  margin-right: 5%;
}

.center-align {
  margin: 0 auto;
  text-align: center;
}

.center-align .badge {
  margin-left: auto;
  margin-right: auto;
}


/* Final Call-To-Action Overlay */
.hero-final {
  z-index: 20;
}

.final-content {
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 32px;
  padding: 4rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  max-width: 750px;
  opacity: 0;
  transform: translateY(40px);
}

.cta-title {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -1px;
  background: linear-gradient(135deg, #ffffff, var(--brand-red));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
}

.cta-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

.cta-actions {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 32px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-green), var(--brand-red));
  color: #ffffff;
  box-shadow: 0 10px 25px rgba(52, 199, 89, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(255, 59, 48, 0.45);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}


/* ==========================================================================
   4b. Courses Section (Horizontal Scroll Portals)
   ========================================================================== */

/* Background Layers (Aurora & Parallax Text) */
.courses-bg-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0; /* Behind the track */
  overflow: hidden;
  pointer-events: none;
}

.aurora-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
  mix-blend-mode: screen;
  animation: orbDrift 20s infinite alternate ease-in-out;
}

.orb-1 {
  width: 60vw;
  height: 60vw;
  background: var(--brand-green);
  top: -20%;
  left: -10%;
  animation-delay: 0s;
}

.orb-2 {
  width: 70vw;
  height: 70vw;
  background: var(--brand-red);
  bottom: -20%;
  right: -10%;
  animation-delay: -5s;
}

.orb-3 {
  width: 50vw;
  height: 50vw;
  background: #111; /* subtle dark filler */
  top: 40%;
  left: 50%;
  animation-delay: -10s;
}

@keyframes orbDrift {
  0% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(5vw, -5vh) scale(1.1); }
  66% { transform: translate(-5vw, 5vh) scale(0.95); }
  100% { transform: translate(0, 0) scale(1); }
}

.parallax-bg-text {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  font-size: 28vw;
  font-weight: 900;
  white-space: nowrap;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 3px rgba(255, 255, 255, 0.04);
  z-index: 1; /* Above orbs, behind cards */
  will-change: transform;
}

#courses-scroll-container {
  position: relative;
  width: 100%;
  background-color: #000000;
}

.courses-sticky-wrapper {
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  display: flex;
  align-items: center;
  z-index: 15;
}

.courses-track {
  display: flex;
  height: 100%;
  width: 900vw; /* Accommodate all 9 courses side-by-side */
  will-change: transform;
  flex-shrink: 0; /* CRITICAL FIX: prevent the track itself from shrinking inside .courses-sticky-wrapper flex container! */
  flex-grow: 0;
}

.course-card {
  width: 100vw;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center; /* Center the panel inside the viewport slide */
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  flex: 0 0 100vw; /* Do not allow cards to shrink */
  flex-shrink: 0;
  flex-grow: 0;
}

/* Styled glassmorphic physical cards */
.course-card-panel {
  width: 82%;
  height: 72%;
  background: rgba(12, 12, 12, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8%;
  box-sizing: border-box;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.9);
  transform: scale(0.92) translateY(20px);
  opacity: 0.25;
  transition: opacity 0.8s, border-color 0.8s, box-shadow 0.8s;
  position: relative;
  overflow: hidden;
}

/* When the course slide is active, animate the panel up and in */
.course-card.active .course-card-panel {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Green theme accents */
.course-card-panel.brand-theme-green {
  border-color: rgba(52, 199, 89, 0.1);
}
.course-card.active .course-card-panel.brand-theme-green {
  border-color: rgba(52, 199, 89, 0.35);
  box-shadow: 0 40px 100px rgba(52, 199, 89, 0.12), 0 0 1px rgba(52, 199, 89, 0.5);
}
.course-card-panel.brand-theme-green .portal-logo {
  background: linear-gradient(135deg, #ffffff, var(--brand-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 5px 15px rgba(52, 199, 89, 0.4));
}
.course-card-panel.brand-theme-green .portal-glow {
  background: radial-gradient(circle, rgba(52, 199, 89, 0.15) 0%, transparent 70%);
}
.course-card-panel.brand-theme-green .portal-frame {
  border-color: rgba(52, 199, 89, 0.08);
}
.course-card.active .course-card-panel.brand-theme-green .portal-frame {
  border-color: rgba(52, 199, 89, 0.35);
  box-shadow: 0 25px 50px rgba(52, 199, 89, 0.12);
}
.brand-theme-green .btn-card-cta:hover {
  color: var(--brand-green);
  box-shadow: 0 4px 20px rgba(52, 199, 89, 0.35);
}

/* Red theme accents */
.course-card-panel.brand-theme-red {
  border-color: rgba(255, 59, 48, 0.1);
}
.course-card.active .course-card-panel.brand-theme-red {
  border-color: rgba(255, 59, 48, 0.35);
  box-shadow: 0 40px 100px rgba(255, 59, 48, 0.12), 0 0 1px rgba(255, 59, 48, 0.5);
}
.course-card-panel.brand-theme-red .portal-logo {
  background: linear-gradient(135deg, #ffffff, var(--brand-red));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 5px 15px rgba(255, 59, 48, 0.4));
}
.course-card-panel.brand-theme-red .portal-glow {
  background: radial-gradient(circle, rgba(255, 59, 48, 0.15) 0%, transparent 70%);
}
.course-card-panel.brand-theme-red .portal-frame {
  border-color: rgba(255, 59, 48, 0.08);
}
.course-card.active .course-card-panel.brand-theme-red .portal-frame {
  border-color: rgba(255, 59, 48, 0.35);
  box-shadow: 0 25px 50px rgba(255, 59, 48, 0.12);
}
.brand-theme-red .btn-card-cta:hover {
  color: var(--brand-red);
  box-shadow: 0 4px 20px rgba(255, 59, 48, 0.35);
}

.course-info {
  flex: 1;
  max-width: 48%;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.course-num {
  display: none;
}

.course-info h3 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: #ffffff;
  letter-spacing: -1.5px;
}

.course-info p {
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 2.2rem;
  max-width: 480px;
}

.course-visual-container {
  flex: 1;
  max-width: 45%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* 3D Portal Frame animation */
.portal-frame {
  width: 380px;
  height: 480px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.005));
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  transform-style: preserve-3d;
  perspective: 1000px;
  transform: scale(0.85) rotateY(-15deg);
  opacity: 0.3;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s, border-color 0.8s, box-shadow 0.8s;
}

.portal-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
  filter: grayscale(80%) contrast(1.2);
}

.course-card.active .portal-img {
  opacity: 0.7;
  transform: scale(1.05);
  filter: grayscale(20%) contrast(1.1);
}

.portal-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.2rem;
  z-index: 10;
  pointer-events: none;
  transform: translateZ(30px); /* 3D depth pop out */
}

.portal-tag {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.portal-glow {
  position: absolute;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  filter: blur(20px);
  pointer-events: none;
  z-index: 1;
  transition: transform 0.5s ease;
}

/* Active State zoom-in reveal ("Opening a New World") */
.course-card.active .portal-frame {
  transform: scale(1) rotateY(-5deg) rotateX(5deg);
  opacity: 1;
}

.course-card.active .portal-glow {
  transform: scale(1.3);
  animation: glow-breathe 4s infinite ease-in-out alternate;
}

@keyframes glow-breathe {
  0% { transform: scale(1.1) rotate(0deg); opacity: 0.8; }
  100% { transform: scale(1.4) rotate(180deg); opacity: 1; }
}

/* ==========================================================================
   5. Responsive Sizing
   ========================================================================== */
/* ==========================================================================
   5. Responsive Sizing
   ========================================================================== */
@media (max-width: 768px) {
  /* Navbar Mobile Layout */
  .navbar {
    height: 70px;
    padding: 0 4%;
  }
  
  .logo-placeholder {
    width: 95px;
    height: 45px;
  }
  
  /* Hide desktop menu & buttons on mobile */
  .nav-pill-container,
  .nav-right-actions {
    display: none !important;
  }
  
  /* Mobile Toggle Button */
  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    pointer-events: auto;
    z-index: 2000; /* Float above the mobile overlay */
    outline: none;
    
    /* Animation state based on scroll */
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s;
  }
  
  .nav-toggle.visible {
    opacity: 1;
    transform: translateY(0);
  }
  
  .nav-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
  }
  
  .nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background-color: #ffffff;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s;
  }
  
  /* Animate Toggle lines to 'X' when open */
  .navbar.menu-open .nav-toggle span:nth-child(1) {
    transform: translateY(3.5px) rotate(45deg);
  }
  
  .navbar.menu-open .nav-toggle span:nth-child(2) {
    transform: translateY(-3.5px) rotate(-45deg);
  }
  
  /* Mobile Overlay Menu */
  .mobile-overlay {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.96);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: 1800; /* Float below toggle but above standard overlays */
    justify-content: center;
    align-items: center;
    
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    pointer-events: none;
  }
  
  .mobile-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  
  .mobile-nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2.2rem;
    text-align: center;
  }
  
  .mobile-nav-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 1.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s, color 0.3s;
  }
  
  .mobile-overlay.active .mobile-nav-links a {
    transform: translateY(0);
    opacity: 1;
  }
  
  .mobile-overlay.active li:nth-child(1) a { transition-delay: 0.05s; }
  .mobile-overlay.active li:nth-child(2) a { transition-delay: 0.15s; }
  .mobile-overlay.active li:nth-child(3) a { transition-delay: 0.25s; }
  .mobile-overlay.active li:nth-child(4) a { transition-delay: 0.35s; }
  
  .mobile-nav-links a:hover {
    color: #ffffff;
  }
  
  /* Widescreen Cinematic Letterbox on Mobile */
  body::before, body::after {
    height: 5vh; /* Thinner bars on mobile screens */
  }
  
  /* Text Overlay on Mobile */
  .overlay-text-card {
    max-width: 100%;
    padding: 0 1rem;
    margin: 0;
  }
  
  .overlay-text-card h2 {
    font-size: 2.2rem;
    line-height: 1.15;
    margin-bottom: 1.2rem;
  }
  
  .overlay-text-card p {
    font-size: 0.95rem;
    margin-bottom: 1.8rem;
    max-width: 100%;
  }
  
  .btn-card-cta {
    padding: 10px 22px;
    font-size: 0.78rem;
  }
  
  /* Final Section on Mobile */
  .final-content {
    padding: 2.5rem 1.5rem;
    margin: 0 1rem;
    text-align: center;
  }
  
  .cta-title {
    font-size: 2.2rem;
  }
  
  .cta-subtitle {
    font-size: 1rem;
    margin-bottom: 1.8rem;
  }
  
  .cta-actions {
    flex-direction: column;
    gap: 1rem;
  }
  
  .btn {
    width: 100%;
    text-align: center;
  }
  
  /* Courses Mobile Layout */
  #courses-scroll-container {
    height: auto;
  }
  
  .courses-sticky-wrapper {
    height: 100svh;
  }
  
  .course-card {
    flex-direction: column;
    justify-content: center;
    padding: 0;
  }
  
  .course-card-panel {
    width: 90%;
    height: 82%;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 6%;
    gap: 1.2rem;
    text-align: center;
    transform: scale(0.92) translateY(15px);
    opacity: 0.25;
  }
  
  .course-card.active .course-card-panel {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
  
  .course-info {
    max-width: 100%;
    order: 2;
    align-items: center;
    text-align: center;
  }
  
  .course-num {
    font-size: 4.5rem;
    margin-bottom: -0.5rem;
  }
  
  .course-info h3 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 0.8rem;
  }
  
  .course-info p {
    font-size: 0.92rem;
    text-align: center;
    margin-bottom: 1.5rem;
    max-width: 100%;
  }
  
  .course-visual-container {
    max-width: 100%;
    height: auto;
    order: 1;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .portal-frame {
    width: 230px;
    height: 230px;
    transform: scale(0.85);
    border-radius: 50%; /* Circular lens portal on mobile! */
  }
  
  .course-card.active .portal-frame {
    transform: scale(1);
  }
  
  .portal-logo {
    font-size: 2.8rem;
  }
  
  .portal-tag {
    font-size: 0.65rem;
    letter-spacing: 1px;
  }
}

/* ==========================================================================
   4.5 Skills & Technologies Section
   ========================================================================== */
#section-skills {
  min-height: 100vh;
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.8) 15vh, #000000 30vh);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 10;
  padding: 6rem 0;
  overflow: hidden;
}

.skills-header {
  text-align: center;
  margin-bottom: 5rem;
  padding: 0 5%;
}

.skills-title {
  font-size: 4rem;
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 1rem;
}

.skills-subtitle {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.5);
}

/* Marquee Logic */
.marquee-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
}

/* Gradient Edges to fade out text */
.marquee-container::before,
.marquee-container::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 15vw;
  z-index: 2;
  pointer-events: none;
}
.marquee-container::before {
  left: 0;
  background: linear-gradient(to right, #000 0%, transparent 100%);
}
.marquee-container::after {
  right: 0;
  background: linear-gradient(to left, #000 0%, transparent 100%);
}

.marquee-track {
  display: flex;
  width: max-content;
}

.marquee-content {
  display: flex;
  align-items: center;
  gap: 3rem;
  padding-right: 3rem;
}

.track-left .marquee-content {
  animation: scrollLeft 40s linear infinite;
}

.track-right .marquee-content {
  animation: scrollRight 35s linear infinite;
}

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

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

/* Marquee Items Styling */
.marquee-item {
  font-size: 6rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.15);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: default;
  white-space: nowrap;
  /* GSAP Skew setup */
  transform-origin: bottom center;
}

.marquee-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background-color: var(--brand-green);
  opacity: 0.5;
  box-shadow: 0 0 10px rgba(46, 204, 113, 0.4);
}

.track-right .marquee-dot {
  background-color: var(--brand-red);
  box-shadow: 0 0 10px rgba(255, 59, 48, 0.4);
}

.marquee-item:hover {
  -webkit-text-stroke: 0px transparent;
  color: white;
  text-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.track-left .marquee-item:hover {
  color: var(--brand-green);
  text-shadow: 0 10px 30px rgba(46, 204, 113, 0.3);
}

.track-right .marquee-item:hover {
  color: var(--brand-red);
  text-shadow: 0 10px 30px rgba(255, 59, 48, 0.3);
}

@media (max-width: 900px) {
  .skills-title { font-size: 3rem; }
  .marquee-item { font-size: 4rem; }
}

/* ==========================================================================
   5. Final Section (Join Us / Enrollment)
   ========================================================================== */
#section-final {
  min-height: 100vh;
  background-color: var(--bg-dark);
  position: relative;
  display: flex;
  flex-direction: column;
  z-index: 10;
  overflow: hidden;
  padding-top: 100px;
}

.final-container {
  flex: 1;
  display: flex;
  max-width: 1400px;
  width: 90%;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
  padding-bottom: 4rem;
}

/* Left Column */
.final-info-column {
  flex: 1;
  max-width: 500px;
  opacity: 0; /* for GSAP */
  transform: translateY(40px);
}

.final-title {
  font-size: 5.5rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 1.5rem;
  letter-spacing: -2px;
}

.brand-text {
  background: linear-gradient(135deg, var(--brand-green), var(--brand-red));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.final-subtitle {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 3rem;
  line-height: 1.6;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.contact-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.4);
}

.contact-link, .contact-text {
  font-size: 1.1rem;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.contact-link:hover {
  color: var(--brand-green);
}

/* Right Column: Glassmorphic Form */
.final-form-column {
  flex: 1;
  max-width: 600px;
  width: 100%;
  opacity: 0; /* for GSAP */
  transform: translateX(40px);
}

.glass-form-wrapper {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 3rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

/* Spotlight Effect */
.spotlight {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle 300px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 59, 48, 0.08), transparent 80%);
  pointer-events: none;
  z-index: 0;
}

.glass-form-content {
  position: relative;
  z-index: 10;
}

.glass-form-content h3 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.glass-form-content p {
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

/* Form Inputs */
.enrollment-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  position: relative;
}

.form-group input, .form-group select {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.2rem 1rem 0.6rem 1rem;
  color: white;
  font-family: var(--font-primary);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
  appearance: none;
  box-sizing: border-box;
}

.form-group input:focus, .form-group select:focus {
  border-color: var(--brand-green);
  box-shadow: 0 0 0 4px rgba(46, 204, 113, 0.1);
}

.form-group label {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.4);
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

/* Floating Label Logic */
.form-group input:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.select-label {
  top: 0.8rem !important;
  font-size: 0.65rem !important;
  color: var(--brand-green) !important;
}

.select-label {
  color: rgba(255, 255, 255, 0.4) !important;
}

.form-group select:focus ~ .select-label {
  color: var(--brand-green) !important;
}

.btn-submit {
  width: 100%;
  background: linear-gradient(135deg, var(--brand-green), #27ae60);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 1.2rem;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 1rem;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(46, 204, 113, 0.3);
}

/* ==========================================================================
   6. Mega Footer
   ========================================================================== */
.mega-footer {
  position: relative;
  width: 100%;
  background: #000000;
  padding: 8rem 5% 2rem 5%;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  overflow: hidden;
  z-index: 10;
}

.footer-glow {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 50vh;
  background: radial-gradient(ellipse at bottom, rgba(52, 199, 89, 0.15), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.footer-top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 6rem;
}

.footer-main-logo {
  max-width: 350px;
  margin-bottom: 3rem;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,0.5));
}

.footer-slogan {
  font-size: 5rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -2px;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.2);
  text-transform: uppercase;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4rem;
  margin-bottom: 6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 4rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.footer-col h4 {
  font-size: 1.2rem;
  color: #ffffff;
  margin-bottom: 1rem;
  font-weight: 600;
}

.hover-link {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 1.05rem;
  position: relative;
  width: max-content;
  transition: color 0.3s ease;
}

.hover-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -4px;
  left: 0;
  background-color: var(--brand-green);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hover-link:hover {
  color: #ffffff;
}

.hover-link:hover::after {
  width: 100%;
}

.footer-text-block {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-top: 1rem;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 2rem;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.9rem;
}

.footer-legal {
  display: flex;
  gap: 2rem;
}

/* GSAP Init Classes */
.mega-footer-element {
  opacity: 0;
  transform: translateY(30px);
}

/* Mobile Responsive */
@media (max-width: 900px) {
  .final-container {
    flex-direction: column;
    padding-top: 0;
    gap: 3rem;
  }
  
  #section-final {
    padding-top: 50px;
  }
  
  .final-title {
    font-size: 4rem;
  }
  
  .glass-form-wrapper {
    padding: 2rem 1.5rem;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }
  
  .loader-logo {
    font-size: 1.5rem;
  }
  
  .courses-sticky-wrapper {
    height: 100svh;
  }
  
  /* Mega Footer Mobile */
  .mega-footer {
    padding: 6rem 5% 2rem 5%;
  }
  
  .footer-slogan {
    font-size: 3rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding-top: 3rem;
    margin-bottom: 4rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }
  
  .footer-legal {
    justify-content: center;
  }
}
