:root{
  --nav-h: 72px;
  
}

/* Scroll: evita che le ancore finiscano sotto la navbar */
html{ scroll-behavior: smooth; }
section[id]{ scroll-margin-top: var(--nav-h); }

.body{
    background-color: #d8dde3;
    margin:0px;
}

.section{
    padding: 40px 60px 10px 40px;
    /* max-width:max(980px, calc(100% - 48px)) ; */
   /* width: min(980px, calc(100% - 48px));  */
   position: static;
   font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
   color: #333;
   
}

.container{
    padding: 20px;
}

/*font format*/
.h1{
    font-weight: 600;
    font-size: 1rem;
    height: 1.5rem;
    color: #475467;
}
.h2{
    font-weight: 700;
    font-size: 1.2rem;
    height: 2rem;
}

.h3{
    font-weight: 600;
    font-size: 1.3rem;
    height: 2rem;
}

.h4{
    font-family:'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    font-weight:bold;
    font-size: 1.4rem;
    height: 1.5rem;
    color: #101828;
}

.p{
    font-weight: 400;
}

.quote{
    font-style: italic;
}
/*NAVBAR*/
.section-navbar{
    z-index: 10; 
    position: relative;
  top: 0;
  /* z-index: -1; */
  background-image: url("assets/images/hero.png");
  background-size: cover;
  background-position: 100% 0;
  background-repeat: no-repeat;
  background-attachment: fixed;
  
 
}

.container-navbar{
    /* position: relative; */
    display: flex;
    flex-flow: row wrap;
    justify-content: space-between;
    align-items: stretch;
     /* box-shadow: rgba(0, 0, 0, 0.04) 0px 3px 5px; */
}

.logo img{
  display:inline-block;
}

/* Desktop menu (default) */
.nav-links{
  display:flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 40px;
  position: relative; /* necessario per dropdown su mobile */
   height: var(--nav-h);
}

.nav-links a{
  padding: 10px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.9);
  /* font-family: Montserrat, sans-serif; */
  font-weight: 600;
  font-size: large;
}



/*HERO SECTION*/
.hero{
    display: flex;
    flex-flow: column;
    align-items:left end;
    padding-top: 140px;
    padding-bottom: 40px;
    background-image: url("assets/images/hero.png");
    background-size: cover;
    background-position: 100% 0;
    background-repeat: no-repeat;
    background-attachment: fixed;
}


.hero-title{
    display: block;
    padding: 20px;
    position: static;
    margin: 20px 0 10px 40px;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 600;
    font-size: 38px;
    color: #243c66;
    
}


/*ABOUT SECTION*/
.intro p{
    font-size: large;
    
}




/*CONTACTS SECTION*/
.intestazione{
    margin-bottom: 1rem;
}
.contacts a{
    color: #aec5ec;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.listaContatti{
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    align-items: stretch;
    align-content: space-evenly;
    gap: 2rem;
    margin: auto;
    
}

.contact-item{
    display: flex;
    flex-direction: column;
    align-items: left;
    background-color: #4d7195;
    padding: 1.5rem;
    flex: 1;
    /* min-width: 0; */
    position: relative;
}


.contact-icon{
    background-color: #475467;
    border-radius: 1rem;
    width: 3.2rem;
    height: 3.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.contact-icon img{
    display: block;
     width: 1.8rem;
     height: 1.8rem;
}




/*FOOTER*/
.footer{
    background-color: #97a3ba;
    padding: 10px;
    margin-top: 4.5rem;
}

.footer-wrapper{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 10px;
}

.footer-wrapper a{
    padding: 5px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    
}

.footer-menu {
    font-weight: 600;
    font-size: medium;
    gap: 2rem;
    display: flex;
    flex-direction: row;
}



.footer-social{
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    align-items: center;
    padding: 10px 5px;
}
.social-item a{
    display: flex;
    flex-direction: row;
    align-content: left;
}

.social-item img{
    width: 20px;
    height: 20px;
    display: inline-block;
    align-items: baseline;
}

.social-item span{
    padding-left: 10px;
    padding-right: 10px;
    font-size: 14px;
    display: block;
}

.footer-copyright{
    font-size: 11px;
    color: #666;
    font-weight: 600;
}






/* Hamburger: nascosto su desktop */
.nav-toggle{
  display:none;
  border:0;
  background:transparent;
  padding:10px;
  cursor:pointer;
}



/* Icona hamburger */
.bars{
  display:inline-block;
  width:24px;
  height:2px;
  background: rgba(255, 255, 255, 0.9);
  position:relative;
}
.bars::before,
.bars::after{
  content:"";
  position:absolute;
  left:0;
  width:24px;
  height:2px;
  background: rgba(254, 255, 255, 0.9);
}
.bars::before{ top:-7px; }
.bars::after{ top:7px; }

/* Stato aperto (X) */
.nav-open .bars{ background:transparent; }
.nav-open .bars::before{ top:0; transform:rotate(45deg); }
.nav-open .bars::after{ top:0; transform:rotate(-45deg); }

/* --- MOBILE/TABLET --- */
@media (max-width: 900px){
  :root{ --nav-h: 64px; }

    .section{
    padding: 0px;
    }
    .section-navbar{
    background-position: left 65% top 0;
    background-size: auto;
    }   
    .hero{
    background-position: left 65%  top 0;
    background-size: auto;
    }
  .nav-toggle{ display:block; }

  /* nascondo i link su mobile */
  .nav-links{
    display:none;
    position:absolute;
    top: 100%;         /*  invece di var(--nav-h)*/
    left: 0;
    right: 0;
    flex-direction:column;
    gap: 12px;
    padding-bottom: 60px;
    padding-top: 30px;
    align-items: center;
    background: #b6b7c5;
    /* border-bottom: 1px solid rgba(0,0,0,.06); */
  }

  .nav-open .nav-links{
    display:flex;
  }
}

