/* Questo è un commento in CSS, non verrà mostrato */

/* Impostiamo uno stile base per tutto il sito */
body {
  background-color: #f5f5f5; /* colore di sfondo chiaro */
  /*font-family: Arial, sans-serif; /* tipo di font leggibile */
  font-family: 'Comfortaa', cursive;
  color: #222; /* colore del testo */
  margin: 0; /* togliamo i margini standard del browser */
  padding: 20px; /* spazio interno del contenuto */
}

/* Stilizziamo il titolo */
h1 {
  color: #f3f5f8; /*#003366; /* un blu elegante */
  font-size: 2.5em; /* grandezza del testo */
}

/* Stilizziamo il paragrafo */
p {
  font-size: 1.2em;
  line-height: 1.5;
}
header {
  background-color: white;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  padding: 20px 0;
  position: sticky;
top: 0;
z-index: 1000;
}

/* Contenitore centrale */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo */
.logo {
  font-size: 1.8em;
  font-weight: bold;
  color: #003366;
}

/* Navbar */
.navbar {
  list-style: none; /* Toglie i pallini */
  display: flex;
  gap: 20px; /* Spazio tra voci */
  margin: 0;
  padding: 0;
}

/* Link nella navbar */
.navbar a {
  text-decoration: none; /* Toglie il sottolineato */
  color: #003366;
  font-weight: 500;
}

.navbar a:hover {
  color: #0077cc; /* Colore quando ci passi sopra */
}
.hero {
  height: 100vh; /* 100% dell’altezza dello schermo */
  background-image: url('images/automazione-industriale.jpg');
  background-size: cover; /* Copre tutto lo sfondo */
  background-position: center; /* Centra l’immagine */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  position: relative;
  z-index: 1;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5); /* Sfondo scuro trasparente sopra l'immagine */
  z-index: -1;
}

.hero-content {
  z-index: 2;
  max-width: 800px;
  padding: 20px;
}

.hero h1 {
  font-size: 3em;
  margin-bottom: 10px;
}

.hero p {
  font-size: 1.5em;
}
.hero-btn {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 30px;
  background-color: #0077cc;
  color: white;
  text-decoration: none;
  font-size: 1.1em;
  border-radius: 5px;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.hero-btn:hover {
  background-color: #005fa3;
  transform: scale(1.05);
}
.about {
  padding: 80px 20px;
  background-color: #f9f9f9;
  color: #222;
  text-align: left;
  
}



section h2 {
  font-size: 2em;
  margin-bottom: 30px;
  color: #003366;
  text-align: center;
  position: relative;
}

section h2::after {
  content: "";
  width: 60px;
  height: 3px;
  background-color: #0077cc;
  display: block;
  margin: 10px auto 0;
  border-radius: 2px;
}


.about p {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.2em;
  line-height: 1.6;
}
.services {
  padding: 80px 20px;
  background-color: #ffffff;
  text-align: center;
}

section h2 {
  font-size: 2em;
  margin-bottom: 30px;
  color: #003366;
  text-align: center;
  position: relative;
}

section h2::after {
  content: "";
  width: 60px;
  height: 3px;
  background-color: #0077cc;
  display: block;
  margin: 10px auto 0;
  border-radius: 2px;
}


.service-cards {
   display: flex;
  flex-wrap: wrap;
  justify-content: center;  /* ✅ CENTRA orizzontalmente */
  gap: 30px;
  width: 100%;              /* ✅ Assicura che occupi tutta la larghezza disponibile */
  margin: 0 auto;           /* ✅ Centra il blocco se servisse */
}

.card {
  background-color: #f2f2f2;
  padding: 30px;
  border-radius: 10px;
  width: 300px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
}

.icon {
  font-size: 3em;
  margin-bottom: 15px;
}

.card h3 {
  margin-bottom: 10px;
  color: #003366;
}

.card p {
  font-size: 1em;
  line-height: 1.5;
  color: #444;
}
.projects {
  padding: 80px 20px;
  background-color: #f9f9f9;
  text-align: center;
}

section h2 {
  font-size: 2em;
  margin-bottom: 30px;
  color: #003366;
  text-align: center;
  position: relative;
}

section h2::after {
  content: "";
  width: 60px;
  height: 3px;
  background-color: #0077cc;
  display: block;
  margin: 10px auto 0;
  border-radius: 2px;
}


.project-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

.project-card {
  background-color: white;
  border-radius: 10px;
  width: 300px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: transform 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
}

.project-card img {
  width: 100%;
  height: auto;
  display: block;
}

.project-card h3 {
  color: #003366;
  margin: 15px 0 10px;
}

.project-card p {
  padding: 0 15px 20px;
  font-size: 1em;
  color: #444;
  line-height: 1.5;
}
.contact {
  padding: 80px 20px;
  background-color: #ffffff;
  text-align: center;
}

section h2 {
  font-size: 2em;
  margin-bottom: 30px;
  color: #003366;
  text-align: center;
  position: relative;
}

section h2::after {
  content: "";
  width: 60px;
  height: 3px;
  background-color: #0077cc;
  display: block;
  margin: 10px auto 0;
  border-radius: 2px;
}


.contact p {
  font-size: 1.2em;
  margin: 10px 0;
  color: #333;
}

.contact a {
  color: #0077cc;
  text-decoration: none;
}

.contact a:hover {
  text-decoration: underline;
}
.map-container {
  margin-top: 30px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
footer {
  background-color: #003366;
  color: white;
  text-align: center;
  padding: 30px 20px;
  font-size: 0.9em;
}

footer a {
  color: #ffffff;
  text-decoration: none;
  margin: 0 10px;
}

footer a:hover {
  text-decoration: underline;
}
/* ✅ Responsive: sotto i 768px */
@media (max-width: 768px) {

  /* NAVBAR verticale e centrata */
  .navbar {
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding-top: 15px;
  }

  /* HERO sezione */
  .hero h1 {
    font-size: 2em;
    line-height: 1.2;
  }

  .hero p {
    font-size: 1em;
    padding: 0 10px;
  }

  .hero-content {
    padding: 0 20px;
  }

  .hero-btn {
    font-size: 1em;
    padding: 10px 20px;
  }

  /* CARD: Servizi e Progetti in colonna */
 
    .project-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
  padding: 30px 0;
}

.project-card {
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  overflow: hidden;
  width: 300px;
  padding-bottom: 15px;
  transition: transform 0.3s ease;
}

.project-card img {
  width: 100%;
  height: auto;
  display: block;
}

.project-card h3 {
  margin: 15px 0 10px;
  color: #003366;
}

.project-card p {
  padding: 0 15px;
  color: #444;
  font-size: 1em;
  line-height: 1.5;
}


  /* CONTATTI leggibili */
  .contact p {
    font-size: 1em;
    padding: 0 10px;
  }

  /* FOOTER mobile-friendly */
  footer {
    font-size: 0.9em;
    padding: 20px 10px;
  }
}
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.contact p {
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
  padding: 0 10px;
  box-sizing: border-box;
}
.contact .container {
  display: block; /* ⚠️ disattiva il flex! */
  text-align: center;
  padding: 0 20px;
  box-sizing: border-box;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 600px;
  margin: 40px auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.contact-form input,
.contact-form textarea {
  padding: 12px;
  font-size: 1em;
  border: 1px solid #ccc;
  border-radius: 6px;
  resize: vertical;
  font-family: inherit;
}

.contact-form button {
  padding: 12px;
  background-color: #0077cc;
  color: white;
  font-size: 1em;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.contact-form button:hover {
  background-color: #005fa3;
}
.contact-flex {
  display: flex;
  gap: 30px;
  margin: 30px 0;
  flex-wrap: wrap;
}

.contact-form,
.map-container {
  flex: 1 1 300px;
  box-sizing: border-box;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact-form input,
.contact-form textarea {
  padding: 12px;
  font-size: 1em;
  border: 1px solid #ccc;
  border-radius: 6px;
  resize: vertical;
  font-family: inherit;
}

.contact-form button {
  padding: 12px;
  background-color: #0077cc;
  color: white;
  font-size: 1em;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.contact-form button:hover {
  background-color: #005fa3;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  min-height: 300px;
  border-radius: 6px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  border: none;
}

/* Responsive fix */
@media (max-width: 768px) {
  .contact-flex {
    flex-direction: column;
  }

  .map-container,
  .contact-form {
    width: 100%;
  }
}
html {
  scroll-behavior: smooth;
}
#torna-su {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
  background-color: #0077cc;
  color: white;
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  font-size: 24px;
  cursor: pointer;
  display: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: background-color 0.3s ease;
}

#torna-su:hover {
  background-color: #005fa3;
}
.animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate.visible {
  opacity: 1;
  transform: translateY(0);
}
.hamburger {
  display: none;
  font-size: 28px;
  background: none;
  border: none;
  cursor: pointer;
  color: #003366;
}

/* Nasconde la navbar su mobile */
@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  nav.mobile-hidden {
    display: none;
  }

  nav.mobile-visible {
    display: block;
    position: absolute;
    top: 70px;
    right: 30px;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-radius: 10px;
    padding: 15px;
  }

  nav.mobile-visible .navbar {
    flex-direction: column;
    gap: 10px;
  }
}
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #003366;
  color: white;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 9999;
  font-size: 0.85em;
  flex-wrap: wrap;
}

.cookie-banner p {
  margin: 0;
  flex: 1 1 auto;
}

.cookie-banner a {
  color: #ffffff;
  text-decoration: underline;
}

.cookie-buttons {
  display: flex;
  gap: 10px;
  margin-left: 20px;
}

.cookie-buttons button {
  background-color: #0077cc;
  color: white;
  border: none;
  padding: 6px 10px;
  font-size: 0.85em;
  border-radius: 5px;
  cursor: pointer;
}

.cookie-buttons button:hover {
  background-color: #005fa3;
}
.cookie-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.cookie-modal-content {
  background: #fff;
  padding: 30px;
  border-radius: 10px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.3);
  text-align: left;
}
.cookie-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.cookie-modal-content {
  background: #fff;
  padding: 30px;
  border-radius: 10px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.3);
  text-align: left;
}
/* Dropdown nella navbar */
/* Dropdown menu fix */
.navbar li {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: white;
  border: 1px solid #ddd;
  list-style: none;
  padding: 0;
  margin: 0;
  border-radius: 6px;
  min-width: 160px;
  z-index: 1000;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.dropdown-menu li a {
  display: block;
  padding: 10px 15px;
  text-decoration: none;
  color: #222;
  white-space: nowrap;
}

.dropdown-menu li a:hover {
  background-color: #f0f0f0;
}

/* MOSTRA il menu quando il mouse è sull'elemento padre */
.navbar li:hover > .dropdown-menu {
  display: block;
}
/* PRELOADER */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 2s ease;
}

.loader {
  font-size: 1.8em;
  font-weight: bold;
  color: #003366;
  animation: pulse 5s infinite;
}

@keyframes pulse {
  0%   { opacity: 0.3; transform: scale(0.95); }
  50%  { opacity: 1;   transform: scale(1);    }
  100% { opacity: 0.3; transform: scale(0.95); }
}
.loader-svg {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.preloader-logo {
 width: 100px; /* Riduci da 120px a 80px o quanto vuoi */
  height: auto;
  display: block;
  animation: pulse 5s infinite;
}



.services {
  position: relative;
  overflow: hidden;
  color: white; /* testi chiari sopra video scuro */
  z-index: 1;
}

.services .background-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25; /* livello di trasparenza */
  z-index: 0;
}

.services .container {
  position: relative;
  z-index: 2;
}
.logo img {
  height: 50px; /* o quello che preferisci */
  width: auto;
}
.contact .background-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25; /* livello di trasparenza */
  z-index: 0;
  }
/* Overlay contenuto sopra il video */
.contact {
  position: relative;
  overflow: hidden;
}

.contact-overlay {
  position: relative;
  background-color: rgba(255, 255, 255, 0.95); /* Bianco leggermente trasparente */
  padding: 20px 20px;
  z-index: 1;
  border-radius: 20px; /* Arrotonda i bordi */
}  

body {
  display: flex;
  flex-direction: column;
}

main {
  flex: 1; /* occupa tutto lo spazio rimanente */
}

footer {
  background-color: #003366;
  color: white;
  padding: 30px 20px;
}
.clients {
  padding: 100px 20px; /* spazio sopra e sotto aumentato */
  background-color: #ffffff;
  text-align: center;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.clients-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

.clients-card {
  background-color: #f2f2f2;
  color: #003366;
  padding: 20px;
  border-radius: 10px;
  width: 250px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.clients-card:hover {
  transform: scale(1.05);
}
.clients-card img {
  width: 100px;
  height: auto;
  margin-bottom: 15px;
  transition: transform 0.3s ease;
}

.clients-card img:hover {
  transform: scale(1.1);
}

