/* 3D image carousel — hero */
.carousel-section {
  position: relative;
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
  min-height: 525px;
}

div#carousel {
  perspective: 1200px;
  background: #100000;
  padding-top: 6%;
  font-size: 0;
  margin-bottom: 1.5rem;
  overflow: hidden;
  min-height: 525px;
}

figure#spinner {
  transform-style: preserve-3d;
  height: 450px;
  margin: 0;
  transform-origin: 50% 50% -760px;
  transition: transform 2.8s ease-in-out;
}

figure#spinner img {
  width: 56%;
  max-width: 620px;
  height: auto;
  position: absolute;
  left: 22%;
  top: 0;
  transform-origin: 50% 50% -760px;
  outline: 1px solid transparent;
  border-radius: 0.75rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  object-fit: contain;
  aspect-ratio: 4 / 3;
  object-position: center;
  background:
    linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98)),
    radial-gradient(circle at 50% 40%, rgba(99, 102, 241, 0.22), transparent 62%);
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 0.45rem;
  box-sizing: border-box;
}

figure#spinner img:nth-child(1) {
  transform: rotateY(0deg);
}
figure#spinner img:nth-child(2) {
  transform: rotateY(-45deg);
}
figure#spinner img:nth-child(3) {
  transform: rotateY(-90deg);
}
figure#spinner img:nth-child(4) {
  transform: rotateY(-135deg);
}
figure#spinner img:nth-child(5) {
  transform: rotateY(-180deg);
}
figure#spinner img:nth-child(6) {
  transform: rotateY(-225deg);
}
figure#spinner img:nth-child(7) {
  transform: rotateY(-270deg);
}
figure#spinner img:nth-child(8) {
  transform: rotateY(-315deg);
}

.carousel-nav {
  color: #fff;
  margin: 5%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  text-decoration: none;
  font-size: 2rem;
  line-height: 1;
  transition: color 0.6s ease, background 0.3s ease;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  margin-top: -1.5rem;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  cursor: pointer;
  z-index: 10;
  user-select: none;
}

.carousel-nav--prev {
  left: 0.5rem;
}

.carousel-nav--next {
  right: 0.5rem;
}

.carousel-nav:hover {
  color: #888;
  background: rgba(255, 255, 255, 0.15);
}

@media (max-width: 767px) {
  div#carousel {
    padding-top: 12%;
    min-height: 410px;
  }

  figure#spinner {
    height: 325px;
    transform-origin: 50% 50% -520px;
  }

  figure#spinner img {
    width: 64%;
    left: 18%;
    transform-origin: 50% 50% -520px;
  }

  .carousel-nav {
    font-size: 1.5rem;
    width: 2.25rem;
    height: 2.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  figure#spinner {
    transition: none;
    will-change: auto;
  }

  .carousel-section {
    min-height: auto;
  }
}

