/* Default styles (smartphones) */

html {
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: inherit;
}

.hidden {
  display: none !important;
}

/* Full-Page Section */
.full-page-section {
  position: relative;
  height: 100vh;
  width: 100%;
  background: url('../img/IMG_1006.jpg') no-repeat center center/cover;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.section-title {
  position: relative;
  width: 80%;
  z-index: 2;
  margin-left: 1rem;
  color: white;
  font-size: 2rem;
  font-weight: 900;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.section-title span {
  color: #8BC63E;
}

/* Intro servizi */
.contenitore_sezione {
  width: 100%;
  padding: 1.5rem;
  background-color: #f5f5f5;
}

.contenitore_sezione_flex {
  width: 100%;
  padding: 3rem 1rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  background-color: #f5f5f5;
}

.contenitore_column {
  padding: 1rem;
  width: 100%;
  border-radius: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
  background-color: #FFF;
  text-align: center;
}

.text-in-column {
  text-align: center;
}

/* Sezione progetti realizzati */
.projects-section {
  width: 100%;
  padding: 8rem 1.5rem;
  background-color: #000;
}

.projects-container {
  max-width: 1200px;
  margin: 0 auto;
}

.projects-container h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

.projects-intro {
  font-size: 1rem;
  color: #eee;
  margin-bottom: 1.5rem;
}

.projects-band {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 1.5rem 0;
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  border-radius: 1rem;
  overflow: hidden;
  background-color: #000;
  color: #fff;
}

.project-image {
  width: 100%;
  height: 50vh; /* mobile: 50% altezza schermo */
  background-size: cover;
  background-position: center;
}

.project-meta {
  padding: 1rem 0.5rem 0.75rem;
  border: 1px solid #fff;
  border-top: none;
  border-radius: 0 0 1rem 1rem;
}

.project-title {
  font-size: 1.1rem;
  margin: 0;
  font-weight: 700;
}

.project-location {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Immagini di sfondo progetti */
.project-image.project-1 { background-image: url('../img/projects/parco_piazza_torre.jpg'); }
.project-image.project-2 { background-image: url('../img/projects/aula_sospesa_scuola_vidracco.jpg'); }
.project-image.project-3 { background-image: url('../img/projects/cavi_frana_monte_antelao.jpg'); }
.project-image.project-4 { background-image: url('../img/projects/chiosco_san_pellegrino_terme.jpg'); }
.project-image.project-5 { background-image: url('../img/projects/luci_led_palazzine_jesolo.jpg'); }
.project-image.project-6 { background-image: url('../img/projects/manutenzione_parco_molina_di_fiemme.jpg'); }
.project-image.project-7 { background-image: url('../img/projects/percorso_equilibrio_onore.jpg'); }
.project-image.project-8 { background-image: url('../img/projects/percorso_sospeso_reti_sicilia.jpg'); }
.project-image.project-9 { background-image: url('../img/projects/reti_erkule_piscina_stentino.jpg'); }
.project-image.project-10 { background-image: url('../img/projects/variante_parco_cinte_tesino.jpg'); }

/* Sezione valori / materiali */
.responsive-section {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: url('../img/g.jpg') no-repeat center center/cover;
  position: relative;
  gap: 1rem;
  padding: 2rem 1.5rem;
  align-items: stretch;
  justify-content: center;
}

.responsive-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.2);
  z-index: 0;
}

.responsive-section-box {
  position: relative;
  z-index: 1;
  padding: 1rem;
  border-radius: 0.5rem;
  background-color: rgba(0, 0, 0, 0.8);
  color: #FFF;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Sezione contatti */
.contact-section {
  width: 100%;
  padding: 4rem 1rem;
  background-color: #f5f5f5;
}

.contact-container {
  margin: auto;
  text-align: center;
  max-width: 1100px;
}

.contact-container h2 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: #333;
}

.contact-container p {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 20px;
}

.contact-content {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.contact-form {
  flex: 1;
  background: white;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 15px;
  text-align: left;
}

.form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
  color: #444;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
}

.btn-submit {
  width: 100%;
  padding: 12px;
  background-color: #8BC63E;
  color: white;
  font-size: 1.2rem;
  font-weight: bold;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: 0.3s;
}

.btn-submit:hover {
  background-color: #1E7B1E;
}

.contact-info {
  flex: 1;
  background: white;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
  text-align: left;
}

.contact-info h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.contact-info p {
  font-size: 1rem;
  margin-bottom: 10px;
}

.contact-info a {
  color: #8BC63E;
  text-decoration: none;
  font-weight: bold;
}

.contact-info a:hover {
  text-decoration: underline;
}

.form-message {
  margin-top: 15px;
  padding: 15px;
  border-radius: 5px;
  font-size: 1.1rem;
  text-align: center;
  display: none;
}

.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Laptops and desktops */
@media screen and (min-width: 1024px) {

  .full-page-section {
    background-attachment: fixed; /* L'immagine di sfondo rimane fissa solo su desktop */
  }

  .section-title {
    font-size: 2.5rem;
    width: 50%;
    margin-left: 2rem;
  }

  .contenitore_sezione_flex {
    flex-wrap: nowrap;
  }

  .contenitore_column {
    width: 25%;
    text-align: left;
  }

  .projects-section {
    padding: 8rem 0;
  }

  .projects-container {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .projects-container h2,
  .projects-intro {
    padding: 0 4rem;
  }

  .projects-grid {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 2rem;
  }

  .project-card {
    flex: 0 0 40vw;
    max-width: 576px;
    transform-origin: center center;
    transform: scale(1);
    transition: box-shadow 0.25s ease;
  }

  .project-card.project-card--active {
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  }

  .project-image {
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .projects-band {
    overflow-x: auto;
    padding: 1.5rem 0;
    scrollbar-width: none;
  }

  .projects-band::-webkit-scrollbar {
    display: none;
  }

  .project-card.project-card--active::before {
    background: linear-gradient(
      to top,
      rgba(0, 0, 0, 0.55),
      rgba(0, 0, 0, 0.25)
    );
  }

  .responsive-section {
    flex-direction: row;
    flex-wrap: nowrap;
  }

  .responsive-section-box {
    width: 33.333%;
  }

  .contact-content {
    flex-direction: row;
  }

  .contact-section {
    padding: 4rem 2rem;
  }

  .contact-form {
    padding: 2rem;
  }

  .contact-info {
    padding: 1.5rem;
  }
}
