/**
 * Estilos para el blog
 */

.hero-blog {
  margin-top: 0;
}

.hero-blog .hero-inner {
  margin-top: 0;
}

/* Separación del header en listados (categorías/archivos) */
body.category main.wp-block-group,
body.archive main.wp-block-group,
body.tag main.wp-block-group {
  margin-top: 170px;
}

/* Categorías */
.categorias-blog {
  background-color: #f8f9fa;
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.categorias-blog .container {
  max-width: 880px;
}

.categoria-card-horizontal {
  background: #e9ecef;
  border-radius: 10px;
  padding: 1.5rem 2rem;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.categoria-card-horizontal:hover {
  background: #fff;
  border-color: #6c757d;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.08);
  transform: translateX(5px);
}

.categoria-title-horizontal {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111;
}

/* Últimas publicaciones */
.blog-grid-posts {
  margin-top: 3rem;
}

/* Grid de 3 columnas con cards más grandes */
.blog-grid-posts .wp-block-post-template {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 1.5rem !important; /* Reducir gap para que ocupen más espacio */
  width: 100%;
  max-width: 100% !important;
}

/* Asegurar que los elementos li ocupen todo el espacio */
.blog-grid-posts .wp-block-post-template > li {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
}

.blog-card-insight {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  height: 480px; /* Aumentar altura de 400px a 480px */
  width: 100% !important; /* Asegurar que ocupe todo el ancho disponible */
  max-width: 100% !important;
  min-width: 0; /* Prevenir overflow */
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card-blog {
  background: none;
}

.post-card-blog__content{
  background:#000;
  color:#fff;
}

.post-card-blog__content a{
  color:#fff;
}



.post-title-blog {
  margin-top: 1rem;
}

.post-excerpt-blog {
  min-height: 80px;
}

/* Latest posts widget spacing */
.latest-posts-widget {
  margin-top: 3rem;
}

/* Responsive */
@media (max-width: 991px) {
  .blog-grid-posts .wp-block-post-template {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.25rem;
  }
}

@media (max-width: 768px) {
  .blog-grid-posts .wp-block-post-template {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem;
  }
}

@media (max-width: 576px) {
  .blog-grid-posts .wp-block-post-template {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }
  .categorias-blog .container {
    padding: 0 1rem;
  }
}




.blog-card-insight:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.blog-card-insight__link {
  display: block;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.blog-card-insight__image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s ease;
}

.blog-card-insight:hover .blog-card-insight__image {
  transform: scale(1.1);
}

.blog-card-insight__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.85) 100%) !important;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.blog-card-insight__content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2.5rem; /* Aumentar padding de 2rem a 2.5rem */
  color: white !important;
  z-index: 3;
}

.blog-card-insight__content * {
  color: white !important;
}

.blog-card-insight__category {
  display: inline-block;
  font-size: 0.8125rem; /* Aumentar ligeramente */
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.375rem 0.875rem; /* Aumentar padding */
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  margin-bottom: 1rem; /* Aumentar margen */
}

.blog-card-insight__title {
  font-size: 1.75rem; /* Aumentar de 1.5rem a 1.75rem */
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 1rem 0;
  color: white;
}

.blog-card-insight__synopsis {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.3s ease;
  font-size: 1rem; /* Aumentar de 0.9375rem a 1rem */
  line-height: 1.6;
  margin-top: 0;
}

.blog-card-insight:hover .blog-card-insight__synopsis {
  max-height: 140px; /* Aumentar de 120px a 140px */
  opacity: 1;
  margin-top: 0.75rem;
}

/* Grid de 3 columnas */
.blog-grid-insights {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

@media (max-width: 991px) {
  .blog-grid-insights {
      grid-template-columns: repeat(2, 1fr);
      gap: 1.5rem;
  }
}

@media (max-width: 576px) {
  .blog-grid-insights {
      grid-template-columns: 1fr;
  }
  
  .blog-card-insight {
      height: 350px;
  }
}


/* Aumentar ancho del contenedor del blog */
body.home main.wp-block-group,
body.blog main.wp-block-group {
  max-width: 1400px !important;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

/* Asegurar que el query ocupe todo el ancho */
.blog-grid-posts {
  max-width: 100% !important;
  width: 100%;
}


/* Hero de categoría con imagen de fondo */
.category-hero {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 6rem 2rem;
  margin: 0 0 3rem 0;
  color: #fff;
  position: relative;
  overflow: hidden;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-hero__overlay {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.4) 100%);
  z-index: 1;
}

.category-hero__inner {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.category-hero__title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  margin-bottom: 1rem;
  color: #fff;
  line-height: 1.2;
}

.category-hero__description {
  font-size: clamp(1rem, 2vw, 1.25rem);
  max-width: 720px;
  margin: 0 auto;
  color: #fff;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .category-hero {
    padding: 4rem 1.5rem;
    min-height: 300px;
  }
}