/* ════════════════════════════════════════════
   GALERIA-FOTOS.CSS
   ────────────────────────────────────────────
   Estilos del bloque reutilizable de galería (galeria-fotos.js).
   Usa las variables globales de base.css (--black, --white, --bg,
   --orange, --font, --font-body), así cada página lo ve con sus colores.
   Mismo lenguaje visual que la galería anterior (.recuerdos-*):
   bloques negros, bordes rectos, mayúsculas.
   ════════════════════════════════════════════ */

.galeria-fotos {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* ── Encabezado ── */
.gf-cab {
  background: var(--black);
  padding: 1.8rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.gf-tagline {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--bg);
  margin: 0;
}
.gf-titulo {
  font-family: var(--font);
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 0.9;
  color: var(--white);
  margin: 0;
}

/* ── Botón "Fotos" que despliega los álbumes ── */
.gf-boton {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 56px;
  padding: 0.8rem 1.2rem;
  border: 2px solid var(--black);
  background: var(--white);
  color: var(--black);
  font-family: var(--font);
  font-size: 1.1rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.gf-boton i { font-style: normal; font-size: 1.6rem; line-height: 1; }
.gf-boton:hover,
.gf-boton[aria-expanded="true"] { background: var(--black); color: var(--white); }

.gf-cuerpo { display: flex; flex-direction: column; gap: 1.2rem; }
.gf-cuerpo[hidden], .gf-elegido[hidden] { display: none; }
.gf-estado { font-family: var(--font-body); font-size: var(--text-sm); color: var(--black); opacity: 0.6; margin: 0; }
.gf-estado:empty { display: none; }

/* ── Tarjetas de álbum ── */
.gf-albumes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.6rem;
}
.gf-album {
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 0;
  border: 2px solid var(--black);
  background: var(--white);
  cursor: pointer;
  color: var(--black);
  transition: transform 0.2s;
}
.gf-album:hover { transform: translateY(-2px); }
.gf-album.activo { border-color: var(--orange); box-shadow: 0 0 0 2px var(--orange); }
.gf-album-img { display: block; aspect-ratio: 4 / 3; background: var(--black); overflow: hidden; }
.gf-album-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gf-album-nombre {
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.1;
  padding: 0.55rem 0.6rem 0.1rem;
}
.gf-album-cant { font-family: var(--font-body); font-size: 0.7rem; opacity: 0.65; padding: 0 0.6rem 0.55rem; }

/* ── Álbum elegido ── */
.gf-elegido { display: flex; flex-direction: column; gap: 0.8rem; scroll-margin-top: 1rem; }
.gf-nombre {
  font-family: var(--font);
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1;
  color: var(--black);
  margin: 0;
}
.gf-desc { font-family: var(--font-body); font-size: var(--text-sm); margin: 0; }
.gf-desc:empty { display: none; }

/* Pestañas de subálbumes (mismo estilo que los botones de álbum anteriores) */
.gf-subs { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.gf-subs:empty { display: none; }
.gf-sub {
  font-family: var(--font);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.6rem 1rem;
  min-height: 40px;
  border: 2px solid var(--black);
  background: transparent;
  color: var(--black);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.gf-sub:hover, .gf-sub.activo { background: var(--black); color: var(--white); }

/* ── Grilla de miniaturas ── */
.gf-grilla {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.4rem;
}
.gf-grilla .gf-estado { grid-column: 1 / -1; }
.gf-item {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--black);
  cursor: pointer;
  padding: 0;
  border: none;
}
.gf-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease, filter 0.25s ease;
  filter: grayscale(10%) contrast(95%);
}
.gf-icono {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  color: var(--white);
  font-size: 1rem;
  opacity: 0;
  transition: opacity 0.2s;
}
/* Los videos muestran siempre el ▶: en el celular no hay "hover" para descubrirlo. */
.gf-item.video .gf-icono { opacity: 1; background: rgba(0, 0, 0, 0.2); }
.gf-pie {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  color: var(--white);
  font-family: var(--font);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.3rem 0.4rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transition: opacity 0.2s;
}
@media (hover: hover) {
  .gf-item:hover img { transform: scale(1.06); filter: none; }
  .gf-item:hover .gf-icono, .gf-item:hover .gf-pie { opacity: 1; }
}
.gf-item:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* ════════════ VISOR ════════════ */
.gf-visor {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s, visibility 0.25s;
}
.gf-visor.abierto { visibility: visible; opacity: 1; }
.gf-v-fondo { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.92); cursor: pointer; }
.gf-v-panel {
  position: relative;
  z-index: 1;
  width: min(960px, 96vw);
  max-height: 96vh;
  background: var(--black);
  display: flex;
  flex-direction: column;
}
.gf-v-cab {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.1rem 0.7rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.gf-v-album {
  display: block;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--bg);
}
.gf-v-titulo {
  font-family: var(--font);
  font-size: clamp(0.9rem, 2.2vw, 1.2rem);
  font-weight: 900;
  text-transform: uppercase;
  color: var(--white);
  margin: 0.2rem 0 0;
  line-height: 1;
}
.gf-v-titulo:empty { display: none; }
.gf-v-cerrar {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.3rem;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  margin: -0.5rem -0.6rem 0 0;
}
.gf-v-cerrar:hover { color: var(--white); }
.gf-v-media {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  touch-action: pan-y;   /* el deslizamiento horizontal lo maneja el JS */
}
.gf-v-media img,
.gf-v-media video { max-width: 100%; max-height: calc(96vh - 140px); display: block; object-fit: contain; }
.gf-v-media iframe { width: 100%; aspect-ratio: 16 / 9; max-height: calc(96vh - 140px); border: 0; display: block; }
.gf-v-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.8rem;
}
.gf-v-cuenta { font-family: var(--font-body); font-size: var(--text-sm); color: rgba(255, 255, 255, 0.7); }
.gf-v-btn {
  min-width: 48px;
  min-height: 44px;
  background: none;
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: var(--white);
  font-size: 1.2rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.gf-v-btn:hover:not(:disabled) { border-color: var(--orange); background: var(--orange); }
.gf-v-btn:disabled { opacity: 0.25; cursor: default; }

@media (max-width: 600px) {
  .gf-cab { padding: 1.4rem 1.2rem; }
  .gf-albumes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gf-grilla { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.3rem; }
  .gf-v-panel { width: 100vw; max-height: 100vh; height: 100%; }
  .gf-v-media img, .gf-v-media video { max-height: calc(100vh - 130px); }
}
