/* ================ RESET BASE ================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ================ HTML | BODY ================ */
html,
body {
  /* max-width: 100%; */
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  font-family: "Montserrat", sans-serif;
}
/* Nasconde il menu a tendina solo nella pagina privacy */
.privacy-page #dropdownMenu {
  display: none !important;
}

/* ================== HEADER ================== */

header {
  position: sticky;
  top: 0;
  background-color: #fff;
  height: 64px;
  padding: 0 2rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.header-container {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

/* Hamburger Menu */

.home-icon {
  display: flex;
  align-items: center;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-decoration: none;
}

.home-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  transition: filter 0.2s ease;
}

.home-icon:hover img {
  filter: brightness(1.2);
}

.hamburger {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.hamburger svg {
  width: 28px;
  height: 28px;
  stroke: #333;
  transition: opacity 0.2s ease;
}

/* Logo */
.logo img {
  height: 40px;
  object-fit: contain;
}

/* Language Selector */
.language-selector {
  position: relative;
  border: 2px solid #333;
  display: flex;
  align-items: center;
  padding: 5px 12px;
  color: #333;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
  transition: all 0.3s ease;
  min-width: 70px;
  width: 70px;
  justify-content: space-between;
}

.language-selector.open {
  border-left: 2px solid transparent;
  border-right: 2px solid transparent;
  border-top: 2px solid transparent;
  border-bottom: 2px solid transparent;
}

.language-selector span {
  margin-right: 8px;
}

.language-selector svg {
  transition: transform 0.3s ease;
}

.language-selector.open svg {
  transform: rotate(180deg);
}

.language-options {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: white; /* Sfondo come .dropdown */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); /* Ombra */
  padding: 1rem; /* Spaziatura interna */
  border-radius: 8px; /* Angoli arrotondati */
  list-style: none; /* Niente puntini */
  margin: 0;
  z-index: 1000;
  width: max-content;
  min-width: 100%; /* Mantiene larghezza coerente col selettore */
}

.language-options li {
  font-weight: normal;
  padding: 0.5rem 1rem;
  color: #333;
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.language-options li:hover {
  text-decoration: underline;
  font-weight: 700;
}

.language-selector.open .language-options {
  display: block;
}

/* =================== MAIN =================== */
main {
  padding: 0;
  background-color: transparent;
  margin-bottom: 2rem;
}

/* ================= MODAL INSTRUCTIONS ================== */

.modal-text {
  padding: 0 1.5rem;
  background-color: white;
}

.modal-text h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.4rem;
  text-align: center;
}

.modal-text h3 {
  margin-top: 1.5rem;
  font-size: 1.2rem;
  color: #003366;
}

.modal-text ol,
.modal-text ul {
  padding-left: 1.2rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.modal-text p {
  line-height: 1.5;
}

/* ================== FOOTER ================== */
.site-footer {
  background-color: #003366;
  color: white;
  padding: 0 1rem;
  font-size: 0.9rem;
  border-top: 1px solid #ddd;
  height: 64px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  height: 100%;
}

.footer-left,
.footer-center,
.footer-right {
  flex: 1;
}

.footer-left {
  text-align: left;
}

.footer-center {
  text-align: center;
}

.footer-right {
  text-align: right;
}

.footer-container a {
  text-decoration: underline;
  color: inherit;
  transition: all 0.2s ease-in-out; /* Smooth animazione */
}

.footer-container a:hover {
  font-weight: bold;
  font-size: 1.05rem;
  text-decoration: none;
}

/* --------------- Modale Privacy --------------- */
#privacyModal .modal-logo {
  text-align: center;
  margin-bottom: 1.5rem;
}

#privacyModal .modal-logo img {
  max-width: 250px;
  height: auto;
}

#privacyModal .modal-content {
  position: relative; /* Necessario per posizionamento assoluto del bottone */
}

/* Titolo principale */
#privacyModal .modal-content h1 {
  margin-bottom: 1.5rem;
  text-align: center;
}

/* Sottotitolo */
#privacyModal .modal-content h2 {
  margin-bottom: 1.5rem;
}

/* Spaziatura tra paragrafi, titoli e liste */
#privacyModal .modal-content p,
#privacyModal .modal-content ol,
#privacyModal .modal-content ul,
#privacyModal .modal-content h3,
#privacyModal .modal-content h4 {
  margin-bottom: 1.2rem;
}

/* Spazio finale prima di "M Wash" */
#privacyModal .modal-content p:last-of-type {
  margin-bottom: 2rem;
}

/* ---------- Elenchi puntati (ul) ---------- */
#privacyModal .modal-content ul {
  padding-left: 1.5rem;
  list-style-position: outside;
  font-weight: normal;
  list-style-type: disc;
}

/* ---------- Lista numerata principale (.par) ---------- */
#privacyModal .modal-content ol.par {
  list-style-position: outside;
  padding-left: 1.5rem;
  counter-reset: section;
}

#privacyModal .modal-content ol.par > li {
  font-weight: bold; /* Grassetto per il numero */
  margin-top: 1.5rem;
}

#privacyModal .modal-content ol.par > li h3 {
  font-weight: bold;
  display: block;
  margin-left: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Paragrafi interni alla lista .par (senza grassetto) */
#privacyModal .modal-content ol.par > li p {
  font-weight: normal;
  margin-left: 0.5rem; /* Allineamento ai titoli h3 */
  margin-bottom: 0;
}

/* ---------- Lista secondaria numerata 8.1, 8.2, ... ---------- */
#privacyModal .modal-content .subsection-list {
  counter-reset: subsection;
  list-style: none;
  padding-left: 1.5rem;
  margin-left: 0;
}

#privacyModal .modal-content .subsection-list > li {
  counter-increment: subsection;
  margin-bottom: 0.5rem;
  padding-left: 2.5rem;
  position: relative;
}
#privacyModal .modal-content .subsection-list > li p {
  padding-left: 0;
  margin-top: 0.5rem;
}

#privacyModal .modal-content .subsection-list > li::before {
  content: "8." counter(subsection) " ";
  position: absolute;
  left: 0;
  font-weight: bold;
  font-size: 1rem;
}

/* Titoli dei sottoparagrafi (es. 8.1, 8.2, ...) */
#privacyModal .modal-content .subsection-list h4 {
  font-size: 1rem;
  font-weight: bold;
  margin: 0.5rem;
}

/* Paragrafi dei sottoparagrafi */
#privacyModal .modal-content .subp {
  margin-left: 0;
  font-weight: normal;
}

/* ---------- Lettere a), b), c) ---------- */
#privacyModal .modal-content .ol-type-a {
  list-style-type: lower-alpha;
  padding-left: 1.5rem; /* Allineate con .subp e h4 */
  margin-top: 0.5rem;
  font-weight: normal;
}

#privacyModal .modal-content .ol-type-a li {
  margin-bottom: 0.5rem;
}

/* Pulsante di chiusura */
#privacyModal .close {
  position: sticky;
  top: 1rem;
  float: right;
  right: 1rem;
  font-size: 2.5rem;
  font-weight: bold;
  color: #333;
  cursor: pointer;
  z-index: 1001;
  line-height: 1;
  transition: transform 0.2s ease, color 0.2s ease;
}

#privacyModal .close:hover {
  color: #000;
  transform: scale(1.2);
}

#datiSocietariModal .modal-content h2 {
  margin-bottom: 3rem;
  text-align: center;
}

#datiSocietariModal .dati-societari-text p {
  margin-bottom: 1.5rem;
  line-height: 1.5;
  font-size: 1rem;
}

#datiSocietariModal .modal-logo {
  text-align: center;
  margin-bottom: 1.5rem;
}

#datiSocietariModal .modal-logo img {
  max-width: 250px;
  height: auto;
}

#datiSocietariModal .modal-content {
  position: relative; /* Necessario per il posizionamento assoluto del pulsante */
}

#datiSocietariModal .close {
  position: absolute;
  top: 0.5rem; /* più in alto rispetto alle altre modali */
  right: 0.5rem; /* margine destro coerente */
  font-size: 2.5rem;
  font-weight: bold;
  color: #333;
  cursor: pointer;
  z-index: 1001;
  line-height: 1;
  transition: transform 0.2s ease, color 0.2s ease;
}

#datiSocietariModal .close:hover {
  color: #000;
  transform: scale(1.2);
}
