/* ============================================
   ESTILOS DE LA PÁGINA BLOG.HTML
   ============================================ */

/* 1. Portada Institucional del Blog (Page Hero) */
.page-hero {
  background: linear-gradient(135deg, var(--verde-oscuro, #0f2a1e) 0%, #163828 100%);
  color: #ffffff;
  padding: 5rem 1.5rem 4rem;
  text-align: center;
}

.page-hero-content {
  max-width: 860px;
  margin: 0 auto;
}

.page-hero-eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--turquesa, #2a9d8f);
  margin-bottom: 0.8rem;
}

.page-hero h1 {
  font-size: clamp(1.9rem, 3.8vw, 2.7rem);
  color: #ffffff;
  margin-bottom: 1rem;
  line-height: 1.25;
}

.page-hero p {
  color: #e2e8f0;
  font-size: clamp(0.98rem, 1.8vw, 1.1rem);
  line-height: 1.65;
  margin: 0 auto;
}

/* 2. Contenedor general */
.blog-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* 3. Barra de Filtros / Categorías */
.blog-filter-section {
  background-color: #ffffff;
  padding: 1.5rem 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.filter-pills {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  scrollbar-width: thin;
}

.filter-pills::-webkit-scrollbar {
  height: 4px;
}

.filter-pills::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 4px;
}

.filter-pill {
  white-space: nowrap;
  padding: 0.55rem 1.2rem;
  background-color: var(--fondo-claro, #f8fafc);
  color: var(--texto-gris, #475569);
  border: 1px solid #e2e8f0;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.25s ease;
  cursor: pointer;
}

.filter-pill:hover {
  background-color: #e2e8f0;
  color: var(--verde-oscuro, #0f2a1e);
}

.filter-pill.active {
  background-color: var(--verde-oscuro, #0f2a1e);
  color: #ffffff;
  border-color: var(--verde-oscuro, #0f2a1e);
}

/* 4. Sección de Artículos */
.blog-articles-section {
  padding: 4rem 1rem 5rem;
  background-color: var(--fondo-claro, #f8fafc);
}

/* 5. Tarjeta del Artículo Destacado */
.featured-post-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background-color: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(15, 42, 30, 0.05);
  margin-bottom: 3.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(15, 42, 30, 0.1);
}

.featured-post-media {
  position: relative;
  min-height: 320px;
}

.featured-post-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-category-badge {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  background-color: var(--verde-oscuro, #0f2a1e);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.35rem 0.85rem;
  border-radius: 4px;
}

.featured-post-content {
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: #64748b;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.meta-divider {
  color: #cbd5e1;
}

.featured-post-content h2 {
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  color: var(--verde-oscuro, #0f2a1e);
  line-height: 1.3;
  margin-bottom: 0.85rem;
}

.featured-post-content h2 a {
  color: var(--verde-oscuro, #0f2a1e);
  transition: color 0.25s ease;
}

.featured-post-content h2 a:hover {
  color: var(--turquesa, #2a9d8f);
}

.featured-post-content p {
  color: var(--texto-gris, #475569);
  font-size: 0.98rem;
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

.read-more-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--acento, #d97706);
  transition: color 0.25s ease, gap 0.25s ease;
}

.read-more-link:hover {
  color: var(--acento-hover, #b45309);
  gap: 0.75rem;
}

/* 6. Grid de Artículos Regulares */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 4rem;
}

.blog-card {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 16px rgba(15, 42, 30, 0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 24px rgba(15, 42, 30, 0.08);
  border-color: var(--turquesa, #2a9d8f);
}

.blog-card-media {
  position: relative;
  height: 200px;
}

.blog-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card-content {
  padding: 1.6rem 1.4rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog-card-content h3 {
  font-size: 1.15rem;
  color: var(--verde-oscuro, #0f2a1e);
  line-height: 1.35;
  margin-bottom: 0.65rem;
}

.blog-card-content h3 a {
  color: var(--verde-oscuro, #0f2a1e);
  transition: color 0.25s ease;
}

.blog-card-content h3 a:hover {
  color: var(--turquesa, #2a9d8f);
}

.blog-card-content p {
  color: var(--texto-gris, #475569);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.read-more-inline {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--verde-medio, #1b4332);
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.read-more-inline:hover {
  color: var(--turquesa, #2a9d8f);
  padding-left: 4px;
}

/* 7. Banner de Conversión Inferior */
.blog-cta-banner {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-left: 5px solid var(--acento, #d97706);
  border-radius: 12px;
  padding: 2.2rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  box-shadow: 0 4px 16px rgba(15, 42, 30, 0.04);
}

.blog-cta-text h3 {
  font-size: 1.25rem;
  color: var(--verde-oscuro, #0f2a1e);
  margin-bottom: 0.4rem;
}

.blog-cta-text p {
  color: var(--texto-gris, #475569);
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0;
}

.blog-cta-action {
  flex-shrink: 0;
}

/* 8. Responsividad */
@media (max-width: 992px) {
  .featured-post-card {
    grid-template-columns: 1fr;
  }

  .featured-post-media {
    min-height: 240px;
  }

  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .blog-cta-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .blog-cta-action {
    width: 100%;
  }

  .blog-cta-action .btn {
    display: block;
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .featured-post-content {
    padding: 1.6rem 1.2rem;
  }
}