.hero{
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--background2);
}

.hero-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.titles_background picture {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.titles_background {
    position: relative;
    overflow: hidden;
    margin: 2rem 1rem;
    padding: 2rem;
    border-radius: 16px;
    max-width: 1300px;
    min-height: 650px;
    width: 100%;

    display: flex;
    flex-direction: column;
    justify-content: center; 
    align-items: flex-start;
    padding-top: 5rem;
}

.titles_background::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(255, 255, 255, 0.7) 40%,
        rgba(255, 255, 255, 0) 100%
    );
    z-index: 1;
}

/* El contenido debe ir encima del gradiente */
.titles_background > *:not(.hero-bg-img):not(picture) {
    position: relative;
    z-index: 2;
}

.titles {
    display: flex;
    flex-direction: column;
}

.titles_background p{
    margin-top: 1rem;
    margin-bottom: 3rem;
    font-size: var(--fs-title1);
    color: var(--bodyText);
    max-width: 550px;
    font-family: var(--font-main);
}

@media (max-width: 768px) {
    .titles_background{
        align-items: center;
        text-align: center;
    }
}