/* Lector de la guía: se lee, se pasa la página y los enlaces se tocan. */
.lec { max-width: 1040px; margin: 0 auto; padding: clamp(14px, 3vw, 28px) clamp(12px, 3vw, 24px) 48px; }
.lec-barra { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 12px 0 14px; border-bottom: 1px solid var(--border); position: sticky; top: 64px; background: var(--bg); z-index: 6; }
.lec-tit strong { display: block; font-size: 15.5px; color: var(--text-primary); }
.lec-tit span { display: block; font-size: 12.5px; color: var(--text-muted); }
.lec-nav { display: flex; align-items: center; gap: 8px; }
.lec-b { font: inherit; font-size: 17px; line-height: 1; width: 40px; height: 38px; cursor: pointer;
  background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border-strong); }
.lec-b:hover:not([disabled]) { border-color: var(--accent); color: var(--accent); }
.lec-b[disabled] { opacity: .4; cursor: default; }
.lec-nav input { font: inherit; font-size: 15px; width: 62px; padding: 8px; text-align: center;
  background: #fff; color: var(--text-primary); border: 1px solid var(--border-strong); }
.lec-de { font-size: 13.5px; color: var(--text-muted); }
.lec-baja { font-size: 13.5px; font-weight: 700; color: var(--accent); }

/* ── La hoja ──────────────────────────────────────────────────────── */
.lec-hoja { position: relative; margin: 20px 0 0; perspective: 2400px; min-height: 40vh; }
.lec-visor { overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; background: var(--bg-card); border: 1px solid var(--border); }
.lec-visor.acercado { cursor: grab; }
.lec-visor.arrastrando { cursor: grabbing; scroll-behavior: auto; }
.lec-papel { position: relative; width: 100%; margin: 0 auto; }
.lec-papel img { display: block; width: 100%; height: auto; -webkit-user-drag: none; user-select: none; }
.lec-hoja.cargando .lec-papel { opacity: .5; transition: opacity .12s; }
.lec-visor.acercado .lec-enlaces a { outline-width: 2px; }

/* la página que se va o que llega, girando sobre su lomo */
.lec-vuelta { position: absolute; inset: 0; z-index: 3; transform-origin: left center; backface-visibility: hidden;
  background: var(--bg-card); border: 1px solid var(--border); box-shadow: 0 0 40px rgba(13,23,38,.18); }
.lec-vuelta img { display: block; width: 100%; height: auto; }
.lec-vuelta::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(13,23,38,.22), rgba(13,23,38,0) 32%); opacity: 0; transition: opacity .18s; }
.lec-vuelta.girando::after { opacity: 1; }

/* ── Enlaces del PDF, encima de la imagen ─────────────────────────── */
.lec-enlaces { position: absolute; inset: 0; }
.lec-enlaces a { position: absolute; display: block; border-radius: 2px; border-bottom: 0;
  background: rgba(43,110,136,.08); outline: 1px solid rgba(43,110,136,.16); outline-offset: 0;
  transition: background .15s, outline-color .15s; }
.lec-enlaces a:hover, .lec-enlaces a:focus-visible { background: rgba(242,184,75,.32); outline-color: rgba(224,92,74,.75); }
.lec-enlaces a::after { content: ""; position: absolute; inset: -4px; }
@media (hover: none) { .lec-enlaces a { background: rgba(43,110,136,.05); outline-color: rgba(43,110,136,.12); } }

/* ── Flechas a los lados ──────────────────────────────────────────── */
.lec-lado { position: absolute; top: 0; bottom: 0; width: clamp(44px, 9%, 84px); z-index: 4; cursor: pointer;
  background: none; border: 0; padding: 0; display: grid; place-items: center; color: var(--text-primary); }
.lec-lado--ant { left: 0; } .lec-lado--sig { right: 0; }
.lec-lado span { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; font-size: 20px;
  background: rgba(255,255,255,.94); border: 1px solid var(--border-strong); box-shadow: 0 6px 18px rgba(13,23,38,.22);
  opacity: 0; transform: scale(.9); transition: opacity .2s, transform .2s, background .15s; }
.lec-hoja:hover .lec-lado span, .lec-lado:focus-visible span { opacity: 1; transform: none; }
.lec-lado:hover span { background: var(--teal); color: #fff; border-color: var(--teal); }
.lec-lado[disabled] { cursor: default; }
.lec-lado[disabled] span { display: none; }
@media (hover: none) { .lec-lado span { opacity: .85; transform: none; } }

.lec-pie { margin: 18px 0 0; font-size: 12.5px; color: var(--text-muted); line-height: 1.6; }
@media (max-width: 620px) { .lec-barra { top: 56px; } .lec-tit { flex-basis: 100%; } .lec-baja { order: 3; } }

@media (prefers-reduced-motion: reduce) {
  .lec-vuelta { display: none !important; }
  .lec-lado span { transition: none; }
}

/* ── Cuando el lector va embebido en la página de venta ───────────── */
.lec--previa { max-width: none; padding: 0; }
.lec--previa .lec-barra { position: static; background: none; padding-top: 0; }
.lec--previa .lec-hoja { max-width: 760px; margin-left: auto; margin-right: auto; }
.lec-baja--nota { color: var(--text-muted); font-weight: 500; }
.lec-corte { max-width: 760px; margin: 22px auto 0; padding: 20px 22px;
  background: var(--bg-card); border: 1px solid var(--border-strong); border-left: 4px solid var(--coral); }
.lec-corte p { margin: 0 0 16px; font-size: 15.5px; color: var(--text-body); line-height: 1.6; }
.lec-corte strong { color: var(--text-primary); }
.lec-corte[hidden] { display: none; }

/* ── Acercar y alejar ─────────────────────────────────────────────── */
.lec-zoom { display: inline-flex; align-items: center; gap: 6px; }
.lec-b--z { width: 34px; height: 34px; font-size: 16px; }
.lec-nivel { font: inherit; font-size: 12.5px; font-weight: 700; min-width: 54px; height: 34px; cursor: pointer;
  background: var(--bg-card); color: var(--text-secondary); border: 1px solid var(--border-strong); }
.lec-nivel:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 620px) { .lec-zoom { order: 2; } }
