/* --------- header__container -------------- */


.header__evento{
    container-type: inline-size;
    container-name: header;
    position: relative;
    z-index: 2;
}

.header__background-photos{
    max-width: 1300px;
    width: 100%;
    margin-bottom: 0px;
    height: 60vh;
}

.header__background-photos img{
    width: 100%;
    height: 100%;
    max-height: 1200px;
    object-fit: cover;
}

@container header (min-width:500px){
    .header__background-photos{
        max-width: 1300px;
        width: 100%;
        margin-bottom: 0px;
        height: 80vh;
    }
    
    .header__background-photos img{
        width: 100%;
        height: 100%;
        max-height: 1200px;
        object-fit: cover;
    }
}

/* ---------- inicio evento__news -----------------*/

.evento{
    display: flex;
    flex-direction: column;
    max-width: 1300px;
    margin: 0 auto;
    position: relative;
    container-type: inline-size;
    container-name: evento;
    background-color: #fff;
    overflow: hidden;
}

.evento__news{
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    width: 100%;
    padding: 0px 10px 30px 10px;
    gap: 20px;
    position: relative;
    z-index: 1;
    max-width: 1300px;
    color: #07134e;
}

.news__title{
    background-color: #5881be;
    width: 110%;
    color: #fff;
    padding: 10px;
    text-wrap: balance;
    z-index: 20;
    animation: aparicionArriba 1s 1 both;
    text-align: center;
    font-size: 1.6rem;
}

@keyframes aparicionArriba{
    from{
        transform: translateY(-100%);
        opacity: 0;
    }

    to{
        transform: translateY(0%);
        opacity: 1;
    }
}

.news__subtitle{
    text-wrap: balance;
    text-align: center;
    font-size: 1.3rem;
    animation: aparicionDerecha 1s 1 both;
}

@keyframes aparicionDerecha{
    from{
        transform: translateX(100%);
        opacity: 0;
    }

    to{
        transform: translateX(0%);
        opacity: 1;
    }
}

.news__grid{
    display: grid;
    grid-template-columns: repeat(1, minmax(200px, 1fr));
    gap: 10px;
    width: 100%;
    justify-content: space-evenly;
    justify-items: center;
    align-items: center;
}

.news__grid-item{
    display: flex;
    flex-direction: column;
    width: 100%;
    justify-content: space-evenly;
    align-items: center;
    max-width: 500px;
    position: relative;
}

.background-img1{
    position: absolute;
    width: 128px;
    height: 128px;
    bottom: -110px;
    left: 0px;
    transform: rotate(90deg);
    z-index: -1;
}

.background-img1 img{
    width: 100%;
    transition: transform 1.5s ease, opacity 1.5s ease;
    opacity: 0;
    transform: translateX(100%);
}

.background-img1 img.visible{
    transform: translateX(0);
    opacity: 1;
}

.grid-item-img{
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.grid-item-img img{
    transform: translateX(-100%);
    opacity: 0;
    transition: transform 1.5s ease, opacity 1.5s ease;
}

.news__grid-item img.visible{
    transform: translateX(0);
    opacity: 1;
}

.grid-item-img img{
    max-width: 250px;
    max-height: 250px;
}

.grid-item-text{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.grid-item-text h3{
    text-align: center;
    text-wrap: balance;
    font-size: 1.3rem;
}

.grid-item-text p{
    margin: 0;
    max-width: 350px;
    padding: 0 5px;
    text-align: justify;
    text-wrap: pretty;
    hyphens: auto;
    color: #333;
}

.grid-item-text a{
    color: #07133f;
    text-decoration: none;
    padding: 5px;
    margin-top: 10px;
    border-top: solid 1px #07139f;
    border-bottom: solid 1px #07139f;
    font-weight: bold;
    font-size: 1.1rem;
    transition: color .3s ease;
}

.grid-item-text a:hover{
    color: #07139f;
}


/* ------------- queries evento__news -------------*/

@container evento (min-width:450px){
    .background-img1{
        position: absolute;
        width: 128px;
        height: 128px;
        bottom: -110px;
        left: 30px;
    }
}

@container evento (min-width:700px){
    .news__title{
        font-size: 1.9rem;
    }

    p{
        font-size: 1.1rem;
    }

    .news__grid-item{
        flex-direction: row;
        gap: 50px;
        max-width: 700px;
    }

    .grid-item-img{
        flex: 1;
    }

    .grid-item-text{
        gap: 20px;
        flex: 1;
    }

    .news__grid-item img{
        max-width: 300px;
        max-height: 300px;
    }

    .background-img1{
        position: absolute;
        width: 128px;
        height: 128px;
        bottom: -110px;
        left: auto;
        right: -60px;
    }
}

/* ---------- Fin evento__news ------------------- */


/* -------- evento__extras ------------- */

.evento__extras{
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    width: 100%;
    padding: 0 0 30px 0;
    gap: 20px;
    position: relative;
    z-index: 0;
    max-width: 1300px;
    background-color: #5881be;
    color: #333;
    opacity: 0;
    transform: translateX(100%);
    transition: transform 2s ease, opacity 2s ease;
}

.evento__extras.visible{
    transform: translateX(0);
    opacity: 1;
}

.extras__title{
    text-wrap: balance;
    text-align: center;
    font-size: 1.6rem;
    color: #fff;
    background-color: #ff904d;
    width: 100%;
    padding: 10px;
}

.extras__news{
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    width: 100%;
    max-width: 700px;
    gap: 40px;
    padding: 20px 15px 30px 15px;
    overflow: hidden;
}

.extras__news-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    max-width: 500px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px #0002;
    position: relative;
    background-color: #fff;
}

.news-item-img{
    flex: 1;
}

.news-item-img img{
    border-radius: 16px;
    box-shadow: 0 0 10px #0009;
    width: 100%;
    max-width: 128px;
    aspect-ratio: 1/1;
    object-fit: cover;
}

.news-item-text{
    flex: 4;
}

.extras__news-item h3 {
    font-size: 1.3rem; 
    color: #07134e;
    margin-bottom: 10px;
    text-align: center;
    text-wrap: pretty;
}

.extras__news-item p {
    font-size: 1rem;
    color: #333;
    margin-bottom: 10px;
    text-align: center; 
    hyphens: auto;
    max-height: 2.5em;
    transition: all 0.3s ease;
    overflow: hidden;
}

.news-item-text p.expanded {
    max-height: 100vh;
}

.extras__news-item i.expand-button {
    position: absolute;
    font-size: 2rem;
    bottom: -20px;
    background-color: #6632c4;
    color: #fff;
    border-radius: 24px;
    box-shadow: 0 0 5px #0006;
    transition: transform 0.3s ease;
    cursor: pointer;
    transform: rotate(90deg);
}

.extras__news-item i.expand-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: rotate(none);
}

.extras__news-item i.expand-button:hover {
    transform: scale(1.1);
    cursor: pointer;
}


/* ---------- evento__extras queries -------- */
@container evento (min-width:500px){
    
    .extras__news{
        padding: 20px 25px 30px 15px;
    }

    .extras__news-item {
        flex-direction: row;
    }

    .extras__news-item p{
        text-align: left;
        padding-right: 5px;
    }

    .extras__news-item i.expand-button {
        position: absolute;
        font-size: 2rem;
        bottom: auto;
        right: -20px;
        background-color: #6632c4;
        color: #fff;
        border-radius: 24px;
        box-shadow: 0 0 5px #0006;
        transition: transform 0.3s ease;
        cursor: pointer;
        transform: rotate(0deg);
    }
}
/* --------- fin evento__extras ---------- */

/* ------- inicio evento__past ------------- */

.evento__past{
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    width: 100%;
    padding: 0px 10px 30px 10px;
    gap: 20px;
    position: relative;
    z-index: 1;
    max-width: 1300px;
    background-color: #fff;
    color: #07133f;
    box-shadow: 0 0 20px #0005;
}

.past__title{
    text-wrap: balance;
    text-align: center;
    font-size: 1.3rem;
    color: #fff;
    background-color: #5881be;
    width: 110%;
    padding: 10px;
}

.past__grid{
    display: grid;
    grid-template-columns: repeat(1, minmax(200px, 1fr));
    gap: 10px;
    width: 100%;
    justify-content: space-evenly;
    justify-items: center;
    align-items: center;
}

.past__grid-item{
    display: flex;
    flex-direction: column;
    width: 100%;
    justify-content: space-evenly;
    align-items: center;
    max-width: 500px;
    position: relative;
    gap: 20px;
}

.background-img2{
    position: absolute;
    width: 128px;
    height: 128px;
    bottom: -45px;
    right: -40px;
    transform: rotate(-90deg);
    z-index: -1;
}

.background-img2 img{
    width: 100%;
    transition: transform 1.5s ease, opacity 1.5s ease;
    opacity: 0;
    transform: translateY(100%);
}

.background-img2 img.visible{
    opacity: 1;
    transform: translateY(0);
}

.grid-item-img2 img{
    max-width: 250px;
    max-height: 250px;
    transition: transform 1.5s ease, opacity 1.5s ease;
    transform: translateX(100%);
    opacity: 0;
}

.grid-item-img2 img.visible{
    transform: translateX(0);
    opacity: 1;
}


.grid-item-text2{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.grid-item-text2 h3{
    text-align: center;
    text-wrap: balance;
    font-size: 1.3rem;
}

.grid-item-text2 p{
    margin: 0;
    max-width: 350px;
    padding: 0 5px;
    text-align: center;
    text-wrap: pretty;
    hyphens: auto;
    color: #333;
}

.grid-item-text2 a{
    color: #07139f;
    text-decoration: none;
    padding: 5px;
    margin-top: 10px;
    border-top: solid 1px #07139f;
    border-bottom: solid 1px #07139f;
    font-weight: bold;
    font-size: 1.1rem;
}

/* ----------- evento__past queries ----------- */

@container evento (min-width:500px){
    .background-img2{
        position: absolute;
        width: 128px;
        height: 128px;
        bottom: -60px;
        right: -20px;
        transform: rotate(0);
        z-index: -1;
    }
}

@container evento (min-width:700px){
    .past__title{
        font-size: 1.7rem;
    }

    .past__grid-item{
        flex-direction: row-reverse;
        gap: 50px;
        max-width: 700px;
        padding: 15px 0;
    }

    .background-img2{
        position: absolute;
        width: 150px;
        height: 150px;
        bottom: -65px;
        right: auto;
        left: 10px;
        transform: rotate(0);
        z-index: -1;
    }

    .past__grid-item img{
        max-width: 300px;
        max-height: 300px;
    }

    .grid-item-img2{
        display: flex;
        flex-direction: column;
        flex: 1;
        align-items: center;
    }

    .grid-item-text2{
        gap: 20px;
        flex: 1;
    }

    .background-img1{
        position: absolute;
        width: 128px;
        height: 128px;
        bottom: -110px;
        left: auto;
        right: -60px;
    }
}

/* ----------- fin evento__past ------------ */


/* ------- inicio evento__gallery ------- */

.evento__gallery{
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    width: 100%;
    padding: 0 10px 30px 10px;
    gap: 20px;
    position: relative;
    max-width: 1300px;
    background-color: #fff;
    color: #333;
}

.gallery__title{
    text-wrap: balance;
    text-align: center;
    font-size: 1.4rem;
    color: #fff;
    background-color: #ff904d;
    width: 110%;
    padding: 10px;
}

.gallery__grid{
    display: grid;
    grid-template-columns: repeat(1, minmax(200px, 1fr));
    justify-content: space-evenly;
    justify-items: center;
    align-items: center;
    gap: 10px;
    width: 100%;
    position: relative;
}

.gallery__grid img{
    width: 100%;
    border-bottom: 2px solid #07134e;
    padding-bottom: 10px;
    opacity: 0;
    transition: transform 1.5s ease, opacity 1.5s ease;
}

.gallery__grid img:nth-of-type(odd) {
    transform: translateX(-100%);
}

.gallery__grid img:nth-of-type(even) {
    transform: translateX(100%);
}

.gallery__grid img.visible {
    transform: translateX(0);
    opacity: 1;
}

/* -------- evento__gallery queries -------- */

@container evento (min-width:600px){
    .gallery__grid{
        display: grid;
        grid-template-columns: repeat(2, minmax(200px, 1fr));
        justify-content: space-evenly;
        justify-items: center;
        align-items: center;
        gap: 10px 20px;
        width: 100%;
    }

    .gallery__grid img{
        width: 100%;
        height: 300px;
        border-bottom: 2px solid #07134e;
        padding-bottom: 10px;
    }
}

@container evento (min-width:56.25rem){
    .gallery__grid{
        display: grid;
        grid-template-columns: repeat(4, minmax(200px, 1fr));
        justify-content: space-evenly;
        justify-items: center;
        align-items: center;
        gap: 10px 20px;
        width: 100%;
    }

    .gallery__grid img{
        width: 100%;
        max-height: 250px;
        border-bottom: 2px solid #07134e;
        padding-bottom: 10px;
    }

    .gallery__grid img:nth-of-type(odd) {
        transform: translateX(0%);
        transform: translateY(100%);
    }
    
    .gallery__grid img:nth-of-type(even) {
        transform: translateX(0%);
        transform: translateY(100%);
    }

    .gallery__grid img.visible{
        transform: translateY(0);
    }
}

/* -------- fin evento__gallery -------- */