/* Cuba Despierta · Lugares (views/lugares.php). Se carga solo en /descubre-cuba/lugares.
   Paleta de site.css más el cartón de las postales y el azul del matasellos.
   Animaciones comunes de redesign.css (kenburns, fadeup, lineup, data-reveal). Giro de postales: js/lugares.js. */
.lz { --card: #fbf7ee; --ink-blue: #2c4a7c; --line-blue: #c9d3e3; }

/* ---------- 1. Cabecera con abanico de postales ---------- */
.lh { position: relative; display: flex; align-items: center; min-height: min(100svh, 900px); padding: calc(var(--hdr-h) + 3rem) 0 4rem; background: var(--ink-950); color: #fff; overflow: hidden; isolation: isolate; }
.lh-media { position: absolute; inset: -40px; z-index: -2; }
.lh-media img { width: 100%; height: 100%; object-fit: cover; filter: blur(6px) brightness(.55) saturate(.9); transform: scale(1.06); }
.lh::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(14,14,14,.92) 0%, rgba(14,14,14,.65) 50%, rgba(14,14,14,.35) 100%); }
.lh-in { position: relative; width: 100%; display: grid; grid-template-columns: minmax(0, 1fr); gap: 3rem; align-items: center; }
@media (min-width: 1024px) { .lh-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.lh-kicker { margin-top: 1.8rem; display: flex; align-items: center; gap: .9rem; font-size: 12px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }
.lh-title { margin-top: 1.2rem; font-size: clamp(2.8rem, .9rem + 6.8vw, 6.8rem); font-weight: 800; line-height: .92; letter-spacing: -.035em; text-transform: uppercase; }
.lh-title .serif { color: var(--brand-light); font-size: 1.08em; text-transform: none; }
.lh-lead { margin-top: 1.4rem; max-width: 34rem; font-size: clamp(1rem, .95rem + .35vw, 1.2rem); line-height: 1.65; color: #e0e0e0; }
.lh-ctas { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .8rem; }
/* El abanico: postales que llegan una a una y se separan al pasar el ratón */
.lh-fan { --spread: 13deg; position: relative; height: clamp(300px, 34vw, 440px); }
.lh-fan:hover { --spread: 20deg; }
@media (max-width: 1023px) { .lh-fan { display: none; } }
.lh-card { position: absolute; left: 50%; top: 50%; width: clamp(200px, 20vw, 280px); padding: 10px 10px 38px; background: var(--card); box-shadow: 0 24px 40px -18px rgba(0,0,0,.75); transform-origin: 50% 170%; transform: translate(-50%, -50%) rotate(calc((var(--i) - (var(--n) - 1) / 2) * var(--spread))); transition: transform .7s var(--ease-out); }
.lh-card img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.lh-card em { position: absolute; left: 12px; right: 12px; bottom: 8px; font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.js .lh-card { animation: lz-deal .9s var(--ease-out) both; animation-delay: calc(var(--i) * 160ms + 400ms); }
@keyframes lz-deal { from { opacity: 0; transform: translate(-50%, 40%) rotate(0deg); } }

/* ---------- 2. Postales con historia ---------- */
.lp { padding-block: clamp(4rem, 3rem + 4vw, 7rem); scroll-margin-top: var(--hdr-h); }
.lp-count { font-size: 14px; color: var(--muted); }
.lp-count b { font-size: 1.6rem; font-weight: 900; color: var(--ink); }
.lp-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 3rem; }
@media (min-width: 1100px) { .lp-list:not(.is-solo) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* La postal: foto a un lado y reverso de cartón al otro, como abierta sobre la mesa */
.lp-card { display: grid; grid-template-columns: minmax(0, 1fr); background: var(--card); color: var(--ink); text-decoration: none; box-shadow: 0 34px 60px -34px rgba(0,0,0,.6); transform: rotate(var(--tilt, 0deg)); transition: transform .7s var(--ease-out), box-shadow .7s; }
@media (min-width: 900px) { .lp-card { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); } }
.lp-card:hover, .lp-card:focus-visible { transform: rotate(0) translateY(-6px); box-shadow: 0 44px 70px -34px rgba(0,0,0,.65); }
.lp-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 6px; }
.lp-photo { position: relative; display: block; padding: 14px; }
.lp-photo img { display: block; width: 100%; height: 100%; min-height: 260px; aspect-ratio: 4 / 3; object-fit: cover; }
.lp-greet { position: absolute; left: 30px; bottom: 30px; padding: .3rem .7rem; background: rgba(255,255,255,.9); font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--brand-dark); transform: rotate(-3deg); }
.lp-back { position: relative; display: flex; flex-direction: column; gap: .8rem; padding: 2rem 1.8rem 1.8rem; background: var(--card) repeating-linear-gradient(to bottom, transparent 0 33px, var(--line-blue) 33px 34px); background-position: 0 120px; border-top: 1px dashed #d7cdb9; }
@media (min-width: 900px) { .lp-back { border-top: 0; border-left: 1px dashed #d7cdb9; } }
/* Sello con borde dentado y matasellos circular */
.lp-stamp { position: absolute; top: 1.4rem; right: 1.4rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; width: 70px; height: 84px; background: var(--brand); color: #fff; border: 4px dotted var(--card); box-shadow: 0 0 0 3px var(--brand), 0 4px 10px rgba(0,0,0,.2); transform: rotate(4deg); }
.lp-stamp b { font-size: 11px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.lp-mark { position: absolute; top: 2.2rem; right: 4.6rem; display: flex; align-items: center; justify-content: center; width: 86px; height: 86px; border: 2px solid rgba(44,74,124,.55); border-radius: 50%; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-align: center; color: rgba(44,74,124,.75); transform: rotate(-14deg); }
.lp-t { margin-top: 5.4rem; font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(2rem, 1.5rem + 1.6vw, 3rem); line-height: 1; color: var(--ink-blue); }
.lp-d { font-size: 15.5px; line-height: 34px; color: #3a3a3a; }
.lp-go { margin-top: auto; display: inline-flex; align-items: center; gap: .4rem; font-size: 11.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--brand-dark); }
.lp-go svg { transition: transform .45s var(--ease-out); }
.lp-card:hover .lp-go svg { transform: translateX(5px); }
.lp-empty { padding: 2rem; border: 1px dashed var(--line-strong); color: var(--muted); }

/* ---------- 3. Más postales: se dan la vuelta ---------- */
.lm { padding-block: clamp(4rem, 3rem + 4vw, 7rem); background: var(--ink-900); color: #fff; scroll-margin-top: var(--hdr-h); }
.lm-note { max-width: 26rem; font-size: 15px; line-height: 1.6; color: #c9c9c9; }
.lm-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem 2rem; }
@media (min-width: 600px) { .lm-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .lm-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.lm-item { display: flex; flex-direction: column; gap: 1rem; perspective: 1400px; }
.lm-card { position: relative; display: grid; width: 100%; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; transform: rotate(var(--tilt, 0deg)); transform-style: preserve-3d; transition: transform .8s var(--ease-out); }
.lm-card:hover { transform: rotate(0) translateY(-4px); }
.lm-card[aria-pressed="true"] { transform: rotateY(180deg); }
.lm-card:focus-visible { outline: 2px solid var(--brand-light); outline-offset: 6px; }
.lm-face { grid-area: 1 / 1; display: flex; flex-direction: column; padding: 10px; background: var(--card); color: var(--ink); box-shadow: 0 24px 40px -22px rgba(0,0,0,.8); -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.lm-front img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.lm-cap { padding: .7rem .3rem .2rem; font-family: var(--serif); font-style: italic; font-size: 1.25rem; line-height: 1.1; }
.lm-back { justify-content: flex-start; gap: .8rem; padding: 1.6rem 1.4rem; background: var(--card) repeating-linear-gradient(to bottom, transparent 0 29px, var(--line-blue) 29px 30px); background-position: 0 90px; transform: rotateY(180deg); }
.lm-stamp { align-self: flex-end; display: flex; align-items: center; justify-content: center; width: 52px; height: 62px; background: var(--brand); color: #fff; border: 3px dotted var(--card); box-shadow: 0 0 0 2px var(--brand); }
.lm-cat { font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--brand-dark); }
.lm-d { font-size: 14.5px; line-height: 30px; color: #3a3a3a; }
.lm-go { display: inline-flex; align-items: center; gap: .4rem; align-self: flex-start; padding-bottom: .15rem; border-bottom: 2px solid var(--brand); font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #fff; text-decoration: none; }
.lm-go svg { transition: transform .45s var(--ease-out); }
.lm-go:hover svg { transform: translateX(5px); }

/* ---------- 4. Sigue descubriendo ---------- */
.lx { padding-block: clamp(3.5rem, 2.5rem + 3vw, 5.5rem); }
.lx ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: .8rem; }
@media (min-width: 560px) { .lx ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .lx ul { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .lx ul { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.lx a { display: flex; align-items: center; gap: .9rem; height: 100%; padding: 1rem 1.1rem; background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: border-color .3s, transform .5s var(--ease-out); }
.lx-ico { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none; background: var(--soft); color: var(--brand-dark); transition: background-color .35s, color .35s, transform .5s var(--ease-out); }
.lx-txt { display: flex; flex: 1; flex-direction: column; gap: .15rem; min-width: 0; }
.lx-n { font-size: 14.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; }
.lx-c { font-size: 12px; color: var(--muted); }
.lx a > svg { color: var(--brand); transition: transform .45s var(--ease-out); }
.lx a:hover { border-color: var(--ink); transform: translateY(-3px); }
.lx a:hover .lx-ico { background: var(--brand); color: #fff; transform: rotate(-8deg); }
.lx a:hover > svg { transform: translateX(5px); }

/* ---------- Movimiento reducido: sin reparto ni giros 3D (la postal enseña directamente el reverso) ---------- */
@media (prefers-reduced-motion: reduce) {
  html.js .lh-card { animation: none; }
  .lh-card, .lp-card, .lm-card, .lx a { transition: none; }
  .lm-card[aria-pressed="true"] { transform: none; }
  .lm-back { transform: none; visibility: hidden; }
  .lm-card[aria-pressed="true"] .lm-back { visibility: visible; }
  .lm-card[aria-pressed="true"] .lm-front { visibility: hidden; }
}

/* ---------- Archivo (views/_cat_archivo.php): postales ---------- */
.arc.is-lugares { --arc-card: var(--card); --arc-accent: var(--ink-blue); --arc-rot: -1deg; }
.arc.is-lugares .arc-card { padding: 8px; }
.arc.is-lugares .arc-body { border-top: 1px dashed var(--line-blue); margin-top: 8px; }
