.section-3 {
  position: relative;
  overflow: hidden;
  background-color: rgba(233, 248, 255, 1);
  background-image: url("../../../assets/img/background-3.png");
  background-size: cover;
  background-position: center;
}

.title-section-3 {
  color: rgba(1, 36, 75, 1);
  font-size: 36px;
  margin-bottom: 2rem;
  text-align: center;
}
.text-section-3 {
  font-size: 20px;
  color: rgba(1, 36, 75, 1);
}

.cards-container-section-3 {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  margin: 0 auto;
  padding: 0;
}

.card-section-3 {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-section-3 img {
  width: 40%;
  object-fit: cover;
  border-radius: 4px;
}

.image-overlay-wrapper {
  position: relative;
  display: inline-block;
  width: 160px;
}

.image-overlay-wrapper img {
  display: block;
  width: 160px;
  border-radius: 8px;
}

.image-overlay-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(113, 0, 240, 0.1);
  mix-blend-mode: multiply;
  border-radius: 8px;
  pointer-events: none;
}

.cta-button-section-3 {
  display: block;
  margin: 2rem auto 0 auto;
  background: rgba(255, 202, 0, 1);
  border: none;
  color: rgba(113, 0, 240, 1);
  font-size: 17px;
  padding: 0.1rem 5rem;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.cta-button-section-3:hover {
  background: #ffc107;
}

/* Tablet: fuente más pequeña */
@media (max-width: 1024px) {
  .title-section-3 {
    font-size: 25px;
  }
  .card-section-3 p {
    font-size: 15px;
  }
  .cta-button-section-3 {
    font-size: 15px;
  }
}

/* Móvil: 1 columna + más compacto */
@media (max-width: 576px) {
  .card-section-3 {
    flex-direction: row; /* ✅ Mantiene imagen y texto en línea */
    align-items: center;
    flex-wrap: nowrap;
  }

  .image-overlay-wrapper {
    width: 120px; /* Puedes ajustar el tamaño en móvil si quieres */
  }

  .image-overlay-wrapper img {
    width: 120px;
  }

  .card-section-3 p {
    font-size: 15px;
  }

  .title-section-3 {
    font-size: 1.3rem;
  }

  .cta-button-section-3 {
    font-size: 14px;
  }
}

/* Extra grandes: fuerza 3 columnas */
@media (min-width: 1200px) {
  .cards-container-section-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1025px) and (max-width: 1199px) {
  .cards-container-section-3 {
    grid-template-columns: repeat(2, 1fr); /* Fuerza 2 columnas fijas */
    max-width: 900px; /* Evita que se estiren demasiado */
  }
}
