/* ============================================================
   Sesiones de fotos — estilo galería de cliente (claro, editorial)
   ============================================================ */
:root {
  --s-bg: #fbf8f7;
  --s-ink: #1e1e1e;
  --s-muted: rgba(30, 30, 30, .55);
  --s-line: rgba(30, 30, 30, .1);
  --s-head: 'Syne', sans-serif;
  --s-body: 'Red Hat Text', system-ui, sans-serif;
  --s-gap: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.sesiones {
  background: var(--s-bg);
  color: var(--s-ink);
  font-family: var(--s-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.sesiones a { color: inherit; text-decoration: none; }
body.sesiones img { display: block; max-width: 100%; }
body.lock { overflow: hidden; }

.s-label {
  font-family: var(--s-head);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

/* ---------- Portada a pantalla completa ---------- */
.s-cover {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 520px;
  overflow: hidden;
  color: #fff;
  display: flex;
  align-items: flex-end;
}
.s-cover img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  animation: s-zoom 2.4s cubic-bezier(.2,.7,.2,1) forwards;
}
.s-cover::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.25) 50%, rgba(0,0,0,.6) 100%);
}
@keyframes s-zoom { to { transform: scale(1); } }

.s-cover-inner {
  position: relative; z-index: 2;
  width: 100%;
  padding: 0 6vw 9vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  opacity: 0;
  animation: s-fade 1.2s .4s ease forwards;
}
@keyframes s-fade { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.s-cover h1 {
  font-family: var(--s-head);
  font-weight: 700;
  font-size: clamp(34px, 5.5vw, 72px);
  line-height: 1.02;
  text-transform: uppercase;
  max-width: 14ch;
}
.s-cover .s-meta { opacity: .85; }
.s-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 14px 28px;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: background .3s, color .3s;
}
.s-cover .s-btn:hover { background: #fff; color: var(--s-ink); }
.s-btn.dark { color: var(--s-ink); }
.s-btn.dark:hover { background: var(--s-ink); color: #fff; }

.s-back-top {
  position: absolute; top: 24px; left: 6vw; z-index: 3;
  display: flex; align-items: center; gap: 10px;
  color: #fff;
}
.s-back-top .logo-mark { width: 30px; height: 30px; }

/* ---------- Barra superior fija ---------- */
.s-bar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 248, 247, .94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--s-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 6vw;
}
.s-bar-title { min-width: 0; }
.s-bar-title strong {
  display: block;
  font-family: var(--s-head);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .02em;
  text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.s-bar-title span { color: var(--s-muted); font-size: 10px; }
.s-bar-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.s-bar-actions a.s-label { color: var(--s-muted); margin-right: 14px; transition: color .2s; }
.s-bar-actions a.s-label:hover { color: var(--s-ink); }
.s-icon {
  width: 40px; height: 40px;
  display: inline-grid; place-items: center;
  background: none; border: 0; cursor: pointer;
  color: var(--s-ink);
  border-radius: 50%;
  position: relative;
  transition: background .2s;
}
.s-icon:hover { background: rgba(30,30,30,.06); }
.s-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.s-icon .s-count {
  position: absolute; top: 4px; right: 2px;
  font-size: 9px; font-weight: 700;
  background: var(--s-ink); color: #fff;
  min-width: 15px; height: 15px; padding: 0 3px;
  border-radius: 8px; display: grid; place-items: center;
}
.s-icon .s-count:empty { display: none; }

/* ---------- Filtros (todas / favoritas) ---------- */
.s-tabs {
  display: flex; gap: 28px;
  padding: 34px 6vw 18px;
}
.s-tabs button {
  background: none; border: 0; cursor: pointer;
  color: var(--s-muted);
  padding-bottom: 6px;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.s-tabs button.active { color: var(--s-ink); border-color: var(--s-ink); }

/* ---------- Mosaico ---------- */
.s-grid {
  display: flex;
  align-items: flex-start;
  gap: var(--s-gap);
  padding: 0 var(--s-gap) 80px;
}
.s-col { flex: 1; min-width: 0; }
.s-item {
  position: relative;
  margin-bottom: var(--s-gap);
  cursor: zoom-in;
  overflow: hidden;
  background: #eee9e6;
}
.s-item img {
  width: 100%; height: auto;
  opacity: 0;
  transition: opacity .7s ease, transform .9s cubic-bezier(.2,.7,.2,1);
}
.s-item img.loaded { opacity: 1; }
.s-item:hover img { transform: scale(1.025); }
.s-item .s-fav {
  position: absolute; right: 10px; bottom: 10px;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255,255,255,.9);
  color: var(--s-ink);
  opacity: 0; transform: translateY(6px);
  transition: opacity .25s, transform .25s;
}
.s-item:hover .s-fav, .s-item .s-fav.on { opacity: 1; transform: none; }
.s-fav svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.s-fav.on svg { fill: #c0392b; stroke: #c0392b; }
.s-empty { padding: 60px 6vw 120px; color: var(--s-muted); text-align: center; }

/* ---------- Lightbox ---------- */
.s-lb {
  position: fixed; inset: 0; z-index: 200;
  background: var(--s-bg);
  display: grid;
  grid-template-rows: auto 1fr auto;
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.s-lb.open { opacity: 1; pointer-events: auto; }
.s-lb-top, .s-lb-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px;
}
.s-lb-bottom { justify-content: center; color: var(--s-muted); }
.s-lb-stage {
  position: relative;
  display: grid; place-items: center;
  min-height: 0;
  padding: 0 70px;
  touch-action: pan-y;
}
.s-lb-stage img {
  max-width: 100%;
  max-height: calc(100svh - 140px);
  object-fit: contain;
  transition: opacity .25s;
}
.s-lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
}
.s-lb-nav.prev { left: 14px; }
.s-lb-nav.next { right: 14px; }
.s-lb-nav svg { width: 24px; height: 24px; }

/* ---------- Índice de sesiones ---------- */
.s-hero-index {
  padding: 140px 6vw 60px;
  max-width: 1100px;
}
.s-hero-index h1 {
  font-family: var(--s-head);
  font-weight: 700;
  font-size: clamp(38px, 6vw, 84px);
  line-height: 1;
  text-transform: uppercase;
  margin: 14px 0 22px;
}
.s-hero-index p { color: var(--s-muted); max-width: 56ch; font-size: 1.05rem; }
.s-index-nav {
  position: absolute; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 6vw;
}
.s-index-nav .logo-wrap { display: flex; align-items: center; gap: 10px; }
.s-index-nav .logo-mark { width: 28px; height: 28px; }
.s-index-nav nav { display: flex; gap: 26px; }
.s-index-nav nav a { color: var(--s-muted); transition: color .2s; }
.s-index-nav nav a:hover { color: var(--s-ink); }

.s-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr));
  gap: 48px 28px;
  padding: 0 6vw 110px;
}
.s-card { display: block; }
.s-card-img { overflow: hidden; aspect-ratio: 4 / 3; background: #eee9e6; }
.s-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.s-card:hover .s-card-img img { transform: scale(1.04); }
.s-card h2 {
  font-family: var(--s-head);
  font-size: 18px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
  margin: 18px 0 4px;
}
.s-card .s-label { color: var(--s-muted); }

.s-cta {
  border-top: 1px solid var(--s-line);
  padding: 90px 6vw;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.s-cta h2 {
  font-family: var(--s-head);
  font-size: clamp(26px, 3.4vw, 42px);
  text-transform: uppercase;
  line-height: 1.1;
}
.s-cta p { color: var(--s-muted); max-width: 48ch; }

.s-footer {
  border-top: 1px solid var(--s-line);
  padding: 28px 6vw;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  color: var(--s-muted);
  font-size: .85rem;
}

/* ---------- Responsivo ---------- */
@media (max-width: 640px) {
  :root { --s-gap: 4px; }
  .s-bar { padding: 10px 16px; }
  .s-bar-actions a.s-label { display: none; }
  .s-tabs { padding: 24px 16px 14px; }
  .s-cover-inner { padding: 0 16px 10vh; }
  .s-back-top { left: 16px; }
  .s-lb-stage { padding: 0 6px; }
  .s-lb-nav { display: none; }
  .s-item .s-fav { opacity: 1; transform: none; width: 30px; height: 30px; right: 6px; bottom: 6px; }
  .s-index-nav { padding: 18px 16px; }
  .s-index-nav nav { gap: 16px; }
  .s-hero-index { padding: 120px 16px 40px; }
  .s-cards { padding: 0 16px 80px; }
}
@media (prefers-reduced-motion: reduce) {
  .s-cover img, .s-cover-inner { animation: none; opacity: 1; transform: none; }
}

/* ---------- Botones de descarga en portada ---------- */
.s-cover-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.s-cover-btns .s-btn { margin-top: 0; }

/* ---------- Video ---------- */
.s-video-wrap { padding: 44px 6vw 10px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.s-video-title { color: var(--s-muted); }
.s-video { width: 100%; max-width: 1100px; aspect-ratio: 16 / 9; background: #000; }
.s-video.vertical { max-width: 420px; aspect-ratio: 9 / 16; }
.s-video iframe, .s-video video { width: 100%; height: 100%; border: 0; display: block; object-fit: contain; background: #000; }

/* ---------- Cargar más ---------- */
.s-more { text-align: center; color: var(--s-muted); padding: 0 0 60px; }
.s-video-wrap[hidden], .s-more[hidden] { display: none; }

/* ============================================================
   TEMA OSCURO (estilo editorial de viaje) — se activa con  tema: "oscuro"
   ============================================================ */
body.tema-oscuro {
  --s-bg: #1e1e1e;
  --s-ink: #ffffff;
  --s-muted: rgba(255, 255, 255, .55);
  --s-line: rgba(255, 255, 255, .08);
  --s-head: 'Raleway', sans-serif;
  --s-body: 'Lato', system-ui, sans-serif;
  --s-gap: 7px;
}
.tema-oscuro .s-label { font-family: var(--s-body); font-weight: 500; letter-spacing: .15em; }
.tema-oscuro .s-cover h1 { letter-spacing: .05em; max-width: 18ch; }
.tema-oscuro .s-cover::after { background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,.55) 100%); }
@media (min-width: 760px) {
  .tema-oscuro .s-cover-inner { flex-direction: row; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; }
  .tema-oscuro .s-cover-inner .s-meta { order: -2; flex-basis: 100%; margin-bottom: -8px; }
  .tema-oscuro .s-cover-inner > .s-btn, .tema-oscuro .s-cover-btns { margin-top: 0; }
}
.tema-oscuro .s-btn { padding: 12px 24px; border-color: rgba(255,255,255,.7); }
.tema-oscuro .s-cover .s-btn:hover { background: #fff; color: #1e1e1e; }
.tema-oscuro .s-bar { background: rgba(30, 30, 30, .94); }
.tema-oscuro .s-bar-title strong { font-size: 14.5px; letter-spacing: .09em; }
.tema-oscuro .s-icon { color: #fff; }
.tema-oscuro .s-icon:hover { background: rgba(255,255,255,.08); }
.tema-oscuro .s-icon .s-count { background: #fff; color: #1e1e1e; }
.tema-oscuro .s-grid { padding: 0 20px 80px; }
.tema-oscuro .s-item { background: #2a2a2a; }
.tema-oscuro .s-item .s-fav { background: rgba(30,30,30,.8); color: #fff; }
.tema-oscuro .s-btn.dark { color: #fff; }
.tema-oscuro .s-btn.dark:hover { background: #fff; color: #1e1e1e; }
.tema-oscuro .s-lb { background: #141414; }
.tema-oscuro .s-lb-stage img { box-shadow: 0 10px 40px rgba(0,0,0,.4); }
@media (max-width: 640px) { .tema-oscuro .s-grid { padding: 0 6px 60px; } }

/* Presentación (slideshow) */
.s-lb.playing .s-lb-nav { opacity: .25; }

/* Video de fondo en la portada */
.s-cover-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.s-cover-video.on { opacity: 1; }
