/*************************************************************/
/*MODAL STYLE*************************************************/
/*************************************************************/
.modal{
    display: none;
    position: fixed;
    z-index: 3;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.97);
    padding: 50px 0;
    box-sizing: border-box;
    overflow: auto;
}

.modal-content{
    margin: auto;
    padding: 20px;
    width: 80%;
    max-height: 80vh;
    overflow-y: auto;
    user-select: none;
}

.modal-content::-webkit-scrollbar{
    width: 3px;
}

.modal-content::-webkit-scrollbar-thumb{
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.modal-txt-container.text-container{
    padding: 10px;
    background-image: linear-gradient(rgba(255, 254, 254, 0.9),rgba(255, 254, 254, 0.1));
}

/*************************************************************/
/*MODAL CLOSE BUTTON******************************************/
/*************************************************************/
.close-button{
    position: fixed;
    top: 50px;
    right: 50px;
    font-size: 2.5em;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    z-index: 5;
    background: none;
    border: none;
    user-select: none;
}

.close-button:hover {
    color: lightgray;
}

/*************************************************************/
/*MODAL ARROWS SWIPE******************************************/
/*************************************************************/
.modal-nav{
    position: fixed;
    top: 0;
    width: 50%;
    height: 100%;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
    color: black;
    pointer-events: auto;
}

.modal-nav svg {
    width: 30px;
    height: 30px;
    stroke: black;
    opacity: 1;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.modal-nav svg:hover {
    opacity: 0.2;
}

/*Left side*/
.left-nav {
    left: 0;
    justify-content: flex-start;
    padding-left: 20px;
}

.left-nav svg {
    transform: rotateY(180deg);
}

/*Right side*/
.right-nav {
    right: 0;
    justify-content: flex-end;
    padding-right: 20px;
}

/*************************************************************/
/*MODAL COLUMNS***********************************************/
/*************************************************************/
.two-column{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

/*************************************************************/
/*IMAGE SETTINGS**********************************************/
/*************************************************************/
#modalImg{
    width: 100%;
    height: auto;
    max-height: 90vh;
    object-fit: contain;
    display: block;
}

/*************************************************************/
/*TEXT SETTINGS***********************************************/
/*************************************************************/
#modalTitle{
    text-align: center;
    font-family: Comfortaa;
}

#modalText{
    font-family: Manrope;
    max-width: 70vw;
    margin-top: 50px;
    text-align: left;
}

/*************************************************************/
/*REDIRECT BUTTON*********************************************/
/*************************************************************/
.redirect-btn {
    z-index: 90;
    display: inline-block;
    text-align: center;
    margin-top: 30px;
    padding: 20px 50px;
    font-family: Comfortaa, sans-serif;
    font-size: 1.5em;
    font-weight: bold;
    border: 1px solid black;
    color: black;
    border-radius: 10px;

    background: linear-gradient(270deg, blanchedalmond, coral);

    background-size: 200% 200%;
    transition: background-position 0.5s ease;
    cursor: pointer;

    -webkit-tap-highlight-color: transparent;
}

.redirect-btn:hover {
    background-position: 100% 50%;
}

.redirect-btn:focus{
    transform: scale(0.9);
}

.redirect-btn:focus:not(:active) {
    transform: scale(1);
}

/***********************************************************************************************************************/
/*RESPONSIVENESS (DEVICE SIZE ADJUSTMENT)*********************/
/*************************************************************/
/*Tablets*/
@media (max-width: 1024px){
    .two-column{
        grid-template-columns: 1fr;
    }

    /*new close button position*/
    .close-button{
        position: fixed;
        top: 10px;
        right: 20px;
        font-size: 2.5em;
        font-weight: bold;
        color: #333;
        z-index: 4;
        background: none;
        border: none;
    }

    /*let them scroll to see content in modal*/
    .modal-content::-webkit-scrollbar{
        width: 3px;
    }

    .modal-content::-webkit-scrollbar-thumb{
        background-color: rgba(0, 0, 0, 0.2);
        border-radius: 10px;
    }

    .modal-content{
        max-height: 90vh;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        padding: 20px;
        box-sizing: border-box;
        -webkit-overflow-scrolling: touch;
    }

    #modalImg{
        width: 100%;
        height: auto;
        margin-top: 40px;
        object-fit: contain;
        -webkit-overflow-scrolling: touch;
    }

    /*movement not blocked but the arrows don't "interact", they're just visible. Swipe works through js*/
    .modal-nav{
        pointer-events: none;
    }
}

/*Phones*/
@media (max-width: 430px) {
    .two-column{
        grid-template-columns: 1fr;
    }

    /*new close button position*/
    .close-button{
        position: fixed;
        top: 10px;
        right: 20px;
        font-size: 2.5em;
        font-weight: bold;
        color: #333;
        z-index: 4;
        background: none;
        border: none;
    }
    .redirect-btn {
        padding: 10px 30px;
        font-family: Comfortaa, sans-serif;
        font-size: 1em;
    }

    /*let them scroll to see content in modal*/
    .modal-content::-webkit-scrollbar{
        width: 3px;
    }

    .modal-content::-webkit-scrollbar-thumb{
        background-color: rgba(0, 0, 0, 0.2);
        border-radius: 10px;
    }

    .modal-content{
        max-height: 90vh;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        margin: auto;
        padding: 20px;
        box-sizing: border-box;
        -webkit-overflow-scrolling: touch;
    }

    #modalImg{
        width: 100%;
        height: auto;
        margin-top: 40px;
        object-fit: contain;
        -webkit-overflow-scrolling: touch;
    }

    /*block moving between pseudo-modals on mobile, so hide arrows and the DAMN MODAL-NAV OR IT WONT REACT TO TOUCH*/
    .modal-nav{
        display: none;
        pointer-events: none;
    }
    .modal-nav svg{
        visibility: hidden;
    }
}