/* ===== Blog ===== */
.blog-wrap {
  background: #fff;
}

/* El listado lleva su propia cabecera full-width (sin margen superior) */
.blog-listing {
  margin-top: 0;
  padding: 0 0 90px;
}

/* ===== Cabecera del blog con imagen de fondo ===== */
.blog-hero {
  position: relative;
  margin-top: var(--header-height, 90px);
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #4a4f54 url('/img/blog/blog-header.jpg') center center / cover no-repeat;
}
.blog-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(40, 44, 48, 0.6);
}
.blog-hero-content {
  position: relative;
  z-index: 2;
  padding: 60px 20px;
}
.blog-hero h1 {
  color: #fff;
  font-size: 60px;
  font-weight: 700;
  line-height: 1.1;
  margin: 0;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}
.blog-hero-sep {
  display: block;
  width: 60px;
  height: 3px;
  background: #fff;
  margin: 22px auto 18px;
}
.blog-hero p {
  color: #fff;
  font-size: 19px;
  font-weight: 300;
  margin: 0;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .35);
}

.blog-listing .container { max-width: 1140px; }

/* ===== Barra de filtros por categoría ===== */
.blog-filterbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin: 50px 0 30px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e7e7e7;
}
.blog-active-cat {
  font-size: 22px;
  font-weight: 700;
  color: rgb(52, 73, 94);
}
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.blog-filter {
  background: transparent;
  border: 1px solid transparent;
  color: #666;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  padding: 8px 16px;
  border-radius: 3px;
  cursor: pointer;
  transition: color .2s, background .2s, border-color .2s;
}
.blog-filter:hover { color: #0C4DA2; }
.blog-filter.active {
  color: #fff;
  background: #0C4DA2;
  border-color: #0C4DA2;
}

/* ===== Rejilla de tarjetas overlay ===== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.blog-card {
  position: relative;
  display: block;
  min-height: 320px;
  border-radius: 8px;
  overflow: hidden;
  background-color: #2b3138;
  background-size: cover;
  background-position: center;
  text-decoration: none;
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
}
.blog-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.82) 0%, rgba(0,0,0,.35) 45%, rgba(0,0,0,.12) 100%);
  transition: background .3s ease;
}
.blog-card:hover .blog-card-overlay {
  background: linear-gradient(to top, rgba(0,0,0,.9) 0%, rgba(0,0,0,.6) 50%, rgba(0,0,0,.4) 100%);
}
.blog-card-content {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding: 24px 22px 26px;
}
.blog-card-date {
  display: block;
  font-size: 12px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .85);
  margin-bottom: 8px;
}
.blog-card h2 {
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
  margin: 0 0 10px;
}
.blog-card p {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, .9);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== Cargar más ===== */
.blog-loadmore-wrap { text-align: center; margin-top: 46px; }
.blog-loadmore {
  background: transparent;
  border: 2px solid #0C4DA2;
  color: #0C4DA2;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 14px 40px;
  border-radius: 3px;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.blog-loadmore:hover { background: #0C4DA2; color: #fff; }

.blog-empty-filter { text-align: center; padding: 40px 0; color: #666; }

/* ===== Estado vacío ===== */
.blog-empty { text-align: center; padding: 80px 0 60px; }
.blog-empty .icon-soon { font-size: 56px; color: #0C4DA2; margin-bottom: 18px; }
.blog-empty h2 { font-size: 24px; color: rgb(52, 73, 94); margin-bottom: 12px; }
.blog-empty p { font-size: 16px; color: #555; max-width: 560px; margin: 0 auto; line-height: 1.65; }

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .blog-hero { min-height: 240px; }
  .blog-hero h1 { font-size: 40px; }
  .blog-hero p { font-size: 16px; }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-filterbar { flex-direction: column; align-items: flex-start; }
  .blog-filters { gap: 4px; }
  .blog-filter { padding: 7px 12px; font-size: 13px; }
}

/* ============================================================
   Artículo individual (post)
   ============================================================ */
.blog-article-wrap { margin-top: var(--header-height, 90px); padding: 70px 0 90px; }
.blog-breadcrumb { font-size: 13px; color: #888; margin-bottom: 28px; }
.blog-breadcrumb a { color: #0C4DA2; text-decoration: none; }
.blog-breadcrumb a:hover { text-decoration: underline; }

.blog-article { max-width: 760px; margin: 0 auto; }
.blog-article h1 {
  font-size: 32px;
  color: rgb(52, 73, 94);
  line-height: 1.25;
  margin-bottom: 14px;
  font-weight: 700;
}
.blog-meta { font-size: 14px; color: #999; margin-bottom: 30px; }
.blog-cover { width: 100%; border-radius: 10px; margin-bottom: 34px; }
.blog-content { font-size: 17px; color: #333; line-height: 1.75; }
.blog-content h2 { font-size: 24px; color: rgb(52, 73, 94); margin: 38px 0 14px; font-weight: 700; }
.blog-content h3 { font-size: 20px; color: rgb(52, 73, 94); margin: 28px 0 12px; font-weight: 600; }
.blog-content p { margin-bottom: 20px; }
.blog-content ul, .blog-content ol { margin: 0 0 20px 22px; }
.blog-content li { margin-bottom: 8px; }
.blog-content a { color: #0C4DA2; }
.blog-content img { max-width: 100%; border-radius: 8px; }
.blog-content blockquote {
  border-left: 4px solid #0C4DA2;
  padding: 4px 20px;
  margin: 24px 0;
  color: #555;
  font-style: italic;
}
.blog-back { display: inline-block; margin-top: 40px; font-size: 15px; color: #0C4DA2; font-weight: 600; text-decoration: none; }
.blog-back:hover { text-decoration: underline; }
