/* ============================================================
   LNS · Carrusel en abanico (galería de fotos)
   Port del componente React "card-fan-carousel" al stack del sitio.
   Las tarjetas se apilan en el centro y GSAP las coloca en abanico.
   ============================================================ */

.fan-layout {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 80rem;
  height: 17.6rem;            /* alturas iguales a las del cálculo en JS */
  margin-inline: auto;
  overflow: visible;          /* el abanico se sale del contenedor a propósito */
}

.fan-card {
  position: absolute;
  left: 50%;
  top: 50%;
  margin-left: -5rem;         /* la mitad del ancho */
  margin-top: -8.8rem;        /* la mitad del alto  */
  width: 10rem;
  height: 17.6rem;
  border-radius: 1rem;
  overflow: hidden;
  background: #141210;
  border: 1px solid rgba(237, 231, 217, .08);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .85);
  will-change: transform;
  opacity: 0;                 /* GSAP las revela al entrar */
}

.fan-card img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Marcador para cuando todavía no hay fotos cargadas */
.fan-vacia {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .6rem; height: 100%; padding: 1rem; text-align: center;
  background: linear-gradient(160deg, rgba(21,121,74,.16), rgba(200,32,44,.12));
  border: 1px dashed rgba(237,231,217,.22);
  color: rgba(237,231,217,.42);
  font-family: 'Oswald', sans-serif; font-size: .72rem;
  letter-spacing: .14em; text-transform: uppercase;
}

@media (min-width: 480px) {
  .fan-layout, .fan-card { height: 20.8rem; }
  .fan-card { width: 11.8rem; margin-left: -5.9rem; margin-top: -10.4rem; }
}
@media (min-width: 640px) {
  .fan-layout, .fan-card { height: 22.4rem; }
  .fan-card { width: 12.8rem; margin-left: -6.4rem; margin-top: -11.2rem; }
}
@media (min-width: 768px) {
  .fan-layout, .fan-card { height: 27.2rem; }
  .fan-card { width: 15.5rem; margin-left: -7.75rem; margin-top: -13.6rem; }
}
@media (min-width: 1024px) {
  .fan-layout, .fan-card { height: 30.4rem; }
  .fan-card { width: 17.35rem; margin-left: -8.675rem; margin-top: -15.2rem; }
}

/* Flechas */
.fan-flecha {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  height: 2.5rem; width: 2.5rem; border-radius: 9999px; flex: 0 0 auto;
  border: 1.5px solid rgba(237,231,217,.14);
  background: rgba(237,231,217,.06);
  color: rgba(237,231,217,.6);
  cursor: pointer; outline: none;
  transition: color .25s ease, border-color .25s ease, background .25s ease;
}
.fan-flecha:hover { color: #fff; border-color: rgba(237,231,217,.35); background: rgba(237,231,217,.1); }
.fan-flecha:active { opacity: .7; }
.fan-flecha:focus-visible { outline: 2px solid #EDE7D9; outline-offset: 2px; }
@media (min-width: 768px) { .fan-flecha { height: 3rem; width: 3rem; } }

.fan-punto {
  width: .5rem; height: .5rem; border-radius: 9999px; flex: 0 0 auto;
  background: rgba(237,231,217,.18);
  transition: background .3s ease, transform .3s ease;
}
.fan-punto.activo { background: rgba(237,231,217,.85); transform: scale(1.3); }

@media (prefers-reduced-motion: reduce) {
  .fan-punto, .fan-flecha { transition: none; }
}

/* ============================================================
   Visor de foto completa (al tocar una tarjeta)
   ============================================================ */
.fan-card img { cursor: zoom-in; }

.fan-visor-fondo {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(8, 7, 6, .84);
  backdrop-filter: blur(6px);
  opacity: 0; cursor: zoom-out;
}

.fan-visor-img {
  position: fixed; z-index: 91;
  object-fit: cover;
  border-radius: 1rem;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .95);
  will-change: transform;
  cursor: zoom-out;
}

.fan-visor-pie {
  position: fixed; z-index: 92; left: 50%; bottom: 1.25rem;
  transform: translateX(-50%);
  display: flex; align-items: center; justify-content: center;
  gap: 1rem; flex-wrap: wrap; max-width: 92vw; opacity: 0;
  font-size: .9rem; color: rgba(237, 231, 217, .8); text-align: center;
}
.fan-visor-pie a {
  display: inline-flex; align-items: center; gap: .4rem;
  border: 1px solid rgba(21, 121, 74, .5); color: #4FBC86;
  border-radius: .6rem; padding: .35rem .75rem;
  font-family: 'Oswald', sans-serif; font-size: .72rem;
  letter-spacing: .12em; text-transform: uppercase;
}
.fan-visor-pie a:hover { background: rgba(21, 121, 74, .15); }

.fan-visor-cerrar {
  position: fixed; z-index: 92; top: 1rem; right: 1rem;
  height: 2.6rem; width: 2.6rem; border-radius: 9999px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(237, 231, 217, .18);
  background: rgba(20, 18, 16, .75); color: rgba(237, 231, 217, .8);
  cursor: pointer; opacity: 0;
}
.fan-visor-cerrar:hover { color: #fff; border-color: rgba(237, 231, 217, .4); }
.fan-visor-cerrar:focus-visible { outline: 2px solid #EDE7D9; outline-offset: 2px; }
