* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Alata', sans-serif;
}

button {
    font-family: 'Josefin Sans', sans-serif;
    margin: auto 1% auto 0;
    padding: 10px 20px;
    background-color: white;
    border: 1.8px solid black;
    letter-spacing: 0.1rem;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
}

h1 {    
    font-family: 'Josefin Sans', sans-serif;
    letter-spacing: 0.2rem;
}

li {
    margin: 10px 15px;
    font-size: 0.8rem;
    width: max-content;
    position: relative;
    cursor: pointer;
}

li::after {
    content: "";
    position: absolute;
    width: 0%;
    height: 3px;
    background: white;
    border-radius: 2px;
    bottom: -7px;
    left: 50%;
    transform: translateX(-50%);
    transition: width 0.5s;
  }


p {
    font-size: 0.8rem;
    color: hsl(0, 0%, 55%);
}

.container {
    padding: 2.5% 10%;
}

/* top container */
.top-container {   
    min-height: 60vh;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('images/desktop/image-hero.jpg');
    background-repeat: no-repeat;
    background-size: cover;
} 

.navbar {
    display: flex;
    justify-content: space-between;
}

.nav-items {
    display: flex;
    list-style-type: none;
    color: rgb(231, 221, 221);
    cursor: pointer;
}
.nav-items li{
    padding: 5px 0;
}

.nav-left {
    display: flex;
    align-items: center;
}

.top-header-cont {
    max-width: 45%;
    margin: 15% 0;
    color: white;
    padding: 3%;
    border: 2px solid white;
}

.top-title {
    line-height: 3rem;
    font-size: 2rem;
    width: 80%;
    font-weight: 300;
    letter-spacing: 0.3rem;
}

/*  Hamburger menu  */
/*  using BEM naming convention  */

.menu-icon {
    position: relative;
    padding: 26px 10px;
    cursor: pointer;
    z-index: 1;
    display: none;
}

.menu-icon__line {
    display: block;
    position: relative;
    background: white;
    height: 2px;
    width: 28px;  
    border-radius: 4px;
    transition: all .5s ease-in-out;
}

.menu-icon__line::before, .menu-icon__line::after {
    content: "";
    position: absolute;
    height: 100%;
    width: 100%;
    border-radius: 4px;
    background: white;
    transition: all .5s ease-in-out;
}

.menu-icon__line::before {
    transform: translateY(-8px);
}

.menu-icon__line::after {
    transform: translateY(8px);
}

/* Animation Menu  */

.menu-icon.open .menu-icon__line {
    transform: translateX(-10px);
    background: transparent;
}
.menu-icon.open .menu-icon__line::before {
    transform: rotate(45deg) translate(10px, -10px);
}
.menu-icon.open .menu-icon__line::after {
    transform: rotate(-45deg) translate(10px, 10px);
}

@media (max-width:1170px){
    .top-title{
        width: 90%;
    }
}

@media (max-width:1044px){
    .top-title{
        width: 90%;
    }
    .top-header-cont {
        max-width: 50%;
    }
}

/* middle container */

.middle-container {
    margin-top: 120px;
    
}

.middle-top-container{
    position: relative;
    margin-bottom: 80px;
}


.text-interactive {
    position: absolute;
    width: 53%;
    padding: 60px 0 0 60px;
    bottom: 0px;
    right: 0;
    background-color: white;
}

.img-interactive {
    width: 60%;
}

.text-interactive h1{
    margin-bottom: 20px;
    width: 70%;
}

.text-interactive p{
    font-size: 1rem;
}

@media (max-width:1190px){
    .text-interactive h1{
        width: 90%;
    }
    .text-interactive p{
        font-size: 0.8rem;
    }
}



/* bottom container */

.bottom-creations {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 60px;
}

.card-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 60px;
}

.card {
    display: flex;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: top;
    width: 22%;
    margin: 10px;
    height: 400px;
    position: relative;
    margin-bottom: 20px;
}



.card-title {
    color: white;
    align-self: flex-end;
    font-family: 'Josefin Sans', sans-serif;
    letter-spacing: 0.2rem;
    font-weight: 300;
    padding: 0 12%;
    margin-bottom: 15%;
}

@media (max-width:1175px){
    .card{
        height: 350px;
    }
    .card-title {
        font-size: 1.3rem;
        padding: 0 10%;
    }
}

@media (max-width:930px){
    .top-title{
        font-size: 1.5rem;
        line-height: 2rem;
        width: 90%;
    }
    .card-title {
        font-size: 1.1rem;
        padding: 0 8%;
    }
    .top-header-cont{
        max-width: 45%;
    }
}

.card-container .card:nth-child(1) {
    background-image: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6)), url("images/desktop/image-deep-earth.jpg");
}
.card-container .card:nth-child(2) {
    background-image: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6)), url("images/desktop/image-night-arcade.jpg");
}
.card-container .card:nth-child(3) {
    background-image: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6)), url("images/desktop/image-soccer-team.jpg");
}
.card-container .card:nth-child(4) {
    background-image: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6)), url("images/desktop/image-grid.jpg");
}
.card-container .card:nth-child(5) {
    background-image: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6)), url("images/desktop/image-from-above.jpg");
}
.card-container .card:nth-child(6) {
    background-image: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6)), url("images/desktop/image-pocket-borealis.jpg");
}
.card-container .card:nth-child(7) {
    background-image: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6)), url("images/desktop/image-curiosity.jpg");
}
.card-container .card:nth-child(8) {
    background-image: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6)), url("images/desktop/image-fisheye.jpg");
}


/* footer */

.footer {
    background-color: black;
    margin-top: 80px;
    display: flex;
    justify-content: space-between;
    padding-top: 30px;
}
.footer__left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer__left ul{
    list-style-type: none;
    color: white;
    display: flex;
    padding-left: 0;
}

.footer__left li {
    margin-top: 15px;
    margin-left: 0;
}

.footer__right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-evenly;
}

.footer__right ul {
    list-style-type: none;
    display: flex;
}

.footer__right ul img {
    width: 80%;
}

.footer__right li {
    margin: 0 5px;
}

#btn-mobile {
    display: none;
}

/* active state */


button:hover {
    background-color: black;
    color: white;
}

.card:hover{
    opacity: 0.4;
}

li:hover::after {
    width: 70%;
}
  
.top-footer li:hover::after{
    width: 100%;
}


@media (max-width:895px){
    .container {
        padding: 2.5% 5%;
    }
    .text-interactive h1{
        font-size: 1.5rem;
    }
    .text-interactive p{
        font-size: 0.6rem;
    }
    .bottom-creations {
        font-size: 0.7rem;
    }
    .top-container {
        background-position: center;
    }
}



/* da 745 visualizzazzione mobile */

@media (max-width: 745px) {
    .menu-icon {
        display: block;
    }
    .nav-items {
        display: none;
    }
    .nav-left {
        margin: 6vw 0;
        width: 100vw;
        align-items: center;
        justify-content: space-between;
    }
    .middle-top-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-bottom: 60px;
    }
    .img-interactive {
        width: 100%;
        margin-bottom: 60px;
    }
    .text-interactive {
        position: static;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 80%;
        padding: 0;
    }
    .text-interactive h1 {
        font-size: 2rem;
        font-weight: 300;
    }
    .text-interactive p {
        font-size: 1rem;
    }
    .bottom-creations button {
        display: none;
    }
    .bottom-creations {
        justify-content: center;
    }
    .bottom-creations h1 {
        font-size: 2.2rem;
        font-weight: 300;
    }
    .card-container {
        justify-content: space-evenly;
    }
    .card {
        width: 45%;
        height: 100px;
        background-size: 100% 100%;
    }
    .card-title {
        font-size: 1.4rem;
        width: 80%;
        margin-bottom: 0;
        padding-bottom: 5%;
    }
    .card-container .card:nth-child(1) {
        background-image: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6)), url("images/mobile/image-deep-earth.jpg");
    }
    .card-container .card:nth-child(2) {
        background-image: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6)), url("images/mobile/image-night-arcade.jpg");
    }
    .card-container .card:nth-child(3) {
        background-image: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6)), url("images/mobile/image-soccer-team.jpg");
    }
    .card-container .card:nth-child(4) {
        background-image: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6)), url("images/mobile/image-grid.jpg");
    }
    .card-container .card:nth-child(5) {
        background-image: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6)), url("images/mobile/image-from-above.jpg");
    }
    .card-container .card:nth-child(6) {
        background-image: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6)), url("images/mobile/image-pocket-borealis.jpg");
    }
    .card-container .card:nth-child(7) {
        background-image: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6)), url("images/mobile/image-curiosity.jpg");
    }
    .card-container .card:nth-child(8) {
        background-image: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6)), url("images/mobile/image-fisheye.jpg");
    }
    #btn-mobile {
        display: block;
        margin: 0 auto;
        width: 25%;
    }
    .footer {
        flex-direction: column;
    }
    .footer__left {
        margin: 30px 0;
        align-items: center;
    }
    .footer__left ul {
        margin-top: 20px;
        flex-direction: column;
        align-items: center;
    }
    .footer__left li {
        margin:8px 0;
        font-size: 0.9rem;
    }
    .footer__right {
        align-items: center;
    }
    .footer__right ul img {
        width: 90%;
    }
    .footer__right p {
        font-size: 1rem;
        margin: 20px 0 30px 0;
    }
    .text-focus-in {
        animation: text-focus-in .8s ease-in-out 0.3s both;
    }
    @keyframes text-focus-in {
        0% {
          filter: blur(12px);
          opacity: 0;
        }
        100% {
          filter: blur(0px);
          opacity: 1;
        }
      }
    .nav-left.open {
        align-items: flex-start;
        margin: 6vw 5vw;
    }
    .nav-left.open img {
        margin-top: 10px;
    }
    .container.open {
        padding: 0;
    }
    .navbar.open {
        position: fixed;
        top: 0;
        width: 100%;
        height: 100%;
        background: black;
        z-index: 999;
    }
    .nav-items.open {
        display: block;
        opacity: 1;
        position: absolute;
        top: 10vh;
        left: 5vw;
        flex-direction: column;
        justify-content: space-evenly;
        align-items: flex-start;
        padding: 10rem 0;
    }

    .nav-items.open li {
        font-family: 'Josefin Sans', sans-serif;
        font-size: 2rem;
        text-transform: uppercase;
        color: white;
        margin: 2vh 0; 
    }
}

@media (max-width: 575px) {
    .top-header-cont {
        min-width: 89vw;
        min-height: 30vh;
        padding-left: 6%;
        padding-top: 6%;
        margin-top: 35%;
    }
    .top-title {
        font-size: 8vw;
        line-height: 3rem;
        width: 80%;
    }
    .top-container {
        min-height: 80vh;
        background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.4)), url('images/mobile/image-hero.jpg');
        background-size: 100% 100%;
    }
}

@media (max-width: 480px) {
    .card-container {
        flex-direction: column;
    }
    .card {
        width: 94%;
        height: 130px;
    }
    .card-title {
        width: 50%;
    }
    #btn-mobile {
        display: block;
        margin: 0 auto;
        width: 35%;
    }
    .text-interactive h1 {
        width: 100%;
        letter-spacing: 0.02rem;
    }
}