/* Publicaciones de la Hermandad */
.hsp, .hsp *, .hsp *::before, .hsp *::after, .hsp-lector, .hsp-lector * { box-sizing: border-box; }
.hsp { --hsp-b: var(--hs-burdeos, #5a0000); --hsp-d: var(--hs-dorado, #b4913a); --hsp-c: var(--hs-crema, #f6f0e4); --hsp-cb: var(--hs-crema-borde, #e6dccb); margin: 6px 0 10px; }

/* Filtros */
.hsp-filtros { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 34px; }
.hsp-filtro { appearance: none; border: 1px solid var(--hsp-cb); background: #fff; color: var(--hsp-b); font: 600 13.5px/1 'Open Sans', Arial, sans-serif; padding: 10px 15px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; transition: background .2s, color .2s, border-color .2s; }
.hsp-filtro span { font-weight: 700; font-size: 11.5px; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--hsp-c); color: var(--hsp-b); display: inline-flex; align-items: center; justify-content: center; }
.hsp-filtro:hover { border-color: var(--hsp-d); }
.hsp-filtro.is-on { background: var(--hsp-b); border-color: var(--hsp-b); color: #fff; }
.hsp-filtro.is-on span { background: rgba(255,255,255,.18); color: #fff; }
.hsp-filtro:focus-visible { outline: 2px solid var(--hsp-d); outline-offset: 2px; }

/* Colecciones */
.hsp-coleccion { margin: 0 0 52px; }
.hsp-coleccion[hidden] { display: none; }
.hsp-cab { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 16px; border-bottom: 1px solid var(--hsp-cb); padding: 0 0 12px; margin: 0 0 26px; position: relative; }
.hsp-cab::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 64px; height: 3px; background: var(--hsp-d); }
.hsp .hsp-tit { font: 400 26px/1.2 'Playfair Display', Georgia, serif; color: var(--hsp-b); margin: 0; padding: 0; background: none; text-shadow: none; border: 0; }
.hsp-desc { margin: 0; font: 400 14.5px/1.5 'Open Sans', Arial, sans-serif; color: var(--hs-texto-suave, #5b5450); }

.hsp-rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 34px 26px; align-items: stretch; }
.hsp-coleccion[data-hsp-col="anuarios"] .hsp-rejilla { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }

/* Tarjeta */
.hsp-item { margin: 0; display: flex; flex-direction: column; min-width: 0; }
.hsp-portada { appearance: none; display: block; position: relative; width: 100%; padding: 0; margin: 0 0 14px; border: 0; background: none; cursor: pointer; border-radius: 3px 6px 6px 3px; box-shadow: 0 1px 2px rgba(40,0,0,.18), 0 8px 18px -6px rgba(60,0,0,.32); transition: transform .3s ease, box-shadow .3s ease; overflow: hidden; text-decoration: none !important; }
.hsp-portada img { display: block; width: 100%; height: auto; margin: 0; border: 0; border-radius: inherit; }
/* lomo de revista */
.hsp-portada::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 9%; background: linear-gradient(90deg, rgba(0,0,0,.22), rgba(255,255,255,.12) 45%, rgba(0,0,0,0)); pointer-events: none; z-index: 1; }
.hsp-lupa { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -40%); z-index: 2; background: rgba(255,255,255,.95); color: var(--hsp-b); font: 700 13px/1 'Open Sans', Arial, sans-serif; letter-spacing: .06em; text-transform: uppercase; padding: 11px 18px; border-radius: 999px; box-shadow: 0 6px 18px rgba(0,0,0,.25); opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none; }
@media (hover: hover) {
  .hsp-portada:hover { transform: translateY(-5px); box-shadow: 0 2px 4px rgba(40,0,0,.18), 0 20px 34px -10px rgba(60,0,0,.42); }
  .hsp-portada:hover .hsp-lupa { opacity: 1; transform: translate(-50%, -50%); }
}
.hsp-portada:focus-visible { outline: 3px solid var(--hsp-d); outline-offset: 3px; }
.hsp-sinportada { display: flex; flex-direction: column; justify-content: center; gap: 8px; aspect-ratio: 7 / 10; background: var(--hsp-b); color: #fff; padding: 18px; text-align: center; font: 400 13px/1.3 'Open Sans', Arial, sans-serif; }
.hsp-sinportada strong { font: 400 20px/1.2 'Playfair Display', Georgia, serif; }

.hsp-info { display: flex; flex-direction: column; flex: 1; }
.hsp-ante { margin: 0 0 4px; font: 700 11px/1.3 'Open Sans', Arial, sans-serif; letter-spacing: .09em; text-transform: uppercase; color: var(--hsp-d); }
.hsp .hsp-nom { margin: 0 0 4px; padding: 0; font: 400 18px/1.25 'Playfair Display', Georgia, serif; color: var(--hsp-b); background: none; text-shadow: none; border: 0; }
.hsp-meta { margin: 0 0 12px; font: 400 12.5px/1.4 'Open Sans', Arial, sans-serif; color: #8a8580; }
.hsp-botones { display: flex; gap: 8px; margin-top: auto; }
.hsp-btn, .hsp-btn:link, .hsp-btn:visited { appearance: none; flex: 1 1 0; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 38px; padding: 0 8px; border-radius: 6px; font: 700 12.5px/1 'Open Sans', Arial, sans-serif; cursor: pointer; text-decoration: none !important; transition: background .2s, color .2s, border-color .2s; white-space: nowrap; }
.hsp-btn svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.hsp-botones .hsp-btn-leer { flex: 0 0 auto; padding: 0 13px; }
.hsp-btn-leer, .hsp-btn-leer:link, .hsp-btn-leer:visited { background: var(--hsp-b); color: #fff !important; border: 1px solid var(--hsp-b); }
.hsp-btn-leer:hover { background: var(--hs-burdeos-hover, #7a1a1a); border-color: var(--hs-burdeos-hover, #7a1a1a); }
.hsp-btn-bajar, .hsp-btn-bajar:link, .hsp-btn-bajar:visited { background: #fff; color: var(--hsp-b) !important; border: 1px solid var(--hsp-cb); }
.hsp-btn-bajar:hover { border-color: var(--hsp-b); background: var(--hsp-c); }
.hsp-btn:focus-visible { outline: 2px solid var(--hsp-d); outline-offset: 2px; }

@media (max-width: 600px) {
  .hsp-filtros { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 26px; padding: 2px 16px 6px; scrollbar-width: none; }
  .hsp-filtros::-webkit-scrollbar { display: none; }
  .hsp-filtro { flex: none; }
  .hsp .hsp-tit { font-size: 22px; }
  .hsp-rejilla, .hsp-coleccion[data-hsp-col="anuarios"] .hsp-rejilla { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 14px; }
  .hsp .hsp-nom { font-size: 16px; }
  .hsp-botones { flex-direction: column; gap: 6px; }
  .hsp-botones .hsp-btn { height: 36px; flex: none; width: 100%; }
}

/* ---------- Lector ---------- */
html.hsp-sin-scroll, html.hsp-sin-scroll body { overflow: hidden !important; }
.hsp-lector { position: fixed; inset: 0; z-index: 100000; display: none; flex-direction: column; background: radial-gradient(ellipse at 50% 40%, #3a0f0f 0%, #1c0808 60%, #120505 100%); color: #f3ead9; font-family: 'Open Sans', Arial, sans-serif; }
.hsp-lector.is-abierto { display: flex; animation: hspFade .25s ease; }
@keyframes hspFade { from { opacity: 0; } to { opacity: 1; } }
.hsp-l-barra { flex: none; display: flex; align-items: center; gap: 14px; padding: 10px 14px 10px 22px; background: rgba(0,0,0,.28); border-bottom: 1px solid rgba(255,255,255,.07); }
.hsp-l-titulo { flex: 1; min-width: 0; margin: 0; font: 400 17px/1.3 'Playfair Display', Georgia, serif; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hsp-l-herr { display: flex; align-items: center; gap: 4px; flex: none; }
.hsp-l-pag { display: inline-flex; align-items: center; gap: 6px; margin-right: 10px; font-size: 13.5px; color: rgba(255,255,255,.75); }
.hsp-l-pag input { width: 64px; height: 32px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.07); color: #fff; border-radius: 6px; text-align: center; font: 600 13.5px/1 'Open Sans', Arial, sans-serif; padding: 0 4px; }
.hsp-l-pag input:focus { outline: 2px solid var(--hs-dorado, #b4913a); outline-offset: 1px; }
.hsp-l-b { appearance: none; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: none; border-radius: 8px; color: #f3ead9 !important; cursor: pointer; padding: 0; transition: background .2s; }
.hsp-l-b svg, .hsp-l-flecha svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hsp-l-b:hover { background: rgba(255,255,255,.1); }
.hsp-l-b:disabled { opacity: .35; cursor: default; background: none; }
.hsp-l-b:focus-visible, .hsp-l-flecha:focus-visible { outline: 2px solid var(--hs-dorado, #b4913a); outline-offset: 1px; }
.hsp-l-x { margin-left: 6px; background: rgba(255,255,255,.08); }

.hsp-l-escena { flex: 1; min-height: 0; position: relative; overflow: hidden; padding: 26px 86px; display: flex; touch-action: pan-y; user-select: none; -webkit-user-select: none; outline: 0; }
.hsp-l-escena.is-zoom { overflow: auto; touch-action: pan-x pan-y; cursor: grab; }
.hsp-l-escena.is-arrastrando { cursor: grabbing; }
.hsp-l-hojas { margin: auto; flex: none; }
.hsp-l-pliego { display: flex; justify-content: center; align-items: center; filter: drop-shadow(0 18px 34px rgba(0,0,0,.55)); }
.hsp-l-pliego.entra-der { animation: hspDer .32s cubic-bezier(.2,.7,.3,1); }
.hsp-l-pliego.entra-izq { animation: hspIzq .32s cubic-bezier(.2,.7,.3,1); }
@keyframes hspDer { from { opacity: .2; transform: translateX(34px); } to { opacity: 1; transform: none; } }
@keyframes hspIzq { from { opacity: .2; transform: translateX(-34px); } to { opacity: 1; transform: none; } }
.hsp-l-hoja { position: relative; background: #fff; flex: none; }
.hsp-l-hoja canvas { display: block; width: 100%; height: 100%; }
.hsp-l-hoja.izq::after, .hsp-l-hoja.der::after { content: ""; position: absolute; top: 0; bottom: 0; width: 7%; pointer-events: none; }
.hsp-l-hoja.izq::after { right: 0; background: linear-gradient(90deg, rgba(0,0,0,0), rgba(0,0,0,.16)); }
.hsp-l-hoja.der::after { left: 0; background: linear-gradient(270deg, rgba(0,0,0,0), rgba(0,0,0,.2)); }

.hsp-l-carga { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; font-size: 14.5px; color: rgba(255,255,255,.85); text-align: center; padding: 20px; }
.hsp-l-carga[hidden] { display: none; }
.hsp-l-carga a { color: #fff; text-decoration: underline; }
.hsp-l-spin { width: 38px; height: 38px; border-radius: 50%; border: 3px solid rgba(255,255,255,.18); border-top-color: var(--hs-dorado, #b4913a); animation: hspGira .8s linear infinite; }
.hsp-l-spin[hidden] { display: none; }
@keyframes hspGira { to { transform: rotate(360deg); } }

.hsp-l-flecha { appearance: none; position: absolute; top: 50%; z-index: 3; width: 56px; height: 56px; margin-top: -2px; border-radius: 50%; border: 1px solid rgba(255,255,255,.14); background: rgba(0,0,0,.32); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; transition: background .2s, opacity .2s; }
.hsp-l-flecha svg { width: 26px; height: 26px; }
.hsp-l-flecha:hover { background: rgba(90,0,0,.85); }
.hsp-l-flecha:disabled { opacity: 0; pointer-events: none; }
.hsp-l-ant { left: 16px; }
.hsp-l-sig { right: 16px; }

.hsp-l-pie { flex: none; padding: 8px 22px 14px; display: flex; justify-content: center; }
.hsp-l-pie input { width: min(560px, 100%); accent-color: var(--hs-dorado, #b4913a); cursor: pointer; }

@media (max-width: 760px) {
  .hsp-l-barra { padding: 6px 6px 6px 14px; gap: 6px; flex-wrap: wrap; }
  .hsp-l-titulo { font-size: 15px; flex-basis: calc(100% - 50px); order: 1; }
  .hsp-l-x { order: 2; }
  .hsp-l-herr { order: 3; width: 100%; justify-content: space-between; display: contents; }
  .hsp-l-herr > .hsp-l-pag { order: 4; margin-right: auto; }
  .hsp-l-herr > [data-a="menos"], .hsp-l-herr > [data-a="mas"], .hsp-l-herr > [data-a="bajar"] { order: 5; }
  .hsp-l-pc { display: none; }
  .hsp-l-escena { padding: 12px 10px; }
  .hsp-l-flecha { top: auto; bottom: 62px; width: 46px; height: 46px; }
  .hsp-l-ant { left: 10px; }
  .hsp-l-sig { right: 10px; }
  .hsp-l-pie { padding: 6px 70px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .hsp-l-pliego.entra-der, .hsp-l-pliego.entra-izq, .hsp-lector.is-abierto { animation: none; }
  .hsp-portada, .hsp-lupa { transition: none; }
}
