/* ========================================
   ERGON Banner Promocional - Animaciones
   ======================================== */

/* --- Base container --- */
.ergon-banner {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  min-height: 400px;
  display: flex;
  align-items: center;
  background: var(--bg-color, #1a1a2e);
}
.ergon-banner.has-bg-img {
  background-image: var(--bg-img);
  background-size: cover;
  background-position: center;
}

/* --- Inner layout --- */
.ergon-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 40px 60px;
  gap: 40px;
  position: relative;
  z-index: 2;
}

/* --- Image column --- */
.ergon-banner__imagen-col {
  flex: 0 0 40%;
  max-width: 400px;
}
.ergon-banner__imagen {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  animation: fadeInUp 0.8s ease-out;
}

/* --- Text column --- */
.ergon-banner__texto-col {
  flex: 1;
}
.ergon-banner__subtitulo {
  display: inline-block;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
  margin-bottom: 8px;
  animation: fadeInUp 0.6s ease-out;
}
.ergon-banner__titulo {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 12px;
  animation: fadeInUp 0.7s ease-out;
}
.ergon-banner__descripcion {
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 24px;
  max-width: 480px;
  animation: fadeInUp 0.8s ease-out;
}
.ergon-banner__boton {
  display: inline-block;
  padding: 14px 36px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  animation: fadeInUp 0.9s ease-out;
  border: none;
}
.ergon-banner__boton:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
  opacity: 0.92;
}

/* --- Animaciones de fondo --- */

/* CAPA de animaciones */
.ergon-banner__animaciones {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

/* --- 1) Partículas flotantes --- */
.animacion-particulas .ergon-banner__animaciones::before,
.animacion-particulas .ergon-banner__animaciones::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  animation: floatUp 6s infinite ease-in-out;
}
.animacion-particulas .ergon-banner__animaciones::before {
  left: 20%;
  width: 10px;
  height: 10px;
  animation-delay: 0s;
}
.animacion-particulas .ergon-banner__animaciones::after {
  left: 70%;
  width: 6px;
  height: 6px;
  animation-delay: 3s;
}
/* Extra particles via box-shadow */
.animacion-particulas .ergon-banner__animaciones {
  box-shadow:
    40px 120px 0 2px rgba(255,255,255,0.08),
    120px 60px 0 3px rgba(255,255,255,0.06),
    200px 180px 0 2px rgba(255,255,255,0.1),
    300px 40px 0 4px rgba(255,255,255,0.05),
    80px 250px 0 2px rgba(255,255,255,0.07),
    350px 140px 0 3px rgba(255,255,255,0.06),
    450px 220px 0 2px rgba(255,255,255,0.09),
    180px 300px 0 4px rgba(255,255,255,0.04),
    520px 80px 0 3px rgba(255,255,255,0.08),
    600px 200px 0 2px rgba(255,255,255,0.05);
  animation: particleDrift 12s infinite linear;
}

/* --- 2) Olas --- */
.animacion-ondas .ergon-banner__animaciones::before,
.animacion-ondas .ergon-banner__animaciones::after {
  content: '';
  position: absolute;
  bottom: -10%;
  left: -10%;
  width: 120%;
  height: 40%;
  border-radius: 45%;
  opacity: 0.06;
}
.animacion-ondas .ergon-banner__animaciones::before {
  background: #fff;
  animation: wave 8s infinite linear;
}
.animacion-ondas .ergon-banner__animaciones::after {
  background: #fff;
  animation: wave 10s infinite linear reverse;
  opacity: 0.04;
}

/* --- 3) Destellos --- */
.animacion-destellos .ergon-banner__animaciones::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  animation: shimmer 4s infinite;
}

/* --- 4) Gradiente animado --- */
.animacion-gradient .ergon-banner {
  background: linear-gradient(-45deg, #1a1a2e, #16213e, #0f3460, #533483);
  background-size: 400% 400%;
  animation: gradientBG 12s ease infinite;
}

/* --- Keyframes --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes floatUp {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.15; }
  50%      { transform: translateY(-60px) scale(1.5); opacity: 0.3; }
}
@keyframes particleDrift {
  0%   { transform: translateX(0) translateY(0); }
  50%  { transform: translateX(20px) translateY(-30px); }
  100% { transform: translateX(-10px) translateY(0); }
}
@keyframes wave {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes shimmer {
  0%   { left: -100%; }
  100% { left: 200%; }
}
@keyframes gradientBG {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .ergon-banner__inner {
    flex-direction: column !important;
    padding: 30px 20px;
  }
  .ergon-banner__imagen-col {
    flex: none;
    max-width: 280px;
  }
  .ergon-banner__titulo {
    font-size: 28px;
  }
  .ergon-banner {
    min-height: auto;
  }
}
