/* Brujuleando · web pública */
@font-face { font-family: 'Lora'; src: url(/assets/fonts/lora-latin-wght-normal.woff2) format('woff2'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'Lora'; src: url(/assets/fonts/lora-latin-wght-italic.woff2) format('woff2'); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: 'Source Sans 3'; src: url(/assets/fonts/source-sans-3-latin-wght-normal.woff2) format('woff2'); font-weight: 200 900; font-display: swap; }
@font-face { font-family: 'Source Sans 3'; src: url(/assets/fonts/source-sans-3-latin-wght-italic.woff2) format('woff2'); font-weight: 200 900; font-style: italic; font-display: swap; }

:root {
  --paper: #ffffff;
  --paper-2: #f2f1ef;
  --ink: #1d2b2f;
  --ink-2: #4b5a5e;
  --muted: #7d8588;
  --accent: #c2532b;
  --accent-2: #9e3f1d;
  --line: #e6e4e0;
  --serif: 'Lora', Georgia, 'Times New Roman', serif;
  --sans: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 18px/1.6 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.wrap.narrow { width: min(720px, 100% - 40px); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 99; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* Cabecera */
.site-header { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); }
.header-in { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 22px/1 var(--serif); letter-spacing: -.01em; }
.brand.small { font-size: 19px; }
.compass { color: var(--ink); flex: none; overflow: visible; }
.compass .needle { transform-box: view-box; transform-origin: 16px 16px; transform: rotate(32deg); }
.brand:hover .compass .needle, .brand:focus-visible .compass .needle, .compass.spin .needle { animation: compass-swing 1.4s cubic-bezier(.3,.6,.3,1); }
@keyframes compass-swing {
  0% { transform: rotate(32deg); } 18% { transform: rotate(-38deg); } 38% { transform: rotate(78deg); }
  56% { transform: rotate(10deg); } 72% { transform: rotate(46deg); } 86% { transform: rotate(26deg); } 100% { transform: rotate(32deg); }
}
@media (prefers-reduced-motion: reduce) { .compass .needle { animation: none !important; } }
.site-header nav { display: flex; gap: 6px; align-items: center; }
.site-header nav a { text-decoration: none; font-weight: 500; font-size: 15px; padding: 8px 12px; border-radius: 999px; color: var(--ink-2); }
.site-header nav a:hover, .site-header nav a.on { color: var(--ink); background: var(--paper-2); }
.search-link { display: inline-flex; }

/* Portada */
.hero { position: relative; min-height: min(78vh, 720px); display: flex; align-items: flex-end; color: #fff; overflow: hidden; background: var(--ink); }
.hero-sm { min-height: min(56vh, 520px); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-img.ph { display: grid; place-items: center; color: #fff3; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,20,22,.18) 0%, rgba(11,20,22,.38) 45%, rgba(11,20,22,.9) 100%); }
.hero-text { position: relative; padding: 48px 0 52px; max-width: 820px; margin-left: max(20px, (100% - 1180px) / 2); }
.hero h1 { font: 600 clamp(36px, 6vw, 72px)/1.02 var(--serif); letter-spacing: -.02em; margin: 6px 0 14px; text-wrap: balance; }
.hero h1 a { text-decoration: none; }
.hero-ex { font-size: 19px; line-height: 1.45; max-width: 60ch; opacity: .95; margin: 0; }
.kicker { font: 600 12.5px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 8px; text-decoration: none; display: inline-block; }
.kicker a { text-decoration: none; }
.kicker.light { color: #fff; }
.btn { display: inline-block; background: var(--accent); color: #fff; text-decoration: none; font-weight: 600; padding: 13px 22px; border-radius: 999px; transition: background .2s; }
.btn:hover { background: var(--accent-2); }
.btn.dark { background: var(--ink); }
.intro { padding: 80px 0 20px; }
.intro h1 { font: 600 64px/1 var(--serif); margin: 0 0 12px; }

.section { padding: 56px 0 8px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 22px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.section-head h2 { font: 600 30px/1.1 var(--serif); margin: 0; letter-spacing: -.01em; }
.section-head a { font-weight: 600; font-size: 15px; color: var(--accent); text-decoration: none; }

/* Tarjetas de viaje (series) */
.trips { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.trip { position: relative; display: block; aspect-ratio: 3/2; border-radius: var(--r); overflow: hidden; color: #fff; text-decoration: none; background: var(--ink); }
.trip-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.trip-img.ph { display: grid; place-items: center; color: #fff3; }
.trip:hover .trip-img { transform: scale(1.04); }
.trip-shade { position: absolute; inset: 0; background: linear-gradient(180deg, #0000 40%, #0b1416d9); }
.trip-text { position: absolute; left: 20px; right: 20px; bottom: 18px; display: flex; flex-direction: column; gap: 4px; }
.trip-year { font: 600 13px var(--sans); letter-spacing: .16em; color: #fff; }
.trip-place { font: 600 34px/1.05 var(--serif); letter-spacing: -.01em; text-wrap: balance; }
.trip-name { font: 400 16px/1.3 var(--sans); opacity: .92; }
.trip-count { font-size: 14px; opacity: .8; }
/* Si el texto no cabe sobre la foto, va debajo */
.trip.text-out { aspect-ratio: auto; overflow: visible; background: none; color: var(--ink); }
.trip.text-out .trip-img { position: relative; aspect-ratio: 3/2; height: auto; border-radius: var(--r); }
.trip.text-out .trip-shade { display: none; }
.trip.text-out .trip-text { position: static; padding: 12px 2px 0; }
.trip.text-out .trip-year { color: var(--accent); }
.trip.text-out .trip-count { color: var(--muted); opacity: 1; }

/* Tarjetas de entrada */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px 24px; }
.card-img { display: block; aspect-ratio: 3/2; border-radius: var(--r); overflow: hidden; background: var(--paper-2); }
.card-img img, .card-img .ph { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card-img .ph { display: grid; place-items: center; color: var(--line); }
.card:hover .card-img img { transform: scale(1.04); }
.card-body { padding-top: 14px; }
.card h3 { font: 600 22px/1.2 var(--serif); margin: 4px 0 6px; letter-spacing: -.005em; text-wrap: balance; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.meta { color: var(--muted); font-size: 15px; margin: 0; }
.excerpt { color: var(--ink-2); margin: 0 0 8px; }

/* Listados */
.page-head { padding: 64px 0 10px; }
.page-head h1 { font: 600 clamp(40px, 6vw, 64px)/1 var(--serif); letter-spacing: -.02em; margin: 0 0 12px; }
.page-head p { color: var(--ink-2); font-size: 18px; margin: 0; }
.page-head.center { text-align: center; padding-bottom: 80px; }
.page-head.center .compass { margin: 0 auto 16px; }
.year-block { padding-top: 40px; }
.year { font: 400 italic 54px/1 var(--serif); color: var(--accent); margin: 0 0 18px; }
.empty { color: var(--muted); }

/* Etapas de un viaje */
.stages { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.stage { display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: center; padding: 14px 0; text-decoration: none; border-bottom: 1px solid var(--line); }
.stage-n { font: 600 13px/1.2 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.stage-img { width: 150px; aspect-ratio: 3/2; object-fit: cover; border-radius: 10px; background: var(--paper-2); }
.stage-img.ph { display: grid; place-items: center; color: var(--line); }
.stage-text { display: flex; flex-direction: column; gap: 3px; }
.stage-text strong { font: 600 21px/1.2 var(--serif); }
.stage-ex { color: var(--ink-2); font-size: 15px; }
.stage:hover strong { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* Entrada */
.post-head { padding: 56px 0 8px; }
.post-head.with-img { padding-top: 0; }
.post-cover { width: 100%; height: min(72vh, 680px); object-fit: cover; }
.post-head.with-img .post-title { margin-top: -110px; position: relative; background: var(--paper); padding: 30px 34px 4px; border-radius: var(--r) var(--r) 0 0; width: min(784px, 100% - 8px); }
.post-title h1 { font: 600 clamp(34px, 5vw, 56px)/1.05 var(--serif); letter-spacing: -.02em; margin: 4px 0 12px; text-wrap: balance; }
.prose { font: 400 19.5px/1.7 var(--sans); padding-top: 18px; padding-bottom: 20px; }
.prose > * { margin: 0 0 1.15em; }
.prose h2 { font: 600 30px/1.2 var(--serif); margin: 1.8em 0 .5em; letter-spacing: -.01em; }
.prose h3 { font: 600 23px/1.25 var(--serif); margin: 1.5em 0 .4em; }
.prose a { color: var(--accent-2); text-underline-offset: 3px; }
.prose img { border-radius: 10px; margin: 1.6em auto; }
.prose figure { margin: 1.8em 0; }
.prose figure img { margin: 0 auto; }
.prose figcaption, .prose .wp-caption-text { font: 14.5px/1.4 var(--sans); color: var(--muted); text-align: center; margin-top: 10px; }
.prose blockquote { border-left: 3px solid var(--accent); margin-left: 0; padding: 4px 0 4px 22px; font-style: italic; color: var(--ink-2); font-size: 21px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .3em 0; }
.prose hr { border: 0; text-align: center; margin: 2.4em 0; }
.prose hr::before { content: '✦ ✦ ✦'; color: var(--accent); letter-spacing: .6em; }
.prose iframe, .prose [data-youtube-video] iframe { width: 100%; aspect-ratio: 16/9; height: auto; border: 0; border-radius: 10px; }
.prose table { width: 100%; border-collapse: collapse; font: 15px var(--sans); }
.prose td, .prose th { border-bottom: 1px solid var(--line); padding: 8px; text-align: left; }
@media (min-width: 900px) { .prose img.wide, .prose .alignwide img, .prose .alignfull img { width: calc(100% + 160px); max-width: none; margin-left: -80px; } }
.page-cover { border-radius: var(--r); margin: 10px 0 20px; }


/* Buscador */
.search { display: flex; gap: 10px; margin: 18px 0 14px; }
.search input { flex: 1; font: 18px var(--sans); padding: 14px 18px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); }
.search button { font: 600 16px var(--sans); padding: 0 24px; border-radius: 999px; border: 0; background: var(--ink); color: #fff; cursor: pointer; }

/* Pie */
.site-footer { margin-top: 90px; background: var(--ink); color: #d7dcdc; padding: 46px 0; }
.site-footer .compass { color: #fff; --compass-bg: var(--ink); }
.site-footer .brand { color: #fff; }
.footer-in { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer-in p { margin: 10px 0 0; max-width: 46ch; font-size: 15px; opacity: .8; }
.footer-in nav { display: flex; gap: 22px; flex-wrap: wrap; align-items: flex-start; }
.footer-in nav a { text-decoration: none; font-size: 15px; }
.footer-in nav a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  body { font-size: 17px; }
  .hero-text { padding: 28px 0 36px; }
  .hero-ex { font-size: 17px; line-height: 1.42; }
  .stage { grid-template-columns: 96px 1fr; gap: 14px; }
  .stage-img { width: 96px; }
  .stage-ex { display: none; }
  .post-cover { height: auto; aspect-ratio: 3 / 2; } /* en el móvil, la foto principal en horizontal */
  /* Foto fija que se amplía y contenido de lado a lado que sube por encima */
  .post.has-cover { overflow: clip; } /* recorta la foto ampliada para que no asome al final del artículo */
  .post.has-cover > .post-cover { position: sticky; top: 64px; z-index: 0; transform-origin: center 30%; will-change: transform; }
  .post.has-cover > .post-body { position: relative; z-index: 1; background: var(--paper); margin-top: -22px; border-radius: 22px 22px 0 0;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, .12); }
  .post-head.with-img .post-title { margin-top: 0; width: min(720px, 100% - 40px); padding: 26px 0 0; border-radius: 0; background: transparent; }
  .prose { font-size: 18.5px; }
  .site-header nav a { padding: 8px 9px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Galería de fotos de la entrada */
.gallery-wrap { padding-top: 26px; }
.gallery-title { font: 600 26px var(--serif); margin: 0 0 16px; display: flex; align-items: baseline; gap: 10px; }
.gallery-title span { font: 500 14px var(--sans); color: var(--muted); }
/* Filas justificadas: respetan el orden de las fotos y la forma de cada una */
.gallery { display: flex; flex-wrap: wrap; gap: 8px; --row: 240px; }
.g-item { flex-grow: calc(var(--r) * 100); flex-basis: calc(var(--r) * var(--row)); aspect-ratio: var(--r); max-height: calc(var(--row) * 1.6);
  border-radius: 8px; overflow: hidden; background: var(--paper-2); cursor: zoom-in; }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; display: block; }
.g-item:hover img { transform: scale(1.03); }
.g-fill { flex-grow: 1000000; flex-basis: 0; }  /* evita que la última fila se estire de más */
@media (max-width: 640px) {
  .gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
  .g-item { aspect-ratio: 4/3; max-height: none; border-radius: 4px; }
  .g-fill { display: none; }
}

/* Visor a pantalla completa (carrusel) */
.lb { position: fixed; inset: 0; z-index: 100; background: #0b1416; display: none; overflow: hidden; touch-action: none; overscroll-behavior: contain; opacity: 0; transition: opacity .2s ease, background-color .2s ease; }
.lb.on { display: block; }
.lb.visible { opacity: 1; }
.lb-track { position: absolute; top: 0; left: 0; height: 100%; width: 300vw; display: flex; will-change: transform; touch-action: none; }
.lb-slide { width: 100vw; height: 100%; flex: none; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.lb-img { max-width: 100vw; max-height: 100dvh; object-fit: contain; user-select: none; -webkit-user-drag: none; transform-origin: center center; cursor: zoom-in; }
@media (min-width: 700px) { .lb-img { max-width: calc(100vw - 160px); max-height: calc(100dvh - 80px); border-radius: 6px; } }
.lb.zoomed .lb-img { cursor: grab; }
.lb button { position: absolute; z-index: 2; border: 0; background: #ffffff1a; color: #fff; width: 52px; height: 52px; border-radius: 50%; font-size: 30px; line-height: 1; cursor: pointer; display: grid; place-items: center; transition: opacity .2s; }
.lb button:hover { background: #ffffff33; }
.lb-close { top: calc(14px + env(safe-area-inset-top)); right: 14px; font-size: 20px !important; }
.lb-prev { left: 14px; top: 50%; margin-top: -26px; } .lb-next { right: 14px; top: 50%; margin-top: -26px; }
.lb-count { position: absolute; z-index: 2; bottom: calc(14px + env(safe-area-inset-bottom)); left: 0; right: 0; text-align: center; color: #fffc; font: 500 14px var(--sans); margin: 0; transition: opacity .2s; }
.lb.zoomed .lb-prev, .lb.zoomed .lb-next, .lb.zoomed .lb-count, .lb.single .lb-prev, .lb.single .lb-next { opacity: 0; pointer-events: none; }
@media (max-width: 700px) { .lb-prev, .lb-next { display: none !important; } }

/* Comentarios antiguos */
.comments { padding-top: 40px; }
.comments h2 { font: 600 24px var(--serif); margin: 0 0 14px; }
.comment { padding: 16px 0; border-top: 1px solid var(--line); }
.comment-meta { margin: 0 0 6px; font-size: 14px; color: var(--muted); }
.comment-meta strong { color: var(--ink); }
.comment-body p { margin: 0 0 8px; }

/* Hilos de comentarios y formulario */
.thread { border-top: 1px solid var(--line); }
.thread .comment { border-top: 0; }
.replies { margin: 0 0 14px 22px; padding-left: 18px; border-left: 2px solid var(--paper-2); }
.replies .comment { padding: 10px 0; }
.comment.by-author .comment-body { background: var(--paper-2); padding: 10px 14px; border-radius: 10px; }
.author-badge { display: inline-block; margin-left: 8px; font: 600 11px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--accent); padding: 2px 8px; border-radius: 999px; vertical-align: 1px; }
.comment-form { margin-top: 14px; padding: 24px; background: #fafaf9; border: 1px solid var(--line); border-radius: var(--r); }
.comment-form h3 { font: 600 22px var(--serif); margin: 0 0 14px; }
.cf { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; flex: 1; }
.cf span { font-weight: 600; font-size: 15px; }
.cf em { font-weight: 400; color: var(--muted); font-style: normal; }
.cf input, .cf textarea { font: 16px var(--sans); padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); width: 100%; }
.cf textarea { resize: vertical; min-height: 110px; }
.cf-row { display: flex; gap: 14px; }
.cf-help { font-size: 13.5px; color: var(--muted); margin: -4px 0 14px; }
.cf-check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; margin-bottom: 16px; }
.cf-check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--accent); }
.comment-form .btn { border: 0; cursor: pointer; font: 600 16px var(--sans); }
.comment-form .btn:disabled { opacity: .6; }
.cf-turnstile { margin-bottom: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { padding: 12px 14px; border-radius: 10px; margin: 0 0 16px; font-weight: 500; }
.form-note.ok { background: #e4f3ea; color: #2f7a4f; }
.form-note.error { background: #fbe9e7; color: #b3261e; }
@media (max-width: 640px) { .cf-row { flex-direction: column; gap: 0; } .comment-form { padding: 18px; } .replies { margin-left: 8px; padding-left: 12px; } }

/* Botón para abrir el formulario de comentarios */
.comment-box { margin-top: 18px; }
.comment-cta { list-style: none; display: inline-block; cursor: pointer; font: 500 16px var(--sans); color: var(--ink-2);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.comment-cta::-webkit-details-marker { display: none; }
.comment-cta::marker { content: ''; }
.comment-cta:hover { color: var(--accent); }
.comment-box[open] .comment-cta { display: none; }
.comment-box[open] .comment-form { margin-top: 0; }
.comments .form-note { margin-top: 22px; }

/* Buscador emergente */
html.sm-open { overflow: hidden; }
.sm { position: fixed; inset: 0; z-index: 90; background: rgba(15, 22, 24, .45); backdrop-filter: blur(3px); display: flex; justify-content: center; align-items: flex-start;
  padding: 10vh 16px 16px; opacity: 0; transition: opacity .15s ease; }
.sm.on { opacity: 1; }
.sm[hidden] { display: none; }
.sm-box { width: min(640px, 100%); max-height: 76vh; display: flex; flex-direction: column; background: #fff; border-radius: 16px; box-shadow: 0 24px 70px rgba(0, 0, 0, .25); overflow: hidden;
  transform: translateY(-8px); transition: transform .15s ease; }
.sm.on .sm-box { transform: none; }
.sm-bar { display: flex; align-items: center; gap: 12px; padding: 6px 10px 6px 18px; border-bottom: 1px solid var(--line); color: var(--muted); }
.sm-bar input { flex: 1; border: 0; outline: none; font: 19px var(--sans); padding: 14px 0; color: var(--ink); background: transparent; min-width: 0; }
.sm-bar input::-webkit-search-cancel-button { display: none; }
.sm-close { border: 0; background: var(--paper-2); color: var(--ink-2); font: 600 13px var(--sans); padding: 7px 12px; border-radius: 8px; cursor: pointer; }
.sm-results { overflow-y: auto; padding: 6px; transition: opacity .15s; }
.sm-results.loading { opacity: .55; }
.sm-hint { color: var(--muted); padding: 18px 14px; margin: 0; font-size: 15px; }
.sm-item { display: flex; gap: 14px; align-items: flex-start; padding: 10px; border-radius: 10px; text-decoration: none; }
.sm-item:hover, .sm-item.active, .sm-item:focus { background: var(--paper-2); outline: none; }
.sm-item img, .sm-ph { width: 76px; height: 56px; object-fit: cover; border-radius: 8px; flex: none; background: var(--paper-2); }
.sm-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sm-text strong { font: 600 17px/1.25 var(--serif); }
.sm-text mark { background: #fbe2d5; color: inherit; border-radius: 3px; padding: 0 1px; }
.sm-meta { font-size: 13px; color: var(--accent); font-weight: 600; letter-spacing: .02em; }
.sm-ex { font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 640px) {
  .sm { padding: 0; background: #fff; backdrop-filter: none; }
  .sm-box { width: 100%; max-height: none; height: 100%; border-radius: 0; box-shadow: none; }
  .sm-bar { padding-top: calc(6px + env(safe-area-inset-top)); }
  .sm-bar input { font-size: 17px; }
}

/* Portada: tarjeta destacada del último viaje */
.home-trips { padding-top: 40px; }
.home-title { font: 600 clamp(34px, 5vw, 48px)/1.05 var(--serif); letter-spacing: -.02em; margin: 0 0 22px; }
@media (min-width: 1020px) {
  /* Ocupa 2 columnas y 2 filas: los dos viajes siguientes quedan apilados a su derecha */
  .trip-big { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
  .trip-big .trip-place { font-size: 48px; }
  .trip-big .trip-name { font-size: 18px; }
  .trip-big .trip-text { left: 28px; bottom: 24px; }
}
.trip.text-out .trip-name { opacity: 1; color: var(--ink-2); }

/* Portada: «De viaje» (solo mientras hay un viaje en curso) */
.live { position: relative; min-height: min(70vh, 620px); display: flex; align-items: flex-end; color: #fff; overflow: hidden; background: var(--ink); }
.live-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.live-img.ph { display: grid; place-items: center; color: #fff3; }
.live-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,20,22,.15) 0%, rgba(11,20,22,0) 35%, rgba(11,20,22,.82) 100%); }
.live-text { position: relative; padding: 48px 0 52px; }
.live-kicker { display: inline-flex; align-items: center; gap: 10px; font: 600 13px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: #ffd9c7; margin: 0 0 10px; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #ff6b3d; box-shadow: 0 0 0 0 rgba(255,107,61,.7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(255,107,61,0); } 100% { box-shadow: 0 0 0 0 rgba(255,107,61,0); } }
.live h1 { font: 600 clamp(38px, 6vw, 68px)/1.02 var(--serif); letter-spacing: -.02em; margin: 0 0 10px; text-wrap: balance; }
.live h1 a { text-decoration: none; }
.live-name { font: 400 20px/1.3 var(--sans); margin: 0 0 14px; opacity: .92; }
.live-last { font-size: 17px; margin: 0 0 22px; opacity: .85; }
.live-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn.ghost-light { background: transparent; border: 1.5px solid rgba(255,255,255,.75); color: #fff; }
.btn.ghost-light:hover { background: rgba(255,255,255,.15); }
@media (max-width: 640px) {
  .live { min-height: 78vh; }
  .live-text { padding: 32px 0 34px; }
  .live-last { font-size: 17px; }
  .live-actions { flex-direction: column; }
  .live-actions .btn { text-align: center; padding: 14px; }
  .trip-place { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

/* Página de viaje: menos espacio entre la cabecera y la lista de días */
.hero + .section { padding-top: 26px; }
@media (max-width: 640px) { .hero + .section { padding-top: 14px; } }

/* ── Cambiar de día: barra inferior, gesto de deslizar y entrada de la página nueva ── */
.dn-bar { position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 30;
  display: flex; align-items: center; gap: 4px; padding: 5px; border-radius: 999px;
  background: rgba(255,255,255,.96); box-shadow: 0 6px 24px rgba(0,0,0,.14), 0 0 0 1px var(--line);
  transform: translate(-50%, calc(100% + 30px)); transition: transform .28s ease; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.dn-bar.on { transform: translate(-50%, 0); }
.dn-b { font: 600 15px var(--sans); color: var(--ink); text-decoration: none; padding: 10px 16px; border-radius: 999px; white-space: nowrap; min-width: 88px; text-align: center; }
.dn-b:hover, .dn-b:active { background: var(--paper-2); }
.dn-b.off { visibility: hidden; }
.dn-now { font: 500 13px var(--sans); color: var(--muted); padding: 0 6px; white-space: nowrap; }

.dn-hint { position: fixed; top: 50%; z-index: 25; pointer-events: none; display: flex; flex-direction: column; gap: 2px;
  max-width: 46vw; padding: 12px 16px; border-radius: 16px; background: var(--ink); color: #fff;
  opacity: 0; transform: translateY(-50%) scale(.9); transition: opacity .15s, transform .15s, background-color .15s; --p: 0; }
.dn-hint.show { opacity: calc(.35 + var(--p) * .65); transform: translateY(-50%) scale(calc(.9 + var(--p) * .1)); }
.dn-hint.next { right: 14px; text-align: right; }
.dn-hint.prev { left: 14px; }
.dn-hint.ready { background: var(--accent); }
.dn-hint b { font-size: 20px; line-height: 1; }
.dn-hint span { font: 600 17px var(--sans); }
.dn-hint small { font: 400 13px/1.3 var(--sans); opacity: .85; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.dn-tip { position: fixed; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 31; pointer-events: none;
  padding: 10px 16px; border-radius: 999px; background: var(--ink); color: #fff; font: 500 14px var(--sans); white-space: nowrap;
  opacity: 0; transform: translate(-50%, 10px); transition: opacity .3s, transform .3s; }
.dn-tip.on { opacity: .92; transform: translate(-50%, 0); }

@keyframes dn-in-next { from { opacity: 0; transform: translate3d(40px,0,0); } }
@keyframes dn-in-prev { from { opacity: 0; transform: translate3d(-40px,0,0); } }
.dn-in-next #main { animation: dn-in-next .28s ease-out; }
.dn-in-prev #main { animation: dn-in-prev .28s ease-out; }
@media (prefers-reduced-motion: reduce) { .dn-in-next #main, .dn-in-prev #main { animation: none; } .dn-bar { transition: none; } }

/* ── Portada: última entrada (si es de los últimos 3 días) y días anteriores del viaje ── */
.latest { display: grid; gap: 26px; padding-top: 28px; }
@media (min-width: 960px) { .latest { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 40px; align-items: start; padding-top: 40px; } }
.latest-card { display: block; text-decoration: none; color: inherit; }
.latest-media { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; background: var(--paper-2); }
.latest-img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.latest-img.ph { display: grid; place-items: center; color: var(--line); }
.latest-card:hover .latest-img { transform: scale(1.03); }
.latest-badge { position: absolute; top: 14px; left: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: rgba(11, 20, 22, .68); color: #fff; font: 600 12px var(--sans); letter-spacing: .12em; text-transform: uppercase;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.latest-text { display: flex; flex-direction: column; gap: 6px; padding-top: 16px; }
.latest-text .kicker { margin: 0; }
.latest-title { font: 600 clamp(28px, 4.2vw, 46px)/1.08 var(--serif); letter-spacing: -.015em; text-wrap: balance; }
.latest-card:hover .latest-title { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.latest-h { font: 600 13px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; }
.latest-list { list-style: none; padding: 0; margin: 0; }
.latest-list a { display: grid; grid-template-columns: 104px 1fr; gap: 14px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.ll-img { width: 104px; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 8px; background: var(--paper-2); }
.ll-img.ph { display: grid; place-items: center; color: var(--line); }
.ll-img.ph svg { width: 28px; height: 28px; }
.ll-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ll-day { font: 600 12px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.ll-text strong { font: 600 17px/1.25 var(--serif); }
.latest-list a:hover strong { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.latest-all { display: inline-block; margin-top: 14px; font-weight: 600; font-size: 15px; color: var(--accent); text-decoration: none; }
.latest-all:hover { text-decoration: underline; }
@media (max-width: 640px) {
  .latest { padding-top: 18px; gap: 22px; }
  .latest-media { aspect-ratio: 3 / 2; }
  .latest-list a { grid-template-columns: 88px 1fr; }
  .ll-img { width: 88px; }
}


/* ── Final de la entrada: tira con todos los días del viaje ── */
.days-strip { padding-top: 44px; padding-bottom: 10px; }
.ds-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 12px; }
.ds-head .latest-h { margin: 0; }
.ds-head .latest-all { margin: 0; white-space: nowrap; }
.ds-list { list-style: none; margin: 0; padding: 0 0 10px; display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: thin; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.ds-list li { flex: none; width: 168px; scroll-snap-align: start; }
.ds-list a { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: inherit; }
.ds-img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 10px; background: var(--paper-2); margin-bottom: 6px; transition: opacity .15s; }
.ds-img.ph { display: grid; place-items: center; color: var(--line); }
.ds-img.ph svg { width: 30px; height: 30px; }
.ds-list strong { font: 600 15.5px/1.25 var(--serif); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ds-list a:hover strong { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.ds-list li.here .ds-img { outline: 3px solid var(--accent); outline-offset: -3px; }
.ds-list li.here strong { color: var(--accent); }
@media (max-width: 640px) {
  .ds-list { margin: 0 calc(-1 * var(--gutter, 20px)); padding-left: var(--gutter, 20px); padding-right: var(--gutter, 20px); scroll-padding-left: var(--gutter, 20px); }
  .ds-list li { width: 142px; }
}
/* Primer día de un viaje: no hay días anteriores; en pantalla ancha, texto al lado de la foto */
@media (min-width: 960px) {
  .latest-solo { grid-template-columns: 1fr; }
  .latest-solo .latest-card { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 40px; align-items: center; }
  .latest-solo .latest-text { padding-top: 0; }
}
/* Enlace «Viajes» de la cabecera: el listado queda justo debajo de la cabecera fija */
#viajes { scroll-margin-top: 64px; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
