/* ------------------- RESET ------------------- */
*{
    margin: 0;
    padding: 0;
    border: 0;
    box-sizing: border-box;
    font-size: 100%;
}

ul,
li{
    list-style: none;
}
a{text-decoration: none;}

img{
    max-width: 100%;
    height: auto;
}
html {
    scroll-behavior: smooth;
}
body{
    overflow-x: hidden;
}
html *,
html *:before,
html *:after,
html span {
  box-sizing: border-box;
  transition: 0.5s ease-in-out;
}

/* ------------------- COLORS ------------------- */
:root {
    --white: #ffffff;
    --grey: #EFEFEF;
    --black: #000000;
    --red: #E50019;
    --blue: #005070;
}

/* ------------------- TYPOGRAPHY ------------------- */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400;1,500;1,600;1,700;1,800&display=swap');

body{
    font-family: "Open Sans", sans-serif;
}
h1 {
    font-size: 34px;
    font-weight: 500;
    line-height: 36px;
    letter-spacing: -0.5px;
}
h2{
    font-size: 30px;
    font-weight: 400;
    line-height: 30px;
    letter-spacing: -0.5px;
}
h3{
    font-size: 20px;
    font-weight: 400;
    line-height: 18px;
    letter-spacing: -0.5px;
}
p{
    font-size: 16px;
    font-weight: 400;
    line-height: 16px;
}
.fs-18{
    font-size: 18px;
    line-height: 28px;
}

@media(min-width: 1050px){
    h1{
        font-size: 45px;
        line-height: 55px;
    }
    h2{
        font-size: 40px;
        line-height: 45px;
        width: 50vw;
        margin: 0 auto;
    }
    h3{
        font-size: 20px;
        font-weight: 400;
        line-height: 18px ;
        letter-spacing: -0.5px;
    }
    .fs-18{
        font-size: 20px;
        line-height: 30px;
    }
}

/* ------------------- BUTTONS ------------------- */
.services .button, #thankyou .button, #contattaci input[type="submit"]{
    color: #E50019;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
#contattaci input[type="submit"]{
    height: 100%;
    width: 100%;
    z-index: 999;
}
.button{
    position: relative;
    display: block;
    overflow: hidden;
    width: 100%;
    height: 40px;
    margin: 20px auto;
    border-bottom: 1px solid #E50019;
}
.services .button{
    max-width: 140px;
}
#thankyou .button{
    max-width: 200px;
}
.services .button span, #thankyou .button span{
    padding: 10px 20px;
}
#contattaci .button{
    max-width: 80px;
}
.button:before{
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: #E50019;
    transform: translateY(100%);
    transition: 0.5s ease-in-out;
}
.button:before{
    z-index: 9;
}
.services .button span:hover, #thankyou .button span:hover, #contattaci .button input[type="submit"]:hover{
    color: #ffffff !important;
    z-index: 99;
}
.button:hover:before {
    transform: translateY(0);
}

/* Scroll */
.scopri{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    color: black;
    padding: 30px 0;
}
.arrow-scroll .arrow-scroll__wrap {
    display: inline-block;
    transition: all ease-in-out 0.2s;
    cursor: pointer;
    margin-top: 10px;
}
.arrow-scroll .arrow-scroll__wrap:hover{
    opacity: 0.5;
}
.arrow-scroll .arrow-scroll__wrap_animated {
    animation: arrow-scroll 1.7s infinite ease;
}

/* ------------------- HEADER ------------------- */
header{
    padding: 50px 20px;
    text-align: center;
}
header #logo{
    width: 100px;
}
header h1{
    padding: 50px 0 30px 0;
}
header p{
    color: rgba(0, 0, 0, 0.8);
}
header .images{
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 10px;
}
header .images img:first-child{
    grid-area: 1 / 1 / 4 / 4;
}
header .images img:nth-child(2){
    grid-area: 2 / 4 / 6 / 6;
}
header .images img:nth-child(3){
    grid-area: 4 / 2 / 6 / 5;
}

@media(min-width: 700px){
    header .images{
        width: 80vw;
        height: 80vw;
        margin: 0 auto;
    }
}

@media(min-width: 1050px){
    header{
        padding: 50px 100px;
    }
    header .header-content{
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        justify-items: center;
        gap: 50px;
        padding: 100px 0;
    }
    header .images, header .description{
        width: 30vw;
    }
    header .images{
        height: 30vw;
    }
    header .images img:first-child{
        align-self: end;
    }
    header #logo{
        width: 200px;
    }
}

/* ------------------- FOOTER ------------------- */
footer{
    background: #005070;
    padding: 50px 20px 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
}
footer p{
    font-size: 14px;
    text-align: center;
}
footer a{
    color: white;
}
footer h3{
    font-size: 20px;
    text-align: center;
    padding-bottom: 10px;
}
footer li{
    padding: 3px 0;
}
footer .flex{
    display: flex;
    justify-content: center;
}
footer li i{
    padding-right: 10px;
}
footer .social{
    padding: 10px 0;
}
footer .social i{
    display: flex;
    align-items: center;
}
footer .social a{
    padding: 10px;
    transition: all 200ms ease-in;
}
footer .social a:hover{
    transform: scale(1.1);
}

/* ------------------- MAIN ------------------- */
section{
    padding: 50px 20px;
}
.section-grey{
    background: #EFEFEF;
}
#certificazioni{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: center;
    justify-items: center;
    gap: 20px;
    padding: 50px 30px;
}
#thankyou{
    height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
#thankyou h2{
    color: #E50019;
    text-align: center;
}
#thankyou p{
    padding: 50px 0 30px 0;
}

@media(min-width: 1050px){
    section{
        padding: 100px;
    }
    #certificazioni{
        padding: 100px 25vw;
        gap: 80px;
    }
}

/* ------------------- SERVICES ------------------- */
.services{
    text-align: center;
}
.services .label{
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #E50019;
}
.services h2{
    padding: 10px 0 50px 0;
}
.anchor{
    padding-top: 50px;
}

@media(min-width: 1050px){
    .services .label{
        font-size: 16px;
    }
    .service h2{
        padding: 15px 0 70px 0;
    }
    .anchor{
        padding-top: 70px;
    }
}

/* ------------------- CONTATTACI ------------------- */
#contattaci{
    text-align: center;
}
#contattaci form{
    padding-top: 10px;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}
#contattaci input[type="text"], #contattaci input[type="email"], #contattaci textarea{
    padding: 10px 20px;
    margin: 10px 0;
    border-bottom: 1px solid #D6D6D6;
    color: rgba(0, 0, 0, 1);
    width: 100%;
    background: transparent;
}
#contattaci textarea{
    font-family: 'Open Sans';
    min-height: 150px;
}
#contattaci input::placeholder{
    color: rgba(0, 0, 0, 0.6);
}
#contattaci .input-box{
    text-align: left;
}
#contattaci .input-box span{
    color: rgba(0, 0, 0, 0.6);
    margin-left: 10px;
}
#contattaci .input-box span a{
    color: rgba(0, 0, 0, 0.8);
    font-weight: 600;
}
#contattaci .input-box span a:hover{
    color: rgba(0, 0, 0, 1);
}
#contattaci input[type="text"]:focus, #contattaci input[type="email"]:focus, #contattaci textarea:focus{
    border-radius: 3px;
    outline: none;
    box-shadow: 0 0 0 1px #E50019;
}

@media(min-width: 1050px){
    #contattaci{
        padding: 100px 0;
    }
    #contattaci form{
        width: 60vw;
        margin: 0 auto;
    }
    #contattaci .form-container{
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 50px;
    }
    #contattaci textarea{
        height: calc(100% - 20px);
    }
}

/* ------------------- CARDS ------------------- */
.service-container{
    display: grid;
    gap: 50px;
}
.service-card{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.service-card img{
    width: 70px;
}
.service-card h3:after{
    display: block;
    content: "";
    width: 40px;
    height: 2px;
    border-radius: 2px;
    background-color: #E50019;
    margin: 20px 0 17px 0;
}
.service-card h3{
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.service-card p {
    font-weight: 200;
    color: rgba(0, 0, 0, 0.8);
    padding: 3px;
    text-align: center;
}

@media(min-width: 1050px){
    .service-container{
        grid-template-columns: repeat(3, 1fr);
        align-items: start;
    }
    .service-card p{
        width: auto;
    }
}