/* FONT IMPORT */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');

html {
  overflow-x: hidden;
}
/* RESET & BASE */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1a1a1a;
  background-color: #f5f5f5;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: 'Bebas Neue', sans-serif;
  color: #4c4747;
  letter-spacing: 1.5px;
}

ul {
  list-style: none;
  padding-left: 0;
}

a {
  font-weight: bold;
  text-decoration: none;
  color: inherit;
}

/* CONTAINER */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 50px;
  box-sizing: border-box;
  width: 100%;
}

/* HEADER */
.main-header {
  background-color: #f5f5f5;
  border-bottom: 1px solid #e0e0e0;
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0 40px;
}

.main-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0;
}

.logo {
  flex-shrink: 0;
}

.logo a {
  display: flex;
  align-items: center;
}

.logo img {
  max-height: 70px;
  height: auto;
  width: auto;
}

.main-nav {
  margin-left: auto;
}

.main-nav ul {
  display: flex;
  gap: 30px;
  justify-content: flex-end;
  width: 100%;
}

.main-nav a {
  position: relative;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  font-weight: 200;
  text-transform: uppercase;
  color: #4c4747;
  text-decoration: none;
  padding: 10px 0;
  transition: all 0.2s ease;
  letter-spacing: 1.5px;
}

.main-nav a::after {
  content: '';
  display: block;
  width: 100%;
  height: 2px;
  background-color: #cfcfcf;
  position: absolute;
  bottom: 0;
  left: 0;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s ease-in-out;
}

.main-nav a:hover::after {
  transform: scaleX(1);
}

.main-nav a:hover {
  color: #b11010;
}

.form-group {
  display: flex;
  align-items: center; /* centra verticalmente */
  gap: 10px; /* distanza tra checkbox e testo */
}

.form-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0; /* rimuove margini default */
}

.form-group label {
  margin: 0; /* evita margini extra */
  font-size: 0.95rem;
}


.services-list li:hover {
  color: #b11010;
  font-weight: 700;
  transition: color 0.3s ease, font-weight 0.3s ease;
}

.section h2 {
  transition: color 0.3s ease;
}

.hamburger-menu {
  display: none;
  font-size: 30px;
  cursor: pointer;
  padding: 10px;
  user-select: none;
}

/* HERO SECTION */
.hero {
 background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: background-image 1s ease-in-out;
  min-height: 88vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  height: 400px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  width: 100%;
  height: 100%;
  transition: opacity 1.5s ease-in-out;
  z-index: 1;
}

.hero-slide.visible {
  opacity: 1;
  z-index: 2;
}

.hero-text {
  position: relative;
  z-index: 3;
  color: white;
  padding: 2rem;
  width: 100%;
  max-width: 1150px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  padding: 0 10px;
}

.hero-text h1 {
  font-size: 4.2rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow:2px 2px 6px #b11010,   
   0 0 12px rgba(0, 0, 0, 0.4);      
  font-family: 'Bebas Neue', sans-serif;
  margin-right: 0;
  letter-spacing: 2.5px;
}

.no-break {
  white-space: nowrap;
}

.hero-text p {
  font-size: 1.6rem;
  font-weight: 400;
  color: #ffffff;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
  margin-right: 0;
}

.hero-text .h1-container {
  width: 100%;
  display: flex;
  justify-content: flex-end;
}

/* SECTIONS */
.section {
  padding: 60px 0;
}

.section.light {
  background-color: #F2F4F8 ;
}

.section.dark {
  background-color: #f5f5f5;
}

.section h2 {
  font-size: 3rem;
  margin-top: 10px;
  margin-bottom: 10px;
  color: #4c4747;
}

.section p {
  margin-bottom: 15px;
  color: #333333;
}

.section-img {
  display: block;
  margin: 30px auto 0 auto;
  width: 100%;
  max-width: 800px;
  border-radius: 4px;
}

.chi-siamo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center; /* Allinea gli elementi al centro verticalmente */
  margin-top: 20px;
}

.chi-siamo-grid-reversed {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center; /* Allinea gli elementi al centro verticalmente */
  margin-top: 60px;
}

.chi-siamo-grid-reversed .image-content {
  order: -1;
}

.chi-siamo-img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
  transition: transform 0.4s ease; /* Aggiungi una transizione per un effetto fluido */
}

.chi-siamo-img:hover {
  transform: scale(1.05); /* Ingrandisce leggermente l'immagine al passaggio del mouse */
}
/* SERVICES */
.services-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.services-list li {
  background-color: #ffffff;
  border-left: 4px solid #2a3f54;
  padding: 10px 15px;
  font-weight: 400;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.button-link {
  display: inline-block;
  background-color: #2a3f54;
  color: #ffffff;
  padding: 12px 20px;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
  transition: background-color 0.3s ease;
  margin-top: 10px;
}

.cta-center {
  text-align: center;
  margin-top: 30px;
}

.button-link:hover {
  background-color: #1f2e3d;
}

/* PROJECTS */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.project-item {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

.project-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}

.project-item:hover img {
  transform: scale(1.05);
}

.project-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(42, 63, 84, 0.85);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 500;
  text-align: center;
  padding: 12px 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  font-family: 'Inter', sans-serif;
  letter-spacing: 1px;
}

.project-item:hover .project-caption {
  opacity: 1;
}

/* CONTACTS */
#contatti p {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: #333;
  margin-bottom: 15px;
  text-align: left;
}

.contact-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
  align-items: flex-start;
}

.contact-info,
.map-wrapper {
  flex: 1 1 45%;
  min-width: 300px;
}

.map-wrapper {
  flex: 1 1 400px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 10px;
  max-width: 600px;
}

.contact-form label {
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  margin-bottom: 5px;
  text-align: left;
}

.contact-form input,
.contact-form textarea {
  padding: 10px;
  border: 1px solid #ccc;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  border-radius: 4px;
  width: 100%;
  max-width: 100%;
}

.contact-form button {
  padding: 12px 24px;
  background-color: #2a3f54;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  width: fit-content;
  transition: background-color 0.3s ease;
}

.contact-form button:hover {
  background-color: #1f2e3d;
}

.map-frame {
  width: 100%;
  height: 400px;
  border: none;
  border-radius: 6px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.form-section {
  width: 100%;
  margin-top: 60px;
}

/* FOOTER */
.main-footer,
#superstudio-maxi-page .main-footer {
  background-color: #2a3f54 !important;
  color: #ffffff !important;
  text-align: center;
  padding: 20px 0;
  font-size: 0.9rem;
  border-top: 1px solid #1f2e3d;
}

.main-footer a,
#superstudio-maxi-page .main-footer a {
  color: #ffffff !important;
  text-decoration: underline;
}

.main-footer a:hover,
#superstudio-maxi-page .main-footer a:hover {
  color: #e0e5ec !important;
}

#superstudio-village-gallery .image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

#superstudio-village-gallery .image-item {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#superstudio-village-gallery .image-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
  border-radius: 4px;
}

#superstudio-village-gallery .image-item:hover img {
  transform: scale(1.05);
}

#superstudio-village-gallery {
    margin-top: -10px !important;
}

#superstudio-village-page .image-item img {
  max-width: 100%;
  height: auto;
  object-fit: cover;
}

#superstudio-village-page .image-grid {
  max-width: 100%;
  overflow: hidden;
}

#superstudio-village-page #superstudio-village-gallery {
  margin-top: 20px;
}

/* ANIMATIONS */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(100px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 1.2s ease-out;
}

.animate-text {
  animation: fadeInUp 2s ease forwards;
}

.hero-text h1,
.hero-text p,
.hero-text a.button-link {
  animation: fadeInUp 4s ease-out;
}

/* PROJECT GALLERY */
.projects-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.project-large {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.project-large img {
  width: 100%;
  height: auto;
  transition: transform 0.4s ease;
}

.project-large:hover img {
  transform: scale(1.05);
}

.caption {
  position: absolute;
  bottom: 0;
  background: rgba(42, 63, 84, 0.85);
  color: #fff;
  width: 100%;
  padding: 0.8rem;
  font-size: 1.1rem;
  text-align: center;
  transition: background 0.3s ease;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  letter-spacing: 0.5px;
}
.projects-gallery.single {
  display: grid;
  place-items: center;
  margin-top: 2rem;
}

.projects-gallery.single .project-large {
  width: 100%;
  max-width: 500px; /* dimensione simile a quelle industriali */
}
@media (max-width: 768px) {
  /* BODY & GENERALE - Mantenuto come fornito */
  body {
    font-size: 14px;
    overflow-x: hidden !important;
    width: 100vw !important;
  }
  
  /* REGOLA GENERICA GLOBALE: Molto aggressiva ma necessaria se ci sono problemi esterni */
  * {
    max-width: 100vw !important;
  }
  
  /* HEADER & NAV - Mantenuto come fornito */
  .main-header {
    position: relative;
    padding: 10px 20px;
  }

  .main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    position: relative;
  }
  
  .logo {
    margin-right: auto;
    z-index: 1;
  }

  .logo img {
    max-height: 70px;
  }

  .hamburger-menu {
    display: block;
    font-size: 30px;
    cursor: pointer;
    user-select: none;
    position: relative;
    z-index: 2;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #f5f5f5;
    width: 100%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out;
  }

  .main-nav.active {
    max-height: 400px;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    margin: 0;
    gap: 0;
  }
  
  .main-nav ul li {
    margin: 10px 0;
    width: 100%;
    text-align: center;
  }

  .main-nav ul li a {
    display: block;
    padding: 15px 20px;
    font-size: 20px;
  }

  /* IMMAGINI GENERALI */
  img {
    max-width: 100%; /* Assicura che nessuna immagine fuoriesca */
    height: auto;
    display: block;
  }
  
  /* SEZIONI E CONTAINER */
  .section {
    padding: 35px 0;
    /* Rimosso padding-left/right: 0; è gestito dal container */
  }

  .container {
    padding: 0 20px; /* Spazio per il testo */
  }

  /* HERO - Mantenuto come fornito */
  .hero {
    height: 300px;
    min-height: auto;
    padding-top: 0;
    justify-content: flex-end;
  }

  .hero-text {
    align-items: center;
    text-align: center;
    padding: 0 20px;
    margin: 0 auto;
    width: 100%;
  }

  .hero-text .h1-container {
    justify-content: center;
  }

  .hero-text h1 {
    font-size: 1.8rem;
    max-width: 100%;
    margin: 0 auto;
    white-space: normal;
  }

  .hero-text p {
    font-size: 1rem;
    max-width: 100%;
    margin: 0 auto;
  }

  .hero-text .no-break {
    white-space: normal;
  }

  .hero-text a.button-link {
    margin: 15px auto 0 auto;
    display: inline-block;
  }
  
  /* TESTO */
  .section h2 {
    font-size: 1.9rem;
    margin-top: 0;
    margin-bottom: 20px;
    font-weight: 400;
  }

  .section p {
    font-size: 0.9rem;
    margin-bottom: 16px;
    line-height: 1.55;
    color: #444;
  }

  /* GRIGLIE VARIE - Mantenuto come fornito */
  .chi-siamo-grid,
  .chi-siamo-grid-reversed {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 30px;
  }

  .chi-siamo-grid-reversed .image-content {
    order: 0;
  }

  .services-list {
    grid-template-columns: 1fr;
    margin-top: 15px;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  /* ANNULLA l'ingrandimento per tutti i project-item su mobile se l'immagine singola non è un project-item */
  .project-item img {
    transform: none; /* CORREZIONE: Rimuoviamo l'ingrandimento predefinito */
  }

  .project-caption {
    opacity: 1;
  }
  
  /* GALLERY IMMAGINE SINGOLA - FOCUS DELLA CORREZIONE */
  
  .projects-gallery {
    display: flex;
    flex-direction: column;
    align-items: center; 
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding: 0; /* CORREZIONE: Rimuove il padding dal contenitore principale della galleria */
  }
  
  .projects-gallery.single {
    max-width: 100vw;
    width: 100%;
    margin: 0 auto;
    padding: 0; /* CORREZIONE: Rimuove il padding in conflitto */
    box-sizing: border-box; 
    overflow-x: hidden;
  }
  
  /* Contenitore dell'immagine */
  .project-large {
    width: 100%;
    max-width: 100%;
    margin: 0;
  }
  
  /* Immagine */
  .project-large img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 0 auto;
  }

 .projects-gallery.single .project-large {
  /* Annulla il max-width: 100% per i singoli progetti 
     e riapplica il limite desiderato (es. 90% del container) 
     o un valore fisso (es. 400px) */
  max-width: 400px; 
  width: 90%; 
}

  .caption {
    text-align: center;
    font-size: 0.85rem;
    padding: 0.5rem;
    font-weight: 500;
  }
  
  /* FOOTER & CONTATTI - Mantenuto come fornito */
  .contact-grid {
    flex-direction: column;
    gap: 40px;
  }

  .contact-info,
  .map-wrapper,
  .form-section {
    flex: 1 1 100%;
  }
  
  #superstudio-village-gallery .image-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 0;
  }

  .form-section {
    margin-top: 40px;
  }

  .form-section h3 {
    text-align: center;
  }
  
  .contact-form {
    margin: 0 auto;
  }
}