/* ============================================================
   relatos.css — Mate con amigos
   Estilos de páginas de relatos: header del relato,
   índice flotante, carrusel + lightbox.
   Lo cargan las páginas tipo Aconcagua-Scotty, Palabras-que-muestran.
   ============================================================ */


/* ── Header del relato ── */
.relato-header {
  padding-bottom: 28px;
  border-bottom: 2px solid rgba(255,255,255,.4);
  margin-bottom: 34px;
}
.relato-header h1 {
  margin: 0 0 14px;
  font-size: 48px;
  line-height: 1.05;
  color: var(--blanco65);
  text-shadow: 0 2px 16px rgba(0,0,0,1), 0 4px 40px rgba(0,0,0,1);
}
.relato-header .autor {
  font-size: 22px;
  color: var(--blanco65);
  margin: 0;
  font-style: italic;
  text-shadow: 0 2px 10px rgba(0,0,0,1), 0 4px 30px rgba(0,0,0,1);
}
.relato-header .reading-time {
  font-size: 20px;
  color: var(--blanco65);
  margin: 8px 0 0;
  text-shadow: 0 2px 10px rgba(0,0,0,1), 0 4px 30px rgba(0,0,0,1);
}


/* ── Índice flotante ── */
.floating-nav {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1002;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
  align-items: flex-end;
}
.floating-nav.visible { opacity: 1; pointer-events: auto; }

.floating-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.floating-nav-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--tinta);
  border: 1px solid var(--borde);
  border-radius: 999px;
  background: rgba(251,240,217,.25);
  font-size: 18px;
  font-weight: 700;
  backdrop-filter: blur(4px);
  transition: transform .2s ease, box-shadow .2s ease, color .2s;
  cursor: pointer;
  font-family: Georgia, "Times New Roman", serif;
  padding: 0;
}
.floating-nav-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 0 20px rgba(255,255,255,.5), 0 0 40px rgba(255,255,255,.2);
  color: rgba(255,255,255,.90);
}
.floating-nav-label {
  font-size: 14px;
  color: var(--blanco65);
  font-family: Georgia, "Times New Roman", serif;
  text-shadow: 0 2px 10px rgba(0,0,0,1), 0 4px 30px rgba(0,0,0,1), 0 8px 60px rgba(0,0,0,.95);
  user-select: none;
}

.indice-panel {
  position: fixed;
  right: 20px;
  bottom: 156px;
  width: min(210px, calc(100vw - 40px));
  max-height: min(58vh, 400px);
  overflow: auto;
  scrollbar-width: none;
  background: rgba(251,240,217,.25);
  backdrop-filter: blur(6px);
  border: 1px solid var(--borde);
  border-radius: 12px;
  padding: 8px 0;
  z-index: 1001;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px) scale(.985);
  transform-origin: bottom right;
  transition: opacity .18s ease, transform .18s ease;
}
.indice-panel::-webkit-scrollbar { display: none; }
.indice-panel.open { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }

.indice-panel-titulo {
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--tinta);
  margin: 0;
  padding: 6px 16px 8px;
}
.indice-links { display: flex; flex-direction: column; }
.indice-link {
  display: block;
  text-decoration: none;
  color: var(--tinta);
  font-size: 16px;
  line-height: 1.25;
  padding: 6px 16px;
  border-radius: 999px;
  background: transparent;
  transition: box-shadow .15s ease, color .15s;
}
.indice-link:hover { box-shadow: 0 0 20px rgba(255,255,255,.5), 0 0 40px rgba(255,255,255,.2); color: rgba(255,255,255,.90); }
.indice-link.active { font-weight: 700; }


/* ── Carrusel (Aconcagua-Scotty y similares) ── */
.carrusel {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 6px;
  background: #e8dfd3;
}
.carrusel-track { display: flex; transition: transform .4s ease; }
.carrusel-slide { min-width: 100%; position: relative; }
.carrusel-slide img  { width: 100%; height: 480px; object-fit: cover; display: block; cursor: zoom-in; }
.carrusel-slide video { width: 100%; height: 480px; object-fit: cover; display: block; background: #1a1208; cursor: zoom-in; }

.carrusel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,.8);
  background: transparent;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: opacity .25s ease, border-color .2s, transform .2s;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}
.carrusel:hover .carrusel-btn { opacity: 1; pointer-events: auto; }
.carrusel-btn:hover { border-color: rgba(255,255,255,1); transform: translateY(-50%) scale(1.07); }
.carrusel-btn.prev { left: 12px; }
.carrusel-btn.next { right: 12px; }
@media (hover:none) { .carrusel-btn { display: none; } }

.carrusel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.carrusel-dot {
  width: 8px; height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.3);
  border: none; cursor: pointer; padding: 0;
  transition: background .2s, transform .2s;
}
.carrusel-dot.active { background: rgba(255,255,255,.8); transform: scale(1.2); }

.carrusel-controles {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 14px;
}
.ctrl-btn {
  width: 40px; height: 40px;
  border-radius: 999px;
  border: 1px solid var(--borde);
  background: transparent;
  color: var(--tinta);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: box-shadow .2s, color .2s, transform .2s;
}
.ctrl-btn:hover {
  box-shadow: 0 0 20px rgba(255,255,255,.5), 0 0 40px rgba(255,255,255,.2);
  color: rgba(255,255,255,.90);
  transform: scale(1.05);
}


/* ── Lightbox del carrusel ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.lightbox.open { display: flex; }
.lightbox img  { max-width: 92vw; max-height: 82vh; object-fit: contain; border-radius: 4px; }
.lightbox video { max-width: 92vw; max-height: 82vh; border-radius: 4px; }
.lightbox-caption { color: rgba(255,255,255,.7); font-style: italic; font-size: 15px; margin-top: 14px; max-width: 80vw; text-align: center; }
.lightbox-close {
  position: fixed; top: 18px; right: 22px;
  background: transparent; border: 2px solid rgba(255,255,255,.6);
  color: #fff; font-size: 22px; width: 42px; height: 42px;
  border-radius: 999px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .2s; padding: 0;
}
.lightbox-close:hover { border-color: #fff; }
.lb-controls-bar {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 14px; align-items: center; z-index: 10001;
}
.lightbox-btn {
  background: transparent; border: 2px solid rgba(255,255,255,.6);
  color: #fff; font-size: 22px; width: 48px; height: 48px;
  border-radius: 999px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .2s, transform .2s; padding: 0;
}
.lightbox-btn:hover { border-color: #fff; transform: scale(1.07); }


/* ── Móvil ── */
@media (max-width: 760px) {
  .relato-header h1 { font-size: 32px; }
  .relato-header .autor { font-size: 18px; }
  .indice-panel { right: 14px; bottom: 136px; }
  .floating-nav { right: 14px; bottom: 14px; }

  .carrusel-slide img, .carrusel-slide video { height: 260px; }

  .lightbox img  { width: 100vw; height: calc(100vh - 100px); max-width: 100vw; max-height: calc(100vh - 100px); border-radius: 0; object-fit: contain; }
  .lightbox video { width: 100vw; height: calc(100vh - 100px); max-width: 100vw; max-height: calc(100vh - 100px); border-radius: 0; }

  .floating-nav-btn { color: rgba(255,255,255,.85) !important; border-color: rgba(255,255,255,.3) !important; box-shadow: 0 2px 12px rgba(255,255,255,.15), 0 4px 24px rgba(0,0,0,.3); }
  .floating-nav-label { color: rgba(255,255,255,.90) !important; text-shadow: 0 1px 4px rgba(0,0,0,1), 0 2px 12px rgba(0,0,0,1), 0 4px 24px rgba(0,0,0,.9) !important; }
  .indice-link { color: rgba(255,255,255,.85) !important; }
  .indice-panel-titulo { color: rgba(255,255,255,.65) !important; }
}
