/* ===================================================
   SCROLL-DRIVEN CINEMATIC VIDEO ANIMATION EXPERIENCE
   Ali Sarah Electronics Trading Co. LLC
   =================================================== */

/* ── Hero Ambient Video Background ── */
.hero,
.products-page-hero,
.services-page-hero,
.emi-page-hero,
.about-page-hero,
.contact-page-hero,
.terms-hero {
  position: relative;
  overflow: hidden;
}

.hero-video-bg-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}

.hero-video-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.52;
  filter: saturate(1.25) contrast(1.15) brightness(1.05);
  transform: scale(1.04);
  transition: transform 0.5s ease-out, opacity 0.5s ease;
}

.hero-video-bg-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 60% 40%, rgba(10, 12, 20, 0.25) 0%, rgba(10, 12, 20, 0.75) 80%),
              linear-gradient(180deg, rgba(10, 12, 20, 0.35) 0%, #0a0c14 100%);
  z-index: 2;
  pointer-events: none;
}

.hero-content,
.hero-image-wrap,
.products-page-hero .hero-badge,
.products-page-hero h1,
.products-page-hero p,
.products-page-hero .hero-stats-row,
.services-hero-inner,
.emi-hero-content,
.about-page-hero-content,
.contact-hero-content,
.terms-hero-badge,
.terms-hero h1,
.terms-hero p,
.terms-meta {
  position: relative;
  z-index: 3;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.75);
}

/* ── Fullscreen Scroll-Driven Experience Section ── */
.scroll-video-section {
  position: relative;
  width: 100%;
  height: 300vh; /* 3-phase scroll track */
  background: #06070c;
}

.scroll-video-stage {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

/* Background video layers */
.scroll-video-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
  z-index: 1;
}

.scroll-video-layer.active {
  opacity: 0.85;
  transform: scale(1);
}

/* Vignette & Contrast Overlay */
.scroll-video-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(10, 12, 20, 0.3) 0%, rgba(6, 7, 12, 0.85) 75%, #06070c 100%),
              linear-gradient(180deg, rgba(10, 12, 20, 0.9) 0%, transparent 25%, transparent 75%, rgba(10, 12, 20, 0.95) 100%);
  z-index: 2;
  pointer-events: none;
}

/* Floating Narrative Content Container */
.scroll-video-hud {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 1200px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  pointer-events: none;
}

[dir="rtl"] .scroll-video-hud {
  align-items: flex-end;
  text-align: right;
}

/* Narrative Story Phases */
.scroll-video-phase {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  max-width: 680px;
  opacity: 0;
  visibility: hidden;
  filter: blur(8px);
  transition: all 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: auto;
}

.scroll-video-phase.active {
  opacity: 1;
  visibility: visible;
  filter: blur(0px);
  transform: translateY(-50%) translateX(0);
}

.scroll-video-phase.exit-up {
  opacity: 0;
  transform: translateY(-65%) scale(0.96);
  filter: blur(8px);
}

.scroll-video-phase.enter-down {
  opacity: 0;
  transform: translateY(-35%) scale(0.96);
  filter: blur(8px);
}

/* Phase Badges & Elements */
.scroll-phase-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.4rem 1.1rem;
  border-radius: 50px;
  font-family: var(--font-main, 'Outfit', sans-serif);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  background: rgba(10, 12, 20, 0.75);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.scroll-phase-badge.red {
  color: #ff6b7a;
  border-color: rgba(232, 25, 44, 0.6);
  box-shadow: 0 0 25px rgba(232, 25, 44, 0.35);
}

.scroll-phase-badge.cyan {
  color: #38bdf8;
  border-color: rgba(0, 210, 255, 0.6);
  box-shadow: 0 0 25px rgba(0, 210, 255, 0.35);
}

.scroll-phase-badge.purple {
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.6);
  box-shadow: 0 0 25px rgba(168, 85, 247, 0.35);
}

.scroll-phase-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
  animation: liveDotPulse 1.5s infinite;
}

.scroll-phase-title {
  font-family: var(--font-main, 'Outfit', sans-serif);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  color: #ffffff;
  margin-bottom: 1.25rem;
  letter-spacing: -1.5px;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.8);
}

.scroll-phase-title .accent-red {
  background: linear-gradient(135deg, #ff4757 0%, #ff7b54 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.scroll-phase-title .accent-cyan {
  background: linear-gradient(135deg, #38bdf8 0%, #a7f3d0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.scroll-phase-title .accent-purple {
  background: linear-gradient(135deg, #c084fc 0%, #f472b6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.scroll-phase-desc {
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  color: #d1d5e5;
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 580px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

/* Floating Glass Specs Row */
.scroll-specs-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.25rem;
}

.scroll-spec-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.6rem 1.2rem;
  background: rgba(15, 18, 30, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  backdrop-filter: blur(16px);
  color: #f1f3f9;
  font-family: var(--font-main, 'Outfit', sans-serif);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.scroll-spec-chip svg {
  width: 16px;
  height: 16px;
  color: var(--red-light, #ff4757);
}

/* Actions */
.scroll-phase-actions {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.scroll-action-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0.9rem 2rem;
  background: var(--gradient-red, linear-gradient(135deg, #e8192c 0%, #ff6b35 100%));
  color: #fff;
  border-radius: 50px;
  font-family: var(--font-main, 'Outfit', sans-serif);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: 0 8px 30px rgba(232, 25, 44, 0.5);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.scroll-action-primary:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 40px rgba(232, 25, 44, 0.7);
  color: #fff;
}

.scroll-action-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.85rem 1.8rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 50px;
  font-family: var(--font-main, 'Outfit', sans-serif);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  backdrop-filter: blur(12px);
  transition: all 0.3s ease;
}

.scroll-action-secondary:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  color: #fff;
}

/* ── Cyber HUD Navigation & Step Indicator (Side Tracker) ── */
.scroll-hud-tracker {
  position: absolute;
  right: 3rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  z-index: 6;
  pointer-events: auto;
}

[dir="rtl"] .scroll-hud-tracker {
  right: auto;
  left: 3rem;
}

.scroll-tracker-item {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px;
  color: var(--gray, #8b93b0);
  font-family: var(--font-main, 'Outfit', sans-serif);
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.3s ease;
  flex-direction: row-reverse;
}

[dir="rtl"] .scroll-tracker-item {
  flex-direction: row;
}

.scroll-tracker-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  border: 2px solid transparent;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.scroll-tracker-item:hover .scroll-tracker-dot {
  background: #fff;
  transform: scale(1.3);
}

.scroll-tracker-item.active {
  color: #fff;
}

.scroll-tracker-item.active .scroll-tracker-dot {
  background: var(--red, #e8192c);
  border-color: #ffffff;
  transform: scale(1.5);
  box-shadow: 0 0 15px rgba(232, 25, 44, 0.9);
}

.scroll-tracker-line {
  position: absolute;
  right: 10px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: rgba(255, 255, 255, 0.1);
  z-index: -1;
}

[dir="rtl"] .scroll-tracker-line {
  right: auto;
  left: 10px;
}

.scroll-tracker-progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: var(--red, #e8192c);
  box-shadow: 0 0 10px var(--red, #e8192c);
  transition: height 0.2s ease-out;
}

/* Floating Audio / Ambient Controls */
.scroll-audio-toggle {
  position: absolute;
  bottom: 2rem;
  right: 3rem;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0.6rem 1.1rem;
  border-radius: 50px;
  background: rgba(10, 12, 20, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-family: var(--font-main, 'Outfit', sans-serif);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(16px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  transition: all 0.25s ease;
  pointer-events: auto;
}

[dir="rtl"] .scroll-audio-toggle {
  right: auto;
  left: 3rem;
}

.scroll-audio-toggle:hover {
  background: var(--red, #e8192c);
  border-color: var(--red-light, #ff4757);
  box-shadow: 0 0 20px rgba(232, 25, 44, 0.5);
  transform: translateY(-2px);
}

.scroll-audio-toggle svg {
  width: 16px;
  height: 16px;
}

/* Bottom Scroll Hint */
.scroll-hint-bar {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--font-main, 'Outfit', sans-serif);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  pointer-events: none;
  animation: scrollBounce 2s infinite;
}

@keyframes scrollBounce {
  0%, 20%, 50%, 80%, 100% { transform: translate(-50%, 0); }
  40% { transform: translate(-50%, -8px); }
  60% { transform: translate(-50%, -4px); }
}

.scroll-hint-mouse {
  width: 20px;
  height: 32px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  position: relative;
}

.scroll-hint-mouse::before {
  content: '';
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 6px;
  background: var(--red-light, #ff4757);
  border-radius: 2px;
  animation: scrollWheel 1.5s infinite;
}

@keyframes scrollWheel {
  0% { top: 5px; opacity: 1; }
  100% { top: 16px; opacity: 0; }
}

/* ===================================================
   RESPONSIVE OPTIMIZATIONS
   =================================================== */
@media (max-width: 900px) {
  .scroll-hud-tracker {
    display: none; /* Hide side dots on mobile/tablet to avoid clutter */
  }
  .scroll-video-section {
    height: 270vh;
  }
  .scroll-video-hud {
    padding: 1.5rem;
  }
  .scroll-phase-title {
    font-size: 2.2rem;
  }
  .scroll-phase-desc {
    font-size: 0.98rem;
    margin-bottom: 1.5rem;
  }
  .scroll-audio-toggle {
    bottom: 1.25rem;
    right: 1.25rem;
  }
  [dir="rtl"] .scroll-audio-toggle {
    right: auto;
    left: 1.25rem;
  }
  .scroll-hint-bar {
    display: none;
  }
}

/* ===================================================
   CATALOG PAGE FULL-WIDTH VIDEO MOTION HERO
   =================================================== */
.catalog-video-hero {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  margin-bottom: 3rem;
  padding: 3.5rem 3rem;
  display: flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  min-height: 280px;
}

.catalog-video-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  filter: saturate(1.25) contrast(1.15) brightness(1.05);
  transform: scale(1.02);
  transition: transform 0.8s ease-out;
  pointer-events: none;
}

.catalog-video-hero:hover .catalog-video-hero-bg {
  transform: scale(1.06);
}

.catalog-video-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 12, 20, 0.88) 0%, rgba(10, 12, 20, 0.45) 50%, rgba(10, 12, 20, 0.78) 100%);
  pointer-events: none;
}

[dir="rtl"] .catalog-video-hero-overlay {
  background: linear-gradient(-90deg, rgba(10, 12, 20, 0.88) 0%, rgba(10, 12, 20, 0.45) 50%, rgba(10, 12, 20, 0.78) 100%);
}

.catalog-video-hero-content {
  position: relative;
  z-index: 2;
  max-width: 650px;
}

.catalog-video-hero-content h3 {
  font-family: var(--font-main, 'Outfit', sans-serif);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  color: #ffffff;
  margin: 0.8rem 0 0.5rem;
  letter-spacing: -0.5px;
}

.catalog-video-hero-content p {
  color: var(--gray-light, #c5cad8);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.75rem;
}

.catalog-video-hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.catalog-video-hero-actions .btn-primary {
  padding: 0.75rem 1.6rem;
  font-size: 0.92rem;
  cursor: pointer;
  border: none;
}

.catalog-video-hero-actions .btn-secondary {
  padding: 0.75rem 1.6rem;
  font-size: 0.92rem;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-radius: 8px;
  font-family: var(--font-main, 'Outfit', sans-serif);
  font-weight: 600;
  transition: all 0.25s ease;
}

.catalog-video-hero-actions .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

