h1 {
    color: gold;
    font-size: 3rem;
    justify-self: center;
}

p {
    color: gold;
    font-size: 2rem;
    margin: 2rem;
    text-align: justify;
}

/* CONTENEDOR DE TODAS LAS TARJETAS */
.tarjetas-grid {
    display: grid;
    gap: 30px;
    
    /* Usamos el 100% del ancho disponible del padre */
    width: 100%; 
    max-width: 130em; 
    
    /* Centrado horizontal  */
    margin-left: auto;
    margin-right: auto;
    
    /* Aseguramos que el contenido interno también se alinee */
    justify-content: center; 
    padding: 20px;
    box-sizing: border-box; 
}

/* que la tarjeta ocupe todo el ancho de su celda */
.tarjeta {
    display: flex;
    gap: 2rem;
    padding: 20px;

    border: 2px solid gold;
    border-radius: 12px;
    background-color: #7D0988;

    min-height: 250px;
    box-sizing: border-box;

    align-items: center;
    margin-bottom: 20px;
    max-width: 80%;
    margin: 0 auto 20px auto;
}

/* TARJETA ENTERA */

.texto {
    flex:6;
}

/* Tipo A: Imagen IZQ - Texto DCH */
.tipoA {
    flex-direction: row; 
}

/* Tipo B: Texto IZQ - Imagen DCH */
.tipoB {
    flex-direction: row-reverse; 
}

.imagen {
    flex: 4; 
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-left: 2rem;
    margin-right: 2rem;
}

.imagen img {
    max-width: 100%;
    width: 35rem;   
    height: 35rem;
    object-fit: cover; 
    height: auto;
    border-radius: 1rem;
    flex-direction: column;
    align-items: center;
}

/* tarjeta nombre y logo */
.redes {
    width: 100%;
    display: flex;              
    justify-content: center;    
    gap: 1rem;
    margin-top: auto;
}

@media (max-width: 768px) {

    h1 {
        font-size: 2.2rem;
    }

    p {
        font-size: 1.5rem;
    }

    .tarjeta {
        flex-direction: column;          /* apila verticalmente */
    }
}
