* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main {
  flex: 1;
}

body {
  margin: 0;
  font-family: 'EB Garamond', serif;
  color: white;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

header {
  background-color: #e0dfdf;
  position: fixed;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.header-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 1em;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.logo-container img {
  height: 50px;
}

h1 {
  font-size: 1.2em;
  margin: 0;
  color: #603931;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1em;
  margin: 0;
  padding: 0;
}

nav li {
  position: relative;
}

nav a {
  color: #603931;
  text-decoration: none;
  font-weight: bold;
  padding: 0.5em;
}

nav a:hover {
  color: #f2950a;
}

nav ul ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #e0dfdf;
  padding: 0.5em;
  border-radius: 5px;
}

nav li:hover ul {
  display: block;
}

nav ul ul li {
  max-width: max-content;
  width: 100%;
}

nav ul ul a {
  color: #603931;
  padding: 0.3em 0.5em;
  display: block;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8em;
  color: #603931;
}

.flag-icon {
  height: 20px;
}

main {
  padding: 7em 2em 2em;
  max-width: 1200px;
  width: 100%;
  margin: auto;
  box-sizing: border-box;  
}

.intro {
  font-size: 1.5em;
  max-width: 700px;
  width: 100%;
  margin-top: 1em;
  text-align: left;
}

.chi-siamo {
  display: flex;
  justify-content: center;
  gap: 1em;
  flex-wrap: wrap;
}

.chi-siamo img {
  width: 200px;
  height: auto;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s;
}

.chi-siamo img:hover {
  transform: scale(1.05);
}

.chi-siamo-testo {
  max-width: 800px;
  width: 100%;
  margin: auto;
  font-size: 1.1em;
  text-align: left;
}

section {
  background-color: rgba(96, 57, 49, 0.4);
  margin: 2em auto;
  padding: 1em;
  border-radius: 10px;
  max-width: 1000px;
  width: 100%;
  text-align: inherit;
}

.attivita, .pomeriggi {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
  justify-content: center;
  margin: 1em 0;
}

.card {
  background-color: white;
  color: #603931;
  width: calc(23% - 1em);
  max-width: 200px;
  min-width: 160px;
  padding: 0.8em;
  border-radius: 8px;
  text-align: center;
  flex: 1 1 auto;
}

.card img {
   max-width: 100%;
  height: auto;
  border-radius: 4px;
  transition: transform 0.3s ease;
}

.card h3 {
  font-size: 1.1em;
  margin-top: 0.5em;
}

.card a:hover img {
  transform: scale(1.05);
}

.card-button {
  display: inline-block;
  background-color: #f2950a;
  color: white;
  padding: 0.4em 1em;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  transition: background-color 0.3s;
  margin-top: 0.5em;
  font-size: 1em;
  line-height: normal;
}

.card-button:hover {
  background-color: #d87e00;
}
.card-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1em;
  margin-bottom: 2em;
  max-width: 1000px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.titolo-box {
  margin-top: 2em;
  font-size: 1.8em;
  text-align: center;
  color: white;
  max-width: 1000px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.blocco-benv {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 800px;
  width: 100%;
  margin: 1.8em auto 0 auto; /* centrato ma verso sinistra */
  padding: -0.3em;
}

.benvenuti {
  display: flex;
  align-items: center;
  gap: 1em;
  font-size: 3em;
}

.benvenuti img {
  height: 100px;
}

.sottotitolo {
  font-size: 1.8em;
  margin-top: 0.5em;
  color: white;
}

@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    align-items: flex-start;
  }


  nav ul.show {
    display: flex;
  }

  nav a {
    padding: 0.5em 0;
    width: 100%;
  }

  .attivita {
    flex-direction: column;
    align-items: center;
  }

  .card {
    width: 90%;
    max-width: 300px;
  }
}
.link-documenti {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  justify-content: center;
  margin: 1em 0;
}

/* Visualizzazione verticale su mobile */
@media (max-width: 768px) {
  .link-documenti {
    flex-direction: column;
    align-items: center;
  }
}
.contatti-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2em;
  justify-content: space-between;
  margin: 2em 0;
}

.contatti-info {
  flex: 1 1 40%;
}

.social-section i {
  font-size: 2em;
  margin-right: 0.5em;
  color: white;
}

.contatti-form {
  flex: 1 1 50%;
  display: flex;
  flex-direction: column;
  gap: 1em;
}

.contatti-form input,
.contatti-form textarea {
  padding: 0.7em;
  border-radius: 5px;
  border: none;
  font-family: inherit;
  font-size: 1em;
}

.contatti-form label {
  font-weight: bold;
  color: white;
}

.contatti-form textarea {
  resize: vertical;
}

/* Mobile: colonna singola */
@media (max-width: 768px) {
  .contatti-container {
    flex-direction: column;
  }

  .contatti-info,
  .contatti-form {
    width: 100%;
  }

  .social-section i {
    font-size: 1.8em;
  }
}.titolo-box-chiaro {
  background-color: rgba(255, 255, 255, 0.70);
  color: #603931; /* il tuo marrone */
  padding: 0.5em 1em;
  border-radius: 8px;         /* angoli arrotondati */
  display: inline-block;      /* così non occupa tutta la riga */
  font-size: 1.8em;           /* puoi aumentare ancora */
  font-weight: bold;
  margin: 1em auto;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* ombra leggera */
}
.galleria {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1em;
  padding: 2em;
}
.galleria a {
  display: block;
  width: 200px;
  height: 200px;
  overflow: hidden;
  border-radius: 8px;
  position: relative;
}

.galleria img:not(.img-libera) {
   max-width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
}

.galleria a:hover img {
  transform: scale(1.05);
}
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main {
  flex: 1;
}
/* VERSIONE MOBILE */
@media (max-width: 768px) {

  nav ul.show {
    display: flex;
  }

  .card-container {
    flex-direction: column;
    align-items: center;
  }

  .card {
    width: 90%;
    margin-bottom: 1em;
  }
 @media (max-width: 768px) {
  .card-container {
    flex-direction: column;
    align-items: center;
  }

  .card {
    width: 90%;
    max-width: 300px;
  }
} 

   .galleria img {
     max-width: 100%;
    height: auto;
    margin: 0.5em 0;
  }

  .titolo-box, .titolo-box-chiaro {
    font-size: 1.5em;
    text-align: center;
  }
}
.centrato {
  text-align: center;
}
@media (max-width: 768px) {

  .galleria img {
     max-width: 100%;
    height: auto;
    margin: 0.5em 0;
  }

}
.youtube-wrapper {
  text-align: center;
  margin: 3em auto 2em auto;
}

.youtube-button {
  background-color: white;
  color: #f2950a;
  padding: 0.6em 2em;
  border-radius: 10px;
  font-weight: bold;
  text-decoration: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: 1em;
  line-height: 1.2;
  min-width: auto;
  word-break: break-word;
  white-space: normal;
}

.youtube-button i {
  font-size: 1.4em;
}
.img-libera {
  display: block;
  max-width: 200px;
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1em auto;
}
.galleria-libera {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
  justify-content: center;
  margin: 2em auto;
}

.img-libera {
  max-width: 200px;
  width: 100%;
  height: auto;
  border-radius: 8px;
}
.galleria-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 200px;
  width: 100%;
}
.blocco-testo {
  background-color: rgba(255, 255, 255, 0.85);
  color: #603931;
  padding: 1.5em;
  border-radius: 10px;
  margin: 2em auto;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  max-width: 840px;
  width: 100%;
  text-align: justify;
  font-size: 1.1em;
  line-height: 1.6;
  box-sizing: border-box; 
}
.contatti-info {
  background-color: rgba(255, 255, 255, 0.85);
  color: #603931;
  padding: 1.5em;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  font-size: 1.1em;
  line-height: 1.6;
  height: fit-content;
  width: 100%;
  box-sizing: border-box;
}

main h2 {
  margin-top: 1em;
  margin-bottom: 0;
  color: #603931;
  font-size: 1.8em;
}
main h4 {
  margin-top: 1em;
  margin-bottom: 0;
  color: White;
  font-size: 1.8em;
  text-align: center;  
}

@media (min-width: 768px) {
  .contatti-form {
    margin-top: 2.2em; /* solleva il form */
  }
}
.social-section a i {
  color: #603931;
  font-size: 1.5em;  /* stessa dimensione del footer */
  transition: color 0.3s ease;
}

.social-section a i:hover {
  color: #f2950a;
}
/* Nasconde le sottovoci solo su mobile */
@media (max-width: 768px) {
  .desktop-only-submenu > ul {
    display: none !important;
  }
}
.margine-alto {
  margin-top: 5em;
}
.youtube-button {
  background-color: white;
  color: #f2950a;
  padding: 0.8em 1.2em;
  border-radius: 10px;
  font-weight: bold;
  text-decoration: none;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  display: inline-block;
  max-width: 90%;
  line-height: 1.4;
  word-wrap: break-word;
  text-align: center;
}
.footer-unificato {
  width: 100%;
  background-color: #603931;
  color: white;
  text-align: left;
  padding: 1em 2em;
  font-size: 1em;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  box-sizing: border-box;
  position: relative;
  z-index: 10;
}

.footer-unificato .social {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
}

.footer-unificato .social a {
  color: white;
  font-size: 1.5em;
}

.footer-unificato .social a:hover {
  color: #f2950a;
}
.footer-pagina,
.footer {
  width: 100%;
  background-color: #603931;
  color: white;
  text-align: left;
  padding: 1em 2em;
  font-size: 1em;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  box-sizing: border-box;
  position: relative;
  z-index: 10;
}

.footer-pagina .social,
.footer .social {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
}

.footer-pagina .social a,
.footer .social a {
  color: white;
  font-size: 1.5em;
}

.footer-pagina .social a:hover,
.footer .social a:hover {
  color: #f2950a;
}
.sfondo-saccargia {
  background-image: url('immagini/saccargia.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
@media (max-width: 768px) {
  .sfondo-saccargia {
    background-image: url('immagini/sfondomobilehome.jpg'); /* metti qui il nome corretto del file */
  }
}

  @media (max-width: 768px) {
  .benvenuti {
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-size: 2.2em;
    gap: 0.2em;
  }

  .benvenuti img {
    height: 80px;
  }

  .benvenuti span {
    display: block;
  }
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
    margin-left: auto;
    background-color: #f2950a;
    color: white;
    border: none;
    padding: 0.5em 1em;
    border-radius: 5px;
  }

  nav ul {
    display: none;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.7em 1em;
    background-color: #e0dfdf;
    padding: 1.5em;
    border-radius: 8px;
    font-size: 1.2em;
    text-align: center;
  }

  nav ul li {
    width: 100%;
  }

  nav ul li a {
    color: #603931;
    font-size: 1.1em;
    display: inline-block;
    white-space: normal;
    line-height: 1.4;
  }

  nav ul.show {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.7em 1em;
    background-color: #e0dfdf;
    padding: 1.5em;
    border-radius: 8px;
    font-size: 1.2em;
    text-align: center;
  }

  .flag-icon {
    display: block;
    margin: 1em auto 0 auto;
  }
}
@media (max-width: 768px) {
  .blocco-benv {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 1em;
    margin-top: 3em;
    position: relative;
  }

  .benvenuti {
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    margin-bottom: 1em;
  }

  .benvenuti img {
    height: 80px;
    margin-bottom: 0.5em;
	margin-left: auto;
  }

  .benvenuti span {
    font-size: 1.5em;
    color: white;
    background-color: rgba(96, 57, 49, 0.5); /* marrone semitrasparente */
    padding: 0.3em 0.8em;
    border-radius: 8px;
  }

  .sottotitolo {
    font-size: 1.2em;
    color: white;
    background-color: rgba(96, 57, 49, 0.5); /* box semitrasparente */
    padding: 0.6em 1em;
    border-radius: 10px;
    text-align: center;
    margin-top: 0.5em;
  }
/* Regole specifiche per le icone social nella sezione contatti */
.contatti-info .social-contatti {
  display: flex;
  justify-content: center;
  gap: 1.2em;
  margin-top: 1.5em;
}

.contatti-info .social-contatti a {
  text-decoration: none;
}

.contatti-info .social-contatti a i {
  font-size: 2em;
  color: #603931 !important;
  transition: color 0.3s ease;
}

.contatti-info .social-contatti a i:hover {
  color: #f2950a !important;
}
/* Sezione banner progetti */
.sezione-banner {
  width: 100%;
  margin: 2rem 0;
  display: flex;
  justify-content: center;
  background: none;
  padding: 0;
}


.no-bg {
  background-color: transparent !important;
  padding: 0;
  margin: 0;
}
section.no-bg {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}
/* Forza i banner ad adattarsi */
section.sezione-banner.no-bg {
  background-color: transparent !important;
  padding: 0 !important;
  margin: 0 auto !important;
  max-width: 840px !important;
  box-sizing: border-box;
  text-align: center;
}

.banner-progetti {
  max-width: 840px !important;
  width: 100% !important;
  margin: 3rem auto !important;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.banner-progetti a {
  display: block;
  width: 100% !important;
}

.banner-progetti img {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  display: block;
  border-radius: 8px;
  border: 2px solid #5e3d1f;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
}
section.no-bg, 
section.no-bg > div, 
.blocco-testo {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}
.blocco-privacy {
  text-align: left !important;
  max-width: 800px;
  margin: 0 auto;
  padding: 1em;
  color: white;
  line-height: 1.6;
  font-family: 'EB Garamond', serif;
}
}
.blocco-privacy h3 {
  margin-top: 1.5em;
  color: #f2950a;
}
.testo-chi-siamo {
  background-color: rgba(255, 255, 255, 0.8); /* bianco semitrasparente */
  color: #603931; /* testo marrone */
  padding: 1.5em;
  margin: 2em auto;
  max-width: 900px;
  border-radius: 10px;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
  text-align: justify;
  font-size: 1.1em;
  line-height: 1.6;
}

