/* --------------- ALL --------------- */
*{
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    list-style: none;
    text-decoration: none;
}

img{
    width: 100%;
}

body{
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    height: 100vh;
}

/* --------------- FONT FAMILY --------------- */
.montserrat{
    font-family: "Montserrat", serif;
}

/* --------------- LOADER --------------- */
#loader{
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #4A5B4A;
    z-index: 1500;
    transition: opacity 1s ease, transform 1s ease;
    opacity: 1;
    #loaderText{
        color: white;
        opacity: 1;
        animation: fadeOutText 3s forwards;
    }
}

#loader.hide{
    opacity: 0;
    transform: scale(0.1);
}

/* ------------ MAIN ------------ */
main{
    height: 92vh;
}

/* ------------ H1 ------------ */
#h1MyProjects{
    color: #4A5B4A;
    font-size: 2rem;
    text-align: center;
    padding: 1%;
    margin-top: 25px;
}

/* ------------ BTN BACK HOMEPAGE ------------ */
#btnBackHome{
    position: absolute;
    top: 1%;
    right: 1%;
    color: #4A5B4A;
    border: none;
    font-size: 10px;
    z-index: 1000;
}

/* ------------ SECTION PROJECTS ------------ */
#sectProjects{
    width: 90%;
    height: 80%;
    position: absolute;
    top: -8%;
    left: 5%;
    opacity: 0;
    animation: fade-in2 0.8s linear forwards;
    animation-delay: 3.3s;
}

.container {
    top: 70%;
    left: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
    width: 90%;
    height: 80%;
    background-color: #BFC0C0;
    box-shadow: 0 30px 50px #BFC0C0;
    transition: filter 0.8s linear;
    &.blurred {
        filter: blur(8px);
    }
    .slide {
        .item {
            width: 13%;
            height: 50%;
            position: absolute;
            top: 50%;
            transform: translate(0, -50%);
            border-radius: 20px;
            box-shadow: 0 30px 50px #BFC0C0;
            background-position: 50% 50%;
            background-size: cover;
            display: inline-block;
            transition: 0.5s;
            &:nth-child(1),
            &:nth-child(2) {
                top: 0;
                left: 0;
                transform: translate(0, 0);
                border-radius: 0;
                width: 100%;
                height: 100%;
            }
            &:nth-child(3) {
                left: 78%;
                filter: blur(5px);
                width: 30%;
                height: 15%;
            }
            &:nth-child(4) {
                display: none;
            }
            .content {
                padding: 5%;
                border-radius: 20px;
                position: absolute;
                top: 50%;
                left: 2%;
                width: 50%;
                text-align: left;
                color: white;
                transform: translate(0, -50%);
                display: none;
                filter: contrast(1.1);
                .name{
                    font-size: 14px;
                    text-transform: uppercase;
                    font-weight: bold;
                    opacity: 0;
                    animation: animate 1s ease-in-out 1 forwards;
                }
                .descript{
                    font-size: 10px;
                    margin: 10px 0 20px 0;
                    opacity: 0;
                    animation: animate 1s ease-in-out 0.3s 1 forwards;
                }
                .button{
                    background-color: white;
                    padding: 5px 10px;
                    font-size: 9px;
                    border: none;
                    border-radius: 4px;
                    box-shadow: -4px 4px #A1B2B0;
                    font-weight: bold;
                    &:active{
                        box-shadow: -3px 0 #A1B2B0;
                    }
                    opacity: 0;
                    animation: animate 1s ease-in-out 0.6s 1 forwards;
                }
            }
            &:nth-child(2) .content {
                display: block;
            }
        }
    }
}

.button2{
    width: 100%;
    text-align: center;
    position: absolute;
    bottom: 20px;
    button{
        width: 40px;
        height: 35px;
        border-radius: 8px;
        border: none;
        cursor: pointer;
    }
}

/* ------------ SECTION PROJECT DETAILS ------------ */
#sectDetails{
    position: absolute;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: auto;
    color: white;
    padding: 20px;
    display: none;
    z-index: 1000;
    border-radius: 8px;
    &.open{
        display: block;
        animation: fade-in3 0.8s linear forwards;
    }
    &.close{
        animation: fade-out3 0.8s linear forwards;
    }
    .details-content{
        text-align: center;
        p{
            padding: 5px;
            font-size: 11px;
        }
        #closeDetails{
            background-color: white;
            color: white;
            padding: 10px 20px;
            border: none;
            font-size: 10px;
            border-radius: 5px;
            font-weight: bold;
            box-shadow: -4px 4px #A1B2B0;
            margin-top: 25px;
            &:active{
                box-shadow: -3px 0 #A1B2B0;
            }
        }
    }
}

/* --------------- FOOTER --------------- */
footer{
    padding: 1%;
    border-top: solid 1px #4A5B4A;
    nav{
        ul{
            display: flex;
            justify-content: space-around;
            height: 8vh;
            align-items: center;
            li{
                a{
                    font-size: 1rem;
                    color: #4A5B4A;
                }
            }
        }
    }
}

/* ---------------------------------------------------------------------------------------------- */
/* ---------------------------------- RESPONSIVE TABLET PORTRAIT -------------------------------- */
/* ---------------------------------------------------------------------------------------------- */
@media screen and (min-width:767px) and (max-width:1024px) {
    /* ------------ SECTION PROJECTS ------------ */
    .container {
        .slide {
            .item {
                &:nth-child(3) {
                    left: 68%;
                    width: 20%;
                }
                &:nth-child(4) {
                    display: block;
                    height: 13%;
                    left: calc(50% + 43%);
                    filter: blur(6px);
                    width: 15%;
                }
                .content {
                    width: 30%;
                    padding: 4%;
                    .name{
                        font-size: 1rem;
                    }
                    .descript{
                        font-size: 13px;
                    }
                    .button{
                        font-size: 10px;
                    }
                }
            }
        }
    }

    /* ------------ SECTION PROJECT DETAILS ------------ */
    #sectDetails{
        height: auto;
        .details-content{
            p{
                font-size: 1rem;
            }
            #closeDetails{
                font-size: 11px;
            }
        }
    }

    /* ------------ BTN BACK HOMEPAGE ------------ */
    #btnBackHome{
        font-size: 12px;
    }

}

/* -------------------------------------------------------------------------------------- */
/* ---------------------------------- RESPONSIVE DESKTOP -------------------------------- */
/* -------------------------------------------------------------------------------------- */
@media screen and (min-width:1024px) {
    main{
        height: 100vh;
    }

    /* ------------ H1 ------------ */
    #h1MyProjects{
        font-size: 4rem;
        font-weight: 400;
        margin-top: unset;
    }

    /* ------------ BTN BACK HOMEPAGE ------------ */
    #btnBackHome{
        top: 2%;
        right: 2%;
        font-size: 1rem;
    }

    /* ------------ SECTION PROJECTS ------------ */
    #sectProjects{
        width: 90%;
        height: 80%;
        position: absolute;
        top: -8%;
        left: 5%;
        opacity: 0;
        animation: fade-in2 0.8s linear forwards;
        animation-delay: 3.3s;
    }

    .container {
        top: 78%;
        height: 90%;
        .slide {
            .item {
                &:nth-child(3) {
                    left: 78%;
                    filter: blur(5px);
                    width: 15%;
                    height: 25%;
                }
                &:nth-child(4) {
                    display: block;
                    height: 22%;
                    left: calc(50% + 45%);
                    filter: blur(6px);
                    width: 12%;
                }
                .content {
                    padding: 2%;
                    left: 2%;
                    width: 20%;
                    .name{
                        font-size: 1rem;
                    }
                    .descript{
                        font-size: 13px;
                    }
                    .button{
                        font-size: 11px;
                    }
                }
            }
        }
    }

    /* ------------ SECTION PROJECT DETAILS ------------ */
    #sectDetails{
        width: 50%;
        height: auto;
        .details-content{
            p{
                padding: 5px;
                font-size: 1rem;
            }
            #closeDetails{
                font-size: 12px;
                margin-top: 15px;
            }
        }
    }

    /* --------------- FOOTER --------------- */
    footer{
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        border-right: solid 1px #4A5B4A;
        padding: unset;
        border-top: none;
        nav{
            height: 100%;
            display: flex;
            justify-content: space-evenly;
            margin: auto;
            ul{
                justify-content: space-evenly;
                height: 100%;
                flex-direction: column;
                li{
                    padding: 15px;
                    writing-mode: vertical-rl;
                    a{
                        font-size: 1rem;
                        i{
                            &:hover{
                                animation: rotate360 0.8s linear forwards;
                            }
                        }
                    }
                }
            }
        }
    }
}




/* ----------------------------------------- */
/* --------------- KEYFRAMES --------------- */
/* ----------------------------------------- */
@keyframes fadeOutText {
    0% {
        font-size: 3rem;
        opacity: 1;
        filter: blur(0px);
    }
    50% {
        opacity: 0.5;
        filter: blur(1px);
    }
    100% {
        font-size: 2rem;
        opacity: 0;
        filter: blur(2px);
    }
}

@keyframes animate {
    from{
        opacity: 0;
        transform: translate(0, 100px);
        filter: blur(33px);
    }
    to{
        opacity: 1;
        transform: translate(0);
        filter: blur(0);
    }
}

@keyframes fade-in-footer{
    from{
        opacity: 0;
        transform: translateY(50px);
    }
    to{
        opacity: 1;
        transform: translateY(0px);
    }
}

@keyframes fade-in2 {
    0%{
        opacity: 0;
        transform: translateY(60px);
    }
    50%{
        opacity: 0.5;
        transform: translateY(30px);
    }
    100%{
        opacity: 1;
        transform: translateY(0px);
    }
}

@keyframes fade-in3 {
    from{
        opacity: 0;
        top: 90%;
    }
    to{
        opacity: 1;
        top: 78%;
    }
}

@keyframes fade-out3 {
    from{
        opacity: 1;
        top: 78%;
    }
    to{
        opacity: 0;
        top: 90%;
    }
}

@keyframes rotate360 {
    0%{
        transform: rotate(0);
    }
    100%{
        transform: rotate(360deg);
    }
}

