/* components/coverflow.css */

/* Coverflow: galeria de portadas de Alterra
   ============================================================ */

.coverflow-gallery-wrapper {
  margin: 20px 0 10px;
}

.coverflow-gallery {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 4px;
}

.coverflow-track {
  position: relative;
  flex: 0 1 720px;
  min-width: 0;
  height: 430px;
  perspective: 1100px;
  transform-style: preserve-3d;
  overflow: visible;
}

.coverflow-slot {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: 253px;
  height: 380px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  opacity: 0;
  text-decoration: none;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transform-origin: center;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  box-shadow:
    0 6px 18px
    rgba(var(--shadow-color-rgb), 0.22);
  transition: box-shadow 0.2s ease;
}

.coverflow-slot[data-offset="0"] {
  opacity: 1;
  z-index: 50;
}

.coverflow-slot.is-center {
  pointer-events: auto;
  cursor: pointer;
  box-shadow:
    0 10px 26px
    rgba(var(--shadow-color-rgb), 0.35);
}

.coverflow-cover {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  transition:
    transform 0.2s ease,
    filter 0.2s ease;
}

.coverflow-slot.is-center:hover
.coverflow-cover {
  transform: scale(1.025);
  filter: brightness(1.05);
}

.coverflow-title {
  margin: 8px 0 0;
  color: var(--text-h3);
  font-family: var(--font-body);
  font-size: 0.85rem;
  text-align: center;
}

.coverflow-gallery-wrapper.is-animating
.coverflow-slot {
  pointer-events: none;
}

.coverflow-arrow {
  position: relative;
  z-index: 60;
}

.coverflow-dots {
  display: none;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
}

.coverflow-dot {
  width: 18px;
  height: 4px;
  border-radius: 2px;
  background: var(--border-subtle);
}

.coverflow-dot.is-active {
  background: var(--cta-primary);
}

@media (max-width: 640px) {
  .coverflow-track {
    height: 340px;
  }

  .coverflow-slot {
    width: 200px;
    height: 300px;
  }

  .coverflow-dots {
    display: flex;
  }
}
