/* ========================================== */
/* SECCIÓN BLOG DE NOTICIAS (#blog-home)      */
/* ========================================== */

#blog-home {
  width: 100%;
  background: var(--ICO-Blanco, #FFF);
  padding: 48px 0;
}

.blog-home-wrapper {
  position: relative;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(32px, 6vw, 72px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* --- Cabecera --- */
.blog-home-header {
  text-align: center;
  max-width: 800px;
}

.blog-home-title {
  color: var(--ICO-Azul, #0B4460);
  font-family: "Avenir Next LT Pro", sans-serif;
  font-size: 40px;
  font-weight: 700;
  line-height: 120%; /* 48px */
  margin: 0 0 16px 0;
}

.blog-home-subtitle {
  color: var(--ICO-texto-mate, #343737);
  font-family: "Avenir Next LT Pro", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: normal;
  margin: 0 0 40px 0;
}

/* --- Carrusel Wrapper --- */
.blog-home-carousel-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.blog-home-viewport {
  width: 100%;
  overflow: hidden;
}

.blog-home-track {
  display: flex;
  gap: 24px;
  cursor: grab;
  user-select: none;
  /* El transition se maneja dinámicamente vía JS para el infinito */
}

.blog-home-track.active {
  cursor: grabbing;
}

/* --- Botones del Slider (SVG externo) --- */
.blog-home-slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.blog-home-slider-btn:hover {
  transform: translateY(-50%) scale(1.05);
}

.blog-home-slider-btn img {
  width: 100%;
  height: 100%;
}

.blog-home-slider-btn.prev {
  left: -20px;
}

.blog-home-slider-btn.next {
  right: -20px;
}

/* --- Tarjetas (Cards) --- */
.blog-card {
  display: flex;
  width: 363px;
  height: 190px;
  padding: 8px;
  align-items: center;
  gap: 24px; /* 24px de separación hacia el contenido */
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #F7F7F7;
  flex-shrink: 0;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}

.blog-card:hover {
  border-color: var(--ICO-Celeste, #459CD6);
}

.blog-card-img {
  width: 124px;
  height: 175px;
  border-radius: 8px; /* Radio deducido de las imágenes */
  object-fit: cover;
  flex-shrink: 0;
}

.blog-card-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  overflow: hidden;
}

.blog-card-tag {
  display: flex;
  padding: 6px 8px;
  justify-content: center;
  align-items: center;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: #459CD6;
  color: var(--ICO-Blanco, #FFF);
  font-family: "Avenir Next LT Pro", sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: normal;
  margin-bottom: 16px;
  white-space: nowrap;
}

.blog-card-title {
  color: var(--ICO-Azul, #0B4460);
  font-family: "Avenir Next LT Pro", sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: normal;
  margin: 0 0 16px 0;
  /* Truncate text a máximo 3 líneas */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.blog-card-link {
  color: var(--ICO-Celeste, #459CD6);
  font-family: "Avenir Next LT Pro", sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 150%; /* 24px */
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* --- Dots Inferiores --- */
.blog-home-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.blog-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--ICO-Celeste, #459CD6);
  background-color: transparent;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.blog-dot.active {
  background-color: var(--ICO-Celeste, #459CD6);
}

/* --- Botón Ver Todo --- */
.blog-home-btn-all {
  display: inline-flex;
  padding: 16px 40px;
  justify-content: center;
  align-items: center;
  gap: 16px;
  border-radius: 43px;
  background: var(--ICO-Azul, #0B4460);
  color: var(--ICO-Blanco, #FFF);
  font-family: "Avenir Next LT Pro", sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: normal;
  text-decoration: none;
  margin-top: 32px;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.blog-home-btn-all:hover {
  transform: scale(1.03);
  background: var(--ICO-Celeste, #459CD6);
}

.blog-home-track {
  display: flex;
  gap: 24px;
}

/* ========================================== */
/* RESPONSIVE (Mobile y Tablets)              */
/* ========================================== */

@media (max-width: 1024px) {
  .blog-home-wrapper {
    padding: 0 24px;
  }
  
  .blog-home-slider-btn {
    display: none; /* Se ocultan botones en mobile/tablet para priorizar arrastre/dots */
  }
}

@media (max-width: 768px) {
  .blog-home-title {
    font-size: 32px;
  }

  .blog-home-subtitle {
    margin-bottom: 32px;
  }

  .blog-card {
    width: min(100%, 363px); /* Se adapta para que no rompa el viewport */
    gap: 16px;
    padding: 12px;
  }

  .blog-card-img {
    width: 124px;
    height: 100%;
    min-height: 130px;
  }

  .blog-card-tag {
    font-size: 12px;
    padding: 4px 6px;
    margin-bottom: 12px;
  }

  .blog-card-title {
    font-size: 14px;
    margin-bottom: 12px;
    -webkit-line-clamp: 4; /* Permite una línea más en mobile para aprovechar espacio */
  }

  .blog-home-btn-all {
    width: 100%;
    padding: 16px 20px;
  }
}