/* ==========================================================
   CIAO DIGITAL — HERO ANIMADO / INDEX-TESTE
   Arquivo isolado: não altera o hero da index.php oficial.
   ========================================================== */

#hero-billboard.hero-portfolio-motion {
  position: relative;
  width: 100%;
  height: 85vh;
  min-height: 620px;
  overflow: hidden;
  background: #130018;
  isolation: isolate;
}

.hero-portfolio-motion .hero-motion-grid {
  position: absolute;
  top: -38%;
  left: -32%;
  width: 164%;
  height: 176%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  transform: rotate(-11deg);
  transform-origin: center;
  z-index: 0;
  overflow: visible;
}

.hero-portfolio-motion .hero-motion-line {
  display: flex;
  flex: 0 0 auto;
  width: max-content;
  gap: 18px;
  will-change: transform;
}

.hero-portfolio-motion .hero-motion-set {
  display: flex;
  flex: 0 0 auto;
  width: max-content;
  gap: 18px;
  padding-right: 18px;
}

.hero-portfolio-motion .hero-motion-item {
  flex: 0 0 330px;
  width: 330px;
  height: 220px;
  overflow: hidden;
  border-radius: 12px;
  background: #26102d;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .22);
}

.hero-portfolio-motion .hero-motion-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

/* Máscara/vinheta inspirada no cover do template, adaptada à Ciao */
.hero-portfolio-motion .hero-motion-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(35, 0, 41, .96) 0%, rgba(35, 0, 41, .72) 28%, rgba(35, 0, 41, .22) 62%, rgba(35, 0, 41, .35) 100%),
    radial-gradient(circle at 65% 48%, transparent 5%, rgba(12, 0, 16, .18) 58%, rgba(12, 0, 16, .72) 100%),
    linear-gradient(0deg, rgba(31, 0, 36, .94) 0%, transparent 24%, transparent 78%, rgba(31, 0, 36, .55) 100%);
}

.hero-portfolio-motion .hero-content {
  z-index: 3;
}

/* Leve profundidade entre as faixas */
.hero-portfolio-motion .hero-motion-line:nth-child(1),
.hero-portfolio-motion .hero-motion-line:nth-child(4) {
  opacity: .72;
}

.hero-portfolio-motion .hero-motion-line:nth-child(2),
.hero-portfolio-motion .hero-motion-line:nth-child(3) {
  opacity: .96;
}

@media (max-width: 900px) {
  #hero-billboard.hero-portfolio-motion {
    height: 82vh;
    min-height: 600px;
    margin-bottom: 20px;
  }

  .hero-portfolio-motion .hero-motion-grid {
    top: -24%;
    left: -72%;
    width: 245%;
    height: 150%;
    gap: 12px;
    transform: rotate(-10deg);
  }

  .hero-portfolio-motion .hero-motion-line,
  .hero-portfolio-motion .hero-motion-set {
    gap: 12px;
  }

  .hero-portfolio-motion .hero-motion-set {
    padding-right: 12px;
  }

  .hero-portfolio-motion .hero-motion-item {
    flex-basis: 230px;
    width: 230px;
    height: 155px;
    border-radius: 9px;
  }

  .hero-portfolio-motion .hero-motion-vignette {
    background:
      linear-gradient(0deg, rgba(35, 0, 41, .98) 0%, rgba(35, 0, 41, .74) 34%, rgba(35, 0, 41, .20) 78%, rgba(35, 0, 41, .54) 100%),
      linear-gradient(90deg, rgba(35, 0, 41, .62) 0%, rgba(35, 0, 41, .22) 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-portfolio-motion .hero-motion-line {
    transform: none !important;
  }
}
