/* ═══════════════════════════════════════════════
   JUSTQRO · Catálogo en formato libro (A5)
   Las medidas van en cqi (1cqi = 1 % del ancho de la página): la página se ve igual en móvil, en escritorio y en el PDF.
═══════════════════════════════════════════════ */

.lb { background: var(--blue); }
.lb-stage { --pw: min(calc(100vw - 32px), calc((100svh - 150px) * 0.7071)); padding: 16px 0 24px; color: var(--white); }
@media (min-width: 900px) { .lb-stage { --pw: min(calc((100vw - 96px) / 2), calc((100svh - 150px) * 0.7071)); padding-top: 24px; } }

.lb-viewport { width: var(--pw); margin: 0 auto; filter: drop-shadow(0 18px 40px rgba(5, 18, 80, 0.45)); }
@media (min-width: 900px) { .lb-viewport { width: calc(var(--pw) * 2); } }
.lb-track { display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; overscroll-behavior-x: contain; outline: none; }
.lb-track::-webkit-scrollbar { display: none; }

.lb-page { --f: 3cqi; position: relative; flex: 0 0 var(--pw); width: var(--pw); height: calc(var(--pw) * 1.4142); overflow: hidden;
  container-type: inline-size; background: var(--white); color: var(--blue); scroll-snap-align: start; scroll-snap-stop: always;
  -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.lb-page > * { font-size: var(--f); line-height: 1.35; }
.lb-spacer { display: none; background: transparent; }
@media (min-width: 900px) {
  .lb-spacer { display: block; }
  .lb-page { scroll-snap-align: none; }
  .lb-page.is-l { scroll-snap-align: start; }
  .lb-page.is-l:not(.lb-spacer) { box-shadow: inset -1.6cqi 0 2.4cqi -1.6cqi rgba(16, 40, 130, 0.22); }
  .lb-page.is-r { box-shadow: inset 1.6cqi 0 2.4cqi -1.6cqi rgba(16, 40, 130, 0.22); }
}
.lb-blue { background: var(--blue); color: var(--white); outline: 1px solid rgba(255, 255, 255, 0.35); outline-offset: -1px; }

.lb-folio { position: absolute; bottom: 4.5cqi; font-size: 2.6cqi !important; font-weight: 700; letter-spacing: 0.08em; }
.lb-page.is-l .lb-folio { left: 7cqi; }
.lb-page.is-r .lb-folio { right: 7cqi; }
.lb-k { display: block; font-size: 2.3cqi; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 1.6cqi; }
.lb-h { font-size: 9cqi; font-weight: 700; line-height: 0.95; letter-spacing: -0.01em; text-transform: uppercase; margin-bottom: 6cqi; }
.lb-small { font-size: 2.4cqi; line-height: 1.45; opacity: 0.85; }

/* Portada y contraportada */
.lb-cover { height: 100%; display: flex; flex-direction: column; padding: 9cqi 8cqi 9cqi; }
.lb-cover__logo { width: 80cqi; height: auto; }
.lb-cover__fair { margin-top: 3cqi; font-size: 4.6cqi; font-weight: 700; letter-spacing: 0.02em; }
.lb-cover__k { margin-top: auto; font-size: 13cqi; font-weight: 300; line-height: 0.9; text-transform: uppercase; letter-spacing: -0.02em; }
.lb-cover__k span { display: block; font-weight: 700; }
.lb-cover__foot { margin-top: 8cqi; display: grid; gap: 0.6cqi; font-size: 3.4cqi; line-height: 1.25; }
.lb-cover__foot b { font-size: 5.4cqi; margin-bottom: 1cqi; }
.lb-back .lb-cover__fair { margin-top: auto; font-size: 7cqi; line-height: 1.05; font-weight: 300; }
.lb-back .lb-cover__foot .lb-small { margin-top: 4cqi; }

/* Organizan y patrocinadores */
.lb-org { height: 100%; padding: 10cqi 8cqi; display: flex; flex-direction: column; }
.lb-org__names { display: flex; flex-wrap: wrap; align-items: baseline; gap: 1cqi 3cqi; font-size: 6cqi; line-height: 1.05; text-transform: uppercase; margin-bottom: 8cqi; }
.lb-org__names span { font-weight: 300; }
.lb-org__sup { margin-top: auto; }
.lb-sponsors { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4cqi 5cqi; align-items: center; margin-bottom: 7cqi; }
.lb-sponsors img { width: 100%; height: auto; }

/* Presentación */
.lb-present { padding: 10cqi 8cqi 12cqi; }
.lb-present__h { font-size: 7.4cqi; font-weight: 700; line-height: 1.02; letter-spacing: -0.01em; margin-bottom: 7cqi; }
.lb-cols { columns: 2; column-gap: 5cqi; font-size: 2.9cqi; line-height: 1.5; }
.lb-cols p { margin-bottom: 3cqi; break-inside: avoid-column; }
.lb-present__stats { display: flex; gap: 6cqi; margin-top: 8cqi; padding-top: 4cqi; border-top: 0.3cqi solid currentColor; font-size: 2.6cqi; text-transform: uppercase; letter-spacing: 0.1em; }
.lb-present__stats b { display: block; font-size: 11cqi; letter-spacing: -0.02em; line-height: 1; }

/* Índice */
.lb-index, .lb-idx, .lb-pr, .lb-team { padding: 10cqi 8cqi 12cqi; }
.lb-toc { list-style: none; counter-reset: toc; }
.lb-toc li { border-top: 0.3cqi solid currentColor; }
.lb-toc a { display: flex; justify-content: space-between; align-items: baseline; padding: 3cqi 0; font-size: 5.4cqi; font-weight: 700; text-decoration: none; text-transform: uppercase; letter-spacing: -0.01em; }
.lb-toc b { font-size: 3cqi; font-weight: 400; letter-spacing: 0.08em; }
.lb-go { color: inherit; }

/* Plano */
.lb-plan { height: 100%; padding: 8cqi 7cqi 10cqi; display: flex; flex-direction: column; }
.lb-plan__svg { flex: 1; min-height: 0; display: flex; justify-content: center; }
.lb-plan__svg .pl-svg { width: auto; max-width: 100%; height: 100%; }

/* Doble página de cada stand · izquierda */
.lb-hero { height: 100%; margin: 0; padding: 8cqi 7cqi 10cqi; display: flex; flex-direction: column; }
.lb-hero__img { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.lb-hero__img img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lb-cap { margin-top: 3cqi; font-size: 2.5cqi; line-height: 1.4; }
.lb-cap b { font-size: 2.9cqi; }
.lb-fav { position: absolute !important; right: 1.5cqi; top: 1.5cqi; }

/* · derecha */
.lb-right { height: 100%; padding: 8cqi 14cqi 10cqi 7cqi; display: flex; flex-direction: column; }
.lb-sms { display: grid; grid-template-columns: 1fr 1fr; gap: 4cqi; margin-bottom: 6cqi; }
.lb-sms--1 { grid-template-columns: 1fr; }
.lb-sm { margin: 0; }
.lb-sm__img { position: relative; height: 52cqi; display: flex; align-items: center; justify-content: center; background: rgba(31, 78, 245, 0.04); }
.lb-sms--1 .lb-sm__img { height: 66cqi; }
.lb-sm__img img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lb-sm .lb-cap { margin-top: 2cqi; font-size: 2.2cqi; }
.lb-sm .lb-cap b { font-size: 2.5cqi; }
.lb-gal { margin-top: auto; }
.lb-gal__n { display: flex; align-items: center; gap: 2cqi; flex-wrap: wrap; font-size: 6.4cqi; font-weight: 700; line-height: 1; text-transform: uppercase; letter-spacing: -0.01em; }
.lb-gal__m { margin-top: 1.6cqi; font-size: 3cqi; font-weight: 600; }
.lb-gal__a, .lb-gal__l { margin-top: 1cqi; font-size: 2.6cqi; }
.lb-gal__art { margin-top: 4cqi; padding-top: 3cqi; border-top: 0.3cqi solid currentColor; font-size: 3cqi; font-weight: 600; }
.lb-gal__art span { font-weight: 300; padding: 0 0.6cqi; }
.lb-gal__t { margin-top: 3cqi; font-size: 2.4cqi; line-height: 1.5; }
.lb-more, .lb-url { display: inline-block; margin-top: 4cqi; font-size: 2.6cqi; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.lb-url { text-transform: none; letter-spacing: 0; font-weight: 600; }
.lb-booth { position: absolute; right: 4cqi; top: 8cqi; writing-mode: vertical-rl; font-size: 2.6cqi !important; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; }
.lb-booth b { font-size: 7cqi; letter-spacing: 0; margin-top: 1.5cqi; }
.lb-soon { height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.lb-soon__c { font-size: 34cqi; font-weight: 700; line-height: 1; letter-spacing: -0.03em; }
.lb-soon__t { font-size: 3.4cqi; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }

/* Índices de galerías y artistas */
.lb-idx .lb-h { margin-bottom: 4cqi; }
.lb-list { list-style: none; font-size: 2.5cqi; }
.lb-list--a { columns: 2; column-gap: 5cqi; font-size: 2.3cqi; }
.lb-list li { break-inside: avoid; border-top: 0.2cqi solid rgba(31, 78, 245, 0.25); }
.lb-list a { display: grid; grid-template-columns: 1fr auto 5cqi; gap: 2cqi; padding: 0.75cqi 0; text-decoration: none; line-height: 1.3; }
.lb-list i { font-style: normal; text-align: right; font-weight: 700; }
.lb-list span { opacity: 0.8; }

/* Programa */
.lb-pr .lb-h { margin-bottom: 4cqi; }
.lb-pr__d { margin-bottom: 5cqi; }
.lb-pr__d h3 { font-size: 5cqi; font-weight: 700; text-transform: uppercase; line-height: 1; }
.lb-pr__d h3 span { font-weight: 300; }
.lb-pr__o { font-size: 2.3cqi; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; margin: 1cqi 0 2cqi; }
.lb-pr__d ul { list-style: none; }
.lb-pr__d li { display: grid; grid-template-columns: 14cqi 1fr; gap: 2cqi; padding: 1.1cqi 0; border-top: 0.2cqi solid rgba(31, 78, 245, 0.25); font-size: 2.4cqi; line-height: 1.35; }
.lb-pr__h { font-weight: 700; }

/* Equipo */
.lb-team__g { margin-bottom: 7cqi; }
.lb-team__g ul { list-style: none; margin-top: 2cqi; }
.lb-team__g li { display: grid; grid-template-columns: 1fr 1fr; gap: 0.3cqi 3cqi; padding: 1.3cqi 0; border-top: 0.2cqi solid rgba(31, 78, 245, 0.25); font-size: 2.6cqi; }
.lb-team__g li span { font-size: 2.2cqi; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.85; }
.lb-team__g li b { font-weight: 700; }
.lb-team__g li i { grid-column: 2; font-style: normal; font-size: 2.3cqi; }

/* Controles */
.lb-ctrl { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; margin: 18px auto 0; padding: 0 16px; }
.lb-btn { width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--white); background: transparent; color: var(--white); font-size: 20px; cursor: pointer; }
.lb-btn:hover { background: var(--white); color: var(--blue); }
.lb-btn:disabled { opacity: 0.35; cursor: default; background: transparent; color: var(--white); }
.lb-count { min-width: 74px; text-align: center; font-size: 14px; font-weight: 600; letter-spacing: 0.08em; }
.lb-lnk { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; padding: 10px 4px; border-bottom: 1.5px solid transparent; }
.lb-lnk:hover { border-bottom-color: currentColor; }
.lb-lnk--pdf { border: 1.5px solid var(--white); border-radius: 999px; padding: 10px 16px; }
.lb-hint { text-align: center; margin-top: 10px; font-size: 12px; opacity: 0.75; }
@media (min-width: 900px) { .lb-hint { display: none; } }
.lb .fav-fab { bottom: max(16px, env(safe-area-inset-bottom)); }

/* PDF (Chrome, A5 sin márgenes) */
@page { size: 148mm 210mm; margin: 0; }
.lb--print { background: var(--white); }
.lb--print .lb-track { display: block; overflow: visible; }
.lb--print .lb-page { width: 148mm; height: 210mm; flex: none; box-shadow: none; outline: none; break-after: page; page-break-after: always; }
.lb--print .lb-page:last-child { break-after: auto; }
.lb--print .lb-go { text-decoration: none; }
.lb .fav-fab { left: auto; right: 16px; transform: none; padding: 12px 16px 12px 14px; }
.lb .fav-fab.is-pop { animation: none; }
@media (max-width: 899px) { .lb .fav-fab span { display: none; } .lb-stage { padding-bottom: 80px; } }

/* Ajustes tras revisar el PDF */
.lb-right { padding-right: 17cqi; }
.lb-booth b { font-size: 6cqi; }
.lb-idx .lb-h { font-size: 7cqi; margin-bottom: 3cqi; }
.lb-idx { padding-bottom: 11cqi; }
.lb-list { font-size: 2.2cqi; }
.lb-list a { padding: 0.5cqi 0; }
.lb-list--a { font-size: 2.1cqi; }
.lb--print main, .lb--print .lb-track { padding: 0 !important; margin: 0 !important; }
.lb-right { padding-right: 18cqi; }
.lb-booth { right: 3cqi; }
.lb-booth b { font-size: 5.6cqi; }
/* En escritura vertical, cqi se calcula sobre el otro eje: aquí van en cqw */
.lb-booth { right: 3cqw; top: 8cqw; font-size: 2.6cqw !important; line-height: 1; }
.lb-booth b { font-size: 5.6cqw; margin-top: 1.5cqw; }
/* La etiqueta del stand: el contenedor va en horizontal (unidades cqi) y solo el texto gira */
.lb-booth { writing-mode: horizontal-tb; right: 3.5cqi; top: 8cqi; font-size: 2.6cqi !important; line-height: 1; }
.lb-booth span { display: block; writing-mode: vertical-rl; }
.lb-booth b { font-size: 2.2em; margin-top: 0.5em; }

/* ── Libro con hojas que giran (lo monta js/catalogo.js) ── */
.lb-track.lb-book { display: block; position: relative; overflow: visible; scroll-snap-type: none; height: calc(var(--pw) * 1.4142); perspective: 2600px; }
.lb-leaf { position: absolute; top: 0; left: 0; width: var(--pw); height: 100%; transform-style: preserve-3d; transform-origin: left center;
  transition: transform .8s cubic-bezier(.4, .05, .2, 1); }
.lb-leaf.is-turning { will-change: transform; }
.lb-leaf.is-far { display: none; }
.lb-book--two .lb-leaf { left: 50%; }
.lb-leaf.is-flipped { transform: rotateY(-180deg); }
.lb-leaf.no-anim { transition: none; }
.lb-face { position: absolute; inset: 0; overflow: hidden; -webkit-backface-visibility: hidden; backface-visibility: hidden; background: var(--white); }
.lb-face--back { transform: rotateY(180deg); }
.lb-face > .lb-page { width: 100%; height: 100%; flex: none; box-shadow: none !important; }
/* Sombra del lomo y luz al girar */
.lb-book--two .lb-face::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.lb-book--two .lb-face--front::after { background: linear-gradient(90deg, rgba(10, 25, 90, 0.22), rgba(10, 25, 90, 0) 7%); }
.lb-book--two .lb-face--back::after { background: linear-gradient(270deg, rgba(10, 25, 90, 0.22), rgba(10, 25, 90, 0) 7%); }
.lb-leaf.is-turning .lb-face::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; animation: lb-shade .8s ease-in-out; }
.lb-leaf.is-turning .lb-face--front::before { background: linear-gradient(90deg, rgba(10, 25, 90, 0.35), rgba(255, 255, 255, 0) 60%); }
.lb-leaf.is-turning .lb-face--back::before { background: linear-gradient(270deg, rgba(10, 25, 90, 0.35), rgba(255, 255, 255, 0) 60%); }
@keyframes lb-shade { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }
.lb-book--one .lb-leaf { transition-duration: .65s; }
.lb-book--one .lb-leaf.is-flipped { transform: rotateY(-100deg); opacity: 0; transition: transform .65s cubic-bezier(.4, .05, .2, 1), opacity .25s .4s; }
.lb-book--one .lb-leaf.no-anim.is-flipped { transition: none; }
.lb-book .lb-face { cursor: pointer; }
.lb-book .lb-face a, .lb-book .lb-face button { cursor: pointer; }
.lb-hint { display: block; }
@media (min-width: 900px) { .lb-hint { display: none; } }
/* Más sitio para la ficha de contacto */
.lb-sm__img { height: 45cqi; }
.lb-sms--1 .lb-sm__img { height: 52cqi; }
.lb-sms { margin-bottom: 4cqi; }
.lb-gal__n { font-size: 6cqi; }
.lb-gal__art { margin-top: 3cqi; padding-top: 2.4cqi; }
.lb-more, .lb-url { margin-top: 3cqi; }
/* Las fotos pequeñas se adaptan al espacio que deja la ficha (nunca se corta el texto) */
.lb-right .lb-sms { flex: 1 1 0; min-height: 26cqi; margin-bottom: 4cqi; }
.lb-sm { display: flex; flex-direction: column; min-height: 0; }
.lb-sm__img, .lb-sms--1 .lb-sm__img { flex: 1 1 0; height: auto; min-height: 0; }
.lb-sm .lb-cap { flex: none; }
.lb-gal { flex: none; margin-top: 0; }
.lb-right > .lb-gal:first-child { margin-top: auto; }

.lb-legal { text-align: center; font-size: 11px; letter-spacing: .06em; opacity: .75; margin: 6px 16px 14px; }
.lb-legal a { color: inherit; text-underline-offset: 3px; }

/* Catálogo: patrocinadores en color sobre panel blanco */
.lb-sponsors { background: #fff; padding: 4cqi 4cqi; border-radius: .6cqi; gap: 3.5cqi 4cqi; }
.lb-sponsors li { display: flex; align-items: center; justify-content: center; height: 8cqi; }
.lb-sponsors img { width: auto; height: auto; max-width: 100%; max-height: 100%; }

/* ── Libro con hoja que se dobla (StPageFlip · js/vendor/page-flip.browser.js) ── */
.lb-track.lb-pf { display: block; overflow: visible; height: auto; scroll-snap-type: none; touch-action: pan-y; }
.lb-pf .lb-page { flex: none; scroll-snap-align: none; box-shadow: none !important; }
.lb-pf .stf__item { background: var(--white); }
.lb-pf .lb-page.lb-blue { background: var(--blue); }
