/* ==========================================================================
   KDK VIETNAM — 6. ANIMATIONS & SOUNDWAVE MODULE (Audio Equalizer & GSAP Keyframes)
   ========================================================================== */

/* Audio Equalizer Soundwave Widget */
.soundwave-widget {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 24px;
  padding: 0 4px;
  vertical-align: middle;
}

.equalizer-bar {
  width: 3.5px;
  background: var(--primary);
  border-radius: 2px;
  animation: equalizerMotion 1.2s ease-in-out infinite alternate;
}

.equalizer-bar:nth-child(1) { height: 40%; animation-delay: 0.1s; animation-duration: 0.9s; }
.equalizer-bar:nth-child(2) { height: 80%; animation-delay: 0.3s; animation-duration: 1.3s; }
.equalizer-bar:nth-child(3) { height: 100%; animation-delay: 0.2s; animation-duration: 1.1s; }
.equalizer-bar:nth-child(4) { height: 60%; animation-delay: 0.4s; animation-duration: 1.4s; }
.equalizer-bar:nth-child(5) { height: 30%; animation-delay: 0.15s; animation-duration: 1.0s; }

.soundwave-widget.light .equalizer-bar {
  background: #ed1b24;  /* KDK logo red */
  box-shadow: 0 0 4px rgba(237, 27, 36, 0.5);
}

@keyframes equalizerMotion {
  0% { height: 20%; }
  50% { height: 100%; }
  100% { height: 35%; }
}

/* GSAP Smooth Reveal Classes */
.gsap-reveal {
  opacity: 0;
  transform: translateY(30px);
  will-change: opacity, transform;
}

.gsap-reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  will-change: opacity, transform;
}

.gsap-reveal-right {
  opacity: 0;
  transform: translateX(40px);
  will-change: opacity, transform;
}

.gsap-pulse {
  animation: pulseGlow 2.5s infinite ease-in-out;
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(237, 27, 36, 0.4); }
  70% { box-shadow: 0 0 0 14px rgba(237, 27, 36, 0); }
  100% { box-shadow: 0 0 0 0 rgba(237, 27, 36, 0); }
}

/* ==========================================================================
   ULTRA-PREMIUM BRANDED AUDIO PRELOADER
   ========================================================================== */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0f1218;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  color: var(--white);
  font-family: var(--font-primary), sans-serif;
}

.loader-content {
  text-align: center;
  max-width: 700px;
  width: 90%;
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.loader-logo {
  height: 80px;
  object-fit: contain;
  margin-bottom: 8px;
  filter: drop-shadow(0 0 15px rgba(255,255,255,0.25));
}

.loader-title {
  font-size: 22px;
  font-weight: 800;
  color: #ff2d3d; /* KDK corporate red */
  margin: 0;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.loader-subtitle {
  background: #d31b24; /* corporate dark red */
  color: var(--white);
  padding: 8px 24px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  box-shadow: 0 4px 12px rgba(211, 27, 36, 0.4);
  margin-bottom: 10px;
  display: inline-block;
}

.loader-info {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.7;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 24px;
  width: 100%;
  text-align: center;
}

.loader-address {
  margin-bottom: 18px !important;
  color: rgba(255, 255, 255, 0.95) !important;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.loader-contacts {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px 28px;
  margin-bottom: 8px;
}

.loader-contacts span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.loader-canvas-container {
  width: 100%;
  height: 90px;
  position: relative;
  margin-top: 10px;
}

#preloader-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* ==========================================================================
   SHINY TEXT SPOTLIGHT EFFECT (LIKE DEMO.NET.VN)
   ========================================================================== */
/* Default: For light backgrounds (base text is dark grey/black) */
.text-spotlight, .vss-text-spotlight {
  background-image: linear-gradient(90deg, 
    #1a1a1a 0%, 
    #1a1a1a 25%, 
    #d31b24 45%, 
    #ff3344 50%, 
    #d31b24 55%, 
    #1a1a1a 75%, 
    #1a1a1a 100%
  ) !important;
  background-size: 200% auto !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
  animation: textShine 6s linear infinite !important;
  background-position: 200% center;
}

/* Overrides: For dark backgrounds (base text is light/white) */
.tech-dark .text-spotlight,
.tech-dark .vss-text-spotlight,
.hero .text-spotlight,
.dp-page-hero .text-spotlight,
.page-header .text-spotlight,
.soundwave-bg .text-spotlight,
.cta-consultation-section .text-spotlight,
.text-spotlight-dark {
  background-image: linear-gradient(90deg, 
    rgba(255, 255, 255, 0.65) 0%, 
    rgba(255, 255, 255, 0.65) 25%, 
    #ff3344 45%, 
    #ffffff 50%, 
    #ff3344 55%, 
    rgba(255, 255, 255, 0.65) 75%, 
    rgba(255, 255, 255, 0.65) 100%
  ) !important;
}

@keyframes textShine {
  0% {
    background-position: 200% center;
  }
  100% {
    background-position: 0% center;
  }
}

/* ==========================================================================
   AMBIENT GLOW MOVEMENT FOR HERO LIGHT FLARE
   ========================================================================== */
.hero::after {
  animation: ambientGlowMove 15s infinite ease-in-out !important;
}

@keyframes ambientGlowMove {
  0% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(-120px, 80px) scale(1.2);
    opacity: 0.85;
  }
  66% {
    transform: translate(60px, -40px) scale(0.9);
    opacity: 0.7;
  }
  100% {
    transform: translate(0, 0) scale(1);
  }
}

/* ==========================================================================
   ACOUSTIC WAVE HOVER RIPPLE EFFECT (FOR PRODUCTS & CARDS)
   ========================================================================== */
.product-card, .solution-card, .blog-card, .dp-sidebar-product-item {
  position: relative;
}

.product-card::before, .solution-card::before, .blog-card::before, .dp-sidebar-product-item::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 2px solid var(--primary);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.product-card:hover::before, .solution-card:hover::before, .blog-card:hover::before, .dp-sidebar-product-item:hover::before {
  animation: audioRipple 1.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
  opacity: 1;
}

@keyframes audioRipple {
  0% {
    transform: scale(1.0);
    opacity: 0.6;
    border-color: var(--primary);
  }
  50% {
    border-color: var(--accent-pink);
  }
  100% {
    transform: scale(1.06);
    opacity: 0;
  }
}

/* Light section decorations are handled by css/light-decor.css */
