*{
    margin: 0;
    padding: 0;
}

:root{
    /*--bgcolor: #454545;*/
    /*--bgcolor: #272932;*/
    --bgcolor: #0a0908;
    /*--txtcolor: #3d3d3d;*/
    --txtcolor: black;
    --cleartxtcolor: #8a817c;
    --showmorecolor: #020202;
}

@font-face {
    font-family: Vonique;
    src: url(fonts/Vonique\ 92_D.otf);
}

@font-face {
    font-family: Futura;
    src: url(fonts/HellasFun-Plain/HFUNCP.TTF);
}

@font-face {
    font-family: Century_gothic;
    src: url(fonts/Century_Gothic/centurygothic.ttf);
}

html{
    font-family: 'Century_gothic', 'open sans', sans-serif;
    font-weight: 100;
    scroll-behavior: smooth;
    background-color: var(--bgcolor);
    color: var(--cleartxtcolor);
    font-size: 1em;
}

body{
    text-rendering: optimizeLegibility;
    overflow: scroll;
    overflow-x: hidden;
    font-weight: 400;
    margin: 10em 4em 0 4em;
}

header{
    /*background-image: url("casa\ plaino.jpg");
    height: 100vh;*/
    background-repeat: no-repeat;
    background-size: cover;
}

.header-container h1{
    /*padding: 0.5em;*/
    font-size: 3.5em;
    font-family: "Century_gothic";
    color: var(--cleartxtcolor);
    font-weight: 100;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.title-long{
    display: none;
}

.title-short{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

#up-header{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header-container{
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 2em 4em;
    /*backdrop-filter: blur(15px);*/
}

#projects-header{
    background-color: var(--bgcolor);
}

#home-header h1, #home-header #menu li a, #home-header #menu #currentLink{
    color: var(--txtcolor);
}

#bg-img{
    width: 100%;
    height: auto;
    overflow: hidden;
}


#sidebar{
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    z-index: 50;
    width: 0%;
    background-color: #0a0a0a74;
    backdrop-filter: blur(15px);
    list-style: none;
    
    flex-direction: column;
    justify-content: flex-start;
    transition: all 0.4s ease-in-out;
    text-align: center;
    opacity: 0;
    color: var(--cleartxtcolor);
}

#sidebar button{
    cursor: pointer;
    border: none;
    background-color: transparent;
}

#sidebar li{
    width: 100%;
    margin: 1em 0;
}

#sidebar a{
    width: 100%;
    text-decoration: none;
    position: relative;
    padding: 0.5em 0;
    text-transform: uppercase;
    transition: color 0.4s;
}

#currentLink{
    color: white;
    margin: 0 0.5em;
    text-transform: uppercase;
    text-decoration: underline;
}

#sidebar.visible{
    width: 100%;
    opacity: 1;
    background-color: #0a0a0aca;
    backdrop-filter: blur(15px);
}

#sidebar.visible a{
    color: var(--cleartxtcolor);
    transition: color 0.4s;
}


#menu{
    display: none;
    list-style: none;
    flex-direction: row;
    justify-content: space-between;
    /*padding: 1em 1em;*/
    text-transform: uppercase;
    width: 40%;
    height: 100%;
}

#menu a{
    color: white;
    text-decoration: none;
    position: relative;
    /*padding: 0.5em 0;*/
    margin: 0 0.5em;
    transition: opacity 0.3s;
}

#menu a:hover{
    opacity: 0.5;
}

/*#menu a:after, #sidebar a:after{
    content: '';
    height: 2px;
    width: 0;
    background-color: var(--txtcolor);
    position: absolute;
    left: 0;
    bottom: 0;
    transition: 0.4s;
}

#menu a:hover{
    color: #ffffff;
}

#menu a:hover:after{
    width: 100%;
}*/

.menu-button{
    display: inline-block;
    background-color: transparent;
    border: none;
    cursor: pointer;
}

main{
    /*width: 100%;
    height: 55em;
    height: 100vh;*/
}

/*================
PROGETTI
================*/

#progetti{
    margin-top: 10em;
}

.project{
    margin-top: 5em;
}

/*PROJECT CARD*/

.main-content{
    margin-top: 10em;
    min-height: 100vh;
    padding: 0 2em;
}

.card{
    display: flex;
    flex-direction: row;
    /*margin: 0 2em;*/
}

.prj-img{
    flex: 2;
    aspect-ratio: 16/9;
}

.prj-img img{
    width: 100%;
    object-fit: cover;
}

.project-desc{
    flex: 1;
    padding-right: 1em;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-details{
    display: grid;
    grid-template-columns: 1fr 1fr;
    row-gap: 1em;
}

.project-info{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding: 5em 0 2em 0;
}

.desc-left, .desc-right, .img-center{
    flex: 1;
}

.desc-left, .desc-right{
    display: flex;
    flex-direction: column;
}

.img-center img{
    width: 100%;
    height: 100%;
}

#servizi, #pubblicazioni{
    color: var(--txtcolor);
    margin: 2em 1em;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

#service-description{
    flex: 1;
    position: relative;
    padding: 0 1em 0 0;
}

#publications-description{
    flex: 1;
    position: relative;
    padding: 0 0 0 1em;
}

#service-description h3, #publications-description h3{
    font-weight: 100;
}

#service-description a{
    position: absolute;
    bottom: 0;
    left: 0;
    border: 1px solid var(--showmorecolor);
    color: var(--showmorecolor);
    text-decoration: none;
    padding: 0.5em;
    border-radius: 0.5em;
    transition: 0.4s;
}

#publications-description a{
    position: absolute;
    bottom: 0;
    right: 0;
    border: 1px solid var(--showmorecolor);
    color: var(--showmorecolor);
    text-decoration: none;
    padding: 0.5em;
    border-radius: 0.5em;
    transition: 0.4s;
}

#service-description a:hover, #publications-description a:hover{
    background-color: var(--showmorecolor);
    color: var(--txtcolor);
}

#service-img-container img{
    width: 100%;
    height: auto;
    overflow: hidden;
}


/*==================
SLIDER
==================*/

.slider-wrapper{
    position: relative;
    max-width: 100%;
    height: 100%;
    margin: 0 auto;
}

.slider{
    display: flex;
    aspect-ratio: 16/9;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    width: 100%;
    height: 100%;
}

.slider img{
    width: 100%;
    height: 100%;
    flex: 1 0 100%;
    scroll-snap-align: start;
    object-fit: cover;
    overflow: hidden;
}

.slider-nav{
    display: flex;
    column-gap: 1rem;
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.slider-nav a{
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background-color: white;
    opacity: 0.75;
    transition:  opacity ease 250ms;
}

.slider-nav a:hover{
    opacity: 1;
}

/*=================
PROJECT SLIDER
===================*/

.project-slider-wrapper{
    position: relative;
    max-width: 100%;
    height: 100%;
    margin: 0 auto;
}

.project-slider{
    display: flex;
    aspect-ratio: 16/9;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    width: 100%;
    height: 100%;
    column-gap: 1em;
}

.carousel{
    /*overflow-x: auto;
    margin: 10em auto 3em auto;*/
    /*margin: 0 2.5em;*/
    display: flex;
    gap: 1em;
    list-style: none;
    scroll-snap-type: x mandatory;
    overflow-x: hidden;
    height: 100%;
}

.carousel li{
    height: 100%;
}

.carousel-wrapper{
    width: 100%;
    /*height: 100%;*/
    height: 80vh;
    /*height: 50em;*/
    position: relative;
    margin: auto 0 auto 0;
    overflow-y: auto;
}

.next-button, .prev-button{
    display: flex;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    align-items: center;
    background-color: transparent;
    border: none;
    padding: 0.5em;
    width: 3em;
    height: 90%;
    transition: all 0.3s;
    z-index: 5;
}

.next-button{
    right: 0;
}

.next-button:hover, .prev-button:hover{
    opacity: 0.7;
    cursor: pointer;
}

.slide img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    scroll-snap-align: start;
    overflow: hidden;
}

.slide, .slide[ii], .slide[iii], .slide[iiii]{
    flex: 0 0 10em;
    /*background-color: cornflowerblue;*/
    /*border: 1px solid red;*/
    align-content: center;
    text-align: center;
    color: var(--cleartxtcolor);
    scroll-snap-align: center;
    transition: all 0.3s;
    inset: 0;
    position: relative;
}

.slide h2{
    transition: opacity 0.4s, transform 0.4s;
    position: absolute;
    opacity: 0;
    font-weight: 100;
    font-size: 1.2em;
    position: absolute;
    text-transform: uppercase;
    bottom: 0.5em;
    left: 1.5em;
    transform: rotate(-90deg);
    transform-origin: bottom left;
    z-index: 2;
}

.slide a:focus h2, .slide:hover h2{
    /*border: 1px red solid;
    opacity: 1;
    font-weight: 100;
    position: absolute;
    text-transform: uppercase;
    bottom: 0;
    transform: translateY(1.5em);
    color: var(--cleartxtcolor);
    z-index: auto;*/

    transition: opacity 0.4s, transform 0.4s;
    opacity: 1;
}

.slide a:focus img, .slide:hover img{
    transition: opacity 0.4s, transform 0.4s;
    opacity: 0.2;
}

.h2-container{
    position: absolute;
    bottom: 0;
    left: 0;
}

.slide[ii]{
    flex: 0 0 15em;
}

.slide[iii]{
    flex: 0 0 25em;
}

.slide[iiii]{
    flex: 0 0 30em;
}

.slide:hover, .slide a:focus{
    cursor: pointer;
    
    /*outline: none;*/
}

.slide a{
    display: block;
    width: 100%;
    height: 100%;
}

.img-container a img{
    width: 100%;
    height: 100%;
    overflow: hidden;
    object-fit: cover;
    opacity: 1;
    display: block;
}

/*.img-container a img:hover{
    opacity: 0.4;
}*/

.img-container{
    width: 100%;
    height: 100%;
    z-index: 10;
}



/*=================
CONTATTI
=================*/


.contatti{
    width: 70%;
    /*margin: 5em auto auto auto;*/
    margin: auto;
    display: flex;
    flex-direction: row;
    height: 100%;
    align-items: center;
}

.contacts, .map{
    flex: 1;
}

.map iframe{
    width: 100%;
    padding: 0.5em 0 0.5em 0.5em;
}

.contacts{
    padding: 1em;
}

.contact{
    margin-top: 2em;
}

.contact i{
    font-size: 2em;
}

.single-contact{
    width: 70%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

/*=================
FOOTER
=================*/

footer{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    margin: 0 1em;
    color: white;
}

#footer-left, #footer-right, #footer-center{
    flex: 1;
    text-align: center;
    padding: 1em 0;
}

#footer-left a{
    color: var(--txtcolor);
    font-size: 2em;
    margin: 0.5em 0.5em;
}

footer i{
    color: var(--cleartxtcolor);
}

@media screen and (max-width: 1000px){
    html{
        font-size: 0.8em;
    }

    /*header{
        height: 50vh;
    }*/

    .title-long{
        display: none;
    }

    .title-short{
        display: block;
    }

    .contatti{
        flex-direction: column;
        width: 100%;
    }

    .single-contact{
        width: 100%;
    }

    .contacts{
        margin-top: 5em;
        width: 70%;
        align-items: center;
    }

    .menu-button{
        display: inline-block;
    }

    /*.grid-container{
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 150px 150px 150px 150px;
    }*/

    #menu{
        display: none;
    }

    #servizi, #pubblicazioni{
        flex-direction: column;
    }

    #sidebar{
        display: flex;
    }
    

    #service-description a, #publications-description a{
        position: static;
        display: inline-block;
    }

    .card{
        flex-direction: column;
    }

    .project-info{
        flex-direction: column;
        align-items: center;
    }

    .slide[ii]{
        flex: 0 0 30vw;
    }

    .slide[iii]{
        flex: 0 0 60vw;
    }

    .slide[iiii]{
        flex: 0 0 100vw;
    }

    footer{
        flex-direction: column;
    }
}
