/* Stile base */
html {
  scroll-behavior: smooth;
}
body {
  font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: white;
  color: #333;
}
/*Menù*/
#top-menu {
  position: fixed;
  top: 0;
  left: 0; 
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  z-index: 1000;
  padding: 10px 0;
  backdrop-filter: blur(8px);
}

#top-menu ul {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  justify-content: flex-end;
  gap: 30px;
  margin: 0;
  padding-right: 2%;
  padding-top: 1%;
  padding-bottom: 1%;
}

#top-menu a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  font-family: sans-serif;
  transition: color 0.3s, border-bottom 0.3s;
  padding-bottom: 4px;
}

#top-menu a:hover,
#top-menu a.active {
  color: #0078ff;
  border-bottom: 2px solid #0078ff;
}

/* Per evitare che il menu copra il contenuto in alto */
body {
  padding-top: 60px;
}

/* Header */
/* ====== VERSIONE 1 =====
header {
  color: black;
  padding: 50px 20px;
  text-align: center;
  height: 560px;
  background-color: white;
  background: 
  linear-gradient(rgba(255, 255, 255, 0.6)), url("img/borgo3.jpg") bottom center;
  background-repeat: repeat-x;
  background-size: 35%;
  margin: 0;
}

header h1 {
  font-size: 3rem;
  margin-bottom: 10px;
}

header p {
  font-size: 2rem;
  margin-bottom: 20px;
}
#logo{
  width: 10%;
}
*/
header {
  color: black;
  padding: 50px 20px;
  text-align: center;
  height: 480px;
  background-color: white;
  background: 
  linear-gradient(rgba(255, 255, 255, 0.6)), url("img/landscape.jpg") center center;
  background-repeat: no-repeat;
  background-size: contain;
  margin: 0;
}
#header_container{
  width: 35%;
  margin-left: 32%;
  margin-top: 4%;
  background-color: white;
  border-radius: 20px;
  padding: 30px;
  padding-left: 15px;
  padding-right: 15px;
}
#header_container h1 {
  font-size: 2.4rem;
  margin-bottom: 10px;
}

#header_container p {
  font-size: 1.6rem;
  margin-bottom: 20px;
}
#logo{
  width: 20%;
}

#slogan #casa{
    color: #3b4fa2;
    font-weight: bold;
}
#slogan #bel{
    color: #d13e3e;
    font-weight: bold;
}
#borgo{
    width: 30%;
    padding: 0;
    margin-left: 0%;
}

/* Pulsante */
.btn {
  display: inline-block;
  background: #3b50a2;
  color: white;
  padding: 12px 20px;
  border-radius: 15px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s, color 0.3s;
  margin-top: 2%;
}

.btn:hover {
    background: #3b50a26b;
    color: black;
}

/* Sezioni */
section {
  padding: 60px 20px;
  text-align: center;
}

section h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: black;
}

section p {
  font-size: 1rem;
  margin: 0 auto;
}

/* Problema */
#problema{
  height: 450px;
  margin-top: -1%;
  background-image: url("img/casa2.svg");
  background-repeat: no-repeat;
  background-size: 25%;
  background-position-x: 24%;
  background-position-y: bottom;
  padding-left: 18%;
}
#problema h2{
  text-align: left;
  font-size: 3rem;
  line-height: 1.4;
}
#problems_container{
  width: 30%;
  padding: 10px 50px;
  background-color: white;
  border-radius: 20px;
  margin-left: 50%;
  margin-top: -10%;
  padding: 30px 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  border-top: 10px solid #d13e3e;
}
#problems_container:hover{
  box-shadow: 0 4px 30px rgba(0,0,0,0.1);
  transition: 0.5;
}
.problem-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px 0;
  text-align: left;
}
.problem-item img {
  width: 40px;
  height: 40px;
}

.problem-item p {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.4;
}

.divider {
  height: 1px;
  background-color: #ddd;
  margin: 0 10px;
}

/* Proposta */
#proposta{
  background-image: url("img/donna.png");
  background-repeat: no-repeat;
  background-size: 40%;
  background-position: 110% -15%;
  height: 400px;
  padding-left: 10%;
}
#proposta h2{
  text-align: center;
  font-size: 3rem;
  margin-top: 0%;
  margin-left: -15%;
  margin-bottom: 4%;
}
.silana{
  color: #3b50a2;
}
.info{
  width: 70%;
  font-size: 1.1rem;
  text-align: left;
  margin-left: 0%;
  line-height: 1.3;
}
#offerte_container{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 5%;
  margin-top: 5%;
  width: 60%;
  margin-left: -3%;
}
#offerte_container .element:nth-child(3n) {
  margin-right: 0;
}
.element {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 25%;
  height: 100px;
  text-align: center;
  background-color: #3b50a213;
  border-radius: 20px;
  padding: 10px 10px 10px 10px;
}
.element p{
  text-align: center;
  width: 80%;
  margin-left: 10%;
}
.element:hover{
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  transition: 0.3s;
}
#grafico p{
  font-size: 1.2rem;
  margin-bottom: 3%;
}
#img_grafico{
  width: 50%;
  margin-left: 0%;
}


/* About */
#about {
  padding: 40px 20px;
  background: #3b50a213;
  text-align: center;
}

#about h2 {
  font-size: 2rem;
  margin-bottom: 50px;
}
.team-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 120px;
}
.member {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 500px;
  text-align: center;
}
.team {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 15px;
  background: #ddd; /* segnaposto */
}
.team:hover{
    width: 210px;
    height: 210px;
    transition: 0.3s;
}
.member h3 {
  font-size: 1.5rem;
  margin: 10px 0 5px;
  color: #3b4fa2;
  font-weight: bold;
}
.member p {
  font-size: 1.2rem;
  color: #555;
  line-height: 1.5;
}
.member .ruolo{
    font-weight: bold;
    color: #d13e3e;
}

/* Mission */
#mission {
  margin-top: -2%;
}
#mission p {
  line-height: 1.6;
  font-size: 1.3rem;
}
.container-switch{
  margin-top: 2%;
}
.divider2{
  height: 1px;
  background-color: #ddd;
  margin: 0 10px;
  width: 10%;
  margin-left: 45%;
  margin-top: 1%;
  margin-bottom: 1%;
}
/*Slider*/
.image-box img {
  width: 500px;
  max-width: 90%;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: opacity 0.5s ease;
}
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
  margin-top: 10px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 34px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}
/* Stato attivo */
input:checked + .slider {
  background-color: #3b4fa2;
}
input:checked + .slider:before {
  transform: translateX(26px);
}
#prima_dopo{
  color: #d13e3e;
  font-weight: bold;
  margin-top: 1%;
}


/* Contatti */
#contatti {
  padding: 20px 0px 20px 70px;
  border-radius: 15px;
  width: 95%;
  margin-top: -2%;
  margin-bottom: 10%;
  margin-right: 0%;
  margin-left: 0%;
  text-align: center;
  background-image: url("img/contatti.png");
  background-position-x: right;
  background-position-y: 90%;
  background-repeat: no-repeat;
  background-size: 35%;
}
#contatti h2 {
  margin-bottom: 20px;
  text-align: left;
  font-size: 3rem;
}
#contatti p {
  margin-bottom: 20px;
  text-align: left;
}
#contatti form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
  margin-bottom: 20px;
}
#contatti form input[type="email"] {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #ccc;
  width: 100%;
  max-width: 300px;
  box-sizing: border-box;
}
.contact-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10%;
  width: 60%;
  margin-left: 0%;
  margin-top: 5%;
}
.contact-container .signup-block, .questionari-block{
  background-color: #3b50a213;
  border-radius: 10px;
  padding: 10px 10px;
  text-align: center;
  box-sizing: border-box;
  width: 45%;
  margin-left: 0%;
  padding: 20px 20px;
}
.questionari-block{
  height: 300px;
}
.signup-block h3 {
  margin-bottom: 15px;
  font-size: 1.5rem;
}
#contatti .questionari-block p{
  line-height: 1.8;
  margin-bottom: 2%;
  text-align: center;
  margin-left: 0%;
}
.questionari-block select{
  margin-left: 0%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #ccc;
  width: 100%;
  max-width: 300px;
  box-sizing: border-box;
}
button{
  cursor: pointer;
  border: none;
  font-size: 1rem;
  font-variant: small-caps;
}
#button_questionari{
  display: block;
  font-size: 1rem;
  width: 40%;
  padding-left: 5px;
  padding-right: 5px;
  margin-left: 0%;
}
.contact-container #p{
  text-align: center;
  font-size: 0.8rem;
}

/* Footer */
footer {
  background: #121212;
  color: white;
  text-align: center;
  padding: 40px;
  font-size: 1.4rem;
}
footer #footer-container{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 120px;
    width: 100%;
}
.footer-element {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 300px;
  text-align: center;
}
#el1{
  margin-right: 0%;
}
footer p{
  font-size: 1.2rem;
}
#p3{
  font-size: 0.8rem;
}


/* =========================================
   ADATTAMENTI RESPONSIVE
   ========================================= */
@media (max-width: 1130px) {
  header{
    height: 430px;
    padding: 0;
    padding-top: 5%;
    margin: 0;
    background-position: center center;
  }
  #header_container{
    margin-top: 2%;
  }
  #proposta{
    background-position-y: -80%;
  }
  #grafico p{
    width: 80%;
  }
  #grafico img{
    width: 70%;
    margin-left: 5%;
  }
  #contatti{
    width: 95%;
    margin: 0;
    padding-left: 30px;
    gap: 2%;
    background-image: none;
    margin-top: -5%;
  }
  .contact-container{
    width: 100%;
    margin: 0;
    margin-bottom: 5%;
  }
}

/* --- Tablet grandi e piccoli (max 1024px) --- */
@media (max-width: 1024px) {

  /* --- VERSIONE HEADER 1 
  header {
    height: 500px;
    background-size: 50%;
  }
--- */

  header{
    height: 350px;
    padding: 0;
  }
  #header_container{
    width: 50%;
    margin-left: 25%;
  }
  #header_container h1{
    font-size: 1.8rem;
  }

  #offerte_container {
    width: 80%;
    gap: 4%;
  }
  .element {
    width: 20%;
    height: auto;
    padding: 20px;
  }
  .element p{
    font-size: 0.9rem;
  }
  #problema {
    background-size: 35%;
    background-position-x: 10%;
    padding-left: 10%;
  }
  #problems_container {
    width: 45%;
    margin-left: 45%;
    margin-top: 0%;
  }
  .team-container {
    gap: 60px;
  }
  footer #footer-container {
    gap: 60px;
  }
  header h1 {
    font-size: 2.5rem;
  }
  #problema h2, #proposta h2{
    font-size: 2.5rem;
  }
  #proposta{
    background-size: 50%;
    background-position: 130% -250%;
  }
  #grafico p{
    width: 80%;
    margin: 0;
    margin-left: 10%;
    margin-bottom: 2%;
  }
  #grafico img{
    width: 80%;
    margin-left: 5%;
  }
   .questionari-block, .signup-block{
    width: 45%;
    margin-left: 0%;
    margin-top: 0%;
  }
  .questionari-block p, .signup-block p{
    font-size: 1rem;
  }
  .questionari-block h2, .signup-block h2{
    font-size: 1.2rem;
  }
  #button_questionari{
    width: 100%;
  }
  .image-box{
    width: 60%;
    margin: 0;
    margin-left: 20%;
  }
}

/* --- Smartphone orizzontali e tablet piccoli (max 768px) --- */
@media (max-width: 768px) {
  nav{
    width: 100%;
    margin: 0%;
  }
  header {
    height: auto;
    background-size: 20%;
    background-position-y: bottom;
  }

  header h1 {
    font-size: 2.2rem;
  }

  header p {
    font-size: 1.4rem;
  }
  #header_container{
    width: 90%;
    margin-left: 2%;
    margin-right: 0%;
  }
  #logo{
    display: none;
  }
  #top-menu ul {
    gap: 15px;
    padding-right: 5%;
  }

  #offerte_container {
    width: 90%;
    flex-direction: column;
    align-items: center;
  }
  .element {
    width: 80%;
    height: auto;
    margin-bottom: 15px;
    margin-left: 10%;
  }

  #problema {
    height: auto;
    background-color: white;
    background-image: none;
    padding: 20px;
  }
  #problema h2{
    text-align: center;
  }

  #problems_container {
    width: 80%;
    margin: 20px auto;
  }
  #proposta {
    background: none;
    text-align: center;
    padding: 30px 10px;
    height: auto;
  }
  #proposta h2 {
    margin-left: 0;
    font-size: 2.2rem;
  }
  .info {
    width: 90%;
    margin: 0 auto;
  }
  #grafico{
    margin-top: -5%;
    width: 90%;
  }
  #grafico p{
    width: 95%;
    padding: 0;
    margin: 0%;
  }
  #grafico img{
    width: 100%;
    margin-left: 0%;
    margin-top: 5%;
  }
  .team-container {
    display: block;
  }
  #about{
    padding: 0%;
    padding-top: 20px;
    padding-bottom: 20px;
  }
  .member{
    align-items: center;
    margin-top: 2%;
    width: 80%;
    margin-left: 10%;
  }
  #contatti {
    background: none;
    padding: 20px;
  }
  #mission{
    padding-left: 0;
    padding-right: 0;
    width: 100%;
    margin-left: 0%;
  }
  .contact-container {
    flex-direction: column;
    align-items: center;
    width: 90%;
  }
  .image-box{
    width: 80%;
    margin: 0;
    margin-left: 10%;
  }

  .contact-container .signup-block,
  .questionari-block {
    width: 100%;
    margin-top: 2%;
  }
  footer #footer-container {
    flex-direction: column;
    gap: 40px;
    width: 80%;
    margin: 0;
  }
  #contatti {
    width: 90%;
    padding-left: 0px;
    padding-right: 0px;
    margin-left: 10%;
  }
}

/* --- Smartphone piccoli (max 480px) --- */
@media (max-width: 480px) {
  body {
    font-size: 0.9rem;
  }
  header h1 {
    font-size: 1.8rem;
  }
  header p {
    font-size: 1.2rem;
  }
  #top-menu{
    width: 100%;
    margin: 0;
  }
  #top-menu ul {
     flex-wrap: wrap;
    justify-content: center;
    padding-right: 0;
      }
  .btn {
    width: 80%;
    padding: 10px;
    font-size: 0.9rem;
  }
  #offerte_container {
    width: 100%;
  }
  .element {
    width: 80%;
    padding: 15px;
    margin-left: auto;
  }
  #problems_container {
    width: 90%;
    padding: 20px;
  }

  #contatti h2 {
    font-size: 2rem;
  }

  footer {
    font-size: 1rem;
    padding: 30px 10px;
  }
  #contatti {
    width: 90%;
    padding-left: 0px;
    margin-left: 5%;
  }
}

/* Logo initially hidden, appears on scroll */
#logo-link{
  position: absolute;
  top: 10px;
  left: 25px;
  display: flex;
  align-items: center;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity .4s ease, transform .4s ease;
  z-index: 1100;
}

#logo-link.visible{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Make room so menu items don't overlap the logo */
#top-menu ul{ padding-left: 100px; }

#logo-fixed{ height: 64px; width:auto; }

/* Mobile: keep it simple (always visible and centered above menu) */
@media (max-width: 768px){
  #logo-link{
    position: static;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    justify-content: center;
    margin-bottom: 6px;
  }
  #top-menu ul{ padding-left: 0; justify-content: center; }
}

/* Instagram icon */
footer .social {
  margin-top: 10px;
  font-size: 1.1rem;
}

footer .social a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.3s ease;
}

footer .social a:hover {
  opacity: 0.8;
}

.social-icon {
  width: 18px;
  height: 18px;
  vertical-align: middle;
  filter: brightness(0) invert(1); /* makes the icon white on dark footer */
}

