/* =========================================================
   Blog / Recursos (usa los colores y componentes de styles.css)
   ========================================================= */

.blog-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
}
.blog-header__inner { display: flex; align-items: center; gap: 22px; height: 72px; }
.blog-header .navbar__logo img { height: 48px; }
.blog-header__nav { display: flex; gap: 4px; margin-left: auto; }
.blog-header__nav a { padding: 8px 14px; border-radius: 999px; font-size: 14.5px; font-weight: 500; color: var(--ink); transition: background-color .3s, color .3s; }
.blog-header__nav a:hover { background: var(--green-soft); color: var(--green); }
.blog-header__cta { flex-shrink: 0; }

.blog { padding-bottom: clamp(56px, 7vw, 96px); }
.blog-hero { padding: clamp(56px, 8vw, 104px) 0 clamp(32px, 4vw, 48px); background: linear-gradient(180deg, var(--beige), var(--bg)); }
.blog-hero .container { display: flex; flex-direction: column; gap: 18px; }
.blog-hero__title { max-width: 760px; font-size: clamp(30px, 4vw, 48px); }

/* ---------- Artículo ---------- */
.article { max-width: 780px; padding-top: clamp(40px, 6vw, 72px); display: flex; flex-direction: column; gap: 16px; }
.article__back { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; font-size: 14px; font-weight: 500; color: var(--green); }
.article__back .icon { transform: rotate(180deg); }
.article__title { font-size: clamp(30px, 4.2vw, 46px); line-height: 1.15; font-weight: 700; letter-spacing: -.02em; }
.article__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--text); }
.article__body { margin-top: 12px; font-size: 17px; line-height: 1.8; color: var(--text); }
.article__body > * + * { margin-top: 18px; }
.article__body h2 { margin-top: 40px; font-size: 25px; line-height: 1.3; font-weight: 600; }
.article__body ul, .article__body ol { padding-left: 22px; }
.article__body ul { list-style: disc; }
.article__body ol { list-style: decimal; }
.article__body li + li { margin-top: 10px; }
.article__body li::marker { color: var(--green); font-weight: 600; }
.article__lead { font-size: 20px; line-height: 1.65; color: var(--ink); }
.article__sources { margin-top: 32px; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--beige); }
.article__sources-title { margin-bottom: 10px; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--orange-deep); }
.article__sources li + li { margin-top: 8px; }
.article__sources a { font-size: 14.5px; color: var(--green); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Llamado final y pie ---------- */
.blog-cta { padding-bottom: clamp(48px, 6vw, 80px); }
.blog-cta__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(28px, 4vw, 40px);
  border-radius: var(--radius-lg);
  background: linear-gradient(120deg, var(--green) 0%, #3f5249 100%);
  box-shadow: var(--shadow-lg);
}
.blog-cta__title { font-size: clamp(20px, 2.2vw, 26px); font-weight: 600; line-height: 1.3; color: var(--white); }
.blog-cta__text { margin-top: 6px; color: rgba(255, 255, 255, .8); }
.blog-cta .btn { flex-shrink: 0; }
.blog-footer { background: var(--footer); color: rgba(255, 255, 255, .6); }
.blog-footer__inner { display: flex; justify-content: space-between; gap: 12px; padding-top: 24px; padding-bottom: 24px; font-size: 13px; }
.blog-footer a:hover { color: var(--orange); }

@media (max-width: 767px) {
  .blog-header__inner { gap: 10px; height: 64px; }
  .blog-header .navbar__logo img { height: 40px; }
  .blog-header__nav a { padding: 8px 10px; font-size: 13.5px; }
  .blog-header__nav a:first-child { display: none; }
  .blog-header__cta { display: none; }
  .article__body { font-size: 16px; }
  .article__lead { font-size: 18px; }
  .blog-cta__inner { flex-direction: column; align-items: flex-start; }
  .blog-cta .btn { width: 100%; }
  .blog-footer__inner { flex-direction: column; }
}

.article__draft { padding: 10px 14px; border-radius: 10px; background: rgba(255, 200, 116, .25); color: #7a4f0e; font-size: 14px; font-weight: 600; }

/* ---------- Filtros por categoría ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  transition: border-color .2s, background-color .2s, color .2s, transform .2s var(--ease);
}
.filter small { font-size: 12px; opacity: .6; }
.filter:hover { border-color: var(--green); color: var(--green); transform: translateY(-1px); }
.filter.is-active { border-color: var(--green); background: var(--green); color: var(--white); }
.filter.is-active small { opacity: .85; }
a.post-card__tag:hover { background: var(--green); color: var(--white); }
@media (max-width: 767px) {
  .filters { flex-wrap: nowrap; overflow-x: auto; margin: 4px -20px 0; padding: 0 20px 6px; scrollbar-width: none; }
  .filter { flex-shrink: 0; }
}
