/* -----------------------------
   Reset CSS e impostazioni base
   (da includere in ogni pagina HEAD)
----------------------------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Open Sans', sans-serif;
  color: #333333;
  background-color: #ffffff;
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #f95738; /* arancio principale */
}

/* -----------------------------
   Variabili CSS (root)
----------------------------- */
:root {
  --primary-color: #0d3b66;    /* Blu scuro */
  --secondary-color: #f95738;  /* Arancio */
  --accent-color: #8fcb9b;     /* Verde tenue */
  --gray-light: #f5f5f5;
  --gray-mid: #cccccc;
  --gray-dark: #333333;
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Open Sans', sans-serif;
}

/* -----------------------------
   Tipografia
----------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--primary-color);
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
p {
  margin-bottom: 1rem;
  color: var(--gray-dark);
}

ul, ol {
  margin-bottom: 1rem;
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.5rem;
}

/* -----------------------------
   Layout: Container e griglie
----------------------------- */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -0.5rem;
}

.col-4 {
  width: 100%;
  padding: 0 0.5rem;
}
@media(min-width: 768px) {
  .col-4 { width: 33.3333%; }
}
@media(min-width: 1024px) {
  .col-4 { width: 25%; }
}

/* -----------------------------
   Navigazione (header)
----------------------------- */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #ffffff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  z-index: 1000;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--primary-color);
  font-weight: bold;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-menu li a {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-dark);
}

.nav-menu li a:hover {
  color: var(--secondary-color);
}

/* -----------------------------
   Hero Section
----------------------------- */
#hero {
  position: relative;
  height: 100vh;
  background: url('../images/hero-lavatrice.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#hero .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(13, 59, 102, 0.6); /* semitrasparente blu scuro */
}

#hero .hero-content {
  position: relative;
  text-align: center;
  z-index: 2;
  padding: 0 1rem;
  color: white;
}

#hero h1 {
  font-family: var(--font-heading);
  font-size: 3rem;
  margin-bottom: 1rem;
  letter-spacing: 1px;
}

#hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

#hero .btn-primary {
  display: inline-block;
  background-color: var(--secondary-color);
  color: #ffffff;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#hero .btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

/* Spazio per compensare header fisso */
body {
  padding-top: 70px;
}

#hero .hero-content .hero-logo {
  display: block;
  margin: 0 auto; /* 0 top/bottom, auto sinistra/destra, 1rem margin-bottom */
  max-width: 300px;    /* come prima: puoi regolare questo valore */
  width: 80%;
  height: auto;
}

@media (min-width: 768px) {
  #hero .hero-content .hero-logo {
    width: auto;
    max-width: 400px;
  }
}

/* -----------------------------
   Sezioni comuni (padding, sfondo)
----------------------------- */
.section {
  padding: 4rem 0;
}

.bg-gray-light {
  background-color: var(--gray-light);
}

/* -----------------------------
   “Perché Sceglierci” (Valori)
----------------------------- */
.valori-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

.valori-card {
  background-color: #ffffff;
  border-radius: 16px;
  padding: 2rem;
  max-width: 300px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.valori-card:hover {
  transform: scale(1.05);
}

.valori-card img {
  width: 100px;
  margin-bottom: 1rem;
}

/* -----------------------------
   Sezione Prodotti in Evidenza
----------------------------- */
.prodotti-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media(min-width: 768px) {
  .prodotti-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.prodotto-card {
  background-color: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.prodotto-card:hover {
  transform: translateY(-5px);
}

.prodotto-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.prodotto-card .card-content {
  padding: 1.5rem;
}

.prodotto-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.prodotto-card p {
  font-size: 0.95rem;
  color: var(--gray-dark);
  margin-bottom: 1rem;
}

.prodotto-card .btn-secondary {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--secondary-color);
  display: inline-block;
  transition: color 0.3s ease;
}

.prodotto-card .btn-secondary:hover {
  color: var(--primary-color);
}

/* -----------------------------
   Sezione “Come Funziona”
----------------------------- */
.come-funziona-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  text-align: center;
}

@media(min-width: 768px) {
  .come-funziona-steps {
    grid-template-columns: repeat(4,1fr);
  }
}

.step-icon {
  width: 300px;
  margin: 0 auto 1rem auto;
}

/* SVG Progress Line posa: */
.progress-line-container {
  position: relative;
  margin-bottom: 2rem;
}

#progress-line {
  width: 100%;
  height: 4px;
  background-color: var(--gray-mid);
  border-radius: 2px;
  overflow: hidden;
}

#progress-fill {
  width: 0;
  height: 100%;
  background-color: var(--primary-color);
  transition: width 0.6s ease-out;
}

/* -----------------------------
   Sezione Chi Siamo (anteprima)
----------------------------- */
.chi-siamo-preview {
  text-align: center;
}

.chi-siamo-preview p {
  max-width: 600px;
  margin: 0 auto 1.5rem auto;
}

/* -----------------------------
   Testimonianze (carousel orizzontale semplice)
----------------------------- */
.testimonial-container {
  display: flex;            /* trasforma in flex container */
  gap: 1rem;                /* spazio orizzontale tra le card */
  overflow-x: auto;         /* abilita lo scroll orizzontale se necessario */
  padding-bottom: 1rem;
  /* rimuovi white-space: nowrap; */
}

.testimonial-item {
  flex: 0 0 auto;           /* impedisce che le card si restringano o si allunghino */
  background-color: #ffffff;
  border-radius: 16px;
  padding: 2rem;
  width: 300px;             /* fisso a 300px */
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  /* margin-right: 1rem; */  /* ora gestito da gap del flex container */
}

.testimonial-item p {
  font-style: italic;
  margin-bottom: 1rem;
}

/* -----------------------------
   Cards “Chi Siamo” + Team
----------------------------- */
.team-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

.team-member {
  text-align: center;
  max-width: 220px;
}

.team-member img {
  display: block;          /* rende l’img un blocco */
  margin: 0 auto 1rem;     /* 0 in alto, auto a destra/sinistra per centrarla, 1rem in basso */
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
}

/* -----------------------------
   Footer
----------------------------- */
footer {
  background-color: #0d3b66;
  color: #ffffff;
  padding: 3rem 1rem;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
}

footer,
footer * {
  color: #ffffff;
}

/* Se i link devono rimanere bianchi e cambiare solo al passaggio */
footer a {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  color: var(--secondary-color);
}

.footer-col {
  flex: 1 1 200px;
}

.footer-col h4 {
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col ul li a {
  color: #ffffff;
  font-size: 0.95rem;
}

.footer-col ul li a:hover {
  color: var(--secondary-color);
}

/* -----------------------------
   Form Contatti
----------------------------- */
form input,
form select,
form textarea {
  width: 100%;
  border: 1px solid var(--gray-mid);
  padding: 0.75rem;
  border-radius: 8px;
  font-size: 1rem;
  margin-bottom: 1rem;
  transition: border-color 0.3s ease;
}

form input:focus,
form select:focus,
form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

form button {
  background-color: var(--secondary-color);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

form button:hover {
  background-color: var(--primary-color);
}

/* -----------------------------
   FAQ
----------------------------- */
.faq-item {
  margin-bottom: 2rem;
}

.faq-item h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

/* -----------------------------
   Blog – Elenco Post
----------------------------- */
.blog-post-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.blog-post-list h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.blog-post-list p {
  color: var(--gray-dark);
}

/* -----------------------------
   Blog – Contenuto Post
----------------------------- */
.blog-content {
  max-width: 800px;
  margin: 0 auto;
}

.blog-content p {
  margin-bottom: 1rem;
  font-size: 1rem;
  color: var(--gray-dark);
}

/* -----------------------------
   Animazioni personalizzate
----------------------------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Popup per Scroll Reveal (se non si usa WOW.js) */
.animate-fadeInUp {
  opacity: 0;
  animation-name: fadeInUp;
  animation-duration: 0.8s;
  animation-fill-mode: forwards;
  animation-delay: 0.3s;
}

/* -----------------------------
   Responsive tweaks
----------------------------- */
@media(max-width: 768px) {
  header .nav-menu {
    display: none; /* per semplicità, rimaniamo desktop-only; */}
}

/* ================================
   HERO SECTION – FLEX CENTERING
   ================================ */
#hero {
  position: relative;
  height: 100vh;
  background: url('../images/hero-lavatrice.jpg') center/cover no-repeat;
  display: flex;                /* ① abilita flex container */
  align-items: center;          /* ② allinea verticalmente */
  justify-content: center;      /* ③ allinea orizzontalmente */
  overflow: hidden;
}

#hero .overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(13, 59, 102, 0.6);
}

#hero canvas#particle-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
}

#hero .hero-content {
  position: relative;
  z-index: 2;
  text-align: center;        /* centra il testo al suo interno */
  width: 100%;               /* occupa tutto lo spazio orizzontale del flex item */
  max-width: 800px;          /* evita che diventi troppo largo */
  padding: 0 1rem;           /* margine interno sui lati */
  color: #ffffff;
}

/* ====================================
   COOKIE BANNER – STILE AGGIORNATO
   ==================================== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: rgba(13, 59, 102, 0.95); /* sfondo semi-opaco scuro */
  color: #ffffff;                              /* testo bianco */
  font-size: 0.95rem;
  line-height: 1.4;
  z-index: 9999;
  display: flex;
  justify-content: center;
  padding: 1rem;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.2);
}

.cookie-banner.hidden {
  display: none;
}

.cookie-banner__content {
  max-width: 1200px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #ffffff;      /* assicura che tutto dentro sia bianco */
}

.cookie-banner__content p {
  margin-bottom: 1rem;
  color: #ffffff;      /* paragrafo bianco */
}

.cookie-banner__content a {
  color: #ffffff;      /* link bianco */
  text-decoration: underline;
}

.cookie-banner__buttons {
  display: flex;
  flex-wrap: wrap;     /* permette ai bottoni di andare a capo anziché sovrapporsi */
  gap: 0.75rem;        /* spazio orizzontale/verticale tra i pulsanti */
  justify-content: center;
  width: 100%;
}

.btn-cookie {
  flex: 1 1 auto;          /* si adattano in larghezza fino a un minimo */
  min-width: 120px;        /* larghezza minima per mantenere leggibilità */
  max-width: 180px;        /* larghezza massima */
  padding: 0.75rem 1.25rem;/* spazio interno aumentato per un tocco più “cliccabile” */
  border: none;
  border-radius: 8px;      /* bordi più arrotondati */
  font-size: 0.95rem;
  cursor: pointer;
  font-weight: 600;
  text-align: center;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-cookie--accept {
  background-color: var(--secondary-color);
  color: #ffffff;
}

.btn-cookie--accept:hover {
  background-color: #de4d2e; /* arancio leggermente scuro */
  transform: translateY(-2px);
}

.btn-cookie--decline {
  background-color: #444444; /* grigio scuro per contrasto con banner scuro */
  color: #ffffff;            /* testo bianco */
}

.btn-cookie--decline:hover {
  background-color: #333333; /* un po’ più scuro */
  transform: translateY(-2px);
}

/* Su desktop (min-width: 768px), layout orizzontale “spread” */
@media (min-width: 768px) {
  .cookie-banner__content {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }
  .cookie-banner__content p {
    margin-bottom: 0;
  }
  .cookie-banner__buttons {
    flex-wrap: nowrap;  /* forziamo su una sola riga per schermi larghi */
    width: auto;
  }
}