/* =========================================================
   LUMY — Blog (lista y artículos). Usa los tokens de styles.css
   ========================================================= */

.nav__links a[aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }

/* ---------- Lista ---------- */

.blog-index { border-top: 1px solid var(--line); }
.blog-index .section__head .display { white-space: normal; }
.blog-index__lead { margin-top: 18px; max-width: 52ch; font-size: var(--text-lg); color: var(--muted); }

.posts { border-top: 1px solid var(--line); }
.post-card { border-bottom: 1px solid var(--line); }
.post-card a {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(16px, 3vw, 40px);
  padding: clamp(24px, 4vh, 40px) 0;
  text-decoration: none;
  transition: background-color .3s ease;
}
.post-card a:has(.post-card__img) { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
.post-card a:hover { background: #F8EBE6; }
.post-card__img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--petal); }
.post-card__body { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.post-card__meta { color: var(--muted); }
.post-card__title {
  font-family: var(--font-display);
  font-variation-settings: 'SOFT' 100;
  font-weight: 500;
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.post-card__desc { max-width: 60ch; color: var(--muted); }
.post-card .link { margin-top: 8px; }

.posts--compact .post-card a { padding: 20px 0; }
.posts--compact .post-card__title { font-size: clamp(1.3rem, 2vw, 1.6rem); }

.posts-empty { padding: 32px 0; border-top: 1px solid var(--line); color: var(--muted); }

@media (max-width: 760px) {
  .post-card a:has(.post-card__img) { grid-template-columns: 1fr; }
}

/* ---------- Artículo ---------- */

.article {
  border-top: 1px solid var(--line);
  padding: var(--section-y) var(--gutter);
}
.article__head,
.article__body,
.article__cta { max-width: 720px; margin-left: auto; margin-right: auto; }

.article__back { margin-bottom: clamp(28px, 5vh, 48px); color: var(--muted); }
.article__back a { text-decoration: none; color: var(--espresso); }
.article__back a:hover { text-decoration: underline; text-underline-offset: 5px; }
.article__byline { margin-top: 18px; font-size: 0.875rem; color: var(--muted); }
.article__meta { color: var(--muted); margin-bottom: 18px; }
.article__title {
  font-family: var(--font-display);
  font-variation-settings: 'SOFT' 100;
  font-weight: 600;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.article__lead { margin-top: 20px; font-size: var(--text-lg); line-height: 1.45; color: var(--muted); }

.article__cover {
  width: 100%;
  max-width: 720px;
  margin: clamp(32px, 6vh, 56px) auto 0;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: var(--petal);
}

/* Texto del artículo (lo que sale del Markdown) */
.article__body {
  margin-top: clamp(32px, 6vh, 56px);
  font-size: 1.125rem;
  line-height: 1.7;
}
.article__body > * + * { margin-top: 1.1em; }
.article__body h2 {
  font-family: var(--font-display);
  font-variation-settings: 'SOFT' 100;
  font-weight: 600;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin-top: 2em;
  padding-top: 0.9em;
  border-top: 1px solid rgba(62, 39, 35, 0.2);
}
.article__body h3 {
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: var(--track-label);
  margin-top: 2em;
}
.article__body h2 + *, .article__body h3 + * { margin-top: 0.7em; }
.article__body a { text-decoration-thickness: 1px; text-underline-offset: 4px; }
.article__body a:hover { background: var(--petal); }
.article__body strong { font-weight: 600; }
.article__body em { font-style: italic; }
.article__body ul, .article__body ol { padding-left: 1.3em; }
.article__body ul { list-style: none; }
.article__body ul li { position: relative; }
.article__body ul li::before { content: '—'; position: absolute; left: -1.3em; color: var(--muted); }
.article__body ol { list-style: decimal; }
.article__body li + li { margin-top: 0.45em; }
.article__body blockquote {
  font-family: var(--font-display);
  font-variation-settings: 'SOFT' 100;
  font-style: italic;
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  line-height: 1.35;
  padding: 1.2em 0 1.2em 1.2em;
  border-left: 2px solid var(--petal);
}
.article__body blockquote p { margin: 0; }
.article__body img { width: 100%; height: auto; margin: 1.6em 0; }
.article__body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  line-height: 1.45;
  display: block;
  overflow-x: auto;
}
.article__body thead th {
  font-weight: 400;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: var(--track-label);
  border-bottom: 1px solid var(--line);
}
.article__body th, .article__body td {
  text-align: left;
  vertical-align: top;
  padding: 12px 16px 12px 0;
  min-width: 9em;
}
.article__body tbody tr { border-bottom: 1px solid rgba(62, 39, 35, 0.2); }
.article__body tbody td:first-child { color: var(--muted); font-size: var(--text-sm); text-transform: uppercase; letter-spacing: var(--track-label); }
.article__body hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }

.article__cta {
  margin-top: clamp(48px, 8vh, 80px);
  padding: clamp(24px, 4vw, 40px);
  background: var(--petal);
}
.article__cta-title {
  font-family: var(--font-display);
  font-variation-settings: 'SOFT' 100;
  font-weight: 600;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.1;
  margin-bottom: 8px;
}
.article__cta .btn { margin-top: 20px; }

.more-posts .label { margin-bottom: 18px; color: var(--muted); }
.more-posts { border-top: 1px solid var(--line); }

/* ---------- Artículo: índice a la izquierda, reserva + más artículos a la derecha ---------- */

.article__layout {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(0, 720px) minmax(260px, 1fr);
  gap: clamp(28px, 3.5vw, 64px);
  align-items: start;
}
.article__main { min-width: 0; }
.article__toc,
.article__side {
  position: sticky;
  top: 32px;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  scrollbar-width: none;
}
.article__toc { justify-self: end; width: min(100%, 230px); padding-top: 8px; }
.article__side { justify-self: start; width: min(100%, 300px); padding-top: 8px; }

.side__title { color: var(--muted); margin-bottom: 14px; }

.article__toc ol { border-left: 1px solid rgba(62, 39, 35, 0.2); }
.article__toc a,
.article__toc-mobile a {
  display: block;
  font-size: 0.875rem;
  line-height: 1.35;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s ease, border-color .2s ease;
}
.article__toc a {
  padding: 7px 0 7px 16px;
  margin-left: -1px;
  border-left: 2px solid transparent;
}
.article__toc a:hover { color: var(--espresso); }
.article__toc a.is-active { color: var(--espresso); border-left-color: var(--espresso); }

.side__book {
  background: var(--petal);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
.side__book-title {
  font-family: var(--font-display);
  font-variation-settings: 'SOFT' 100;
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.1;
}
.side__book-text { font-size: 0.9375rem; line-height: 1.45; }
.btn--block { display: block; width: 100%; text-align: center; padding: 15px 12px; font-size: 0.75rem; }
.side__hours { width: 100%; margin-top: 4px; border-top: 1px solid rgba(62, 39, 35, 0.25); font-size: 0.875rem; }
.side__hours div { display: flex; justify-content: space-between; padding: 8px 0 0; }
.side__hours dt { text-transform: uppercase; letter-spacing: var(--track-label); font-size: 0.75rem; align-self: center; }

.side__more { margin-top: 32px; }
.side__list { border-top: 1px solid var(--line); margin-bottom: 18px; }
.side__list li { border-bottom: 1px solid rgba(62, 39, 35, 0.2); }
.side__list a { display: block; padding: 14px 0; text-decoration: none; font-family: var(--font-display); font-variation-settings: 'SOFT' 100; font-size: 1.0625rem; line-height: 1.25; }
.side__list a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.side__tag { display: block; margin-bottom: 4px; font-family: var(--font-text); font-size: 0.6875rem; text-transform: uppercase; letter-spacing: var(--track-label); color: var(--muted); }
.side__list--plain li { padding: 10px 0; font-size: 0.9375rem; }

/* Índice desplegable (solo cuando no entran las columnas) */
.article__toc-mobile { display: none; }
.article__toc-mobile summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  padding: 16px 0;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: var(--track-label);
}
.article__toc-mobile summary::-webkit-details-marker { display: none; }
.article__toc-mobile summary::after { content: '+'; }
.article__toc-mobile[open] summary::after { content: '−'; }
.article__toc-mobile ol { padding-bottom: 12px; }
.article__toc-mobile a { padding: 8px 0; }

.article__cta .booking-actions { margin-top: 20px; }
.article__cta .booking-actions .btn { margin-top: 0; }

@media (max-width: 1180px) {
  .article__layout { grid-template-columns: minmax(0, 1fr); }
  .article__toc, .article__side { display: none; }
  .article__toc-mobile {
    display: block;
    max-width: 720px;
    margin: clamp(28px, 5vh, 44px) auto 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }
}
.article__body h2 { scroll-margin-top: 24px; }
