/* ============================================================
   ESTILOS ESPECÍFICOS DE LA PÁGINA DE BLOG
   ============================================================ */

/* Hero del Blog */
.blog-hero {
  padding-top: clamp(6.5rem, 12vw, 9rem);
  padding-bottom: clamp(2.5rem, 6vw, 4.5rem);
  background: radial-gradient(circle at 85% 20%, rgba(138, 43, 66, 0.08) 0%, transparent 60%),
              linear-gradient(180deg, var(--paper) 0%, var(--white) 100%);
  border-bottom: 1px solid var(--line);
}

.blog-hero__content {
  max-width: 780px;
}

.blog-hero__title {
  margin-top: 0.5rem;
  margin-bottom: 1.25rem;
}

.blog-hero__lead {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: var(--muted);
  line-height: 1.65;
}

/* Barra de Filtros y Búsqueda */
.blog-bar {
  position: sticky;
  top: 76px;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 0.85rem 0;
  transition: box-shadow var(--t-fast);
}

.blog-bar.is-scrolled {
  box-shadow: 0 8px 24px rgba(16, 12, 14, 0.05);
}

.blog-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.blog-filters {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.blog-filters::-webkit-scrollbar {
  display: none;
}

.blog-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--t-fast);
  font-family: inherit;
}

.blog-filter-btn:hover {
  border-color: var(--bordeaux);
  color: var(--bordeaux);
  background: var(--white);
}

.blog-filter-btn.is-active {
  background: var(--bordeaux);
  color: var(--white);
  border-color: var(--bordeaux);
  box-shadow: 0 4px 12px rgba(138, 43, 66, 0.22);
}

.blog-search-box {
  position: relative;
  min-width: 240px;
  flex-grow: 0;
}

.blog-search-box input {
  width: 100%;
  padding: 0.5rem 1rem 0.5rem 2.2rem;
  font-size: var(--fs-sm);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  color: var(--ink);
  outline: none;
  font-family: inherit;
  transition: border-color var(--t-fast), background var(--t-fast);
}

.blog-search-box input:focus {
  background: var(--white);
  border-color: var(--bordeaux);
}

.blog-search-box svg {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--muted);
  pointer-events: none;
}

/* Artículo Destacado */
.blog-featured {
  padding-top: clamp(2.5rem, 5vw, 4rem);
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.bfeatured-card {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.bfeatured-card:hover {
  border-color: rgba(138, 43, 66, 0.35);
  box-shadow: 0 16px 36px rgba(16, 12, 14, 0.06);
}

.bfeatured-card__media {
  position: relative;
  height: 100%;
  min-height: 360px;
  overflow: hidden;
}

.bfeatured-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}

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

.bfeatured-card__badge {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  background: var(--noir);
  color: var(--gold);
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.35rem 0.8rem;
  border-radius: var(--r-full);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.bfeatured-card__body {
  padding: clamp(1.5rem, 3.5vw, 3rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.bfeatured-card__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: var(--fs-xs);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.75rem;
}

.bfeatured-card__meta span.cat {
  color: var(--bordeaux);
  font-weight: 500;
}

.bfeatured-card__title {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  line-height: 1.18;
  margin-bottom: 1rem;
}

.bfeatured-card__excerpt {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1.75rem;
}

/* Listado de Artículos (Grid) */
.blog-feed {
  padding-top: clamp(2.5rem, 5vw, 4rem);
  padding-bottom: clamp(4rem, 8vw, 6rem);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.blog-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}

.blog-card:hover {
  transform: translateY(-4px);
  border-color: rgba(138, 43, 66, 0.35);
  box-shadow: 0 14px 30px rgba(16, 12, 14, 0.06);
}

.blog-card__media {
  position: relative;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: var(--paper);
}

.blog-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease);
}

.blog-card:hover .blog-card__media img {
  transform: scale(1.05);
}

.blog-card__body {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.65rem;
}

.blog-card__cat {
  color: var(--bordeaux);
  font-weight: 500;
}

.blog-card__time {
  color: var(--muted);
}

.blog-card__title {
  font-size: clamp(1.2rem, 1.8vw, 1.35rem);
  line-height: 1.28;
  margin-bottom: 0.75rem;
  color: var(--ink);
  transition: color var(--t-fast);
}

.blog-card:hover .blog-card__title {
  color: var(--bordeaux);
}

.blog-card__excerpt {
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.blog-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: var(--fs-xs);
}

.blog-card__date {
  color: var(--muted);
}

.blog-card__link {
  color: var(--ink);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color var(--t-fast);
}

.blog-card:hover .blog-card__link {
  color: var(--bordeaux);
}

/* Estado de Sin Resultados */
.blog-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 1.5rem;
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: var(--r-md);
}

.blog-empty h3 {
  font-size: var(--fs-h3);
  margin-bottom: 0.5rem;
}

.blog-empty p {
  color: var(--muted);
}

/* Modal o Lector de Artículo */
.article-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.article-modal[hidden] {
  display: none;
}

.article-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 12, 14, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.article-modal__dialog {
  position: relative;
  background: var(--white);
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  border-radius: var(--r-lg);
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
  padding: clamp(1.75rem, 4vw, 3.25rem);
  z-index: 2;
}

.article-modal__close {
  position: sticky;
  top: 0;
  float: right;
  z-index: 10;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--t-fast);
}

.article-modal__close:hover {
  background: var(--paper);
  color: var(--bordeaux);
}

.article-content {
  margin-top: 1rem;
}

.article-content header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.article-content .eyebrow {
  margin-bottom: 0.5rem;
}

.article-content h1 {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.article-content .meta {
  color: var(--muted);
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.article-content .body p {
  font-size: 1.08rem;
  line-height: 1.8;
  color: #3d3539;
  margin-bottom: 1.5rem;
}

.article-content .body h2 {
  font-size: 1.6rem;
  margin: 2.2rem 0 1rem;
}

.article-content .body ul,
.article-content .body ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
  line-height: 1.75;
}

.article-content .body li {
  margin-bottom: 0.5rem;
}

.article-content .body blockquote {
  border-left: 3px solid var(--gold);
  background: var(--paper);
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
  font-style: italic;
  font-size: 1.12rem;
  color: var(--ink);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

/* Responsive */
@media (max-width: 980px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bfeatured-card {
    grid-template-columns: 1fr;
  }
  .bfeatured-card__media {
    min-height: 280px;
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 640px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .blog-bar {
    top: 68px;
  }
  .blog-bar__inner {
    flex-direction: column;
    align-items: stretch;
  }
  .blog-search-box {
    width: 100%;
  }
}
