*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    color: #332a21;
    font-family: 'PT Sans', sans-serif;
}

a{
    text-decoration: none;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}

ul{
    list-style: none;
}

h1{
    font-size: 24px;
}

h2 {
    font-size: 22px;
}

h2 {
    font-size: 18px;
}

h3 {
    font-size: 16px;
}

.yellow {
    background-color: #ffd77d;
}

.lightblue {
    background-color: #afccc9;
}

.red {
    background-color: #f46e6e;
}

.circlered {
    border-radius: 50%;
    background: radial-gradient(#f46e6e 60%, transparent 40%) no-repeat;
}

.circlelightblue {
    border-radius: 50%;
    background: radial-gradient(#afccc9 60%, transparent 40%) no-repeat;
}

.circleyellow {
    border-radius: 50%;
    background: radial-gradient(#ffd77d 60%, transparent 40%) no-repeat;
}

/* Header */
.header{
    background-color: #fff;
    position: sticky;
    top: 0;
    width: 100%;
    height: 100px;
    border-bottom: 2px solid #165c84;
}

.header img{
    max-width: 100px;
    padding-top: 10px;
}

/* Logo */
.logo{
    margin-left: 20px;
}

#frase {
    /*margin-top: 120px;*/
    text-align: center;
    padding: 10px 0;
    /*font-size: 1.3em;*/
    font-weight: 600;
    color: #ffd77d;
    background-color: #165c84;
}

.frase2 {
    text-align: center;
    font-size: 1.2em;
    font-weight: 600;
    color: #165c84;
    margin-top: 2%;
    padding-top: 1%;
    border-top: 2px solid #165c84;
}

/*.line {
    border-bottom: 2px solid #165c84;
    margin-bottom: 1%;
    width: 100%;
}*/

#main {
    /*background-color: cadetblue;*/
    /*margin-top: 120px;*/
    display: flex;
    flex-direction: column;
    padding: 1%;
    width: 85%;
    margin: auto;
    min-height: calc(100vh - 340px);
}

#sectionyellow {
    display: flex;
    align-items: center;
    background-color: #ffd77d;
}

.section {
    display: flex;
    align-items: center;
}

.sectionvert {
    display: flex;
    align-items: center;
    flex-direction: column;
}

.chisiamo {
    display: flex;
    align-items: center;
    /*background-color: #ffe2ab;*/
}

.border {
    border-top: 2px solid #165c84;
    border-bottom: 2px solid #165c84;
    padding: 15px 0;
}

#fotoa {
    flex-basis: 45%;
    padding: 2%;
    background-image: url(../img/blob2.svg);
    background-repeat: no-repeat;
    background-size: 90% 90%;
    background-position: center;
}
#fotoa img{
    display: block;
    width: 75%;
    margin-left: auto;
    margin-right: auto;
    border-radius: 50%;
    border: 10px solid #ffd77d;
}

#fotob {
    flex-basis: 45%;
    padding: 2%;
    background-image: url(../img/bloblb.svg);
    background-repeat: no-repeat;
    background-size: 90% 90%;
    background-position: center;
} 
#fotob img{
    display: block;
    width: 75%;
    margin-left: auto;
    margin-right: auto;
    border-radius: 50%;
    border: 10px solid #afccc9;
}

#fotoc {
    flex-basis: 45%;
    padding: 2%;
    background-image: url(../img/blobvi.svg);
    background-repeat: no-repeat;
    background-size: 90% 90%;
    background-position: center;
} 
#fotoc img{
    display: block;
    width: 75%;
    margin-left: auto;
    margin-right: auto;
    border-radius: 50%;
    border: 10px solid #f46e6e;
}

.profilo {
    flex-basis: 55%;
    padding: 20px;
    /*background-image: url(../img/blob.png);
    background-size: 100% 100%;*/
    /*background-color: #ccd6d4;*/
    text-align: center;
    line-height: 150%;
    margin-left: 20px;
    border-radius: 15px;
}

.profilo a{
    color: #165c84;
}

.profilo a:hover{
    color: #f7913b;
}

.profilo h2{ 
    color: #165c84;
}

.profilo p{
    text-align: justify;
    padding-top: 2%;
}

.profilo h3{ 
    padding-top: 2%;
}

.leftside {
    flex-basis: 65%;
    padding: 2%;
    background-image: url(../img/blob2.svg);
    background-size: 100% 100%;
}

.leftside img{
    display: block;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    /*padding: 20px;*/
} 

.leftside p{
    font-size: 18px;
    text-align: justify;
}

.rightside {
    flex-basis: 35%;
    padding: 20px;
    text-align: center;
    line-height: 150%;
}

.rightside img{
    display: block;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    /*padding: 20px;*/
} 

/*pagina SERVIZI*/
.leftsides {
    flex-basis: 60%;
    padding: 2%;
}

.leftsides img{
    display: block;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    /*padding: 20px;*/
} 

.leftsides p{
    font-size: 18px;
    text-align: justify;
}

.leftsides ul{
    font-size: 18px;
    list-style: inside;
    margin-left: 20px;
}

.rightsides {
    flex-basis: 40%;
    padding: 20px;
    text-align: center;
    line-height: 150%;
    color: #165c84; 
}

.rightsides h1{
    padding: 10px;
    border-radius: 50%;
}

.rightsides img{
    display: block;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-top: 10px;
}
/* fine pagina SERVIZI*/

#quota {
    flex-basis: 35%;
    padding: 20px;
    background-image: url(../img/blob.svg);
    background-size: 100% 100%;
    text-align: center;
    line-height: 150%;
}

#quota img{
    display: block;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    /*padding: 20px;*/
} 

#terapia {
    min-width: 100%;
    padding: 2%;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
}

.item {
    flex-basis: 30%;
    padding: 10px;
    background-color: #165c84;
    border-radius: 5px;
    text-align: center;
    /*min-height: 135px;*/
    align-self: stretch;
    transition: ease 0.2s;
}

.item:hover {
    animation:  shake 0.5s;
  }
  
  @keyframes shake{
    0%{
      transform: translateX(0)
    }
    25%{
      transform: translateX(3px);
    }
      
    50%{
      transform: translateX(-3px);
    }
    100%{
      transform: translateX(0px);
    }
  }

.item h3{
    color: #ffd77d;
    padding-bottom: 2%;
    font-weight: 600;
    padding: 4% 0;
    letter-spacing: 0.12em;
}

.item p{
    color: #ffffff;
    padding-bottom: 2%;
    font-weight: 500;
    font-size: 18px;
    padding: 4% 0;
}

#collaborazioni {
    background-color: #afccc9;
    border-radius: 10px;
    flex-basis: 100%;
    padding: 2%;
    text-align: justify;
}

#collaborazioni h3{
    color: #165c84;
    padding-bottom: 1%;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.15em;
}

#staff {
    margin-top: 2%;
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    width: 100%;
    padding: 1%;
}

.miniatura {
    flex-basis: 30%;
    padding: 10px;
    display: flex;
    flex-direction: column;
    
    min-width: 150px;
}

.miniatura a{
    color:#165c84
}

.miniatura a:hover{
    color:#f46e6e;
}

.boxfoto {
    flex-basis: 50%;
    padding: 20px;
    background-image: url(../img/blob2.svg);
    background-repeat: no-repeat;
    background-size: 90% 90%;
    background-position: center;
    transition: ease 0.3s;
}

.boxfoto:hover{
    padding: 16px;
}

.boxfoto img{
    border-radius: 50%;
    border: 10px solid #ffd77d;
    width: 100%;
}

.boxtext {
    flex-basis: 50%;
    color: #165c84;
    font-weight: 600;
    text-align: center;
    margin: auto;
}

/*#staff img{
    display: block;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: 0 0 20px 0;
} */

footer {
    background-color: #165c84;
    /*background-image: url(../img/puzzle.png);*/
    text-align: center;
    padding: 15px;
    color: #a6cfcb;
    border-top: 3px solid #ffd77d;
}

footer h3{
    letter-spacing: 0.12em;
    color: #fff;
}

/** LIGHTBOX MARKUP **/

.lightbox {
    /* Default to hidden */
    display: none;
     
    /* Overlay entire screen */
    position: fixed;
    z-index: 999;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    
    /* A bit of padding around image */
    padding: 1em;
  
    /* Translucent background */
    background: rgba(255, 226, 171, 0.8);
  }
  
  /* Unhide the lightbox when it's the target */
  .lightbox:target {
    display: flex;
    justify-content: center;
    align-items: center;

  }
  
  .center {
    height: 60%;
    width: 60%;
    border: 1px solid #165c84;
    padding: 10px;
    background-color: #fff;
    min-height: 260px;
  }

 /* .lightbox span {
    /* Full width and height 
    display: block;
    width: 100%;
    height: 100%;*/
  
    /* Size and position background image
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
  }*/

  #contatti {
    width: 100%;
    height: 35%;
    color:#165c84;
    line-height: 30px;
    padding: 1%;
  }

  #contatti h2{
    font-weight: 600;
  }

  #map {
    height: 65%;
    padding: 1%;
  }

  #copy {
    width: 65%;
    margin: auto;
    font-size: 12px;
    padding-top: 10px;
    border-top: 1px solid #fff;
  }

  #copy a{
    color: #ffd77d;
  }

  #copy a:hover{
    color: #f7913b;
  }

@media (max-width: 767px) {   
    #frase h1{
        font-size: 18px;
        font-weight: 600;
        padding-left: 20px;
        padding-right: 20px;
    }
    #fotoa #fotob #fotoc{
        background-size: 100% 100%;        
    }
    .section {
        /*background-color: cadetblue;*/
        display: flex;
        flex-direction: column;
    }
    #sectionyellow {
        /*background-color: cadetblue;*/
        display: flex;
        flex-direction: column;
        padding-bottom: 15px;
    }
    .leftside {
        flex-basis: 100%;
    }
    .leftside img{
        padding: 10px;
    }
    .profilo {
        padding: 10px 20px 10px 10px;
        line-height: 120%;
        margin: 20px 0 0 0;
    }
    .righside {
        flex-basis: 100%;
        padding: 10px;
        line-height: 120%;
    }
    .rightside img{
        width: 60%;
    } 
    #quota {
        flex-basis: 100%;
        padding: 10px;
        line-height: 120%;
    }
    #quota img{
        width: 60%;
    } 
    #terapia {
        flex-direction: column;
        padding: 2% 0;
    }
    .item {
        margin: 1% 10%;
    }
    .item h3 {
        font-size: 18px;
        padding: 1% 0;
    }
    .item p {
        font-size: 16px;
        padding: 1% 0;
    }
    .center {
        height: 75%;
        width: 75%;
      }
    #contatti {
        font-size: 16px;
      }
    .boxfoto img {
        width: 120%;
        margin-left: -10%;
    }
    .order1{
        order: 1;
    } 
    .order2{
        order: 2;
    } 
}

@media (max-height: 767px) {
    .center {
        display: flex;
        justify-content: space-between;
    }
    #contatti {
        flex-basis:  45%;
        height: 100%;
    }
    #map {
       flex-basis: 45%;
       height: 100%;
    }    
}

@media (max-height: 768px), (min-height: 600px) {
    .center {
        display: flex;
        flex-direction: column;
    }
    #contatti {
        flex-basis:  45%;
    }
    /*#map {
        flex-basis:  45%;
    }  */  
}

@media (max-width: 565px){
    .chisiamo {
        /*background-color: cadetblue;*/
        display: flex;
        flex-direction: column;
        padding-bottom: 15px;
    }
    /*.foto {
        flex-basis: 100%;
    }*/
    /*.foto img{
        padding: 10px;
    }*/
    .profilo {
        flex-basis: 100%;
        padding: 10px;
    }
    footer {
        font-size: smaller;
        padding: 10px;
    }
    #staff {
        flex-direction: column;
    } 
    .miniatura {
        flex-basis: 100%;
        margin: 1% 10%;
    }
    .boxfoto {
        order: 1;
    }    
    .boxfoto img{
        width: 100%;
        margin-left: 0;
    }
    .boxtext {
        order: 2;
    } 
    .miniatura br{
        display: none;
    }
}