/* -------------------------------------------------- */
/*                   ESTILOS BASE                     */
/* -------------------------------------------------- */

.main-cards {
  display: grid;
  gap: 20px;
  padding: 20px;
  margin: 16vh auto;
}

/* Cada noticia */
.main-cards-noticias {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--gris-claro);
  border: 1px solid var(--gris);
  padding: 20px;
  border-radius: 10px;
}
.main-cards-noticias > div{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
/* Título */
.main-cards-noticias h2 {
  color: var(--azul);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 12px;
}

/* Imagen */
.icon_news {
  height: 30vh;
  border-radius: 8px;
  margin-bottom: 15px;
  object-fit: cover;
}

/* Contenedor del botón */
.btn-news {
  display: flex;
  width: 100%;
  margin-top: auto; /* Mantiene el botón abajo */
  align-items: center;
  justify-content: center;
}

/* Botón */
.contact-asesor {
  display: inline-block;
  margin-top: 20px;
  padding: 14px 28px;
  border-radius: 12px;
  background: var(--amarillo);
  color: var(--azul);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 600;
  transition: 0.3s ease;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
  
}

.contact-asesor:hover {
  background: var(--amarillo);
  color: var(--azul);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

/* -------------------------------------------------- */
/*                AJUSTES PARA MÓVILES                */
/* -------------------------------------------------- */

@media (max-width: 599px) {

  .main-cards {
    margin: 8vh auto;   /* Menos margen para evitar desbordes */
    padding: 15px;
  }

  .main-cards-noticias {
    padding: 15px;
  }

  .icon_news {
    height: 22vh;       /* Evita tarjetas demasiado altas */
  }
}

/* -------------------------------------------------- */
/*                DISEÑO RESPONSIVE                   */
/* -------------------------------------------------- */

/* Tablets */
@media (min-width: 600px) {
  .main-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .main-cards-noticias h2 {
    font-size: 1.3rem;
  }
}

/* Laptops y escritorio */
@media (min-width: 1024px) {
  .main-cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .main-cards-noticias {
    padding: 25px;
  }

  .main-cards-noticias h2 {
    font-size: 1.4rem;
  }
}
