/* CaviLife · blog (listado y artículos) — generado con _blog/generar.py */

/* ---------- Listado ---------- */
.blog-list { padding-block: clamp(2rem, 5vw, 3.5rem) clamp(3rem, 7vw, 5rem); }
.blog-chips { margin-bottom: clamp(1.5rem, 3vw, 2.2rem); flex-wrap: wrap; overflow: visible; }
.blog-chips .chip {
  font: 600 0.9rem/1 var(--font-text); padding: 0.62rem 1rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--ink); transition: border-color 160ms, background 160ms, color 160ms;
}
.blog-chips .chip:hover { border-color: var(--blue); }
.blog-chips .chip[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.blog-empty { color: var(--muted); }

.post-grid { display: grid; gap: clamp(1rem, 2vw, 1.6rem); grid-template-columns: repeat(auto-fill, minmax(min(100%, 310px), 1fr)); }

.post-card {
  display: flex; flex-direction: column; overflow: hidden; border-radius: 18px; background: #fff; color: var(--ink);
  text-decoration: none; border: 1px solid var(--line); box-shadow: 0 18px 40px -30px rgba(6, 21, 38, 0.45);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}
.post-card:hover { transform: translateY(-3px); border-color: #b9d3df; box-shadow: 0 26px 50px -30px rgba(6, 21, 38, 0.55); }
.post-card:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
.post-card[hidden] { display: none; }
.post-card__media {
  position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden;
  background: radial-gradient(420px 220px at 85% 0%, rgba(62, 207, 234, 0.45), transparent 60%), linear-gradient(130deg, #061f38 0%, #0b3f6d 100%);
}
.post-card--eventos .post-card__media { background: radial-gradient(420px 220px at 15% 0%, rgba(62, 207, 234, 0.35), transparent 60%), linear-gradient(130deg, #0b3f6d 0%, #1a6fa3 100%); }
.post-card--proyectos .post-card__media { background: linear-gradient(130deg, #0d4d6b 0%, #1aa9c4 100%); }
.post-card--prensa .post-card__media { background: linear-gradient(160deg, #e9f2f6 0%, #cfe2ea 100%); }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 600ms ease; }
.post-card__media img.post-card__doc { width: auto; height: 86%; object-fit: contain; margin-top: 8%; box-shadow: 0 10px 28px rgba(6, 21, 38, 0.3); border-radius: 3px; }
.post-card:hover .post-card__media img { transform: scale(1.04); }
.post-card__icon { width: 30%; max-width: 92px; color: rgba(255, 255, 255, 0.92); }
.post-card__icon svg { display: block; width: 100%; height: auto; }
.post-card__dato { display: flex; flex-direction: column; align-items: center; gap: 0.15rem; color: #fff; text-align: center; }
.post-card__icon--sm { width: 34px; color: #3ecfea; margin-bottom: 0.3rem; }
.post-card__dato strong { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.6rem, 3vw + 1rem, 3.6rem); line-height: 1; letter-spacing: -0.03em; }
.post-card__dato small { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.75); }
.post-grid--list .post-card--destacado .post-card__dato strong { font-size: clamp(3.4rem, 4vw + 1rem, 5.4rem); }
.post-card__body { display: flex; flex-direction: column; gap: 0.55rem; padding: 1.15rem 1.25rem 1.3rem; flex: 1; }
.post-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.7rem; font-size: 0.8rem; color: var(--muted); }
.post-card__cat {
  display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: #0d3a6e; background: #e6f4f9; padding: 0.3rem 0.55rem; border-radius: 6px;
}
.post-card__title { font-family: var(--font-display); font-weight: 600; font-size: 1.14rem; line-height: 1.25; letter-spacing: -0.01em; }
.post-card__excerpt {
  font-size: 0.92rem; line-height: 1.55; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card__more { margin-top: auto; padding-top: 0.3rem; font-weight: 600; font-size: 0.9rem; color: #0d3a6e; }

@media (min-width: 900px) {
  .post-grid--list .post-card--destacado { grid-column: 1 / -1; flex-direction: row; }
  .post-grid--list .post-card--destacado .post-card__media { flex: 0 0 52%; aspect-ratio: auto; min-height: 300px; }
  .post-grid--list .post-card--destacado .post-card__body { padding: clamp(1.6rem, 3vw, 2.6rem); justify-content: center; gap: 0.8rem; }
  .post-grid--list .post-card--destacado .post-card__title { font-size: clamp(1.5rem, 1.2vw + 1rem, 2.1rem); }
  .post-grid--list .post-card--destacado .post-card__excerpt { font-size: 1rem; -webkit-line-clamp: 4; }
  .post-grid--list .post-card--destacado .post-card__more { margin-top: 0.6rem; }
}

/* ---------- Artículo ---------- */
.hero--post h1 { max-width: 28ch; font-size: clamp(1.9rem, 2.4vw + 0.9rem, 3rem); line-height: 1.12; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin: 1.2rem 0 0; color: rgba(255, 255, 255, 0.82); font-size: 0.92rem; }
.post-meta .post-card__cat { background: rgba(62, 207, 234, 0.18); color: #bff1fb; }
.post-section { padding-block: clamp(2rem, 5vw, 3.5rem) clamp(1.5rem, 4vw, 2.5rem); }
.post { font-size: 1.06rem; }
.post h2 { font-size: clamp(1.3rem, 0.6vw + 1.1rem, 1.6rem); letter-spacing: -0.01em; }
.post ol { padding-left: 1.25rem; margin: 0 0 1rem; }
.post strong { color: var(--ink); }
.post figure { margin: 1.8rem 0; }
.post figure img { display: block; width: 100%; height: auto; border-radius: 14px; }
.post figcaption { margin-top: 0.55rem; font-size: 0.86rem; color: var(--muted); text-align: center; }
.post-note {
  font-size: 0.88rem; color: #4a5a70; background: #f2f5f9; border-left: 3px solid var(--cyan, #3ecfea);
  padding: 0.65rem 0.95rem; border-radius: 4px; margin-bottom: 1.8rem !important;
}

.post-pdfs { margin: 2.2rem 0 0; }
.post-pdfs__grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.post .pdf-card {
  display: flex; align-items: center; gap: 1rem; padding: 0.8rem; border-radius: 14px; border: 1px solid var(--line);
  background: #fff; text-decoration: none; color: var(--ink); transition: border-color 180ms, box-shadow 180ms;
}
.post .pdf-card:hover { border-color: var(--blue); box-shadow: 0 14px 30px -22px rgba(6, 21, 38, 0.5); }
.pdf-card img { width: 74px; height: auto; border-radius: 3px; box-shadow: 0 4px 14px rgba(6, 21, 38, 0.22); flex: none; }
.pdf-card span { display: flex; flex-direction: column; gap: 0.2rem; }
.pdf-card strong { color: #0d3a6e; }
.pdf-card small { color: var(--muted); font-size: 0.84rem; }

.post-cta {
  margin: 2.8rem 0 0; padding: clamp(1.5rem, 3vw, 2.2rem); border-radius: 20px; color: #fff;
  background: radial-gradient(600px 300px at 90% 0%, rgba(42, 163, 219, 0.4), transparent 60%), linear-gradient(120deg, #061f38 0%, #0b3f6d 100%);
}
.post .post-cta h2 { margin: 0 0 0.5rem; color: #fff; }
.post .post-cta p { color: rgba(255, 255, 255, 0.85); }
.post-cta__btns { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 1.1rem 0 0 !important; }
.post .post-cta a.btn { text-decoration: none; }
.post .post-cta a.btn--light { color: var(--ink); }
.post .post-cta a.btn--ghost { color: #fff; border-color: rgba(255, 255, 255, 0.75); }
.post .post-cta a.btn--ghost:hover { background: rgba(255, 255, 255, 0.16); border-color: #fff; }

.post-more { padding-block: clamp(1.5rem, 4vw, 2.5rem) clamp(3rem, 7vw, 5rem); background: #f4f8fa; }
.post-more h2 { margin: 0 0 1.4rem; font-size: clamp(1.4rem, 1vw + 1rem, 1.9rem); }
.post-back { margin: 1.8rem 0 0; }
.post-back a { color: #0d3a6e; font-weight: 600; text-decoration: none; }
.post-back a:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  .post-card, .post-card__media img { transition: none; }
  .post-card:hover { transform: none; }
}
