/* Imposta margini a zero e font di base */
body {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
}


/* Migliora la fluidità del layout */
* {
  box-sizing: border-box;
} 

/* HEADER PRINCIPALE: barra superiore con logo e menu */
.header {
  display: flex; /* Allinea logo e menu orizzontalmente */
  justify-content: space-between; /* Spazio tra logo e menu */
  align-items: center; /* Centra verticalmente */
  padding: 0 5vw; /* Spaziatura orizzontale ai lati */
  height: 90px; /* Altezza fissa header */
  /* Gradiente lineare sopra il colore di base */
  background: linear-gradient(90deg, #E8E7E3 0%, #f5f5f5 100%);
  box-shadow: 0 1px 10px #232b3e; /* Ombra leggera */
  position: relative; /* Per posizionare elementi assoluti all'interno */
  z-index: 950;
}

/* AREA LOGO: contiene logo o testo alternativo */
.logo-area {
  width: 280px; /* Larghezza riservata al logo */
  height: 55px; /* Altezza massima logo */
  display: flex; /* Allinea logo e testo */
  align-items: center; /* Centra verticalmente */
  position: relative; /* Per gestire elementi interni */
}

/* IMMAGINE LOGO */
.logo-img {
  height: 55px; /* Altezza massima */
  max-width: 100%; /* Larghezza massima */
  display: block; /* Elimina spazio sotto l'immagine */
  /*border: solid 3px #09f176; /* Bordo sottile per il logo */
}

/* TESTO ALTERNATIVO AL LOGO */
.logo-text {
  font-size: 1.5rem; /* Dimensione testo */
  font-weight: 700; /* Grassetto */
  color: #2D3142; /* Cambiato da blu a colore colonna sx */
  font-family: 'Montserrat', sans-serif; /* Font coerente */
  letter-spacing: 1px; /* Spaziatura lettere */
  display: none; /* Nascosto di default, appare se il logo non si carica */
}

/* MENU DI NAVIGAZIONE: link alle pagine */
.nav-links {
  display: flex; /* Allinea i link orizzontalmente */
  gap: 32px; /* Spazio tra i link */
}

/* STILE DEI LINK */
.nav-links a {
  text-decoration: none; /* Nessuna sottolineatura */
  color: #2D3142; /* Cambiato da blu a colore colonna sx */
  font-weight: 600; /* Grassetto medio */
  font-size: 18px; /* Dimensione testo */
  transition: color 0.2s, transform 0.2s; /* Animazione cambio colore */
  display: inline-block; /* Necessario per il transform */
  transform-origin: center; /* Punto di origine per l'animazione */
}
@media (max-width: 900px) {
  .nav-links a {
    transform-origin: left;
  }
}
/* EFFETTO HOVER SUI LINK */
.nav-links a:hover {
  color: #F9B03C; /* Cambia colore al passaggio del mouse */
  transform: scale(1.2); /*ingrandisce leggermente*/
}

/* HAMBURGER MENU: bottone per menu mobile */
.hamburger {
  display: none; /* Nascosto su desktop */
  flex-direction: column; /* Barre verticali */
  justify-content: center; /* Centra verticalmente */
  align-items: center; /* Centra orizzontalmente */
  width: 40px; /* Dimensione bottone */
  height: 40px;
  background: none; /* Nessuno sfondo */
  border: none; /* Nessun bordo */
  cursor: pointer; /* Cursore a mano */
  gap: 6px; /* Spazio tra le barre */
  margin-left: 20px; /* Spazio a sinistra */
}

/* BARRE DEL HAMBURGER */
.hamburger span {
  display: block; /* Ogni barra è un blocco */
  width: 28px; /* Larghezza barra */
  height: 4px; /* Altezza barra */
  background: #2D3142; /* Cambiato da blu a colore colonna sx */
  border-radius: 2px; /* Angoli arrotondati */
  transition: 0.3s; /* Animazione apertura/chiusura */
}

/* ANIMAZIONE HAMBURGER QUANDO APERTO */
.hamburger.open span:nth-child(1) {
  transform: translateY(10px) rotate(45deg); /* Prima barra ruota */
}
.hamburger.open span:nth-child(2) {
  opacity: 0; /* Seconda barra scompare */
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg); /* Terza barra ruota */
}

/* SEZIONE HERO */
.hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0 20px 60px 20px;
  background: linear-gradient(135deg, #ffffff 0%, #d9d7d2 100%);
  min-height: 200px; /* Evita che si schiacci troppo */
  transition: padding 0.3s;
}

.hero-title {
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 700;
  color: #2D3142;
  text-align: center;
  margin-bottom: 48px;
  font-family: 'Montserrat', sans-serif;
  max-width: 900px;
  padding: 0 10px;
  line-height: 1.1;
  transition: font-size 0.5s cubic-bezier(0.4,0,0.2,1), margin-bottom 0.3s;
}

.hero-buttons {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  justify-content: center;
  transition: gap 0.3s;
}

.hero-btn {
  display: inline-block;
  padding: clamp(12px, 3vw, 22px) clamp(32px, 3vw, 56px);
  background: #F9B03C;
  color: #2D3142;
  font-size: clamp(0.95rem, 3vw, 2rem);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  border: none;
  border-radius: 50px;
  box-shadow: 0px 10px 13px -2px rgba(0,0,0,0.29);
  text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.2s, padding 0.3s, font-size 0.3s;
  text-align: center;
  margin-bottom: 10px;
}

.hero-btn:hover {
  background: #ffd77a;
  color: #2D3142; /* Cambiato da blu a colore colonna sx */
  transform: translateY(-2px) scale(1.1);
}

/* SEZIONE IMMAGINE FULLWIDTH */
.fullwidth-image-section {
  width: 100vw;           /* Occupa tutta la larghezza della viewport */
  margin-left: calc(50% - 50vw); /* Allinea l'immagine a tutta pagina anche se il contenitore è centrato */
  margin-right: calc(50% - 50vw);
  overflow: hidden;       /* Nasconde eventuali sbordi */
}

.fullwidth-image {
  width: 100%;            /* Larghezza sempre al 100% */
  height: auto;           /* Altezza proporzionata */
  display: block;         /* Elimina spazi indesiderati sotto l'immagine */
  object-fit: cover;      /* Copre l'area senza deformare l'immagine */
}

.sezione-fullwidth-bg {
  width: 100vw; /* Occupa tutta la larghezza della viewport */
  min-height: 200px;
  margin-left: calc(50% - 50vw); /* Allinea la sezione a tutta pagina */
  margin-right: calc(50% - 50vw);
  background: linear-gradient(90deg, #23272F 0%, #444851 100%); /* Sfondo scuro sfumato */
  padding: 0;
  box-sizing: border-box;
  display: flex;              /* Dispone le colonne affiancate */
  justify-content: center;
  align-items: stretch;
  color: #fff;
  text-align: center;
}

/* sezione a due colonne eliminata, utile in futuro*/
/*.colonna-sx, .colonna-dx {
  flex: 1 1 0;
  padding: 48px 24px;
}
*/
/*
.colonna-sx {
  background: #2D3142; Colore di sfondo per la colonna sinistra 
}*/

/*.colonna-dx {
  background: #F9B03C; /* Colore di sfondo per la colonna destra 
  color: #23272F;      /* Testo scuro per contrasto 
}*/



/* SEZIONE LOGHI PARTNER */
.partner-logos-section {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 0;
  padding: 40px 0;
  background: #2D3142;
}



.partner-logo {
  height: 300px;
  width: auto;
  max-width: clamp(70px, 27.5vw, 300px);
  max-height: clamp(44px, 15vw, 150px);
  object-fit: contain;
  filter: grayscale(0.2);
  transition: filter 0.2s, transform 0.2s, max-width 0.3s, max-height 0.3s;
  will-change: transform;
  transform-origin: center;
   display: block;
}

.partner-logo:hover {
  filter: grayscale(0) brightness(1.3);
  transform: scale(1.1); /* Ingrandisce meno per evitare "salti" */
}

#logo-comfort-store {
  filter: brightness(1.3);
}

#logo-comfort-store:hover {
  filter: brightness(1.5);
}
.sezione-finale-vuota {
  height: 300px;
  width: 100%;
}

/* Sezione archivio lavori */
.archivio-lavori-section,
.contatti-section  {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background: #fff;
  padding: 30px 0 60px 0;
  /*text-align: center;*/
  position: relative; /* Importante per il posizionamento assoluto del figlio */
  overflow: visible;
  
}

#pdf-viewer {
  min-height: clamp(400px, 100vw, 800px);
  width: 80%;
  border: none;
  display: block;
  margin: 0 auto;
}
.archivio-lavori-title,
.contatti-title,
.listino-title   {
  display: inline-block;
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 40px;
  color: #2D3142;
  font-family: 'Montserrat', sans-serif;
  text-align: left;
  margin-left: 5vw;
  max-width: 900px;
  transition: color 0.2s, transform 0.2s;
  cursor: pointer;
}

.archivio-lavori-title:hover,
.contatti-title:hover{
  color: #F9B03C;      /* stesso colore hover dei link navbar */
  transform: scale(1.07);
}

/* CARD STILE */
.card {
  /* Spaziature */
  padding: 0 0;
  margin: 0 0;
  /* Titolo */
  color: #2D3142;
  background: #fff;
  border: 1.5px solid #e0e0e0;
  border-radius: 18px;
  box-shadow: 0px 10px 13px -2px rgba(0,0,0,0.29); /* Uguale ai bottoni hero */
  font-family: 'Montserrat', sans-serif;
  transition: box-shadow 0.2s, transform 0.2s;
  max-width: 420px;
  text-align: left;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: pointer;
}

.card:hover {
  transform: scale(1.04);
  box-shadow: 0px 16px 24px -2px rgba(0,0,0,0.32); /* Ombra più intensa su hover */
  z-index: 2;
}

.card-img-wrapper {
  width: 100%;
  height: 353px; /* Altezza fissa per tutte le immagini */
  overflow: hidden;
  border-radius: 12px 12px 0 0;
  background: #f3f3f3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Taglia l'immagine per riempire il contenitore */
  display: block;
  border-radius: 12px 12px 0 0;
  /* RIMUOVI margin-bottom e max-height qui */
}

.card-content {
  padding: 18px 24px;
  color: #444851;
  font-size: 1rem;
  min-height: 75px;
}

.card-title {
  margin-bottom: 16px;
  font-size: 1.5rem;
  font-weight: 700;
  color: #2D3142;
}

/*.card-subtitle {
  margin-bottom: 12px;
  font-size: 1.1rem;
  font-weight: 500;
  color: #6c6f7a;
  
}*/ 

.card-footer {
  padding: 18px 24px;
  font-size: 0.9rem;
  font-weight: 400;
  color: #6c6f7a;
  border-top: 1px solid #e0e0e0;
  margin-top: auto;

}


.card-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, 420px); /* Colonne larghezza fissa */
  gap: 32px;
  justify-content: center; /* Centra il gruppo di card */
  margin: 0 20px auto 20px;
}
body.home .archivio-lavori-section{
  padding: 30px 0 30px 0;
}

/* Solo nella home: card come miniature, più piccole e scrollabili */
body.home .card-group {
  display: flex !important;
  flex-direction: row;
  justify-content: flex-start !important;
  overflow-x: auto;
  gap: 12px;
  padding: 18px 0 60px 12px;
  max-width: 100vw;
  scrollbar-width: none;
  -ms-overflow-style: none;
  z-index: 20;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
body.home .card-group .card:first-child {
  margin-left: 0 !important;
}
body.home .card-group::-webkit-scrollbar {
  display: none;                /* Chrome, Safari, Opera */
}

body.home .card-group {
  z-index: 20;
}

body.home .card {
  max-width: 275px;    /* 210px + 25% = 262px */
  min-width: 200px;    /* 140px + 25% = 175px */
  width: 62.5vw;       /* 50vw + 25% = 62.5vw */
  height: 331px;       /* 265px + 25% = 331px */
  font-size: 1rem;
}

body.home .card-img-wrapper {
  height: 331px;       /* 265px + 25% = 331px */
}
body.home .card-content,
body.home .card-footer {
  padding: 9px 12px;
}
body.home .card-title {
  font-size: 0.75rem;
  margin-bottom: 8px;
}
/*body.home .card-subtitle {
  font-size: 0.55rem;
  margin-bottom: 6px;
}*/

/* Solo nella home: testo più piccolo, titolo più grande, <p> più compatto nelle card */
body.home .card-content {
  font-size: 0.85rem;
  padding: 9px 12px;
}

body.home .card-title {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

/*body.home .card-content p {
  margin: 6px 0;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.93em;
}*/

/* RESPONSIVE: regole per schermi piccoli */
@media (max-width: 900px) {
  .nav-links {
    position: absolute; /* Esce dal flusso normale */
    top: 90px; /* Sotto l'header */
    left: 0; /* Allinea a sinistra */
    background: #E8E7E3; /* Sfondo uguale all'header */
    flex-direction: column; /* Link in verticale */
    gap: 0; /* Nessuno spazio verticale */
    width: 100vw; /* Occupa tutta la larghezza della finestra */
    max-width: 100vw; /* Limita la larghezza massima */
    box-shadow: 0 2px 8px rgba(0,0,0,0.08); /* Ombra */
    display: flex; /* Sempre flex, ma nascosto tramite max-height e opacity */
    z-index: 10; /* Sopra agli altri elementi */
    opacity: 0;
    pointer-events: none;
    transform: translateY(-40px);
    max-height: 0;
    overflow: hidden;
    transition: 
      opacity 0.3s,
      transform 0.3s,
      max-height 0.3s cubic-bezier(0.4,0,0.2,1);
  }
  .nav-links.open {
    display: flex; /* Mostra il menu quando aperto */
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    max-height: 500px; /* Assicurati che sia più grande dell'altezza effettiva del menu */
  }
  .nav-links a {
    padding: 18px 32px; /* Spaziatura interna ai link */
    border-bottom: 1px solid #eee; /* Riga divisoria tra i link */
    font-size: 20px; /* Testo più grande su mobile */
  }
  .nav-links a:hover {
    background-color: #d9d7d2;
  }
  .hamburger {
    display: flex; /* Mostra il bottone hamburger su mobile */
  }
  .hero-section {
    padding: 0px 10px 40px 10px;
  }
  .hero-buttons {
    gap: 18px;
  }
  .contatti-cards {
    flex-direction: column;
    gap: 32px;
  }
  .contatti-info-box,
  .contatti-mappa-box {
    max-width: 100%;
    min-width: 0;
    height: auto;         /* lascia auto per adattarsi al contenuto */
    min-height: 320px;
    padding: 28px 8px 28px 8px;
    font-size: 1.08rem;
    align-self: stretch;
    box-sizing: border-box;
  }
  .contatti-mappa-box {
    padding: 0;
    height: 350px;        /* Altezza visibile e gestibile su mobile */
    min-height: 220px;
  }
  .contatti-mappa-box iframe {
    width: 100%;
    height: 100%;
    min-height: 220px;
    max-height: 350px;    /* Limita l'altezza massima su mobile */
    border-radius: 18px;
    aspect-ratio: unset;
  }
}

/* Responsive per hero */
@media (max-width: 600px) {
  .hero-title {
    margin-bottom: 18px;
  }
  .hero-buttons {
    gap: 8px;
  }
  .hero-section {
    padding: 0px 2vw 18px 2vw;
  }
   .sezione-fullwidth-bg {
    flex-direction: column;
  }
  .colonna-sx, .colonna-dx {
    padding: 32px 10vw;
  }
  .card-group {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-left: clamp(4px, 5vw, 20px);
    margin-right: clamp(4px, 5vw, 20px);
    justify-content: center;
    justify-items: center;
  }
  .card {
    width: 100%;
    max-width: clamp(220px, 90vw, 420px); /* Ridimensiona la card in modo fluido */
    min-width: 0;
  }
  .card-img-wrapper {
    height: clamp(150px, 80vw, 353px); /* Anche l'immagine si adatta in modo fluido */
   
  }
}

/* STILI PER LA SEZIONE LISTINO */
.listino-section {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background: linear-gradient(180deg, #F7F7F6 0%, #ECEBE7 100%);
  padding: 60px 0 60px 0;
  position: relative;
  overflow: visible;
}


.listino-title:hover {
  color: #F9B03C;
  transform: scale(1.07);
}

.pdf-viewer-container {
  display: flex;
  justify-content: center;
  margin: 0 auto 18px auto;
  width:100%;max-width:1100px;margin:0 auto;
}


.pdf-download-container {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;

}

.pdf-download-btn {
  display: inline-block;
  margin-top: 8px;
  padding: 12px 32px;
  background: #F9B03C;
  color: #2D3142;
  font-weight: 700;
  border-radius: 50px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.2s;
  box-shadow: 0px 10px 13px -2px rgba(0,0,0,0.29); /* Ombra come le card */
}
.pdf-download-btn:hover {
  background: #ffd77a;
  color: #2D3142;
  transform: scale(1.07);
}


/* Archivio Listini PDF */
.archivio-listini-section {
  margin: 48px auto 0 auto;
  width: calc(100vw - 40px); /* 100vw meno 20px per lato */
  max-width: 1105px;
  min-width: 0;
  background: #f7f7f7;
  border-radius: 18px;
  box-shadow: 0 3px 3px -1px rgba(0,0,0,0.10);
  padding: 24px 16px 24px 16px;
  text-align: center;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.archivio-listini-title {
  font-size: 1.25rem;
  color: #232b3e;
  margin-bottom: 18px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.archivio-listini-list {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
  padding: 0;
  margin: 0;
  list-style: none;
}

.archivio-listini-list li {
 flex: 1 1 180px;
  max-width: 220px;
  min-width: 140px;
  margin-bottom: 0; /* già gestito dal gap */
  display: flex;
  justify-content: center;}

.archivio-listini-list a {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 50px;
  background: #f4f6fa;
  color: #232b3e;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.4s, color 0.4s, box-shadow 0.4s, transform 0.2s;
  box-shadow: 0px 10px 13px -2px rgba(0,0,0,0.29);
  width: 100%;
  text-align: center;
}

.archivio-listini-list a:hover{
  background: #ffd77a;
  color: #2D3142;
  outline: none;
  transform: translateY(-2px) scale(1.1);
}
/* Floating Action Button per WhatsApp */
.whatsapp-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 54px;
  height: 54px;
  background: #2D3142;      /* Blu scuro */
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 4px 24px 0 rgba(45,49,66,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: background 0.3s, color 0.3s, transform 0.2s;
  text-decoration: none;
}
.whatsapp-fab:hover
{
  background: #ffd77a;      /* Giallo chiaro su hover */
  color: #2D3142;
  transform: scale(1.12);
}
.whatsapp-fab svg {
  display: block;
  fill: #fff;               /* Icona bianca */
  transition: fill 0.3s;
}
.whatsapp-fab:hover svg {
  fill: #2D3142;            /* Icona blu scuro su hover */
}

/* Floating Action Button aggiuntivo */
.darkmode-fab {
  position: fixed;
  right: 24px;         /* Allineato come WhatsApp */
  bottom: 88px;        /* 54px (whatsapp) + 10px spazio + 28px (darkmode) = 92px, puoi regolare */
  width: 28px;
  height: 28px;
  background: #2D3142;
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 4px 24px 0 rgba(45,49,66,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  transition: background 0.3s, color 0.3s, transform 0.2s;
  text-decoration: none;
  cursor: pointer;
  border: none;
  outline: none;
}
.darkmode-fab:hover {
  background: #ffd77a;
  color: #2D3142;
  transform: scale(1.12);
}
.darkmode-fab svg {
  width: 16px;
  height: 16px;
  fill: #fff;
  transition: fill 0.3s;
}
.darkmode-fab:hover svg {
  fill: #2D3142;
}

/* STILI PER LA MODALITÀ A FINESTRA (MODAL) */
.modal {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(30, 34, 40, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  align-content: center;
  justify-items: center;
  z-index: 1000;
  animation: modal-fade-in 0.25s;
}

@keyframes modal-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: #fff;
  width: 95%;
  max-width: 800px;
  height: auto;
  max-height: 90vh;
  padding: 2vw;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  position: relative;
  animation: modal-pop-in 0.25s;
  margin: auto; 
  /*border: solid blue;*/
}

/* Grid: 3 colonne, la destra contiene sia X che freccia */
.modal-carousel-wrapper {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  width: 100%;
  position: relative;
}

/* Freccia sinistra allineata a sinistra */
#carousel-prev {
  justify-content: start;
}

/* Freccia destra allineata a destra */
#carousel-next {
  justify-content: end;
}

#modal-close {
  justify-content: end;
}

/* Frecce centrate verticalmente */
.carousel-arrow {
  grid-row: 1;
  align-self: center;
}

/* X in alto a destra, sopra la freccia destra */
.modal-close {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  /* stesso stile delle frecce */
  background: none;
  border: none;
  border-radius: 50%;
  padding: 0;
  width: clamp(18px, 6vw, 44px);
  height: clamp(18px, 6vw, 44px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

/* Freccia destra centrata verticalmente */
#carousel-next {
  margin-top: auto;
  margin-bottom: auto;
  align-self: flex-end;
}

.modal-thumbnails,
.modal-info-section {
  width: 100%;
  box-sizing: border-box;
  margin-top: 8px;
  padding-left: 2vw;
  padding-right: 2vw;
}

.modal-close {
  background: none;
  border: none;
  border-radius: 50%;
  padding: 0;

  width: clamp(28px, 7vw, 44px);
  height: clamp(28px, 7vw, 44px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}



.modal-close .icon-x {
  width: clamp(18px, 4vw, 32px);
  height: clamp(18px, 4vw, 32px);
  display: block;
}

.modal-close .icon-x circle,
.modal-close .icon-x path {
  stroke: #2D3142 !important; /* light mode */
  stroke-width: 1.5;
  transition: stroke 0.2s;
}

.modal-close:hover .icon-x circle,
.modal-close:hover .icon-x path {
  stroke: #F9B03C;
}
.carousel-img.full-window {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;      /* Cambia da 100% a 100vw */
  height: 100vh;     /* Cambia da 100% a 100vh */
  object-fit: contain;
  background: rgba(0,0,0,0.96);
  z-index: 9999;
  margin: 0;
  cursor: zoom-out;
  transition: all 0.2s;
  max-width: 100vw;  /* Assicura che non superi la viewport */
  max-height: 100vh;
}

.carousel-arrow {
  background: none;
  border: none;
  border-radius: 50%;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s;
}

.carousel-arrow .icon-arrow {
  width: clamp(18px, 4vw, 32px);
  display: block;
}

.carousel-arrow .icon-arrow circle,
.carousel-arrow .icon-arrow polyline {
  stroke: #2D3142; /* o #F9B03C in dark.css */
  stroke-width: 1.5;
  transition: stroke 0.2s;
}

.carousel-arrow:hover .icon-arrow circle,
.carousel-arrow.open .icon-arrow circle {
  stroke: #F9B03C;
}
.carousel-arrow {
  
  font-size: clamp(1.3rem, 4vw, 2.2rem);
  width: clamp(18px, 6vw, 44px);
  height: clamp(18px, 6vw, 44px);
}


.modal-image-section {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 500px;
  /* nessun overflow qui */
}

.carousel-img {
  max-width: 100%;
  max-height: 60vh;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  background: #f7f7f7;
  transition: box-shadow 0.2s;
  margin: auto;
  display: block;
}

/* Info sotto l'immagine, stile card */
.modal-info-section {
  width: 100%;
  padding: 8px 0 0 0;
  border-top: 1px solid #e0e0e0;
  text-align: left;
  color: #444851;
  font-family: 'Montserrat', sans-serif;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2D3142;
  margin-bottom: 8px;
}
.modal-subtitle {
  font-size: 1.1rem;
  font-weight: 500;
  color: #6c6f7a;
  margin-bottom: 2px;
}
.modal-description {
  font-size: 1rem;
  margin-bottom: 2px;
}
.modal-footer {
  font-size: 0.95rem;
  color: #6c6f7a;
  margin-top: 6px;
}

/* Aggiunto per la chiusura della modal con animazione */
@keyframes modal-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

.modal-closing {
  animation: modal-fade-out 0.25s forwards !important;
}



/* Blocca lo scroll della pagina quando il modal è aperto */
body.modal-open {
  overflow: hidden !important;
  /* rimuovi position: fixed qui */
  width: 100vw;
  touch-action: none;
}

/* Bottoni sempre fissi in basso a destra, ma sotto il modal */
.darkmode-fab {
  position: fixed;
  bottom: 78px;
  right: 24px;
  z-index: 900;
}
.whatsapp-fab {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 900;
}
.whatsapp-fab,
.darkmode-fab,
.social-icons a {
  box-shadow: 0 1px 10px #232b3e;
}

/* Nuovi stili per le miniature nella modal */
.modal-thumbnails {
  display: flex;
  flex-direction: row;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 15px 6px 15px 6px;
  margin: 0;
  max-width: 100%;
  min-height: 70px;         /* <-- riserva spazio per le miniature */
  /*background: #fff;*/         /* o trasparente/scuro in dark mode */
  z-index: 10;              /* <-- assicura che stiano sopra */
  position: relative;       /* <-- importante per lo z-index */
  box-sizing: border-box;
}

/* Nascondi la scrollbar delle miniature (cross-browser) */
.modal-thumbnails {
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* IE e Edge */
}
.modal-thumbnails::-webkit-scrollbar {
  display: none;                /* Chrome, Safari, Opera */
}

.modal-thumbnails img,
.modal-thumbnail {
  flex: 0 0 auto;
  width: 56px;
  height: 42px;
  object-fit: cover;
  border-radius: 6px;
  transition: transform 0.22s cubic-bezier(0.4,0,0.2,1), box-shadow 0.18s;
  cursor: pointer;
  will-change: transform;
}

.modal-thumbnail.active {
  outline: 2px solid #F9B03C;
  z-index: 2;
}
.modal-thumbnails img:hover {
  transform: scale(1.13);
  z-index: 2;
  box-shadow: 0 3px 8px 0 rgba(0,0,0,0.29);
}

/* --- CONTATTI PAGE --- */
.contatti-main {
  max-width: 1200px;
  margin: 60px auto 0 auto;
  padding: 48px 32px 36px 32px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 32px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
}



.contatti-flex {
  display: flex;
  flex-direction: row;
  gap: 48px;
  width: 100%;
  justify-content: center;
  align-items: stretch;
}

.contatti-cards-wrapper {
  margin-left: clamp(4px, 5vw, 20px);
  margin-right: clamp(4px, 5vw, 20px);
}

.contatti-info-box {
  flex: 1 1 500px;
  max-width: 600px;
  min-width: 320px;
  background: #f7f7f7;
  border-radius: 18px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
  padding: 56px 56px 48px 56px; /* padding più ampio */
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-size: 1.45rem;
  line-height: 1.8;
  color: #232b3e;
  letter-spacing: 0.01em;
  overflow-wrap: break-word;   /* Va a capo se una parola è troppo lunga */
  word-break: break-word;      /* Forza il ritorno a capo su parole lunghe */
  overflow: hidden;            /* Nasconde eventuali sbordi */
  box-sizing: border-box;      /* Già presente, fondamentale */
  /* Se vuoi essere sicuro che il padding sia sempre rispettato: */
  min-width: 0;
  min-height: 0;
}

.contatti-cards {
  display: flex;
  gap: 48px;
  width: 100%;
  justify-content: center;
  align-items: stretch; /* fondamentale */

}

.contatti-info-box,
.contatti-mappa-box {
  flex: 1 1 0;
  min-width: 0;
  max-width: 600px;
  background: #f7f7f7;
  border-radius: 18px;
  box-shadow: 0px 3px 3px -1px rgba(0,0,0,0.29); /* Uguale alle .card */
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-size: 1.35rem;
  line-height: 1.7;
  box-sizing: border-box;
  height: auto;            /* <-- Cambia qui */
  align-self: stretch;     /* <-- Aggiungi qui */
}

.contatti-mappa-box {
  padding: 0;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  justify-content: center;
  align-self: stretch;     /* <-- Aggiungi qui */
}
.archivio-listini-list a {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 50px;
  background: #f4f6fa;
  color: #232b3e;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s;
  box-shadow: 0px 10px 13px -2px rgba(0,0,0,0.29); /* Uguale agli altri bottoni */
  width: 100%;
  text-align: center;
}

.archivio-listini-list a:hover,
.archivio-listini-list a:focus {
  background: #ffd77a;
  color: #2D3142;
  box-shadow: 0px 16px 24px -2px rgba(0,0,0,0.32); /* Uguale agli altri bottoni in hover */
  outline: none;
  transform: translateY(-2px) scale(1.1);
}

.contatti-mappa-box iframe {
  width: 100%;
  height: 100%;
  aspect-ratio: 4/3;       /* <-- Aggiungi per proporzione costante */
  border: 0;
  border-radius: 18px;
  display: block;
  flex: 1 1 auto;
  min-height: 0;
}

/* Responsive: su mobile le card si impilano e l'altezza torna automatica */
@media (max-width: 900px) {
  .contatti-cards {
    flex-direction: column;
    gap: 32px;
  }
  .contatti-info-box {
    max-width: 100%;
    min-width: 0;
    height: auto;
    min-height: fit-content;
    padding: 28px 8px 28px 8px;
    font-size: clamp(1.08rem, 3.5vw, 1.35rem);
    align-self: stretch;
    box-sizing: border-box;
    overflow: visible;
    word-break: break-word;
  }
  .contatti-mappa-box {
    max-width: 100%;
    min-width: 0;
    padding: 0;
    height: 350px;        /* Altezza visibile e gestibile su mobile */
    min-height: 220px;
    align-self: stretch;
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .contatti-mappa-box iframe {
    width: 100%;
    height: 100%;
    min-height: 220px;
    max-height: 350px;    /* Limita l'altezza massima su mobile */
    border-radius: 18px;
    aspect-ratio: unset;
    display: block;
  }
}
.contatti-mappa {
  flex: 2 1 500px;
  max-width: 700px;
  min-width: 320px;
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contatti-mappa iframe {
  width: 100%;
  height: 500px;
  border: 0;
  border-radius: 18px;
  display: block;
}

.contatti-social {
  margin-top: 18px;
  text-align: center;
}

.contatti-social h3 {
  margin-bottom: 18px;
  font-size: 1.3rem;
  color: #232b3e;
}

.social-icons {
  display: flex;
  gap: 28px;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #232b3e;
  border-radius: 50%;
  width: 64px;
  height: 64px;
  color: #fff;
  transition: background 0.4s, color 0.4s;
  font-size: 2rem;
}


.social-icons svg {
  width: 36px;
  height: 36px;
  display: block;
}

.social-icons a:hover,
.social-icons a:focus {
  background: #ffd77a;    /* Sfondo giallo chiaro come hero-btn:hover */
  color: #2D3142;         /* Testo blu scuro */
  transform: translateY(-2px) scale(1.1); /* Effetto sollevamento e ingrandimento */
  box-shadow: 0px 16px 24px -2px rgba(0,0,0,0.32);
  transition: background 0.3s, color 0.3s, transform 0.3s;
}
.social-icons a:hover svg,
.social-icons a:focus svg {
  transition: color 0.3s, transform 0.3s;
}

/* FOOTER STILI */
.footer {
  background: #232b3e;
  color: #fff;
  padding: 50px 0 18px 0;
  text-align: center;
  font-size: clamp(0.90rem, 4vw, 1.1rem);
  margin-top: auto;
}
.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.footer-logo img {
  height: 48px;
  margin-bottom: 12px;
}
.footer-info {
  margin-bottom: 12px;
  line-height: 1.6;
}
.footer-info a {
  color: #F9B03C;
  text-decoration: none;
}
.footer-info a:hover {
  text-decoration: underline;
}
.footer-social {
  display: flex;
  gap: 18px;
  justify-content: center;
  margin-bottom: 12px;
}
.footer-social a {
  color: #fff;
  background: #2D3142;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.footer-social a:hover {
  background: #F9B03C;
  color: #232b3e;
}
.footer-social svg {
  width: 24px;
  height: 24px;
}
.footer-copyright {
  font-size: 0.95rem;
  color: #bbb;
  margin-top: 12px;
}
@media (max-width: 400px) {
  .footer-logo img{
    height: clamp(24px, 12vw, 48px);
  }
}

.contatti-list a {
  color: #F9B03C;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
  border-bottom: 1.5px solid transparent;
}
.contatti-list a:hover,
.contatti-list a:focus {
  color: #232b3e;
  border-bottom: 1.5px solid #F9B03C;
  text-decoration: none;
  outline: none;
}

.logo-novara-path {
  fill: #2D3142;
}


.collaborazioni-section {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 0;
}

.collaborazione-card {
  background: #f3f3f3;
  border-radius: 18px;
  box-shadow: 0 6px 24px -4px rgba(0,0,0,0.10);
  padding: 32px 28px;
  max-width: 1105px;
  width: 100%;
  text-align: center;
  margin-left: clamp(4px, 5vw, 20px);
  margin-right: clamp(4px, 5vw, 20px);
  box-shadow: 0px 10px 13px -2px rgba(0,0,0,0.29); /* Uguale ai bottoni hero */
  transition: box-shadow 0.2s, transform 0.2s;
  text-decoration: none;
  cursor: pointer;
}
.collaborazione-card:hover {
  transform: scale(1.04);
  box-shadow: 0px 16px 24px -2px rgba(0,0,0,0.32); /* Ombra più intensa su hover */
  z-index: 2;
}

.collaborazione-logo svg {
  max-width: 400px;
  max-width: 100%;
  height: auto;
  margin-bottom: 18px;
}

.collaborazione-info ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.collaborazione-info li {
 
  font-size: clamp(1rem, 4vw, 2rem);
  color: #2D3142;
  margin-bottom: 10px;
  font-weight: 500;
}

.footer-logo svg {
  width: 450px;         /* o la larghezza che aveva l'immagine */
  height: auto;
  max-width: 90%;
  display: block;
  margin: 0 auto;
  transition: filter 0.2s, transform 0.2s;

}

/*.header-logo svg:hover {
  filter: grayscale(0) brightness(1.2);
  transform: scale(1.05);
}