:root{
    --background: #f8f8ff;
    --text: #f8f8ff;
}

html {
    scroll-behavior: smooth;
}

.containerconvenios {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 0px 18px 6px rgb(0 0 0 / 8%);
    margin: 20px auto;
    max-width: 60%;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.articles {
    display: flex;
    flex-wrap: nowrap;
    margin: 0 auto;
    justify-content: space-around;
    max-width: 100%;
    gap: 1.5rem;
    flex-direction: row;
    align-content: space-around;
    align-items: stretch;
}

/* Media Query para pantallas pequeñas */
@media (max-width: 768px) {
    .articles {
        flex-direction: column; /* Cambia la dirección del flex a columna en pantallas pequeñas */
        align-items: center; /* Centra los artículos en la columna */
        gap: 1rem; /* Ajusta el espacio entre los artículos */
    }
}

/* Media Query para pantallas más pequeñas */
@media (max-width: 480px) {
    .articles {
        gap: 0.5rem; /* Ajusta el espacio entre los artículos aún más */
    }
}


.articles article{
    width: 100%;
    max-width: 330px;
    cursor: pointer;
    position: relative;
    display: block;
    transition: all 0.4s ease-in-out;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: rgba(100, 100, 111, 0.2) 6px 7px 29px 0px;
    background: #80808021;
}

.articles article h2{
    margin: 0 0 0.5rem 0;
    font-size: 1.6rem;
    color: var(--text);
    transition: color 0.3s ease-out;
}

.articles article img{
    max-width: 100%;
    transform-origin: center;
    transition: transform 0.4s ease-in-out;
    height: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    object-fit: cover;
}

.articles article:hover img {
    transform: scale(1.5);
}

.article-preview {
    padding: 1.5rem;
}

.articles figure{
    width: 100%;
    height: 14rem;
    overflow: hidden;
}