/* Entrega 54 - efecto aleatorio banner principal de inicio, solo escritorio */
/* Base: Entrega 52. No modifica versión móvil. */

@media (min-width: 992px) {
  body.si-modern .si-home-hero-section.si-hero-random-enabled .si-home-hero-media,
  body.si-modern .si-home-hero-section.si-hero-random-enabled .si-home-hero-image,
  body.si-modern .si-home-hero-section.si-hero-random-enabled .si-home-hero-cta,
  body.si-modern .si-home-hero-section.si-hero-random-enabled .si-home-hero-note {
    will-change: transform, opacity, filter;
  }

  body.si-modern .si-home-hero-section.si-hero-random-enabled .si-home-hero-media {
    position: relative !important;
    overflow: hidden !important;
  }

  body.si-modern .si-home-hero-section.si-hero-random-enabled .si-home-hero-media::after {
    content: "";
    position: absolute;
    top: -12%;
    left: -22%;
    width: 34%;
    height: 124%;
    opacity: 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.24) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-18deg) translateX(-150%);
  }

  /* Efecto 1: subida elegante */
  body.si-modern .si-home-hero-section.si-hero-effect-a .si-home-hero-media {
    opacity: 0;
    transform: translateY(30px) scale(.985);
  }
  body.si-modern .si-home-hero-section.si-hero-effect-a.si-hero-random-ready .si-home-hero-media {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: transform .9s cubic-bezier(.22,.61,.36,1), opacity .85s ease;
  }
  body.si-modern .si-home-hero-section.si-hero-effect-a .si-home-hero-cta,
  body.si-modern .si-home-hero-section.si-hero-effect-a .si-home-hero-note {
    opacity: 0;
    transform: translateY(16px);
  }
  body.si-modern .si-home-hero-section.si-hero-effect-a.si-hero-random-ready .si-home-hero-cta,
  body.si-modern .si-home-hero-section.si-hero-effect-a.si-hero-random-ready .si-home-hero-note {
    opacity: 1;
    transform: translateY(0);
    transition: transform .65s ease .15s, opacity .65s ease .15s;
  }

  /* Efecto 2: zoom suave + brillo */
  body.si-modern .si-home-hero-section.si-hero-effect-b .si-home-hero-image {
    opacity: 0;
    transform: scale(1.07);
    filter: saturate(.95) contrast(.98);
  }
  body.si-modern .si-home-hero-section.si-hero-effect-b.si-hero-random-ready .si-home-hero-image {
    opacity: 1;
    transform: scale(1);
    filter: saturate(1) contrast(1);
    transition: transform 1.08s cubic-bezier(.2,.7,.2,1), opacity .85s ease, filter .95s ease;
  }
  body.si-modern .si-home-hero-section.si-hero-effect-b.si-hero-random-ready .si-home-hero-media::after {
    opacity: 1;
    animation: siHeroShine54 1.05s ease .18s 1 forwards;
  }
  body.si-modern .si-home-hero-section.si-hero-effect-b .si-home-hero-cta,
  body.si-modern .si-home-hero-section.si-hero-effect-b .si-home-hero-note {
    opacity: 0;
  }
  body.si-modern .si-home-hero-section.si-hero-effect-b.si-hero-random-ready .si-home-hero-cta,
  body.si-modern .si-home-hero-section.si-hero-effect-b.si-hero-random-ready .si-home-hero-note {
    opacity: 1;
    transition: opacity .75s ease .2s;
  }

  /* Efecto 3: perspectiva premium */
  body.si-modern .si-home-hero-section.si-hero-effect-c .si-home-hero-media {
    opacity: 0;
    transform: perspective(1600px) rotateX(4deg) rotateY(-6deg) translateY(10px);
    transform-origin: 50% 50%;
  }
  body.si-modern .si-home-hero-section.si-hero-effect-c.si-hero-random-ready .si-home-hero-media {
    opacity: 1;
    transform: perspective(1600px) rotateX(0deg) rotateY(0deg) translateY(0);
    transition: transform .95s cubic-bezier(.19,1,.22,1), opacity .82s ease;
  }
  body.si-modern .si-home-hero-section.si-hero-effect-c .si-home-hero-cta {
    opacity: 0;
    transform: translateX(-14px);
  }
  body.si-modern .si-home-hero-section.si-hero-effect-c .si-home-hero-note {
    opacity: 0;
    transform: translateX(14px);
  }
  body.si-modern .si-home-hero-section.si-hero-effect-c.si-hero-random-ready .si-home-hero-cta,
  body.si-modern .si-home-hero-section.si-hero-effect-c.si-hero-random-ready .si-home-hero-note {
    opacity: 1;
    transform: translateX(0);
    transition: transform .65s ease .16s, opacity .65s ease .16s;
  }
}

@keyframes siHeroShine54 {
  0% { transform: skewX(-18deg) translateX(-150%); opacity: 0; }
  16% { opacity: 1; }
  100% { transform: skewX(-18deg) translateX(390%); opacity: 0; }
}

/* móvil sin cambios: se evita forzar animaciones en pantallas chicas */
@media (max-width: 991px) {
  body.si-modern .si-home-hero-section.si-hero-random-enabled .si-home-hero-media,
  body.si-modern .si-home-hero-section.si-hero-random-enabled .si-home-hero-image,
  body.si-modern .si-home-hero-section.si-hero-random-enabled .si-home-hero-cta,
  body.si-modern .si-home-hero-section.si-hero-random-enabled .si-home-hero-note {
    transform: none !important;
    opacity: 1 !important;
    filter: none !important;
    transition: none !important;
    animation: none !important;
  }
}
