/* SavilTech — Transições de imagem do slideshow (uma por slide) */

.hero-slider .hero-slide__media {
  perspective: 1400px;
  transform-style: preserve-3d;
}

.hero-slider .hero-slide__fx {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-slider .hero-slide__img {
  transform: scale(1.05);
  will-change: transform, opacity, clip-path, filter;
}

.hero-slide.is-active .hero-slide__img {
  animation: heroKenBurns 8s ease-out forwards;
}

@keyframes heroKenBurns {
  from { transform: scale(1.08); }
  to { transform: scale(1.02); }
}

/* Overlay preto sempre visível */
.hero-slider .hero-slide__overlay {
  z-index: 2;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.78) 0%,
    rgba(0, 0, 0, 0.62) 45%,
    rgba(0, 0, 0, 0.72) 100%
  ) !important;
}

.hero-slider .hero-slide__overlay::after {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, transparent 55%) !important;
}

.hero-slider .hero-slide__content {
  z-index: 3;
}

.hero-slider .hero-slide__title,
.hero-slider .hero-slide__desc {
  white-space: normal;
  max-width: 720px;
}

/* Cortinas (elementos extra para efeito cortina) */
.hero-slide__curtain {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  display: none;
}

.hero-slide[data-transition="curtain"] .hero-slide__curtain {
  display: block;
}

.hero-slide__curtain-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 51%;
  background: #0a0a0a;
  z-index: 2;
  transition: transform 1.15s cubic-bezier(0.65, 0, 0.35, 1);
}

.hero-slide__curtain-panel--left {
  left: 0;
  transform-origin: left center;
}

.hero-slide__curtain-panel--right {
  right: 0;
  transform-origin: right center;
}

.hero-slide.is-entering.tx-curtain .hero-slide__curtain-panel--left {
  transform: translateX(-102%);
}

.hero-slide.is-entering.tx-curtain .hero-slide__curtain-panel--right {
  transform: translateX(102%);
}

.hero-slide.is-leaving.tx-curtain .hero-slide__curtain-panel--left {
  transform: translateX(0);
}

.hero-slide.is-leaving.tx-curtain .hero-slide__curtain-panel--right {
  transform: translateX(0);
}

.hero-slide.is-active.tx-curtain .hero-slide__curtain-panel--left,
.hero-slide.is-active.tx-curtain .hero-slide__curtain-panel--right {
  transform: translateX(-102%);
}

.hero-slide.is-active.tx-curtain .hero-slide__curtain-panel--right {
  transform: translateX(102%);
}

/* ========== SAÍDA (slide que sai) ========== */
.hero-slide.is-leaving.tx-puzzle .hero-slide__img {
  animation: txPuzzleOut 1.15s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.hero-slide.is-leaving.tx-reveal .hero-slide__img {
  animation: txRevealOut 1.1s ease forwards;
}

.hero-slide.is-leaving.tx-morph .hero-slide__img {
  animation: txMorphOut 1.1s ease forwards;
}

.hero-slide.is-leaving.tx-adorn .hero-slide__img {
  animation: txAdornOut 1.1s ease forwards;
}

.hero-slide.is-leaving.tx-box .hero-slide__img {
  animation: txBoxOut 1.15s ease forwards;
}

.hero-slide.is-leaving.tx-cube .hero-slide__img {
  animation: txCubeOut 1.2s ease forwards;
}

.hero-slide.is-leaving.tx-curtain .hero-slide__img {
  opacity: 0.4;
  transition: opacity 0.8s ease;
}

/* ========== ENTRADA (slide que entra) ========== */
.hero-slide.is-entering.tx-puzzle .hero-slide__img {
  animation: txPuzzleIn 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-slide.is-entering.tx-reveal .hero-slide__img {
  animation: txRevealIn 1.15s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.hero-slide.is-entering.tx-morph .hero-slide__img {
  animation: txMorphIn 1.2s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
}

.hero-slide.is-entering.tx-adorn .hero-slide__img {
  animation: txAdornIn 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.hero-slide.is-entering.tx-box .hero-slide__img {
  animation: txBoxIn 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.hero-slide.is-entering.tx-cube .hero-slide__img {
  animation: txCubeIn 1.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.hero-slide.is-entering.tx-curtain .hero-slide__img {
  animation: txCurtainImgIn 1.1s ease forwards;
}

/* Quebra-cabeça */
@keyframes txPuzzleOut {
  0% {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    transform: scale(1.02);
    filter: brightness(1);
  }
  35% {
    clip-path: polygon(0 0, 52% 2%, 48% 48%, 2% 52%, 0 100%, 100% 100%, 100% 0);
  }
  100% {
    clip-path: polygon(8% 12%, 45% 5%, 55% 42%, 92% 38%, 88% 88%, 42% 95%, 5% 78%, 12% 35%);
    transform: scale(1.12) rotate(3deg);
    filter: brightness(0.35) blur(6px);
    opacity: 0;
  }
}

@keyframes txPuzzleIn {
  0% {
    clip-path: polygon(10% 15%, 48% 8%, 52% 45%, 90% 40%, 85% 85%, 40% 92%, 8% 75%, 15% 38%);
    transform: scale(1.15) rotate(-4deg);
    filter: blur(8px) brightness(0.5);
    opacity: 0;
  }
  55% {
    clip-path: polygon(0 0, 55% 0, 50% 50%, 0 55%, 0 100%, 100% 100%, 100% 0);
    opacity: 1;
    filter: blur(0);
  }
  100% {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    transform: scale(1.05);
    opacity: 1;
  }
}

/* Revelar (círculo) */
@keyframes txRevealIn {
  from {
    clip-path: circle(0% at 50% 50%);
    transform: scale(1.15);
    opacity: 0.5;
  }
  to {
    clip-path: circle(120% at 50% 50%);
    transform: scale(1.05);
    opacity: 1;
  }
}

@keyframes txRevealOut {
  to {
    clip-path: circle(0% at 50% 50%);
    transform: scale(0.9);
    opacity: 0;
  }
}

/* Modificação / morph */
@keyframes txMorphIn {
  0% {
    transform: scale(0.6) skewX(12deg) rotate(-6deg);
    filter: blur(12px) hue-rotate(25deg);
    opacity: 0;
  }
  60% {
    transform: scale(1.06) skewX(-2deg) rotate(1deg);
    filter: blur(0);
  }
  100% {
    transform: scale(1.05);
    opacity: 1;
  }
}

@keyframes txMorphOut {
  to {
    transform: scale(1.2) skewX(-10deg) rotate(8deg);
    filter: blur(10px) saturate(0.3);
    opacity: 0;
  }
}

/* Adornar (moldura + zoom) */
@keyframes txAdornIn {
  0% {
    transform: scale(0.85);
    box-shadow: inset 0 0 0 80px rgba(255, 214, 10, 0.35);
    opacity: 0.6;
  }
  50% {
    box-shadow: inset 0 0 0 20px rgba(255, 214, 10, 0.2);
  }
  100% {
    transform: scale(1.05);
    box-shadow: inset 0 0 0 0 transparent;
    opacity: 1;
  }
}

@keyframes txAdornOut {
  to {
    transform: scale(1.1);
    box-shadow: inset 0 0 0 100px rgba(0, 0, 0, 0.9);
    opacity: 0;
  }
}

/* Caixa (flip 3D) */
.hero-slide.tx-box .hero-slide__fx {
  transform-style: preserve-3d;
}

@keyframes txBoxIn {
  from {
    transform: rotateX(75deg) scale(0.85);
    transform-origin: center bottom;
    opacity: 0;
  }
  to {
    transform: rotateX(0deg) scale(1.05);
    opacity: 1;
  }
}

@keyframes txBoxOut {
  to {
    transform: rotateX(-65deg) scale(0.9);
    transform-origin: center top;
    opacity: 0;
  }
}

/* Cubo 3D */
.hero-slide.tx-cube .hero-slide__fx {
  transform-style: preserve-3d;
}

@keyframes txCubeIn {
  from {
    transform: rotateY(-88deg) translateZ(-120px) scale(0.9);
    opacity: 0.4;
  }
  to {
    transform: rotateY(0deg) translateZ(0) scale(1.05);
    opacity: 1;
  }
}

@keyframes txCubeOut {
  to {
    transform: rotateY(88deg) translateZ(-120px) scale(0.88);
    opacity: 0;
  }
}

@keyframes txCurtainImgIn {
  from { opacity: 0.3; transform: scale(1.1); }
  to { opacity: 1; transform: scale(1.05); }
}

/* Desativa animações antigas (zoom) do style.css */
.hero-slider .hero-slide.is-leaving .hero-slide__img,
.hero-slider .hero-slide.is-entering .hero-slide__img {
  animation: none !important;
}

.hero-slider .hero-slide.is-active:not(.is-entering):not(.is-leaving) .hero-slide__img {
  animation: heroKenBurns 8s ease-out forwards !important;
}

.hero-slider .hero-slide.is-leaving.tx-puzzle .hero-slide__img { animation: txPuzzleOut 1.15s cubic-bezier(0.4, 0, 0.2, 1) forwards !important; }
.hero-slider .hero-slide.is-entering.tx-puzzle .hero-slide__img { animation: txPuzzleIn 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards !important; }
.hero-slider .hero-slide.is-leaving.tx-reveal .hero-slide__img { animation: txRevealOut 1.1s ease forwards !important; }
.hero-slider .hero-slide.is-entering.tx-reveal .hero-slide__img { animation: txRevealIn 1.15s cubic-bezier(0.4, 0, 0.2, 1) forwards !important; }
.hero-slider .hero-slide.is-leaving.tx-morph .hero-slide__img { animation: txMorphOut 1.1s ease forwards !important; }
.hero-slider .hero-slide.is-entering.tx-morph .hero-slide__img { animation: txMorphIn 1.2s cubic-bezier(0.34, 1.2, 0.64, 1) forwards !important; }
.hero-slider .hero-slide.is-leaving.tx-adorn .hero-slide__img { animation: txAdornOut 1.1s ease forwards !important; }
.hero-slider .hero-slide.is-entering.tx-adorn .hero-slide__img { animation: txAdornIn 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important; }
.hero-slider .hero-slide.is-leaving.tx-box .hero-slide__img { animation: txBoxOut 1.15s ease forwards !important; }
.hero-slider .hero-slide.is-entering.tx-box .hero-slide__img { animation: txBoxIn 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards !important; }
.hero-slider .hero-slide.is-leaving.tx-cube .hero-slide__img { animation: txCubeOut 1.2s ease forwards !important; }
.hero-slider .hero-slide.is-entering.tx-cube .hero-slide__img { animation: txCubeIn 1.25s cubic-bezier(0.4, 0, 0.2, 1) forwards !important; }
.hero-slider .hero-slide.is-entering.tx-curtain .hero-slide__img { animation: txCurtainImgIn 1.1s ease forwards !important; }
