/* ============================================================
   relatos.css — Sebastián Satke
   Molde de páginas de experiencias / relatos.
   Modelo "columna central" (estilo Mate con Amigos) con los
   tonos de sebastiansatke: Georgia, blanco translúcido, overlay
   parejo, tinta .95. Se carga junto con styles.css.
   ============================================================ */

/* ── Fondo + overlay parejo del relato ── */
body.relato-page {
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
body.relato-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .70);
  z-index: 0;
  pointer-events: none;
}
body.relato-page .wrap,
body.relato-page .footer-contacto {
  position: relative;
  z-index: 1;
}

/* Columna central */
.wrap {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

/* ── Botón Volver ── */
.volver {
  display: inline-block;
  color: rgba(232, 232, 234, .85);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Barlow', Georgia, sans-serif;
  border: 1px solid rgba(232, 232, 234, .3);
  background: rgba(8, 6, 4, .4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 8px 20px;
  border-radius: 999px;
  margin-bottom: 28px;
  letter-spacing: .02em;
  transition: background .2s, border-color .2s, box-shadow .2s, transform .2s;
}
.volver:hover {
  background: rgba(232, 232, 234, .12);
  border-color: rgba(232, 232, 234, .6);
  box-shadow: 0 0 24px rgba(255, 255, 255, .2);
  transform: translateY(-1px);
}

/* ── Header del relato (sobre el fondo oscuro) ── */
.relato-header {
  padding-bottom: 28px;
  border-bottom: 2px solid rgba(255, 255, 255, .35);
  margin-bottom: 34px;
}
.relato-header .eyebrow {
  font-size: 13px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--light-dim);
  margin-bottom: 14px;
  text-shadow: 0 2px 10px rgba(0,0,0,.9);
}
.relato-header h1 {
  margin: 0 0 14px;
  font-size: 44px;
  line-height: 1.05;
  font-weight: 700;
  color: var(--light);
  text-shadow: 0 2px 16px rgba(0,0,0,1), 0 4px 40px rgba(0,0,0,1);
}
.relato-header .autor {
  font-size: 20px;
  color: var(--light);
  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: 17px;
  color: var(--light-dim);
  margin: 8px 0 0;
  text-shadow: 0 2px 10px rgba(0,0,0,1), 0 4px 30px rgba(0,0,0,1);
}

/* ── Card de lectura (columna central) ── */
.dia-card {
  background: rgba(255, 255, 255, .85);
  border: 1px solid var(--borde);
  border-radius: 16px;
  padding: 36px 40px;
  margin: 0 auto 24px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .35);
  max-width: 780px;
  color: var(--ink);
}
.dia-card p {
  margin: 0 0 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  color: var(--ink);
  text-align: justify;
  line-height: 1.7;
  letter-spacing: 0.01em;
  hyphens: auto;
  -webkit-hyphens: auto;
}
.dia-card p:last-child { margin-bottom: 0; }
.dia-card p em { font-style: italic; }
.dia-card blockquote {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 20px;
  color: var(--ink);
  line-height: 1.7;
  margin: 0 0 18px;
  padding-left: 20px;
  border-left: 2px solid rgba(40, 35, 30, .3);
}

/* ── Subtítulos del relato ── */
.dia-titulo {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--ink-strong);
  margin: 32px auto 16px;
  padding-top: 28px;
  border-top: 1px solid rgba(40, 35, 30, .3);
  max-width: 780px;
}
.dia-titulo:first-of-type { margin-top: 0; }
/* Subtítulo flotante sobre el fondo oscuro (ej. "Fotos", "Video") */
.dia-titulo.flotante {
  color: var(--light);
  border-top: 2px solid rgba(255,255,255,.35);
  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; }

/* ── Control de tamaño de letra (índice flotante, PC y móvil) ── */
.font-ctrl-item { gap: 6px; }
.font-ctrl-item .floating-nav-btn { font-size: 17px; }
.font-size-label { font-size: 13px; font-weight: 400; min-width: 0; letter-spacing: 0; }
@media (max-width: 760px) {
  .floating-nav-btn { width: 34px; height: 34px; font-size: 14px; }
}
.floating-nav-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: rgba(232, 232, 234, .85);
  border: 1px solid rgba(232, 232, 234, .3);
  border-radius: 999px;
  background: rgba(8, 6, 4, .4);
  font-size: 18px;
  font-weight: 700;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: transform .2s ease, box-shadow .2s ease, background .2s, border-color .2s;
  cursor: pointer;
  font-family: 'Barlow', Georgia, sans-serif;
  padding: 0;
}
@media (hover: hover) {
  .floating-nav-btn:hover {
    transform: scale(1.03);
    background: rgba(232, 232, 234, .12);
    border-color: rgba(232, 232, 234, .6);
    box-shadow: 0 0 24px rgba(255, 255, 255, .2);
  }
}
.floating-nav-label {
  font-size: 14px;
  color: var(--light);
  font-family: 'Barlow', Georgia, sans-serif;
  text-shadow: 0 2px 10px rgba(0,0,0,1), 0 4px 30px rgba(0,0,0,1);
  user-select: none;
}

.indice-panel {
  position: fixed;
  right: 20px;
  bottom: 156px;
  width: min(220px, calc(100vw - 40px));
  max-height: min(58vh, 400px);
  overflow: auto;
  scrollbar-width: none;
  background: rgba(255, 255, 255, .80);
  backdrop-filter: blur(6px);
  -webkit-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(--ink-dim);
  margin: 0;
  padding: 6px 16px 8px;
}
.indice-links { display: flex; flex-direction: column; }
.indice-link {
  display: block;
  text-decoration: none;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.25;
  padding: 6px 16px;
  border-radius: 999px;
  background: transparent;
  transition: background .15s ease;
}
.indice-link:hover { background: rgba(40, 35, 30, .08); }
.indice-link.active { font-weight: 700; }

/* ── Carrusel ── */
.carrusel {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(20, 16, 12, .55);
  border: 1px solid var(--borde);
  max-width: 780px;
  margin: 0 auto;
}
.carrusel-track { display: flex; transition: transform .4s ease; }
.carrusel-slide { min-width: 100%; position: relative; }
.carrusel-slide img  { width: 100%; height: 480px; object-fit: contain; display: block; cursor: zoom-in; }
.carrusel-slide video { width: 100%; height: 480px; object-fit: contain; 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,.85);
  background: rgba(0,0,0,.25);
  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: #fff; 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; flex-wrap: wrap; }
.carrusel-dot {
  width: 8px; height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.4);
  border: none; cursor: pointer; padding: 0;
  transition: background .2s, transform .2s;
}
.carrusel-dot.active { background: rgba(255,255,255,.95); 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: var(--btn-bg);
  color: var(--ink);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: box-shadow .2s, transform .2s, background .2s;
}
.ctrl-btn:hover {
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 0 20px rgba(255,255,255,.4);
  transform: scale(1.05);
}

/* ── Lightbox ── */
.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  { width: 94vw !important; height: 86vh !important; object-fit: contain !important; border-radius: 4px; }
.lightbox video { width: 94vw !important; height: 86vh !important; object-fit: contain !important; 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: 30px; }
  .relato-header .autor { font-size: 17px; }
  .dia-card { padding: 24px; }
  .dia-card p, .dia-card blockquote { font-size: 19px; }
  .indice-panel { right: 14px; bottom: 136px; }
  .floating-nav { right: 14px; bottom: 14px; }
  .carrusel-slide img, .carrusel-slide video { height: 260px; }
  .lightbox img, .lightbox video { width: 100vw; height: calc(100vh - 100px); max-width: 100vw; max-height: calc(100vh - 100px); border-radius: 0; object-fit: contain; }
}
