@import url('https://fonts.googleapis.com/css?family=Nunito+Sans&display=swap');


/* css for all pages */
body{
    font-family: "Nunito Sans";
    background-color: hsl(0, 0%, 98%);
}


nav{
   
   
    display: flex;
    padding:0 5vw;
    margin: -10px;
    background-color: white;
    box-shadow: 0px 3px 8px 0px #e6e6e6;

    /* overflow: hidden;
    top: 0; */
}

nav h2{
    flex: 1;
}

nav div{
    text-align: center;
    padding-top: 25px;
    cursor: pointer;
}

/* inputs css */
form{
   
    z-index: 1;
    width: 93%;
    margin: auto;
    display: flex;
    margin-top: 70px;
}

form div:first-child{
    flex: 1;
    font-size: 1em;
}

input{
    color:hsl(0, 0%, 52%);
    font-family: "Nunito Sans";
    font-size: 1em;
    padding: 10px;
    box-shadow: 0px 2px 5px #e8e8e8;
    outline: none;
    border-radius: 6px;
    border: none;
}

form div:first-child input{
    width: 300px;
}

/* cards css */
main{
   
    display: flex;
    flex-wrap: wrap;
    width: 90%;
    margin: auto;
    margin-top: 5vh;
    justify-content: space-between;
    z-index: 90;
}

.card{
    cursor: pointer;
    margin: 50px 20px;
    border-radius: 5px;
    box-shadow: 0px 0px 10px 6px #e8e8e8;
}

.card img{
    object-fit: cover;
    width: 250px;
    height: 200px;
    border-radius: 5px 5px 0 0;
}

.infos{
    width: 225px;
    margin: auto;
    margin-top: -5px;
    letter-spacing: 0.5px;
}


/* details css */
.back{
    margin-top: 8vh;
    font-size: 1em;
    padding: 10px 30px;
    font-family: "Nunito sans";
    margin-left: 5%;
    box-shadow: 0px 2px 7px #c8c8c8;
    border-radius: 8px;
    border: none;
    outline: none;
    cursor: pointer;
}

.main-details{
    margin-top: 10vh;
}

.img-details{
    width: 48%;
    height: 100%;
    margin-right: 80px;
}

.info-details{
    display: flex;
    flex-wrap: wrap;
    flex-basis: 500px;
    height: 100%;
    margin: auto;
}

.info-details h1{
    flex-basis: 100%;
}

.info1-details{
    flex-basis: 50%;
}

.info2-details{
    flex-basis: 50%;
}

.btn-details{
    background-color: white;
    padding: 5px 8px;
    border-radius: 5px;
    font-family: "Nunito Sans";
    cursor: pointer;
    margin: 3px 10px 3px 0;
    box-shadow: 1px 1px 4px #404040;
    outline: none;
    font-size: 0.8em;
    border: none;
}


/* dark mode css */
.body-dark-mode{
    background-color:hsl(207, 26%, 17%);
    color: white;
}

.dark-mode{
    background-color: #31404e;
    color: white;
    box-shadow: 0px 3px 8px 0px #212121;
}


/* details of project css */
.attribution { 
    font-size: 14px;
    bottom: 0;
    position: fixed;
    margin: 5px 0;
}
.attribution a { color: #ffc107; }


/* responsive for main page */
@media all and (max-width: 663px){
    form{
        flex-wrap: wrap;
    }

    form div:first-child{
        flex-basis: 100%;
        margin-bottom: 20px;
    }

    form div:first-child input{
        width: 85%;
    }

    form div:last-child{
        margin-left: 20px;
    }

    main{
        justify-content: center;
        margin-top: 2vh;
    }

    .card{
        margin: 20px;
    }

    .card img{
        width: 200px;
    }

    .infos{
        width: 175px;
        margin-top: -15px;
        font-size: 0.9em;
    }
}

@media all and (max-width: 390px){
    nav h2{
        font-size: 1.3em;
        margin: 10px 0;
    }

    nav div{
        padding-top: 0;
        margin-bottom: 5px;
    }

    nav{
        flex-direction: column;
        align-items: center;
    }

    form{
        margin-top: 50px;
    }

    form div:first-child input{
        width: 80%;
    }

    .attribution{ font-size: 12px; }
}

@media all and (max-width: 232px){
    form div:last-child{
        margin-left: 0;
    }
}


/* responsive for details page */
@media all and (max-width: 1256px){
    .info-details{
        flex-basis:450px;
    }
    .img-details{
        width: 45%;
    }
}

@media all and (max-width: 1150px){
    .img-details{
        width: 70%;
        margin: auto;
    }

    .info-details{
        flex-basis: 70%;
        margin-top: 40px;
    }

    .back{
        margin-top: 40px;
    }

    .main-details{
        margin-top: 30px;
    }
}

@media all and (max-width: 800px){
    .info-details{
        flex-direction: column;
        margin-top: 15px;
        margin-bottom: 40px;
    }
}

@media all and (max-width: 390px){
    .img-details{
        width: 100%;
    }
    
    .info-details{
        font-size: 0.9em;
        flex-basis: 100%;
    }

    .attribution{ font-size: 12px; }
}






/* loading animation */


.loader{
    margin:200px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading__anim {
    width: 35px;
    height: 35px;
    border:  5px solid rgba(189,189,189 ,0.25);
    border-left-color: rgba(3,155,229 ,1);
    border-top-color: rgba(3,155,229 ,1);
    border-radius: 50%;
    display: inline-block;
    animation: rotate 600ms infinite linear;
  }
  
  @keyframes rotate {
    to {
      transform: rotate(1turn)
    }
  }