/* ═══════════════════════════════════════════════
   MAGA KITCHEN — blog.css
═══════════════════════════════════════════════ */

/* ── Nav active ── */
.nav-active { position: relative; }
.nav-active::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 1.5px;
  background: var(--red);
}

/* ══ HERO ══ */
.blog-hero {
  position: relative;
  height: 360px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.blog-hero-bg {
  position: absolute;
  inset: 0;
}

.blog-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}

.blog-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0,0,0,.80) 0%,
    rgba(0,0,0,.40) 55%,
    rgba(0,0,0,.10) 100%
  );
}

.blog-hero-content {
  position: relative;
  z-index: 2;
  padding: 0 40px 48px;
  max-width: 560px;
}

.blog-hero-h1 {
  font-family: 'Playfair Display', serif;
  font-size: 48px;
  line-height: 1.08;
  color: var(--white);
  margin-bottom: 12px;
}

.blog-hero-h1 em { color: var(--red); font-style: italic; }

.blog-hero-sub {
  font-size: 15px;
  color: rgba(255,255,255,.62);
  line-height: 1.7;
  max-width: 460px;
}

/* ══ LAYOUT: main + sidebar ══ */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 0;
  background: var(--cream);
  align-items: start;
}

/* ── MAIN ── */
.blog-main {
  padding: 56px 48px 72px 40px;
  border-right: 1px solid var(--border);
}

/* Filtros */
.blog-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

/* Hereda .filter-btn de style.css */

/* Grid artículos */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

/* Artículo destacado: ocupa columna completa */
.article-featured {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.article-featured .article-img {
  height: 100%;
  min-height: 280px;
}

/* Card base */
.article-card {
  background: var(--white);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, transform .2s;
}

.article-card:hover {
  box-shadow: 0 6px 28px rgba(0,0,0,.08);
  transform: translateY(-2px);
}

.article-img-link { display: block; overflow: hidden; }

.article-img {
  height: 200px;
  overflow: hidden;
}

.article-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .45s ease;
}

.article-card:hover .article-img img { transform: scale(1.04); }

.article-body {
  padding: 24px 22px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Artículo destacado: body alineado verticalmente */
.article-featured .article-body {
  padding: 32px 32px 28px;
  justify-content: center;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.article-cat {
  font-size: 10px;
  font-family: 'DM Sans', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--red);
  border: 1px solid rgba(128,0,32,.25);
  padding: 3px 10px;
}

.article-date {
  font-size: 11px;
  font-family: 'DM Sans', sans-serif;
  color: var(--muted);
}

.article-title {
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  line-height: 1.3;
  margin-bottom: 10px;
}

.article-featured .article-title { font-size: 22px; }

.article-title a {
  color: var(--black);
  transition: color .2s;
}

.article-title a:hover { color: var(--red); }

.article-excerpt {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.68;
  flex: 1;
  margin-bottom: 16px;
}

.article-read-more {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--red);
  transition: gap .2s;
  margin-top: auto;
}

.article-card:hover .article-read-more { gap: 8px; }

.no-results {
  font-size: 14px;
  color: var(--muted);
  padding: 32px 0;
  text-align: center;
  grid-column: span 2;
}

/* ── SIDEBAR ── */
.blog-sidebar {
  padding: 56px 28px 72px 32px;
  background: var(--white);
  display: flex;
  flex-direction: column;
  gap: 32px;
  position: sticky;
  top: 64px;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
}

.sidebar-widget { }

.sidebar-title {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  color: var(--black);
  font-weight: 500;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* Búsqueda */
.sidebar-search {
  display: flex;
  border: 1px solid var(--border);
  overflow: hidden;
}

.sidebar-search input {
  flex: 1;
  padding: 10px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  border: none;
  outline: none;
  color: var(--black);
  background: var(--white);
}

.sidebar-search button {
  background: var(--red);
  border: none;
  padding: 10px 14px;
  cursor: pointer;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .2s;
}

.sidebar-search button:hover { opacity: .85; }

/* Categorías */
.sidebar-cats {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-cats li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  font-size: 13px;
  color: #444;
  transition: all .2s;
  border-radius: 1px;
}

.sidebar-cats li a:hover,
.sidebar-cats li a.cat-active {
  background: rgba(128,0,32,.06);
  color: var(--red);
  padding-left: 14px;
}

.sidebar-cats li a span {
  font-size: 11px;
  color: var(--muted);
  background: var(--light);
  padding: 2px 8px;
  border-radius: 20px;
}

/* Entradas recientes */
.recent-posts {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.recent-posts li a {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transition: opacity .2s;
}

.recent-posts li a:hover { opacity: .75; }

.recent-img {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  overflow: hidden;
}

.recent-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.recent-posts li p {
  font-size: 12px;
  color: var(--black);
  line-height: 1.5;
  margin-bottom: 3px;
  font-weight: 500;
}

.recent-posts li span {
  font-size: 11px;
  color: var(--muted);
}

/* CTA sidebar */
.sidebar-cta {
  background: var(--black);
  padding: 24px 20px;
}

.sidebar-cta h3 {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  color: var(--white);
  margin-bottom: 8px;
  font-weight: 400;
}

.sidebar-cta p {
  font-size: 12px;
  color: rgba(255,255,255,.55);
  line-height: 1.6;
  margin-bottom: 16px;
}

/* Contacto sidebar */
.sidebar-contact .sidebar-title { color: var(--black); }

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.contact-list li svg { color: var(--red); flex-shrink: 0; margin-top: 1px; }

.contact-list li a {
  color: var(--muted);
  transition: color .2s;
}

.contact-list li a:hover { color: var(--red); }

/* ══════════════════════════════════════════════
   RESPONSIVE — TABLET ≤900px
══════════════════════════════════════════════ */
@media (max-width: 900px) {
  .blog-hero { height: 300px; }
  .blog-hero-h1 { font-size: 36px; }
  .blog-hero-content { padding: 0 24px 40px; }

  .blog-layout { grid-template-columns: 1fr; }

  .blog-main {
    padding: 40px 24px 48px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .blog-sidebar {
    position: static;
    max-height: none;
    padding: 40px 24px 48px;
  }

  .article-featured {
    grid-template-columns: 1fr;
  }

  .article-featured .article-img { min-height: 220px; }
  .article-featured .article-body { padding: 22px; }
  .article-featured .article-title { font-size: 18px; }
}

/* ══════════════════════════════════════════════
   RESPONSIVE — MOBILE ≤600px
══════════════════════════════════════════════ */
@media (max-width: 600px) {
  .blog-hero { height: 260px; }
  .blog-hero-h1 { font-size: 30px; }
  .blog-hero-content { padding: 0 20px 32px; }

  .blog-main { padding: 32px 20px 40px; }
  .blog-sidebar { padding: 32px 20px 40px; }

  .articles-grid { grid-template-columns: 1fr; }
  .article-featured { grid-column: span 1; }

  .nav { z-index: 401; }
}
