.invest{
    width: 100%;
    height: auto;
    background-color:var(--main-color);
}

.investTitle{
    width: 100%;
    height: auto;
    color: white;
    font-family: 'Strong';
    font-size: 3rem;
    text-align: center;
    padding-top: 4rem;
    padding-bottom: 2rem;
}   
.investContent{
    width: 100%;
    height: auto;
    font-family: 'Med';
    font-size: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.investBtn{
    width: 100%;
    height: auto;
    font-family: 'Strong';
    font-size: 1.5rem;
    text-align: center;
    }
.investBtn img{
    width: 30%;
    height: auto;
    margin-top: 4rem;
    margin-bottom: 4rem;
}


/* La cuadrícula mágica */
.cards-grid {
    display: grid;
    /* Crea 3 columnas iguales por defecto */
    grid-template-columns: repeat(3, 1fr); 
    /* Espaciado horizontal y vertical entre los recuadros */
    gap: 2rem; 
    width: 80%;
}

/* Contenedor de cada imagen */
.card-item {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Control total de las imágenes exportadas */
.card-item > img {
    width: 100%;
    height: auto; /* Mantiene la proporción perfecta sin deformar */
    object-fit: contain;
    border-radius: 24px; /* Opcional: replica las esquinas redondeadas si no venían en el corte */
}

/* --- RESPONSIVE DESIGN (Media Queries) --- */

/* Laptops pequeñas / tablets grandes */
@media (max-width: 1024px) {
    .investTitle{
        font-size: 2.5rem;
        padding-top: 3.5rem;
    }

    .investContent{
        font-size: 1.25rem;
    }

    .investBtn img{
        width: 40%;
        margin-top: 3rem;
        margin-bottom: 3rem;
    }
}

/* Pantallas medianas (Tablets) */
@media (max-width: 992px) {
    .cards-grid {
        /* Pasa de 3 columnas a 2 columnas */
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .investTitle{
        font-size: 2rem;
        padding-top: 3rem;
        padding-bottom: 1.5rem;
    }

    .investContent{
        font-size: 1.1rem;
    }

    .investBtn img{
        width: 55%;
        margin-top: 2.5rem;
        margin-bottom: 2.5rem;
    }

    .cards-grid{
        width: 90%;
    }
}

/* Pantallas pequeñas (Celulares) */
@media (max-width: 576px) {
    .cards-grid {
        /* Todo se acomoda en 1 sola columna vertical */
        grid-template-columns: 1fr;
        gap: 1.2rem;
        width: 88%;
    }
    .cards-section {
        padding: 2rem 1rem; /* Menos espacio muerto a los lados en móvil */
    }
    .section-title {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }

    .investTitle{
        font-size: 1.6rem;
        padding-top: 2.5rem;
        padding-bottom: 1.25rem;
    }

    .investContent{
        font-size: 1rem;
    }

    .investBtn img{
        width: 70%;
        margin-top: 2rem;
        margin-bottom: 2rem;
    }
}

/* Celulares muy pequeños */
@media (max-width: 360px) {
    .investTitle{
        font-size: 1.35rem;
    }

    .investBtn img{
        width: 85%;
    }
}