/**
 * ViDooX Carousel — Stacked Banner Slider
 * Based on CodePen: https://codepen.io/TheMOZZARELLA/pen/QwyQGaG
 * Adapted with ViDooX style: purple/pink orbs, accent gradient buttons
 *
 * Layout:
 *  - Active slide: full width (matches header), no transparency, on top
 *  - Prev/Next slides: blurred, behind active, offset left/right
 */

/* ============================================================
   Section wrapper with gradient orb background
   ============================================================ */
.carousel-section {
  position: relative;
  margin: 0;
  padding: 40px 0;
  overflow: visible;
  z-index: 1;
}

/* Gradient orbs background — rendered on a pseudo-element that extends beyond the section bounds */
.carousel-section::before {
  content: '';
  position: absolute;
  top: -200px;
  left: -100%;
  right: -100%;
  bottom: -200px;
  width: 300%;
  background:
    radial-gradient(ellipse 800px 600px at 25% 30%, rgba(139, 92, 246, 0.25) 0%, transparent 70%),
    radial-gradient(ellipse 600px 500px at 75% 40%, rgba(236, 72, 153, 0.2) 0%, transparent 70%),
    radial-gradient(ellipse 500px 400px at 50% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
}

/* ============================================================
   Carousel container
   ============================================================ */
.mzaCarousel {
  position: relative;
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
  z-index: 1;
  overflow: visible; /* Allow side slides to be visible */
  box-sizing: border-box;
}

/* Track — the scrolling container */
.mzaCarousel-track {
  position: relative;
  width: 100%;
  height: 420px;
  overflow: visible; /* Allow prev/next slides to be visible */
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.mzaCarousel-track:active {
  cursor: grabbing;
}

.mzaCarousel-track.is-dragging {
  cursor: grabbing;
}

/* Track inner — holds all slides, full width for positioning */
.mzaCarousel-track-inner {
  position: relative;
  width: 100%;
  height: 100%;
  will-change: transform;
}

/* ============================================================
   Individual slide card — all slides are full width
   ============================================================ */
.mzaCard {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
  will-change: transform, opacity, filter, left;
  transition: left 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 0.6s ease,
              filter 0.6s ease;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  /* Default: hidden behind, offset and blurred */
  left: 110%;
  transform: scale(0.95);
  opacity: 0;
  filter: blur(12px) brightness(0.5);
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Active slide — centered, full scale, opaque, on top */
.mzaCard.active-slide {
  opacity: 1 !important;
  left: 0 !important;
  transform: scale(1) !important;
  filter: none !important;
  pointer-events: auto;
  z-index: 10;
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: 0 12px 48px rgba(139, 92, 246, 0.2), 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* Previous slide — behind, offset so 20% visible under active, blurred */
.mzaCard.prev-slide {
  opacity: 0.5 !important;
  left: -80% !important;
  transform: scale(0.95) !important;
  filter: blur(10px) brightness(0.5) !important;
  z-index: 2;
  pointer-events: auto;
  cursor: pointer;
}

/* Next slide — behind, offset so 20% visible under active, blurred */
.mzaCard.next-slide {
  opacity: 0.5 !important;
  left: 80% !important;
  transform: scale(0.95) !important;
  filter: blur(10px) brightness(0.5) !important;
  z-index: 2;
  pointer-events: auto;
  cursor: pointer;
}

/* Hidden slides — completely off-screen */
.mzaCard.hidden-slide {
  opacity: 0 !important;
  left: 200% !important;
  transform: scale(0.9) !important;
  filter: blur(20px) brightness(0.3) !important;
  z-index: 0;
  pointer-events: none;
}

/* Hover on side slides */
.mzaCard.prev-slide:hover,
.mzaCard.next-slide:hover {
  opacity: 0.6 !important;
  filter: blur(8px) brightness(0.6) !important;
}

/* ============================================================
   Slide background
   ============================================================ */
.mzaCard-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
}

/* Default gradient when no image */
.mzaCard-bg.no-image {
  background:
    radial-gradient(ellipse 600px 400px at 30% 40%, rgba(139, 92, 246, 0.4) 0%, transparent 60%),
    radial-gradient(ellipse 500px 350px at 70% 60%, rgba(236, 72, 153, 0.3) 0%, transparent 60%),
    linear-gradient(135deg, #1a0a2e 0%, #2d1b4e 50%, #1a0a2e 100%);
}

/* Unique gradients per slide */
.mzaCard[data-slide-id="banner-main-docs"] .mzaCard-bg.no-image {
  background:
    radial-gradient(ellipse 600px 400px at 30% 40%, rgba(139, 92, 246, 0.5) 0%, transparent 60%),
    linear-gradient(135deg, #1a0a2e 0%, #4c1d95 50%, #7c3aed 100%);
}

.mzaCard[data-slide-id="banner-news-updates"] .mzaCard-bg.no-image {
  background:
    radial-gradient(ellipse 600px 400px at 60% 40%, rgba(59, 130, 246, 0.5) 0%, transparent 60%),
    linear-gradient(135deg, #0c1929 0%, #1e3a5f 50%, #3b82f6 100%);
}

.mzaCard[data-slide-id="banner-roadmap"] .mzaCard-bg.no-image {
  background:
    radial-gradient(ellipse 600px 400px at 50% 50%, rgba(16, 185, 129, 0.5) 0%, transparent 60%),
    linear-gradient(135deg, #0a2922 0%, #065f46 50%, #10b981 100%);
}

/* ============================================================
   Slide overlay & content
   ============================================================ */
.mzaCard-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, 
    rgba(0, 0, 0, 0.1) 0%, 
    rgba(0, 0, 0, 0.3) 50%, 
    rgba(0, 0, 0, 0.7) 100%);
  pointer-events: none;
}

.mzaCard-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mzaCard-title {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.mzaCard-desc {
  margin: 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

/* CTA Button — ViDooX accent gradient */
.mzaCard-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: #ffffff;
  background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
  transition: all 0.25s ease;
  width: fit-content;
}

.mzaCard-btn:hover {
  background: linear-gradient(135deg, #a78bfa 0%, #f472b6 100%);
  box-shadow: 0 6px 24px rgba(139, 92, 246, 0.6);
  transform: translateY(-2px);
}

.mzaCard-btn:active {
  transform: translateY(0);
}

/* ============================================================
   Navigation arrows — hidden (not used)
   ============================================================ */
.mzaArrow {
  display: none !important;
}

/* ============================================================
   Dots / indicators
   ============================================================ */
.mzaDots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
}

.mzaDot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(139, 92, 246, 0.25);
  cursor: pointer;
  padding: 0;
  transition: all 0.3s ease;
}

.mzaDot:hover {
  background: rgba(139, 92, 246, 0.5);
  transform: scale(1.2);
}

.mzaDot.is-active {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.6);
  transform: scale(1.3);
}

/* ============================================================
   Progress bar
   ============================================================ */
.mzaProgress {
  margin-top: 16px;
  height: 3px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.15);
  overflow: hidden;
  max-width: 200px;
  margin-left: auto;
  margin-right: auto;
}

.mzaProgress-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #8b5cf6, #ec4899);
  transition: width 0.1s linear;
}

/* ============================================================
   Responsive — Tablet (≤1024px)
   ============================================================ */
@media (max-width: 1024px) {
  .carousel-section {
    padding: 30px 0;
  }

  .mzaCarousel-track {
    height: 360px;
  }

  .mzaCard {
    border-radius: 18px;
  }

  .mzaCard-title {
    font-size: 24px;
  }

  .mzaCard-desc {
    font-size: 14px;
  }

  .mzaCard-content {
    padding: 24px;
  }

  .mzaArrow {
    width: 42px;
    height: 42px;
    opacity: 1;
  }

  .mzaArrow--left {
    left: -20px;
  }

  .mzaArrow--right {
    right: -20px;
  }
}

/* ============================================================
   Responsive — Mobile (≤768px)
   ============================================================ */
@media (max-width: 768px) {
  .carousel-section {
    padding: 20px 0;
  }

  .mzaCarousel {
    padding: 0 16px;
  }

  .mzaCarousel-track {
    height: 300px;
  }

  .mzaCard {
    border-radius: 14px;
  }

  .mzaCard-title {
    font-size: 20px;
  }

  .mzaCard-desc {
    font-size: 13px;
  }

  .mzaCard-content {
    padding: 20px;
    gap: 8px;
  }

  .mzaCard-btn {
    padding: 10px 22px;
    font-size: 13px;
  }

  .mzaArrow {
    width: 36px;
    height: 36px;
    opacity: 1;
  }

  .mzaArrow svg {
    width: 18px;
    height: 18px;
  }

  .mzaArrow--left {
    left: -16px;
  }

  .mzaArrow--right {
    right: -16px;
  }

  .mzaDots {
    gap: 8px;
    margin-top: 16px;
  }

  .mzaDot {
    width: 8px;
    height: 8px;
  }

  .mzaProgress {
    margin-top: 12px;
  }
}

/* ============================================================
   Responsive — Small Mobile (≤480px)
   ============================================================ */
@media (max-width: 480px) {
  .mzaCarousel {
    padding: 0 12px;
  }

  .mzaCarousel-track {
    height: 260px;
  }

  .mzaCard {
    border-radius: 12px;
  }

  .mzaCard-title {
    font-size: 18px;
  }

  .mzaCard-content {
    padding: 16px;
  }

  .mzaCard-desc {
    font-size: 12px;
  }

  .mzaCard-btn {
    padding: 8px 18px;
    font-size: 12px;
  }

  .mzaArrow {
    width: 32px;
    height: 32px;
  }

  .mzaArrow svg {
    width: 16px;
    height: 16px;
  }

  .mzaDots {
    gap: 6px;
    margin-top: 12px;
  }

  .mzaDot {
    width: 6px;
    height: 6px;
  }
}

/* ============================================================
   Accessibility: reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .mzaCard,
  .mzaCard-btn,
  .mzaArrow,
  .mzaDot,
  .mzaProgress-bar {
    transition: none !important;
    animation: none !important;
  }
}