/* === RESET BASE === */
html, body, div, section, valori, valori-cristinitech, header, footer, main, article, aside, nav {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* === STILI BASE GLOBALE === */
body {
  font-family: 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #f4f4f4;
  background-color: #f4f4f4;
  margin: 0;
  padding: 0;
}

/* === SFONDO E ALTEZZA === */
html, body {
  height: 100%;
  background-color: #f4f4f4;
}

/* === LAYOUT PRINCIPALE === */
.container {
  width: 100%;
  max-width: 1200px;     /* limite massimo su desktop */
  margin: 0 auto;         /* centra il contenuto */
  padding: 0 20px;        /* respiro ai lati su mobile */
  min-height: 100vh; /* occupa tutta l’altezza dello schermo */
  background-color: #f4f4f4; /* esempio: sfondo scuro */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hero-content,
.services-section {
  width: 100%;
  margin-bottom: 40px;    /* spazio tra le sezioni */
}

body {
  font-family: Arial, sans-serif; /* font leggibile e compatibile */
  background-color: #f4f4f4;      /* sfondo grigio chiaro */
  color: #FFFFFF;                    /* colore testo */
  overflow-x: hidden;             /* evita scroll orizzontale */
}

/* === Accessibilità e interazione === */
button:hover,
button:focus {
  background-color: #0c7c0c;                   /* sfondo verde al passaggio */
  outline: none;                               /* rimuove contorno */
  box-shadow: 0 0 0 3px rgba(15, 143, 15, 0.3); /* ombra verde per focus */
}

/* === HEADER === */
header {
  display: flex;                 /* layout flessibile */
  justify-content: space-between;/* logo a sinistra, nav a destra */
  align-items: center;           /* centratura verticale */
  background-color: #3B3B3B;     /* sfondo scuro */
  padding: 10px 20px;
  flex-wrap: wrap;               /* adattamento su mobile */
}

/* === HEADER TOP === */
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  flex-wrap: wrap;
}

/* === LOGO === */
.logo {
  width: 100%;
  max-width: 200px;
  height: auto;
  display: block;
}

/* === SWITCHER LINGUA === */
.lang-switcher {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-left: auto; /* mantiene la posizione a destra */
  padding: 10px 0;
}

.lang-btn {
  background: none;
  border: none;
  font-size: 10px;
  /*font-family: 'Cherry Swash', cursive;*/
  color: #2BD6B4;
  cursor: pointer;
  transition: transform 0.2s ease, color 0.2s ease;
}

.lang-btn:hover {
  transform: scale(1.1);
  color: #00a896;
}

.lang-btn.active {
  background-color: #00aa44;
  color: white;
  border-radius: 6px;
  font-weight: bold;
  padding: 4px 10px;
  transition: background-color 0.3s ease;
}

/* === Responsive Logo & Lingua === */
@media (max-width: 480px) {
  .logo-area {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* === Tema chiaro Lingua === */
@media (prefers-color-scheme: light) {
  .lang-switcher img {
    filter: drop-shadow(0 0 2px #ccc);
  }
}

/* === Tema scuro Lingua === */
@media (prefers-color-scheme: dark) {
  .lang-switcher img {
    filter: drop-shadow(0 0 2px #444);
  }
}

/* === MENU PRINCIPALE === */
nav {
  position: relative;             /* consente posizionamenti assoluti figli */
  z-index: 1001;                  /* porta il menu sopra gli altri elementi */
}

/* === TOGGLE CHECKBOX === */
#check {
  display: none;                  /* checkbox invisibile, controlla apertura menu */
}

/* === MENU HAMBURGER LATERALE === */
nav ul {
  position: fixed;               /* rimane fisso durante lo scroll */
  top: 0;                        /* allineato in alto */
  width: 80vw;                   /* larghezza fluida */
  max-width: 250px;              /* limite massimo */
  right: -80vw;                  /* coerente con la larghezza */
  height: 100vh;                 /* occupa tutta l’altezza della finestra */
  background-color: #3B3B3B;     /* sfondo scuro coerente con l'header */
  display: flex;                 /* layout flessibile */
  flex-direction: column;        /* voci in colonna verticale */
  justify-content: flex-start;   /* allinea le voci in alto */
  align-items: center;           /* centra orizzontalmente le voci */
  gap: 10px;                     /* spazio verticale tra le voci */
  list-style: none;              /* rimuove i marker di elenco */
  margin: 0;                     /* azzera il margine esterno */
  transition: right 0.3s ease;   /* transizione fluida per apertura */
  z-index: 1000;                 /* sotto il bottone hamburger */
}

/* === LINK DEL MENU === */
nav ul li a {
  color: white;                  /* link di colore bianco */
  text-align: center;            /* testo centrato */
  text-decoration: none;         /* rimuove sottolineatura */
  font-size: 16px;               /* dimensione coerente */
  transition: color 0.3s;        /* anima il colore al passaggio */
}

nav ul li a:hover {
  color: lightgreen;             /* colore verde chiaro al passaggio */
}

/* === BOTTONE HAMBURGER === */
.checkbtn {
  background-color: transparent; /* nessuno sfondo */
  color: white;                  /* icona bianca */
  font-size: 25px;               /* dimensione icona */
  cursor: pointer;               /* cursore a mano */
  display: block;                /* visibile su mobile */
  margin: 5px;                   /* margine intorno */
  text-align: center;            /* icona centrata */
  padding: 10px;                 /* spazio interno */
  border-radius: 5px;            /* angoli arrotondati */
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1001;
}

.checkbtn:hover {
  background-color: transparent; /* nessuna variazione al passaggio */
}

/* === ICONA CHIUSURA INTERNA (X) === */
.close-btn {
  width: 100%;
  text-align: right;
}

.close-btn label {
  cursor: pointer;
  padding: 10px;
  display: inline-block;
}

.close-btn i {
  font-size: 24px;
  color: white;
}

/* === MOSTRA IL MENU QUANDO IL CHECKBOX È ATTIVO === */
#check:checked ~ nav ul {
  right: 0;                      /* fa scorrere il menu dentro la viewport */
}

/* === CAMBIO ICONA HAMBURGER/X ESTERNA (se usata) === */
#close-icon {
  display: none;                 /* Nasconde la X inizialmente */
}

#check:checked ~ .checkbtn #open-icon {
  display: none;                 /* Nasconde l’icona hamburger */
}

#check:checked ~ .checkbtn #close-icon {
  display: inline;               /* Mostra la X */
}

/* === MENU RESPONSIVE === */
@media (max-width: 768px) {
  .checkbtn {
    display: block;              /* mostra il bottone hamburger */
  }

  nav ul {
    flex-direction: column;      /* voci impilate in colonna */
    align-items: center;         /* centrate orizzontalmente */
    padding: 0;                  /* rimuove padding */
    gap: 10px;                   /* separazione uniforme tra le voci */
  }

  nav ul li a {
    font-size: 16px;
    padding: 10px;
  }
}

/* === STILI PER MOBILE === */
@media (max-width: 480px) {
  .hero-content h1,
  .hero-content p {
    font-size: 16px;
    line-height: 1.4;
    text-align: center;
    padding: 0 10px;
  }

  .services-section h2 {
    font-size: 20px;
    text-align: center;
  }

  .services-section p {
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
  }

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

/* === Testo === */
.hero-content {
  position: relative;
  min-height: 40vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background-color: #0f0f0f;
}

.hero-content h1 {
  font-size: 1.8em;
  line-height: 1.4;
  text-align: center;
  padding: 0 10px;
  color: #ecf0f1;
  text-shadow: 2px 2px 4px #000000;
  /*font-family: 'Cherry Swash', cursive;*/
  margin: 40px 0;
}

.hero-content p {
  font-size: 1em;
  text-align: center;
  color: white;
  /*font-family: 'Cherry Swash', cursive;*/
  margin-top: auto;
  padding-bottom: 20px;
}

.service-list {
  display: flex;
  align-items: flex-start;
}

span {
  color: #2BD6B4;
}

/* === HERO === */
.hero {
  background-color: #0078D4;       /* sfondo blu vivace */
  color: white;                    /* testo bianco */
  text-align: center;              /* testo centrato */
  padding: 80px 20px;              /* ampio padding verticale e orizzontale */
}

.hero-content h1 {
  font-size: 2.5em;                /* grande titolo */
  margin-bottom: 20px;             /* spazio sotto il titolo */
}

.hero-content p {
  max-width: 600px;                /* larghezza massima del blocco testo */
  margin: 0 auto;                  /* centra il blocco testo */
  font-size: 18px;                 /* testo più piccolo per schermi piccoli */
  color: white;
  line-height: 1.4;                /* migliora la leggibilità */
  text-align: center;              /* centra il contenuto */
  padding: 0 10px;                 /* spazio ai lati */
}

.hero img {
  width: 100%;                     /* occupa tutta la larghezza del container */
  max-height: 300px;               /* altezza massima */
  object-fit: cover;               /* ritaglio proporzionato */
  border-radius: 8px;              /* bordi arrotondati */
}

/* === SERVICES === */
.services {
  background-color: #f4f4f4;       /* sfondo grigio chiaro */
  text-align: center;              /* testo centrato */
  padding: 60px 20px;              /* padding intorno alle sezioni */
  max-width: 1200px;
  margin: 0 auto;
}

.services h2 {
  font-size: 2em;                  /* dimensione sottotitolo */
  margin-bottom: 40px;             /* spazio sotto */
}

.service-list {
  display: flex;                   /* flex container per servizi */
  flex-wrap: wrap;                 /* wrap automatico su più righe */
  justify-content: center;         /* centri gli item orizzontalmente */
  gap: 30px;                       /* spazio tra le card */
}

.service-item {
  background: white;                     /* sfondo bianco per ogni card */
  border-radius: 10px;                   /* angoli arrotondati */
  max-width: 300px;                      /* più compatta */
  padding: 20px 20px;                    /* spazio interno ridotto */
  height: auto;                          /* altezza fissa */
  overflow: hidden;                      /* nasconde contenuto che supera l’altezza */
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);/* ombra sottile */
  text-align: center;                    /* testo centrato */
  display: flex;                         /* layout flessibile */
  flex-direction: column;                /* elementi in colonna */
  align-items: center;                   /* centratura orizzontale */
  justify-content: stretch;              /* contenuto dall’alto */
  flex: 1 1 280px;                       /* flessibilità per layout orizzontale */
}

.service-item:hover {
  transform: scale(1.03);
  transition: transform 0.2s ease;
}

.service-item h3 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: #0078D4;
}

.service-item p {
  font-size: 1rem;
  color: #0078D4;
  line-height: 1.6;
  margin-bottom: 12px;
}

.service-icon {
  width: 100%;
  max-width: 240px;
  height: 180px;              /* spazio fisso verticale */
  object-fit: contain;        /* mantiene proporzioni senza tagliare */
  display: block;
  margin: 0 auto 10px auto;   /* centratura e margine inferiore */
}

.service-image {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* === TYPOGRAPHY === */
h1, h2 {
  color: #0f8f0f;                  /* colore verde per titoli principali */
}

/* === FORMS === */
form {
  display: flex;                   /* flex container per i campi */
  flex-direction: column;         /* disposizione verticale dei campi */
  gap: 10px;                       /* spazio tra i campi */
}

input, textarea {
  padding: 10px;                   /* spazio interno ai campi */
  font-size: 1em;                  /* dimensione del testo nei campi */
  border: 1px solid #ccc;          /* bordo grigio chiaro */
}

button {
  background-color: #0f8f0f;       /* sfondo verde */
  color: white;                    /* testo bianco */
  padding: 10px;                   /* spazio interno */
  border: none;                    /* nessun bordo */
  cursor: pointer;                 /* cursore a mano */
  border-radius: 6px;              /* angoli arrotondati */
}

/* === CONFIRMATION MESSAGE === */
#confirmation-message {
  display: none;                                /* inizialmente nascosto */
  color: green;                                 /* testo verde */
  margin-top: 10px;                             /* spazio sopra */
  animation: fadeIn 0.6s ease-out forwards;     /* animazione di comparsa */
}

/* === ANIMATIONS === */
@keyframes fadeIn {
  from {
    opacity: 0;                                 /* inizio invisibile */
    transform: translateY(10px);                /* inizia spostato verso il basso */
  }
  to {
    opacity: 1;                                 /* fine completamente visibile */
    transform: translateY(0);                   /* torna alla posizione originale */
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;                                 /* inizio visibile */
    transform: translateY(0);                   /* posizione originale */
  }
  to {
    opacity: 0;                                 /* fine nascosto */
    transform: translateY(10px);                /* spostato verso il basso */
  }
}

/* === VALORI === */
.valori-cristinitech {
  padding: 4rem 2rem;
  background-image: url('img/tecnico-clienti.png'); /* aggiorna il percorso se necessario */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  color: white;
  z-index: 1;
  overflow-x: hidden;
}

/* Sovrapposizione scura per leggibilità */
.valori-cristinitech::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: -1;
}

.valori-cristinitech .contenitore {
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.valori-cristinitech h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  text-align: center;
  color: #ffffff;
}

.valori-cristinitech .valore {
  margin-bottom: 1.5rem;
}

.valori-cristinitech .valore h3 {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  color: #2BD6B4;
}

.valori-cristinitech .valore p {
  font-size: 1.25rem;
  line-height: 1.7;
  color: #f0f0f0;
}

/* === RESPONSIVE VALORI === */
@media (max-width: 768px) {
  .valori-cristinitech {
    padding: 3rem 1rem;
    background-position: top;
  }

  .valori-cristinitech h2 {
    font-size: 1.6rem;
  }

  .valori-cristinitech .valore h3 {
    font-size: 1.2rem;
  }

  .valori-cristinitech .valore p {
    font-size: 1rem;
  }
}

/* === SERVICE === */

@media (max-width: 768px) {
  .service-item {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .service-item h3 {
    font-size: 1.3rem;
  }

  .service-item p {
    font-size: 1rem;
  }
}

/* === REGISTRAZIONE UTENTE === */

.registrazione-utente {
  max-width: 350px;
  margin: 0 auto;
  padding: 40px 20px;
  background-color: #f4f4f4;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.registrazione-utente h2 {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 30px;
  color: #0078D4;
}

.form-registrazione label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.form-registrazione input {
  width: 90%;
  padding: 10px;
  margin-bottom: 20px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
}

.form-registrazione button {
  width: 100%;
  padding: 12px;
  background-color: #2BD6B4;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.form-registrazione button:hover {
  background-color: #00a896;
}

/* === CHISIAMO === */

.chi-siamo {
  background-image: url('img/fondo_chisiamo.png'); /* immagine senza testo */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 100px 20px;
  color: white;
  font-family: 'Segoe UI', sans-serif;
  text-align: center;
  position: relative;
  z-index: 1;
}

.chi-siamo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45); /* sfumatura scura */
  z-index: 0;
}

.chi-siamo > * {
  position: relative;
  z-index: 2;
}

.chi-siamo h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  text-align: center;
  color: #ffffff;
} 

/* === RESPONSIVE CHISIAMO === */

@media (max-width: 768px) {
  .chi-siamo {
    padding: 60px 16px;
    font-size: 1rem;
  }

  .chi-siamo h2 {
    font-size: 1.6rem;
    margin-bottom: 24px;
  }

  .chi-siamo p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 16px;
  }
}

/* === CONTATTO === */

    * {
      box-sizing: border-box;
      font-smoothing: antialiased;
      text-rendering: optimizeLegibility;
    }
    .container { width: 60%; }
    input, select, textarea {
      font-family: 'Times New Roman', serif;
      font-size: 16px;
    }
    #contact {
      background: white;
      padding: 25px;
      margin: 20px 0;
      box-shadow: 0 0 20px rgba(0,0,0,0.2), 0 5px 5px rgba(0,0,0,0.24);
    }
    fieldset {
      border: none;
      margin-bottom: 20px;
      padding: 0;
      width: 100%;
    }
    #contact input, #contact textarea, #contact select {
      width: 100%;
      border: 1px solid #ccc;
      background: #fff;
      padding: 10px;
      margin-bottom: 5px;
    }
    #contact input:hover, #contact textarea:hover {
      border-color: #aaa;
      transition: border-color 0.3s ease-in-out;
    }
    #contact textarea {
      height: 100px;
      resize: none;
    }
    #contact select {
      color: #888;
    }
    #contact button {
      cursor: pointer;
      width: 100%;
      border: none;
      background: #02723b;
      color: #fff;
      padding: 10px;
      font-size: 15px;
    }
    #contact button:hover {
      background: #43A047;
      transition: background-color 0.3s ease-in-out;
    }
    #contact button:active {
      box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
    }
    #contact input:focus, #contact textarea:focus {
      outline: none;
      border: 1px solid #aaa;
    }
    ::placeholder {
      color: #888;
    }

/* === PRIVACY === */

body {
   font-family: 'Segoe UI', 'Times New Roman', serif;
   line-height: 1.6;
   margin: 0;
   padding: 0;
   background-color: #fdfdfd;
   color: #333;
}

/* Centra tutto il contenuto della privacy */
   .privacy-content {
   text-align: center;
   max-width: 800px;
   margin: 0 auto;
   padding: 40px 20px;
}

   .privacy-content ul {
   list-style-position: inside;
   padding-left: 0;
   text-align: center;
}

/* Titoli */
   h1, h2 {
   color: #02723b;
   margin-bottom: 10px;
   }

   h3 {
   margin-top: 30px;
   color: #444;
   font-weight: 600;
   }

/* Paragrafi */
   p {
   margin-bottom: 15px;
   font-size: 1rem;
   }
    
/* Liste */
   ul {
   padding-left: 20px;
   margin-bottom: 20px;
   }

/* Link */
   a {
   color: #02723b;
   text-decoration: underline;
   }

   a:hover {
   text-decoration: none;
   }

/* === COOKIE BANNER === */

#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #f5f5f5;
  color: #333;
  padding: 15px 20px;
  font-size: 0.95rem;
  box-shadow: 0 -2px 6px rgba(0,0,0,0.1);
  display: none;
  z-index: 9999;
}

#cookie-banner p {
  margin: 0;
  text-align: center;
}

.cookie-buttons {
  margin-top: 10px;
  text-align: center;
}

.cookie-buttons button {
  margin: 0 8px;
  padding: 8px 16px;
  background-color: #02723b;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.cookie-buttons button:hover {
  background-color: #43a047;
}

/* === FOOTER === */
footer {
  text-align: center;
  padding: 20px;
  background-color: #3B3B3B;
  color: white;
}