/* Carrosseis da landing — piloto acusado-VD */

.j3w-h-carousel {
  --j3w-card-bg: rgba(15, 23, 42, 0.72);
  --j3w-card-border: rgba(255, 255, 255, 0.08);
  --j3w-card-border-hover: color-mix(in srgb, rgba(255, 255, 255, 0.08) 50%, white);
  --j3w-hc-gap: 0.75rem;
  position: relative;
  margin-top: 0.5rem;
  padding: 0.25rem 0 1rem;
}

.j3w-h-carousel__viewport {
  position: relative;
  overflow: hidden;
  perspective: 900px;
  min-height: 14.5rem;
  padding: 0.65rem 0;
  box-sizing: content-box;
  touch-action: pan-y;
  margin: 0 2.6rem;
}

.j3w-h-carousel__track {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  gap: var(--j3w-hc-gap);
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.j3w-h-carousel__track.is-instant {
  transition: none !important;
}

.j3w-h-carousel__slide {
  flex: 0 0 82%;
  max-width: 22rem;
  transition: transform 0.45s ease, opacity 0.45s ease, filter 0.45s ease;
  transform: scale(0.88);
  opacity: 0.42;
  filter: brightness(0.72);
}

.j3w-h-carousel__slide.is-active {
  transform: scale(1);
  opacity: 1;
  filter: none;
  z-index: 2;
}

.j3w-h-carousel__slide.is-near {
  opacity: 0.7;
  filter: brightness(0.88);
  transform: scale(0.93);
}

.j3w-h-carousel__card {
  height: 100%;
  min-height: 11.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.35rem 1.25rem;
  border-radius: 1rem;
  background: var(--j3w-card-bg);
  border: 1px solid var(--j3w-card-border);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  transition: background 0.35s ease, border-color 0.25s ease, box-shadow 0.35s ease;
  position: relative;
  overflow: hidden;
}

.j3w-h-carousel__slide.is-active .j3w-h-carousel__card {
  /* Mesma cor base + glassmorphism + luminosidade nas extremidades */
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(14px) saturate(1.25);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 40px 0 56px -32px rgba(var(--seg-rgb), 0.42),
    inset -40px 0 56px -32px rgba(127, 29, 29, 0.48);
  animation: j3w-h-grow 0.85s ease-out;
}

.j3w-h-carousel__slide.is-active .j3w-h-carousel__card::before,
.j3w-h-carousel__slide.is-active .j3w-h-carousel__card::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 38%;
  pointer-events: none;
  z-index: 0;
}

/* Rosa dos botões (--seg) à esquerda */
.j3w-h-carousel__slide.is-active .j3w-h-carousel__card::before {
  left: 0;
  background: radial-gradient(
    ellipse 90% 80% at 0% 50%,
    rgba(var(--seg-rgb), 0.34) 0%,
    transparent 72%
  );
}

/* Vermelho suave à direita (como no exemplo) */
.j3w-h-carousel__slide.is-active .j3w-h-carousel__card::after {
  right: 0;
  background: radial-gradient(
    ellipse 90% 80% at 100% 50%,
    rgba(127, 29, 29, 0.4) 0%,
    transparent 72%
  );
}

.j3w-h-carousel__slide.is-active .j3w-h-carousel__card:hover {
  border-color: var(--j3w-card-border-hover);
}

@keyframes j3w-h-grow {
  0% {
    transform: scale(0.96);
    box-shadow: 0 0 0 0 rgba(var(--seg-rgb), 0.28);
  }
  55% {
    box-shadow: 0 0 0 14px rgba(var(--seg-rgb), 0);
  }
  100% {
    transform: scale(1);
    box-shadow:
      0 16px 40px rgba(0, 0, 0, 0.38),
      inset 0 1px 0 rgba(255, 255, 255, 0.12),
      inset 40px 0 56px -32px rgba(var(--seg-rgb), 0.42),
      inset -40px 0 56px -32px rgba(127, 29, 29, 0.48);
  }
}

.j3w-h-carousel__card > * {
  position: relative;
  z-index: 1;
}

.j3w-h-carousel__card i {
  color: var(--seg);
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.j3w-h-carousel__card p {
  margin: 0;
  color: #cbd5e1;
  font-size: 0.9rem;
  line-height: 1.55;
  text-align: center;
}

.j3w-h-carousel__card.is-long {
  min-height: 15rem;
}

.j3w-h-carousel__card.is-long p {
  font-size: 0.8rem;
  line-height: 1.5;
}

.j3w-h-carousel__btn {
  position: absolute;
  top: calc(50% - 0.75rem);
  transform: translateY(-50%);
  z-index: 5;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.9);
  color: var(--seg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.j3w-h-carousel__btn:hover {
  background: rgba(var(--seg-rgb), 0.22);
  border-color: rgba(var(--seg-rgb), 0.55);
}

.j3w-h-carousel__btn:focus-visible {
  outline: 2px solid var(--seg);
  outline-offset: 2px;
}

.j3w-h-carousel__btn--prev { left: 0; }
.j3w-h-carousel__btn--next { right: 0; }

.j3w-h-carousel__dots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.j3w-h-carousel__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.j3w-h-carousel__dot.is-active {
  background: var(--seg);
  border-color: var(--seg);
  transform: scale(1.15);
}

.j3w-h-carousel__dot:focus-visible {
  outline: 2px solid var(--seg);
  outline-offset: 2px;
}

/* —— Vertical scroller (ementa / programa) —— */
.j3w-ementa-carrossel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: left;
  width: 100%;
}

.j3w-ementa-carrossel__head {
  width: 100%;
  max-width: 46.8rem; /* 36rem + 30% */
  margin: 0 auto 1.5rem;
}

.j3w-v-scroll {
  --j3w-card-bg: rgba(15, 23, 42, 0.55);
  --j3w-card-border: rgba(255, 255, 255, 0.07);
  --j3w-card-border-hover: color-mix(in srgb, rgba(255, 255, 255, 0.07) 50%, white);
  --j3w-vs-item: 5.5rem;
  --j3w-vs-gap: 0.75rem;
  --j3w-vs-scale: 1.15;
  --j3w-vs-pad-y: calc(var(--j3w-vs-item) * (var(--j3w-vs-scale) - 1) / 2 + 0.45rem);
  --j3w-vs-pad-x: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
  width: 100%;
  max-width: 46.8rem;
  margin-left: auto;
  margin-right: auto;
  padding: 0 0.5rem;
  box-sizing: border-box;
}

.j3w-v-scroll__btn {
  align-self: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(15, 23, 42, 0.9);
  color: var(--seg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  flex-shrink: 0;
}

.j3w-v-scroll__btn:hover {
  background: rgba(var(--seg-rgb), 0.2);
  border-color: rgba(var(--seg-rgb), 0.55);
}

.j3w-v-scroll__btn:focus-visible {
  outline: 2px solid var(--seg);
  outline-offset: 2px;
}

.j3w-v-scroll__viewport {
  box-sizing: content-box;
  height: calc(3 * var(--j3w-vs-item) + 2 * var(--j3w-vs-gap));
  padding: var(--j3w-vs-pad-y) var(--j3w-vs-pad-x);
  overflow: hidden;
  border-radius: 0.5rem;
  position: relative;
}

.j3w-v-scroll__track {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--j3w-vs-gap);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
  position: relative;
  width: 100%;
}

.j3w-v-scroll__track.is-instant {
  transition: none !important;
}

.j3w-v-scroll__item {
  flex: 0 0 var(--j3w-vs-item);
  height: var(--j3w-vs-item);
  /* 84.5% × 1.15 ≈ 97% — margem contra corte nas laterais */
  width: 84.5%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.7rem 1.15rem 0.85rem;
  border-radius: 1rem;
  background: var(--j3w-card-bg);
  border: 1px solid var(--j3w-card-border);
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr;
  align-items: stretch;
  transform: scale(1);
  transform-origin: center center;
  transition:
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.35s ease,
    border-color 0.25s ease,
    box-shadow 0.4s ease,
    opacity 0.35s ease,
    backdrop-filter 0.35s ease;
  opacity: 0.78;
  overflow: visible;
}

.j3w-v-scroll__item.is-active {
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(14px) saturate(1.25);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
  border-color: rgba(255, 255, 255, 0.2);
  transform: scale(var(--j3w-vs-scale));
  opacity: 1;
  z-index: 8;
  /* Glass + luminosidade: rosa (--seg) à esquerda, vermelho à direita */
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 36px 0 48px -28px rgba(var(--seg-rgb), 0.4),
    inset -36px 0 48px -28px rgba(127, 29, 29, 0.46);
  animation: j3w-v-grow 0.9s ease-out;
}

.j3w-v-scroll__item.is-active::before,
.j3w-v-scroll__item.is-active::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 36%;
  pointer-events: none;
  z-index: 0;
  border-radius: inherit;
}

.j3w-v-scroll__item.is-active::before {
  left: 0;
  background: radial-gradient(
    ellipse 90% 85% at 0% 50%,
    rgba(var(--seg-rgb), 0.32) 0%,
    transparent 72%
  );
}

.j3w-v-scroll__item.is-active::after {
  right: 0;
  background: radial-gradient(
    ellipse 90% 85% at 100% 50%,
    rgba(127, 29, 29, 0.38) 0%,
    transparent 72%
  );
}

.j3w-v-scroll__item.is-active:hover {
  border-color: var(--j3w-card-border-hover);
}

@keyframes j3w-v-grow {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(var(--seg-rgb), 0.32);
  }
  55% {
    transform: scale(calc(var(--j3w-vs-scale) + 0.03));
    box-shadow: 0 0 0 12px rgba(var(--seg-rgb), 0);
  }
  100% {
    transform: scale(var(--j3w-vs-scale));
    box-shadow:
      0 12px 32px rgba(0, 0, 0, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.12),
      inset 36px 0 48px -28px rgba(var(--seg-rgb), 0.4),
      inset -36px 0 48px -28px rgba(127, 29, 29, 0.46);
  }
}

.j3w-v-scroll__item span {
  display: block;
  justify-self: start;
  position: relative;
  z-index: 1;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--seg);
  line-height: 1.2;
}

.j3w-v-scroll__item p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #e2e8f0;
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.35;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  padding: 0 0.25rem;
}

.j3w-v-scroll__hint {
  text-align: center;
  font-size: 0.75rem;
  color: #64748b;
  margin: 0;
}

@media (min-width: 640px) {
  .j3w-h-carousel__viewport {
    margin: 0 3rem;
    min-height: 14.5rem;
  }

  .j3w-h-carousel__slide {
    flex-basis: 48%;
    max-width: 20rem;
  }

  .j3w-v-scroll {
    max-width: 46.8rem;
    --j3w-vs-item: 5.25rem;
  }

  .j3w-ementa-carrossel__head {
    max-width: 46.8rem;
  }
}

@media (min-width: 1024px) {
  .j3w-h-carousel__slide {
    flex-basis: 30%;
    max-width: 19.5rem;
  }

  .j3w-h-carousel__viewport {
    min-height: 15.5rem;
  }

  .j3w-v-scroll__item p {
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .j3w-h-carousel__track,
  .j3w-h-carousel__slide,
  .j3w-v-scroll__track,
  .j3w-v-scroll__item {
    transition: none !important;
    animation: none !important;
  }

  .j3w-v-scroll__item.is-active {
    transform: scale(1.08);
  }
}

/* Fallback sem color-mix */
@supports not (background: color-mix(in srgb, red 50%, white)) {
  .j3w-h-carousel {
    --j3w-card-border-hover: rgba(255, 255, 255, 0.42);
  }
  .j3w-v-scroll {
    --j3w-card-border-hover: rgba(255, 255, 255, 0.4);
  }
}
