/**
 * GSAP Effects - Utility CSS para Liferay
 * Banco de Occidente
 *
 * Solo contiene clases utilitarias de animación.
 * NO incluye resets globales (*, html, body) para evitar conflictos con el portal.
 */

/* =========================================================
   1. ESTRUCTURA DE TEXTOS ANIMADOS (SplitText)
   ========================================================= */
.gsap-fade-up .line,
.gsap-scale-rotate .line,
.gsap-bounce .line,
.gsap-word-reveal .line,
.gsap-clip-slide .line {
  display: block;
  overflow: hidden;
}

.gsap-fade-up .char,
.gsap-scale-rotate .char,
.gsap-bounce .char,
.gsap-word-reveal .char,
.gsap-clip-slide .char {
  display: inline-block;
  will-change: transform, opacity;
}

.gsap-fade-up .word,
.gsap-scale-rotate .word,
.gsap-bounce .word,
.gsap-word-reveal .word,
.gsap-clip-slide .word {
  display: inline-block;
  margin-right: 0.25em;
  overflow: hidden;
}

.gsap-fade-up .word:last-child,
.gsap-scale-rotate .word:last-child,
.gsap-bounce .word:last-child,
.gsap-word-reveal .word:last-child,
.gsap-clip-slide .word:last-child {
  margin-right: 0;
}

/* =========================================================
   2. SUBTÍTULOS / BAJADAS DE TEXTO
   ========================================================= */
.gsap-subtitle {
  display: inline-block;
  will-change: transform, opacity;
}

/* =========================================================
   3. CONTADORES NUMÉRICOS
   ========================================================= */
.gsap-counter {
  display: inline-block;
  font-variant-numeric: tabular-nums;
  will-change: contents;
}

/* =========================================================
   4. MARQUESINA INFINITA (Brands / Logos)
   ========================================================= */
.brands-marquee {
  width: 100%;
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.brands-track {
  display: flex;
  align-items: center;
  gap: 3rem;
  width: max-content;
  animation: gsapMarquee 30s linear infinite;
  will-change: transform;
}

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

.brand-logo {
  height: 42px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  opacity: 0.85;
  filter: grayscale(100%) brightness(1.1);
  transition: opacity 0.3s ease, filter 0.3s ease;
  flex-shrink: 0;
}

.brand-logo:hover {
  opacity: 1;
  filter: grayscale(0%) brightness(1.1);
}

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

/* =========================================================
   5. TARJETAS APILADAS CON SCROLL (Cards Stack)
   ========================================================= */
.cards-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  min-height: 420px;
}

.cards-stack {
  position: relative;
  width: 320px;
  height: 420px;
  transform-style: preserve-3d;
  transform: rotateX(18deg) rotateY(-30deg) rotateZ(10deg);
}

.card-img {
  position: absolute;
  left: 0;
  width: 100%;
  max-width: 320px;
  border-radius: 16px;
  border: 2px solid #ffffff;
  box-shadow: 0 25px 55px rgba(0, 0, 0, 0.18);
  background: #ffffff;
  will-change: transform, opacity;
}

.card-1 {
  top: 0;
  z-index: 4;
}

.card-2 {
  top: 42px;
  z-index: 3;
}

.card-3 {
  top: 84px;
  z-index: 2;
}

.card-4 {
  top: 126px;
  z-index: 1;
}

/* Responsive para tarjetas y marquesina */
@media (max-width: 768px) {
  .cards-visual {
    min-height: 340px;
  }

  .cards-stack {
    width: 280px;
    height: 360px;
    transform: rotateX(18deg) rotateY(-28deg) rotateZ(10deg);
  }

  .card-img {
    max-width: 280px;
  }

  .card-1 { top: 0; }
  .card-2 { top: 36px; }
  .card-3 { top: 72px; }
  .card-4 { top: 108px; }

  .brands-track {
    gap: 2rem;
    animation-duration: 22s;
  }

  .brand-logo {
    height: 34px;
    max-width: 170px;
  }
}
