/* ------------------------------------------------------------- */
/* --------------------------- GLOBAL -------------------------- */
/* ------------------------------------------------------------- */
.body{
    position: relative;
    box-sizing: border-box;
}

/* ----------------------- DISPLAY SWAPS ----------------------- */

/* -------------------------- WRAPPER -------------------------- */
#wrapper-archive {
    position: relative;
    width: 75dvw;
    margin: 0 auto 10rem auto;
    display: flex;
    flex-direction: column;
    gap: 10rem;
    max-width: 1300px;
}
@media (max-width: 78em) /*MID:    > 1,250*/ {
    #wrapper-archive {
        gap: 0;
    }
}
@media (max-width: 48em) /*TABLET: > 768  */ {
    #wrapper-archive {
        margin: 0 auto 7.5rem auto;
        width: 85dvw;
    }
}
@media (max-width: 31em) /*MOBILE: > 498  */ {
    #wrapper-archive {
        width: 90dvw;
    }
}
@media (max-width: 20em) /*MINI:   > 320  */ {

}




/* ------------------------------------------------------------- */
/* -------------------------- SECTIONS ------------------------- */
/* ------------------------------------------------------------- */

/* --------------------------- HERO ---------------------------- */
#hero-archive{
    display: flex;
    flex-direction: column;
    gap: 4rem;
    padding-top: 80px;
}
.hero-info{
    display: grid;
    grid-template-columns: 2.5fr 3fr 2fr;
    column-gap: 8rem;
}
.hero-info p{
    font-size: var(--fs-sm);
    text-transform: uppercase;
    text-align: justify;
}
.hero-info-year{
    justify-self: end;
}
@media (max-width: 78em) /*MID:    > 1,250*/ {
    #wrapper-archive {
        gap: 8rem;
    }
    #hero-archive{
        gap: 2.5rem;
        padding-top: 60px;
    }
    .hero-info{
        column-gap: 5rem;
    }
    .hero-info p{
        font-size: 1.2rem;
    }
}
@media (max-width: 48em) /*TABLET: > 768  */ {
    #wrapper-archive {
        width: 85dvw;
    }
    #hero-archive{
        padding-top: 120px;
    }
}
@media (max-width: 31em) /*MOBILE: > 498  */ {
    #wrapper-archive {
        width: 90dvw;
        gap: 6rem;
    }
    .hero-info{
        grid-template-columns: 1fr 1fr;
        column-gap: 3rem;
        row-gap: 2rem;
    }
    .hero-info-year{
        justify-self: start;
    }
}
@media (max-width: 20em) /*MINI:   > 320  */ {
    .hero-info{
        grid-template-columns: 1fr;
        column-gap: 0;
        row-gap: 2rem;
    }
    .hero-info-year{
        justify-self: end;
    }
}

/* --------------------------- GRID --------------------------- */
#grid-archive{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}
.grid-archive-item{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 0.5rem;
    overflow: hidden;

    border: none;
    outline: none;
    background: none;
    padding: 0;
}
.grid-archive-item img{
    width: 100%;
    aspect-ratio: 1;
    cursor: pointer;
}
.grid-archive-item img:hover{
    transform: scale(1.05);
}
@media (max-width: 78em) /*MID:    > 1,250*/ {
    #grid-archive{
        gap: 1.5vw;
    }
}
@media (max-width: 48em) /*TABLET: > 768  */ {
    #grid-archive{
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}
@media (max-width: 31em) /*MOBILE: > 498  */ {
    #grid-archive{
        gap: 2vw;
    }
    .grid-archive-item{
        border-radius: 0.35rem;
    }
}
@media (max-width: 20em) /*MINI:   > 320  */ {
    #grid-archive{
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* --------------------------- MODAL -------------------------- */
/* -- WRAPPER AND CONTAINER -- */
#archive-modal{
    position: fixed;
    box-sizing: border-box;
    z-index: 100;

    display: flex;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;

    align-items: center;
    justify-content: center;

    width: 75dvw;
    height: 100dvh;
    padding: 80px 0;

    background-color: var(--color-dark);
}
#archive-modal.is-open {
    opacity: 1;
    visibility: visible;
}
.modal-container{    
    display: flex;

    height: 100%;
    width: 100%;

    /*background-color: red;*/
    border-top: 1px solid #4c4c4c;
    border-bottom: 1px solid #4c4c4c;
}
/* -- INFO + IMGS -- */
.modal-info, .modal-imgs{
    padding: 40px;
    display: flex;
    flex-direction: column;
}
/* -- INFO -- */
.modal-info{
    justify-content: space-between;
    padding-left: 0;
    width: 40%;
    border-right: 1px solid #4c4c4c;
}
.modal-info-top{
    display: flex;
    justify-content: space-between;
}
.modal-info-top h2{
    width: 350px;
    margin: 0;

    font-family: var(--font-primary);
    font-style: normal;
    font-weight: 500;
}
.modal-info-bottom{
    text-align: justify;
}
/* -- BUTTON -- */
.modal-info-top button {
    width: 25px;
    height: 25px;
    margin-top: 8px;
    cursor: pointer;
    background: transparent;
    border: none;
    position: relative;
}
.modal-info-top button::before,
.modal-info-top button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--color-light);
}
.modal-info-top button::before {
    transform: translateY(-50%) rotate(45deg);
}
.modal-info-top button::after {
    transform: translateY(-50%) rotate(-45deg);
}
/* -- IMGS -- */
.modal-imgs{
    box-sizing: border-box;
    overflow-y: auto;
    overscroll-behavior: contain;

    padding-right: 30px;
    gap: 3rem;

    height: 100%;
    width: 60%;
}
.modal-imgs img{
    width: 100%;
    border-radius: 6px;
    object-fit: cover;
}
/* -- SCROLLBAR -- */
.modal-imgs::-webkit-scrollbar {
    width: 4px;
}
.modal-imgs::-webkit-scrollbar-track {
    background: transparent;
    margin: 40px 0;
}
.modal-imgs::-webkit-scrollbar-button {
    display: none;
}
.modal-imgs::-webkit-scrollbar-thumb {
    background-color: #2C2C2C;
    border-radius: 999px;
    background-clip: padding-box;
}
/* -- NEEDED FOR JS -- */
/* body.modal-open {overflow: hidden;} */

@media (max-width: 78em) /*MID:    > 1,250*/ {
    #archive-modal{    
        padding: 60px 0;
    }
    .modal-info{
        overflow-y: auto;

        padding-left: 0;
        gap: 4rem;

        width: 50%;
    }
    .modal-info-top{
        gap: 2rem;
    }
    .modal-info-top h2{
        font-size: 2.8rem;
    }
    .modal-imgs{
        padding-right: 20px;
        padding-left: 30px;
        width: 50%;
        gap: 2vw;
    }
}
@media (max-width: 48em) /*TABLET: > 768  */ {
    #archive-modal{
        padding-top: 120px;
        padding-bottom: 80px;

        width: 85dvw;
    }
    .modal-container{
        flex-direction: column;

        gap: 4rem;

        border-top: none;
        border-bottom: none;
    }

    .modal-info{
        overflow-y: visible;
        flex: 0 0 auto;

        padding: 0;
        padding-bottom: 4rem;
        gap: 4rem;

        width: 100%;

        border: none;
        border-bottom: 1px solid #4c4c4c;
    }
    .modal-info-top h2{
        font-size: 3.6rem;
    }

    .modal-imgs{
        display: flex;
        flex-direction: column;
        gap: 2rem;

        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;

        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior-y: contain;

        width: 100%;
        flex: 1;            /* ocupa el espacio sobrante de la columna */
        min-height: 0;      /* clave para que el scroll funcione en flex-column */
        padding: 0;
        padding-right: 1rem;
    }
    .modal-imgs img{
        width: 100%;
        height: auto;       /* el alto lo dicta el ratio nativo */
        aspect-ratio: inherit;
        border-radius: 6px;
        display: block;
        margin-right: 1rem;
    }

    .modal-imgs::-webkit-scrollbar {
        width: 4px;
    }
    .modal-imgs::-webkit-scrollbar-track {
        margin: 0;
    }
}
@media (max-width: 31em) /*MOBILE: > 498  */ {
    #archive-modal{
        padding-top: 120px;
        padding-bottom: 25px;

        width: 90dvw;
    }
    .modal-info-top h2{
        font-size: 2.8rem;
    }
}
@media (max-width: 20em) /*MINI:   > 320  */ {
    
}