/* Card Fan Carousel — 21st.dev Vanilla adaptation
   Deck de cards verticais em leque 3D com GSAP, hover spread e Video Modal */

.fan-section {
  width: 100%;
  padding: 6vh 0 2vh;
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: visible;
}

.fan-header {
  text-align: center;
  margin-bottom: 3.5vh;
}

.fan-header .eyebrow {
  justify-content: center;
  margin-bottom: 12px;
}

.fan-header .eyebrow::before {
  display: none;
}

.fan-header .fan-subtitle {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--g);
  margin-top: 8px;
}

/* Palco do leque */
.fan-stage {
  width: 100%;
  max-width: 1320px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1200px;
  min-height: clamp(380px, 46vh, 520px);
  padding: 20px 0 10px;
}

.fan-layout {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 80rem;
  height: 100%;
  transform-style: preserve-3d;
}

/* Card individual */
.fan-card {
  position: absolute;
  width: clamp(200px, 17vw, 250px);
  aspect-ratio: 9 / 15.5;
  border-radius: 6px;
  overflow: hidden;
  background: #0e120f;
  box-shadow: 0 18px 45px -10px rgba(0, 0, 0, 0.8),
              0 0 0 1px rgba(255, 255, 255, 0.08);
  cursor: pointer;
  will-change: transform, opacity;
  user-select: none;
  transform-origin: center bottom;
  touch-action: pan-y;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.fan-card:hover {
  box-shadow: 0 24px 50px -8px rgba(0, 0, 0, 0.9),
              0 0 0 1px rgba(125, 255, 155, 0.4),
              0 0 25px rgba(125, 255, 155, 0.2);
}

.fan-card-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.fan-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.fan-card:hover .fan-card-img {
  transform: scale(1.08);
}

/* Gradiente e vinheta no card */
.fan-card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(4, 20, 10, 0.92) 0%,
    rgba(4, 20, 10, 0.25) 45%,
    rgba(0, 0, 0, 0.35) 100%
  );
  pointer-events: none;
  z-index: 2;
}

/* Tag no topo do card */
.fan-card-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--g);
  background: rgba(4, 20, 10, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(125, 255, 155, 0.35);
  padding: 3px 8px;
  border-radius: 4px;
}

/* Botão de play central no card */
.fan-card-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(4, 20, 10, 0.75);
  backdrop-filter: blur(12px);
  border: 1.5px solid rgba(125, 255, 155, 0.6);
  color: var(--g);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  box-shadow: 0 0 16px rgba(125, 255, 155, 0.25);
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1),
              background 0.3s ease,
              border-color 0.3s ease;
}

.fan-card-play svg {
  width: 15px;
  height: 15px;
  margin-left: 2px;
  fill: currentColor;
}

.fan-card:hover .fan-card-play {
  transform: translate(-50%, -50%) scale(1.1);
  background: var(--g);
  color: #04140a;
  box-shadow: 0 0 24px rgba(125, 255, 155, 0.6);
}

/* Área de informações do card ativo */
.fan-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 1.8rem;
  min-height: 80px;
  z-index: 10;
  position: relative;
  padding: 0 var(--gut);
}

.fan-meta-tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--g);
  margin-bottom: 6px;
}

.fan-meta-title {
  font-family: var(--sans);
  font-weight: 900;
  font-stretch: 62.5%;
  font-size: clamp(20px, 2.2vw, 32px);
  color: var(--ink);
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin: 0 0 6px;
  line-height: 1.1;
}

.fan-meta-synopsis {
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--mute);
  max-width: 580px;
  margin: 0;
  line-height: 1.5;
}

/* Navegação: setas + dots */
.fan-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 1.4rem;
  z-index: 10;
  position: relative;
}

.fan-arrow {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 6px;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: rgba(242, 242, 236, 0.7);
  cursor: pointer;
  outline: none;
  transition: all 0.25s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.fan-arrow svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.5;
}

.fan-arrow:hover {
  border-color: var(--g);
  color: var(--g);
  background: rgba(125, 255, 155, 0.08);
  box-shadow: 0 0 16px rgba(125, 255, 155, 0.2);
  transform: scale(1.05);
}

.fan-arrow:active {
  transform: scale(0.95);
}

/* Dots */
.fan-dots {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 4px;
}

.fan-dot {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  border: none;
  padding: 0;
}

.fan-dot:hover {
  background: rgba(255, 255, 255, 0.45);
}

.fan-dot.is-active {
  width: 22px;
  background: var(--g);
  box-shadow: 0 0 10px rgba(125, 255, 155, 0.5);
}

/* Responsivo */
@media (max-width: 768px) {
  .fan-stage {
    min-height: 380px;
    padding: 10px 0 5px;
  }
  .fan-card {
    width: clamp(140px, 36vw, 185px);
  }
  .fan-meta {
    margin-top: 1.2rem;
    min-height: 70px;
  }
  .fan-meta-title {
    font-size: 19px;
  }
  .fan-meta-synopsis {
    font-size: 12.5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .fan-arrow {
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 480px) {
  .fan-stage {
    min-height: 320px;
  }
  .fan-card {
    width: clamp(125px, 34vw, 155px);
  }
  .fan-dots {
    gap: 5px;
  }
  .fan-dot {
    width: 5px;
    height: 5px;
  }
  .fan-dot.is-active {
    width: 15px;
  }
}
