/* Reset di base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overscroll-behavior-y: none;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #ffffff; /* Sfondo bianco per allinearsi al footer in caso estremo */
  color: #333;
  display: flex;
  flex-direction: column;
  min-height: calc(
    var(--vh, 1vh) * 100
  ); /* Forza il body ad occupare l'intera altezza dello schermo */
  overscroll-behavior-y: none;
}

main {
  flex: 1; /* Spinge il footer in basso prendendo lo spazio rimanente */
  display: flex;
  flex-direction: column;
  background-color: #fcfcfc; /* Deve essere opaco per coprire il footer parallax */
  position: relative;
  z-index: 2; /* Sopra al footer */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); /* Ombra proiettata sul footer */
}

/* Stile dell'Header con position relative per fare da ancora al menu absolute */
header {
  background-color: rgba(255, 255, 255, 1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.35); /* Ombra 3D forte per dare profondità */
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 1000; /* Assicura che l'header e l'ombra stiano SOPRA lo slider */
  transition:
    transform 0.3s ease-in-out,
    background-color 0.4s ease,
    backdrop-filter 0.4s ease,
    box-shadow 0.4s ease;
}

header.header-scrolled {
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15); /* Ombra più leggera quando trasparente */
}

header.header-hidden {
  transform: translateY(-100%);
}

/* ======================================================= */
/* 1. MOBILE-FIRST (Stili per Smartphone - Default)        */
/* ======================================================= */

.navbar {
  display: flex;
  justify-content: space-between; /* Logo a sinistra, Hamburger a destra */
  align-items: center;
  width: 100%;
  padding: 15px 20px;
}

.logo img {
  height: 35px;
  width: auto;
  display: block;
}

/* Stilizzazione del Bottone Hamburger */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

/* Le tre linee dell'hamburger */
.menu-toggle .bar {
  width: 100%;
  height: 3px;
  background-color: #333;
  border-radius: 2px;
  transition: all 0.3s ease; /* Rende l'animazione fluida */
}

/* ANIMAZIONE: Trasforma l'hamburger in una "X" quando il menu è aperto */
.menu-toggle.open .bar:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.menu-toggle.open .bar:nth-child(2) {
  opacity: 0; /* Nasconde la linea centrale */
}

.menu-toggle.open .bar:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* Il menu di navigazione a discesa su Mobile animato */
.menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  position: absolute;
  top: 100%; /* Si posiziona esattamente sotto l'header */
  left: 0;
  background-color: #ffffff;
  padding: 0; /* Animato */
  gap: 10px; /* Spazio tra i link dimezzato */
  list-style: none;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
  border-top: 1px solid transparent;
  z-index: 1000;
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.4s ease,
    padding 0.4s ease,
    border-color 0.4s ease;
}

/* Classe aggiunta tramite JS per mostrare il menu */
.menu.active {
  max-height: 350px; /* Altezza sufficiente per tutti i link */
  padding: 15px 0;
  border-top-color: #eee;
}

/* Quando l'header è scrolled, applica la trasparenza e il blur anche al menu a tendina */
header.header-scrolled .menu {
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.menu li {
  width: 100%;
  text-align: center;
}

.menu a {
  text-decoration: none;
  color: #555;
  font-weight: 600;
  font-size: 14px; /* Dimensione testo ridotta su mobile */
  white-space: nowrap;
  transition: color 0.3s ease;
}

.menu a:hover {
  color: #356600; /* Verde scuro professionale */
}

/* ======================================================= */
/* 2.5 STILI DROPDOWN MENU                                 */
/* ======================================================= */

.dropdown {
  position: relative;
}

.dropdown-menu {
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    visibility 0.3s ease;
  position: absolute;
  top: calc(100% + 10px); /* Staccato dal testo per evitare che si tocchino */
  left: 0;
  background-color: #ffffff;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  list-style: none;
  padding: 10px 0;
  min-width: 250px;
  z-index: 1000;
  border-radius: 4px;
  border-top: 1px solid #356600; /* Più elegante e meno spessa */
}

.dropdown-menu li {
  display: block;
  width: 100%;
}

.dropdown-menu a {
  padding: 10px 20px;
  display: block;
  font-size: 15px;
  font-weight: 500;
  color: #555;
  white-space: normal;
}

.dropdown-menu a:hover {
  background-color: #f9f9f9;
  color: #356600;
}

/* Su PC mostriamo il dropdown al passaggio del mouse o al click (classe active gestita da JS) */
@media (min-width: 768px) {
  .dropdown:hover .dropdown-menu,
  .dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  /* Ponte invisibile per non far chiudere il dropdown quando il mouse attraversa lo spazio vuoto di 10px */
  .dropdown-menu::before {
    content: "";
    position: absolute;
    top: -15px; /* Copre il gap di 10px e dà un po' di tolleranza */
    left: 0;
    width: 100%;
    height: 15px;
    background: transparent;
  }
}

/* Su mobile il dropdown spinge gli elementi verso il basso (click/active) */
@media (max-width: 767px) {
  .dropdown-menu {
    position: static;
    box-shadow: none;
    background-color: #f8f8f8; /* Un grigio leggermente più chiaro per staccare dal bianco */
    width: 100%;
    margin-left: 0;
    /* Reset animazioni desktop */
    opacity: 1;
    visibility: visible;
    transform: none;
    /* Animazione a tendina mobile */
    max-height: 0;
    overflow: hidden;
    padding: 0;
    margin-top: 0;
    border-top: none;
    border-left: none;
    transition:
      max-height 0.4s ease,
      padding 0.4s ease,
      margin 0.4s ease;
  }
  .dropdown.active .dropdown-menu {
    max-height: 500px;
    padding: 10px 0;
    margin-top: 10px;
  }
  .dropdown-menu a {
    padding: 8px 15px;
    font-size: 14px;
  }
}

/* ======================================================= */
/* 2.6 STILI HERO SLIDER                                   */
/* ======================================================= */

.hero-slider {
  width: 100%;
  height: calc(calc(var(--vh, 1vh) * 100) - 65px);
  min-height: 400px;
  position: relative;
  background-color: #333; /* Sfondo di fallback */
}

/* Overlay ombra 3D per far sembrare lo slider incassato nello schermo */
.hero-slider::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Ombra interna molto forte sopra e sotto */
  box-shadow:
    inset 0 25px 25px -15px rgba(0, 0, 0, 0.8),
    inset 0 -25px 25px -15px rgba(0, 0, 0, 0.8);
  pointer-events: none; /* Lascia passare i click verso i bottoni e lo slider */
  z-index: 10; /* Si posiziona sopra le immagini dello slider */
}

/* Freccia di scorrimento verso il basso */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  z-index: 20;
  animation: bounce 2s infinite;
  transition: color 0.3s ease;
}

.scroll-indicator:hover {
  color: #fff;
}

.scroll-indicator svg {
  width: 40px;
  height: 40px;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0) translateX(-50%);
  }
  40% {
    transform: translateY(-15px) translateX(-50%);
  }
  60% {
    transform: translateY(-7px) translateX(-50%);
  }
}

.css-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.slide {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: absolute; /* Stack the slides */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0; /* Hidden by default */
  visibility: hidden;
  animation: fadeAnimation 15s infinite; /* 3 slides * 5s each = 15s total cycle */
}

/* Delay each slide to create the sequence */
.slide-1 {
  animation-delay: 0s;
}
.slide-2 {
  animation-delay: -10s;
}
.slide-3 {
  animation-delay: -5s;
}

/* The fade animation (15s total) */
@keyframes fadeAnimation {
  0% {
    opacity: 1;
    visibility: visible;
  }
  26.66% {
    opacity: 1;
    visibility: visible;
  } /* Visibile per 4s */
  33.33% {
    opacity: 0;
    visibility: hidden;
  } /* Dissolvenza in uscita (1s) */
  93.33% {
    opacity: 0;
    visibility: hidden;
  } /* Nascosta per 9s */
  100% {
    opacity: 1;
    visibility: visible;
  } /* Dissolvenza in entrata (1s) */
}

/* Overlay per rendere il testo più leggibile */
.slide::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

/* Sfondi Mobile (immagini ritagliate verticalmente) */
.slide-1 {
  background-color: #555;
  background-image: url("../img/concrete-mobile.webp");
}
.slide-2 {
  background-color: #666;
  background-image: url("../img/beton-mobile.webp");
}
.slide-3 {
  background-color: #444;
  background-image: url("../img/ric-mobile.webp");
}

.slide-content {
  position: relative;
  z-index: 2; /* Sopra l'overlay scuro */
  color: #ffffff;
  padding: 0 20px;
  max-width: 800px;
}

.slide-content h2 {
  font-size: clamp(2.5rem, 7vw, 5rem);
  margin-bottom: 15px;
  font-weight: 700;
  line-height: 1.1;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: normal;
  text-shadow: 2px 2px 15px rgba(0, 0, 0, 0.9);
}

.slide-content p {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 400;
  margin-bottom: 30px;
  color: #fdfdfd;
  line-height: 1.6;
  text-shadow: 1px 1px 8px rgba(0, 0, 0, 0.9);
}

.btn {
  display: inline-block;
  padding: 12px 25px;
  background-color: transparent;
  color: #ffffff;
  border: 2px solid #ffffff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.btn:hover {
  background-color: #356600;
  border-color: #356600;
  color: #ffffff;
  transform: translateY(-2px);
}

/* ======================================================= */
/* 3. STILI DEL FOOTER (Mobile-First)                      */
/* ======================================================= */

footer {
  background-color: #ffffff;
  border-top: none;
  width: 100%;
  margin-top: 0;
  position: sticky;
  bottom: 0;
  z-index: 1; /* Positivo per permettere i click, ma minore del main (2) per il Parallax */
}

/* Layout di base (Mobile-First): elementi in colonna super-compattati */
.footer-container {
  display: flex;
  flex-direction: column;
  padding: 8px 20px 0px 20px; /* Padding minimo */
  gap: 2px; /* Quasi attaccati */
}

.footer-section {
  flex: 1;
}

/* Nasconde il brand (con la scritta rossa evidenziata) su mobile */
.footer-section.brand {
  display: none;
}

.footer-section h3 {
  font-size: 18px;
  color: #333;
  margin-bottom: 15px;
  font-weight: 700;
}

.footer-section h4 {
  font-size: 13px; /* Leggermente più piccolo su mobile */
  color: #333;
  margin-bottom: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Stili Accordion Footer Nativi (Ponytail mode) */
details.footer-section summary {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  align-items: center;
  cursor: pointer;
  list-style: none; /* Rimuove il triangolo di default */
}

details.footer-section summary::-webkit-details-marker {
  display: none;
}

/* Aggiungiamo un nostro + usando pseudo-elementi (senza JS) */
details.footer-section summary::before {
  content: "+";
  font-size: 18px;
  font-weight: bold;
  color: #356600;
}

details.footer-section[open] summary::before {
  content: "-";
}

details.footer-section summary h4 {
  margin-bottom: 0;
}

.accordion-inner {
  overflow: hidden;
}

details.footer-section[open] .accordion-inner {
  padding-top: 15px;
}

.footer-section p {
  font-size: 13px; /* Ridotto per mobile */
  color: #666;
  line-height: 1.6;
  margin-bottom: 8px;
}

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

.footer-section ul li {
  margin-bottom: 8px;
}

.footer-section ul a {
  text-decoration: none;
  color: #666;
  font-size: 13px; /* Ridotto per mobile */
  font-weight: 500;
  display: inline-block;
  transition:
    color 0.3s ease,
    transform 0.3s ease;
}

.footer-section ul a:hover {
  color: #356600; /* Verde scuro brand */
  transform: translateX(5px);
}

.footer-bottom {
  text-align: center;
  padding: 2px 12px 8px 12px; /* Margini ridotti al minimo assoluto */
  /* border-top rimosso per incorporare il testo nel footer */
}

.footer-bottom p {
  font-size: 11px; /* Ridotto per mobile */
  color: #888;
}

/* ======================================================= */
/* 4. DESKTOP (Stili per PC, in fondo al file per la precedenza) */
/* ======================================================= */

@media (min-width: 768px) {
  .navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: none;
    padding: 15px 30px;
    position: static;
  }

  .hero-slider {
    height: calc(calc(var(--vh, 1vh) * 100) - 75px);
  }

  .logo {
    position: static;
  }

  .logo img {
    height: 45px;
  }

  .menu-toggle {
    display: none;
  }

  .menu {
    display: contents; /* Rende i link figli diretti della navbar */
  }

  .menu li {
    display: block;
    list-style: none;
  }

  .menu li:last-child {
    position: static;
  }

  .menu a {
    font-size: 16px;
    position: relative;
  }

  .menu a::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 50%;
    background-color: #356600;
    transition:
      width 0.3s ease,
      left 0.3s ease;
  }

  .menu a:hover::after {
    width: 100%;
    left: 0;
  }

  .footer-container {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding: 10px 30px 0px 30px; /* Ridotto per snellire il footer */
  }

  .footer-container > .footer-section:nth-child(1) {
    text-align: left;
  }
  .footer-container > .footer-section:nth-child(1) summary {
    justify-content: flex-start;
  }

  .footer-container > .footer-section:nth-child(2) {
    text-align: center;
  }
  .footer-container > .footer-section:nth-child(2) summary {
    justify-content: center;
  }

  .footer-container > .footer-section:nth-child(3) {
    text-align: right;
  }
  .footer-container > .footer-section:nth-child(3) summary {
    justify-content: flex-end;
  }

  /* Correzioni per l'animazione di hover del testo nei link */
  .footer-container > .footer-section:nth-child(2) ul a:hover {
    transform: translateX(0); /* Al centro non si sposta lateralmente */
  }
  .footer-container > .footer-section:nth-child(3) ul a:hover {
    transform: translateX(
      -5px
    ); /* A destra si sposta verso sinistra, per non uscire dal bordo */
  }

  /* Compattiamo i testi del brand per ridurre l'altezza a ~75px senza nasconderli */
  .footer-section h3 {
    margin-bottom: 5px;
    font-size: 16px;
  }

  .footer-section p {
    margin-bottom: 0;
    font-size: 11px;
    line-height: 1.3;
  }

  .footer-bottom {
    padding: 10px 12px 10px 12px; /* Padding verticali dimezzati */
    margin-top: 15px; /* Margine superiore dimezzato */
  }

  .footer-section {
    flex: 1; /* Assegna esattamente 1/3 dello spazio a ciascuna colonna, impedendo spostamenti */
    width: 33.33%;
  }

  .footer-section.brand {
    display: block; /* Mostra di nuovo il blocco brand su PC */
    max-width: 300px;
  }

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

  .footer-section.links ul {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
  }

  /* Ripristina grandezze font su PC */
  .footer-section h4 {
    font-size: 14px;
  }
  .footer-section p {
    font-size: 14px;
  }
  .footer-section ul a {
    font-size: 14px;
  }
  .footer-bottom p {
    font-size: 12px;
  }

  /* Ripristina gli sfondi orizzontali originali su PC */
  .slide-1 {
    background-image: url("../img/concrete.webp");
  }
  .slide-2 {
    background-image: url("../img/beton.webp");
  }
  .slide-3 {
    background-image: url("../img/ric.webp");
  }

  /* Ripristina il testo descrittivo dello slider su PC */
  .slide-content p {
    display: block;
  }
}

/* ======================================================= */
/* 5. NUOVE SEZIONI HOMEPAGE (Stile Mobile-First)          */
/* ======================================================= */

.container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 40px; /* Un po' più di respiro sui lati se occupa tutto lo schermo */
}

.section-padding {
  padding: 40px 0; /* Ridotto il padding base */
  min-height: calc(var(--vh, 1vh) * 45); /* Ulteriormente ridotta al 45% */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.bg-light {
  background-color: #f4f4f4;
}

.theme-dark {
  background-color: #2a2a2a;
  color: #fff;
}

.text-white {
  color: #fff !important;
}

.center {
  text-align: center;
}

.section-title {
  font-size: 28px;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
  color: #222;
}

.hero-title {
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 70px;
  height: 5px;
  border-radius: 3px;
  background-color: #356600;
}

.hero-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 5px;
  border-radius: 3px;
  background-color: #356600;
}

.center.section-title {
  display: block;
}

.center.section-title::after {
  left: 50%;
  transform: translateX(-50%);
}

.theme-dark .section-title::after {
  background-color: #4caf50;
}

.layout-split {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.text-content p {
  font-size: 16px;
  line-height: 1.6;
  color: inherit;
  margin-bottom: 20px;
}

.theme-dark .text-content p {
  color: #ccc;
}

.btn-dark {
  background-color: #222;
  color: #fff;
}

.btn-dark:hover {
  background-color: #356600;
}

.image-content {
  position: relative;
  width: 100%;
}

.image-content img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  position: relative;
  z-index: 2;
}

/* Stile Immagine Chi Siamo - Effetto Cartolina 3D con Vignettatura */
.image-content.offset-bg {
  position: relative;
  border-radius: 16px;
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.25),
    0 10px 20px rgba(0, 0, 0, 0.15); /* Ombra esterna molto pronunciata per sollevare */
  transform: translateY(-5px); /* Rialza visivamente il blocco */
  overflow: hidden; /* Taglia la vignettatura sui bordi arrotondati */
}

.image-content.offset-bg img {
  border-radius: 16px;
  box-shadow: none; /* L'ombra 3D è sul contenitore */
  display: block;
}

/* Overlay per la vignettatura interna e velatura scura */
.image-content.offset-bg::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  background-color: rgba(0, 0, 0, 0.2); /* Leggero nero su tutta la foto */
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.5); /* Ombreggiatura interna forte sui bordi (Vignettatura) */
  pointer-events: none; /* Lascia passare eventuali click */
  z-index: 3;
}

/* Decorazione Immagine Centro Recupero - Stile Cartolina 3D con Effetto Scala di Grigi */
.image-content.border-accent {
  position: relative;
  border-radius: 16px;
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.25),
    0 10px 20px rgba(0, 0, 0, 0.15); /* Ombra esterna (3D) */
  transform: translateY(-5px); /* Rialza visivamente il blocco */
  overflow: hidden; /* Taglia la vignettatura sui bordi arrotondati */
}

.image-content.border-accent img {
  border-radius: 16px;
  box-shadow: none;
  display: block;
  width: 100%;
  /* Nessun filtro grayscale su mobile: si vede a colori di default */
  transition:
    filter 0.5s ease,
    transform 0.5s ease;
  cursor: pointer;
}

/* Overlay per la vignettatura interna */
.image-content.border-accent::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.15); /* Vignettatura interna molto più leggera */
  pointer-events: none; /* Lascia passare i click */
  z-index: 3;
}
/* Griglia Prodotti */
.grid-3,
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  margin-top: 40px;
}

.product-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  will-change: transform;
}

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

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

.card-icon {
  width: 100%;
  height: 200px;
  background-color: #eaeaea;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-icon svg {
  width: 60px;
  height: 60px;
  stroke: #999;
}

.card-body {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-body h3 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 15px;
  color: #222;
}

.card-body p {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.link-arrow {
  text-decoration: none;
  color: #356600;
  font-weight: 800;
  font-size: 14px;
  text-transform: uppercase;
  display: inline-block;
  transition: color 0.3s ease;
}

.link-arrow:hover {
  color: #222;
}

.white-link {
  color: #fff;
  border-bottom: 1px solid #fff;
  padding-bottom: 2px;
}

.white-link:hover {
  color: #4caf50;
  border-color: #4caf50;
}

.services-list-container {
  background: #fff;
  border-radius: 8px;
  border-left: 4px solid #356600;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  padding: 20px;
}

.service-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 20px 0;
  border-bottom: 1px solid #eee;
}

.service-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.service-item:first-child {
  padding-top: 0;
}

.service-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #f4f8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.service-icon svg,
.service-icon img {
  width: 24px;
  height: 24px;
  fill: #356600;
  stroke: none;
  object-fit: contain;
}

.service-text h4 {
  font-size: 16px;
  font-weight: 800;
  color: #222;
  margin-bottom: 5px;
}

.service-text p {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
  margin-bottom: 0;
}

/* Badge e Features Centro Recupero */
.badge {
  display: inline-block;
  background-color: rgba(53, 102, 0, 0.2);
  color: #4caf50;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 15px;
  letter-spacing: 1px;
}

.recovery-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
}

/* Classi di Visibilità */
.mobile-only {
  display: block !important;
}
.desktop-only {
  display: none !important;
}

/* Riorganizzazione Layout Chi Siamo Mobile */
.home-about.section-padding {
  padding-bottom: 10px; /* Compressione massima verso la sezione successiva */
}
.home-about .layout-split {
  display: flex;
  flex-direction: column;
}
.home-about .text-content {
  display: contents; /* Annulla il wrapper visivo per ordinare liberamente i figli */
}
.home-about .section-title {
  order: 1;
  width: 100%;
  margin-bottom: 0px !important; /* Nessun margine */
}
.home-about .image-content {
  order: 2;
  margin: 0px 0 5px 0 !important; /* Nessun margine sopra, piccolissimo sotto */
}
.home-about .text-content p {
  order: 3;
  width: 100%;
  margin-bottom: 0px !important; /* Azzerato completamente */
}
.home-about .desktop-only {
  order: 4;
}
.home-about .mobile-only {
  order: 5;
  width: 100%;
  margin-top: -18px !important; /* Aumento drastico del margine negativo per incollarlo fisicamente */
  position: relative;
  z-index: 10;
}

/* Riorganizzazione Layout Servizi Mobile */
.home-services .layout-split {
  gap: 15px !important; /* Riduciamo il gap predefinito di 40px */
}
.home-services .text-content p {
  margin-bottom: 5px !important; /* Riduciamo il margine sotto il testo */
}

/* MEDIA QUERIES DESKTOP PER NUOVE SEZIONI */
@media (min-width: 768px) {
  /* Reset riorganizzazione Chi Siamo per PC */
  .home-about.section-padding {
    padding-bottom: 60px; /* Ripristina il padding per PC */
  }
  .home-about .text-content {
    display: block;
  }
  .home-about .section-title {
    order: 0;
    width: auto;
    margin-bottom: 20px !important;
  }
  .home-about .image-content {
    order: 0;
    width: auto;
    margin: 0 !important;
  }
  .home-about .text-content p {
    order: 0;
    width: auto;
    margin-bottom: 15px !important;
  }
  .home-about .desktop-only,
  .home-about .mobile-only {
    order: 0;
    width: auto;
  }

  /* Reset riorganizzazione Servizi per PC */
  .home-services .layout-split {
    gap: 40px !important;
  }
  .home-services .text-content p {
    margin-bottom: 20px !important;
  }

  .mobile-only {
    display: none !important;
  }
  .desktop-only {
    display: block !important;
  }

  /* Effetto Hover Scala di grigi -> Colore per Centro Recupero solo su PC */
  .image-content.border-accent img {
    filter: grayscale(100%) brightness(1.08) contrast(1.05);
  }
  .image-content.border-accent:hover img {
    filter: grayscale(0%);
    transform: scale(1.03);
  }

  .section-padding {
    padding: 60px 0; /* Ridotto il padding su desktop da 100 a 60px */
  }
  .layout-split {
    flex-direction: row;
    align-items: center;
    gap: 60px;
  }
  .layout-split > * {
    flex: 1;
  }
  .layout-split.reverse {
    flex-direction: row-reverse;
  }
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .section-title {
    font-size: 36px;
  }
  .text-content p {
    font-size: 18px;
  }
  .services-list-container {
    padding: 40px;
  }
}

/* Certifications Section */
.cert-card {
  text-align: center;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}
.cert-icon {
  width: 100px;
  height: 100px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4f8f0;
  border-radius: 50%;
  color: #356600;
}
.cert-icon svg {
  width: 40px;
  height: 40px;
  fill: currentColor;
}
.cert-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: #222;
}

.recovery-features {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 20px;
}

/* ======================================================= */
/* 6. COMPONENTI PAGINE INTERNE (Chi Siamo, ecc.)          */
/* ======================================================= */

/* Hero Banner */
.page-hero {
  position: relative;
  width: 100%;
  min-height: calc(calc(var(--vh, 1vh) * 100) - 65px);
  height: calc(calc(var(--vh, 1vh) * 100) - 65px);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  margin-top: 0;
}

#chisiamo-hero {
  background-image: url("../img/chisiamo_azienda_hero.webp");
  background-position: 15% center;
}

@media screen and (max-width: 767px),
  screen and (max-width: 1024px) and (orientation: portrait) {
  #chisiamo-hero {
    background-image: url("../img/chisiamo_azienda_hero_mobile.webp") !important;
    background-position: center;
  }
}

.page-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.8) 40%,
    rgba(0, 0, 0, 0.5) 75%,
    rgba(0, 0, 0, 0) 100%
  );
  box-shadow:
    inset 0 25px 25px -15px rgba(0, 0, 0, 0.8),
    inset 0 -25px 25px -15px rgba(0, 0, 0, 0.8);
  z-index: 1;
  pointer-events: none;
}

.page-hero-content {
  position: relative;
  z-index: 2;
  padding: 0 20px;
}

.page-hero-content h1 {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #ffffff;
}

.page-hero-content p {
  font-size: 20px;
  font-weight: 300;
}

/* Timeline Verticale */
.timeline {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 0;
}

.timeline::after {
  content: "";
  position: absolute;
  width: 4px;
  background-color: #e0e0e0;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.timeline-node {
  padding: 10px 100px;
  position: relative;
  background-color: inherit;
  width: 50%;
  z-index: 2;
  margin-bottom: 80px;
}

.timeline-node:last-child {
  margin-bottom: 0;
}

.timeline-node.left {
  left: 0;
  text-align: right;
}

.timeline-node.right {
  left: 50%;
  text-align: left;
}

.timeline-node::before {
  content: "";
  position: absolute;
  height: 4px;
  background-color: #e0e0e0;
  top: 72px;
  width: 100px;
  z-index: 1;
}

.timeline-node.left::before {
  right: 0;
}

.timeline-node.right::before {
  left: 0;
}

.timeline-connector {
  background-color: #e0e0e0;
}

.timeline-content {
  padding: 20px 30px;
  position: relative;
  top: 10px;
}

.timeline-date {
  display: block;
  font-weight: 800;
  font-size: 20px;
  color: #333;
  margin-bottom: 5px;
}

.timeline-content h3 {
  font-size: 24px;
  color: #1b4b27;
  margin-bottom: 15px;
}

.timeline-content p {
  color: #666;
  line-height: 1.6;
}

.timeline-card {
  position: absolute;
  top: 20px;
  width: 100%;
  padding: 0 100px;
  z-index: 5;
}

.timeline-node.left .timeline-card {
  left: 100%;
}

.timeline-node.right .timeline-card {
  right: 100%;
}

.timeline-card-inner {
  width: 100%;
  aspect-ratio: 16/9;
  background-color: #f4f8f0;
  border-radius: 12px;
  box-shadow:
    0 15px 35px rgba(0, 0, 0, 0.1),
    0 5px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.8);
  overflow: hidden;
  position: relative;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  will-change: transform, box-shadow;
}

.timeline-card-inner:hover {
  transform: translateY(-5px);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.12),
    0 8px 20px rgba(0, 0, 0, 0.08);
}

.timeline-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #356600;
  font-weight: 600;
  font-size: 14px;
  opacity: 0.5;
}

.timeline-card-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* TIMELINE MOBILE */
@media screen and (max-width: 767px) {
  .timeline::after {
    left: 50%;
    background-color: rgba(224, 224, 224, 0.3);
  }
  .timeline-node {
    width: 100%;
    padding-left: 20px;
    padding-right: 20px;
    margin-bottom: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .timeline-node.left,
  .timeline-node.right {
    left: 0;
    text-align: center;
  }
  .timeline-node::before {
    display: none;
  }
  .timeline-content {
    padding: 20px 15px 10px 15px;
    text-align: center;
    background-color: #fff;
  }
  .timeline-card {
    position: relative;
    left: auto !important;
    right: auto !important;
    top: auto;
    padding: 0;
    margin-top: 30px;
    width: 100%;
    max-width: 400px;
  }
  .timeline-content {
    position: relative;
    z-index: 2;
  }
  .timeline-content p {
    color: #444;
  }
  .timeline-connector {
    background-color: rgba(224, 224, 224, 0.3);
  }
  .timeline-date {
    font-size: 16px;
  }
  .timeline-content h3 {
    font-size: 20px;
  }
  .page-hero-content h1 {
    font-size: 32px;
  }
}

/* ======================================================= */
/* 7. PAGINA PRODOTTI (SPLIT HERO INTERATTIVO)             */
/* ======================================================= */

.prodotti-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.prodotti-hero {
  flex-grow: 1;
  position: relative;
  width: 100%;
  height: calc(
    calc(var(--vh, 1vh) * 100) - 85px
  ); /* Usa height fissa invece di min-height per forzare il layout */
  background-image: url("../img/prodotti.webp");
  background-size: cover;
  background-position: center;
  display: flex;
  overflow: hidden;
}

.mobile-hint {
  display: none;
}

.split-pane {
  flex: 1;
  align-self: stretch;
  min-width: 0;
  min-height: 0;
  overflow-y: auto; /* Permette scroll interno se lo schermo è minuscolo */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: transparent;
  transition: background-color 0.4s ease;
  cursor: pointer;
  user-select: none;
}

/* Oscuramento al passaggio del mouse o attivazione su mobile */
.split-pane:hover,
.split-pane.active {
  background-color: rgba(0, 0, 0, 0.7);
  outline: none;
  /* Un leggero box-shadow previene le sottili linee bianche causate dagli arrotondamenti sub-pixel del browser (es. su mobile) */
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.7);
}

.pane-content {
  color: #fff;
  padding: 40px;
  max-width: 600px;
}

.pane-content h2 {
  font-size: 48px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 20px;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
  transition: transform 0.4s ease;
  position: relative;
  display: inline-block;
}

.pane-content h2::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -10px;
  width: 60px;
  height: 4px;
  background-color: #356600; /* Verde aziendale 4Beton */
  box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
}

.pane-desc {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.4s ease;
}

.pane-desc p {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 30px;
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.8);
}

.split-pane:hover .pane-content h2,
.split-pane.active .pane-content h2 {
  transform: translateY(-20px);
}

.split-pane:hover .pane-desc,
.split-pane.active .pane-desc {
  opacity: 1;
  max-height: 800px; /* Aumentato per impedire che i testi lunghi o i bottoni vengano tagliati */
}

/* PRODOTTI DETAILS LAYOUT */
.prodotti-split {
  display: flex;
  max-width: 100%;
  margin: 0 auto;
  position: relative;
  gap: 50px;
  padding: 0 40px;
}

.prodotti-left,
.prodotti-right {
  flex: 1;
  min-width: 0;
}

.prodotti-divider {
  width: 4px;
  background-color: #3f5c1f;
  border-radius: 2px;
}

.prodotti-text h3 {
  font-size: 28px;
  color: #1b4b27;
  margin-bottom: 20px;
}

.prodotti-text p {
  color: #555;
  line-height: 1.6;
  margin-bottom: 30px;
}

.img-responsive {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

.offset-shadow {
  box-shadow:
    0 15px 35px rgba(0, 0, 0, 0.1),
    0 5px 15px rgba(0, 0, 0, 0.05);
}

/* LEGO SLIDER */
.lego-slider-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 15px 35px rgba(0, 0, 0, 0.1),
    0 5px 15px rgba(0, 0, 0, 0.05);
}

.lego-slider {
  width: 100%;
  height: 100%;
  position: relative;
}

.lego-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.lego-slide.active {
  opacity: 1;
}

.lego-slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.7);
  color: #1b4b27;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.lego-slider-btn:hover {
  background: rgba(255, 255, 255, 1);
}

.lego-slider-btn.prev {
  left: 10px;
}

.lego-slider-btn.next {
  right: 10px;
}

/* STILI MOBILE PER PRODOTTI HERO */
@media screen and (max-width: 767px) {
  .prodotti-hero {
    flex-direction: column;
    background-image: url("../img/prodotti_mobile.webp");
    height: calc(
      calc(var(--vh, 1vh) * 100) - 65px
    ); /* Header è 65px su mobile */
  }

  .split-pane {
    /* flex: 1 gestisce già l'altezza al 50% in flex-direction: column */
  }

  .pane-content {
    padding: 15px;
  }

  .pane-content h2 {
    font-size: 24px;
    margin-bottom: 10px;
  }

  .pane-desc p {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 15px;
  }

  .split-pane.active .pane-content h2 {
    transform: translateY(-10px);
  }

  .prodotti-split {
    flex-direction: column;
    gap: 30px;
    padding: 0 20px;
  }

  .prodotti-divider {
    width: 100%;
    height: 4px;
    margin: 10px 0;
  }
}

@keyframes pulseHint {
  0% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.05);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

@media (hover: none) and (pointer: coarse) {
  .mobile-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    color: #1b4b27;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    animation: pulseHint 2s infinite;
    transition: opacity 0.3s ease;
  }

  .hint-icon {
    font-size: 24px;
    margin-bottom: 5px;
  }
}

/* =========================================
   CERTIFICAZIONI PAGE
   ========================================= */

.cert-hero {
  position: relative;
  width: 100%;
  min-height: calc(var(--vh, 1vh) * 50);
  background-image: url("../img/certificazioni_hero.webp");
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 20px;
  z-index: 1;
}

@media screen and (max-width: 1024px) {
  .cert-hero {
    background-image: url("../img/certificazioni_hero_mobile.webp");
    background-position: center center;
  }
}

.cert-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.1),
    rgba(0, 0, 0, 0.5)
  );
  z-index: -1;
}

.cert-hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-shadow:
    inset 0 25px 25px -15px rgba(0, 0, 0, 0.8),
    inset 0 -25px 25px -15px rgba(0, 0, 0, 0.8);
  pointer-events: none;
  z-index: 10;
}

.cert-hero-content {
  text-align: center;
  color: #fff;
  max-width: 800px;
}

.cert-hero .section-title,
.cert-hero .hero-title {
  color: #fff;
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
  text-shadow: 2px 2px 15px rgba(0, 0, 0, 0.9);
  letter-spacing: normal;
  margin-bottom: 20px;
}

.cert-hero .section-title::after,
.cert-hero .hero-title::after {
  background-color: #356600;
}

.cert-subtitle {
  margin-top: 30px;
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 400;
  color: #fdfdfd;
  line-height: 1.6;
  text-shadow: 1px 1px 8px rgba(0, 0, 0, 0.9);
}

.cert-cards-section {
  background-color: #f4f4f4;
  padding: 80px 20px;
}

.cert-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.cert-card {
  background: #fff;
  border-radius: 8px;
  padding: 40px 30px;
  text-align: left;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.cert-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.cert-card-icon {
  font-size: 40px;
  margin-bottom: 20px;
}

.cert-card h3 {
  font-size: 22px;
  margin-bottom: 15px;
  color: #222;
}

.cert-card p {
  color: #555;
  line-height: 1.6;
  margin-bottom: 30px;
  flex-grow: 1;
}

@media screen and (max-width: 767px) {
  .cert-hero {
    min-height: calc(var(--vh, 1vh) * 40);
    padding: 80px 20px;
    background-image: url("../img/certificazioni_hero_mobile.webp");
  }
  .cert-hero .section-title {
    font-size: 36px;
  }
  .cert-subtitle {
    font-size: 16px;
  }
  .cert-cards-section {
    padding: 60px 20px;
  }

  .card-img {
    height: 200px;
  }
}

/* =========================================
   CENTRO DI RECUPERO PAGE
   ========================================= */

.hero-recupero {
  background-image: url("../img/ric.webp");
  background-size: cover;
  background-position: center right;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.hero-overlay-left {
  position: absolute;
  top: 0;
  left: 0;
  width: 75%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.8) 40%,
    rgba(0, 0, 0, 0.5) 75%,
    rgba(0, 0, 0, 0) 100%
  );
  z-index: 1;
}

@media screen and (max-width: 767px) {
  .hero-overlay-left {
    width: 100%;
    background: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.8) 0%,
      rgba(0, 0, 0, 0.6) 100%
    );
  }
}

.hero-recupero .text-content {
  max-width: 600px;
  color: #fff;
  padding: 20px;
  text-align: left;
}

.hero-recupero h1 {
  font-size: 42px;
  font-weight: 900;
  margin-bottom: 20px;
  line-height: 1.1;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-recupero p {
  font-size: 16px;
  line-height: 1.6;
  color: #eaeaea;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

@media screen and (max-width: 767px) {
  .hero-recupero {
    background-image: url("../img/ric-mobile.webp");
  }
  .hero-recupero h1 {
    font-size: 25px;
    margin-bottom: 12px;
  }
  .hero-recupero p {
    font-size: 13px;
    line-height: 1.4;
  }
  .hero-recupero .text-content {
    max-height: none;
    overflow-y: visible;
    padding: 0 10px;
  }
}

.eer-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.eer-card {
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid #eaeaea;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
}

.eer-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border-color: #4caf50;
}

.eer-card.highlight {
  border: 2px solid #356600;
  background-color: #fcfcfc;
}

.eer-code {
  font-size: 24px;
  font-weight: 900;
  color: #356600;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.eer-desc {
  font-size: 14px;
  color: #444;
  line-height: 1.4;
}

.eer-desc strong {
  color: #e5a910;
  background: #fff8e1;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  text-transform: uppercase;
  border: 1px solid #ffe082;
  position: absolute;
  top: 10px;
  right: 10px;
}

@media screen and (min-width: 1200px) {
  .eer-grid {
    grid-template-columns: repeat(7, 1fr);
    gap: 15px;
  }
  .eer-card {
    padding: 15px;
  }
  .eer-code {
    font-size: 18px;
  }
  .eer-desc {
    font-size: 12px;
    line-height: 1.3;
  }
}

.cta-section {
  background-color: #f4f4f4;
  color: #333;
  padding: 25px 20px;
}

.cta-section h2 {
  font-size: 26px;
  margin-bottom: 10px;
  color: #222;
}

.cta-section p {
  font-size: 16px;
  color: #555;
  margin-bottom: 20px;
}

.cta-section .btn {
  background-color: transparent;
  border-color: #356600;
  color: #356600;
}

/* ======================================================= */
/* CONTATTI PAGE STYLES                                    */
/* ======================================================= */

.contact-main {
  background-color: #fbfcf9;
  background-image: radial-gradient(
    rgba(53, 102, 0, 0.12) 1px,
    transparent 1px
  );
  background-size: 24px 24px;
  color: #333;
}

.contact-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 30px;
}

.contact-header {
  text-align: center;
  padding: 80px 0 60px;
}

.contact-header .contact-label {
  display: block;
  color: #356600;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 15px;
  text-transform: uppercase;
}

.contact-header h1 {
  font-size: 46px;
  color: #1a1a1a;
  margin-bottom: 20px;
  line-height: 1.2;
}

.contact-header p {
  font-size: 20px;
  color: #4a4a4a;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
}

.contact-content {
  padding: 20px 0 60px;
}

.split-layout {
  display: flex;
  gap: 40px;
  align-items: stretch;
}

.contact-form-card,
.info-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.contact-form-card {
  flex: 3;
}

.contact-form-card h2 {
  font-size: 24px;
  margin-bottom: 25px;
  color: #1a1a1a;
}

.form-row {
  display: flex;
  gap: 20px;
}

.form-group {
  flex: 1;
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 16px;
  font-family: inherit;
  transition: all 0.3s ease;
  background-color: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #356600;
  outline: none;
  box-shadow: 0 0 0 2px rgba(53, 102, 0, 0.1);
}

/* Custom Form Validation Styles */
.form-group input.is-invalid,
.form-group textarea.is-invalid,
.custom-select-trigger.is-invalid,
.form-group.privacy-consent.is-invalid {
  border-color: #d93025 !important;
}

.custom-error-msg {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Custom Select */
.custom-select-wrapper {
  position: relative;
  user-select: none;
  width: 100%;
}

.custom-select-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #fff;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s ease;
}

.custom-select-wrapper.open .custom-select-trigger {
  border-color: #356600;
  border-radius: 4px 4px 0 0;
}

.custom-select-icon {
  transition: transform 0.3s ease;
  color: #666;
}

.custom-select-wrapper.open .custom-select-icon {
  transform: rotate(180deg);
  color: #356600;
}

.custom-select-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: #fff;
  border: 1px solid #356600;
  border-top: none;
  border-radius: 0 0 4px 4px;
  z-index: 10;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px);
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.custom-select-wrapper.open .custom-select-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.custom-option {
  padding: 12px 15px;
  cursor: pointer;
  font-size: 16px;
  border-bottom: 1px solid #eee;
  transition: background-color 0.2s;
}

.custom-option:last-child {
  border-bottom: none;
}

.custom-option:hover {
  background-color: #f9f9f9;
  color: #356600;
}

.custom-option.selected {
  background-color: #f4f9f1;
  color: #356600;
  font-weight: bold;
}

.btn-primary {
  background-color: #356600;
  border: 2px solid #356600;
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: #274d00;
  border-color: #274d00;
  color: #ffffff;
}

.contact-sidebar {
  flex: 2;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.info-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.info-header h3 {
  font-size: 20px;
  color: #1a1a1a;
  margin: 0;
}

.address-text {
  font-size: 16px;
  color: #4a4a4a;
  line-height: 1.5;
}

.divider {
  border: 0;
  height: 1px;
  background: #e0e0e0;
  margin: 20px 0;
}

.sub-label {
  font-size: 12px;
  color: #356600;
  letter-spacing: 1px;
  margin-bottom: 15px;
  text-transform: uppercase;
  font-weight: bold;
}

.hours-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 20px;
  font-size: 14px;
  color: #4a4a4a;
}

.hours-grid strong {
  color: #1a1a1a;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-method {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.method-label {
  display: block;
  font-size: 13px;
  color: #666;
  margin-bottom: 2px;
}

.contact-method strong {
  display: block;
  font-size: 16px;
  color: #1a1a1a;
}

.contact-cta {
  background-color: #e5e5e5;
  padding: 60px 0;
}

.contact-cta h2 {
  font-size: 28px;
  color: #1a1a1a;
  margin-bottom: 15px;
}

.contact-cta p {
  font-size: 16px;
  color: #4a4a4a;
  margin-bottom: 30px;
}

.urgent-phone {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
  color: #356600;
  font-size: 28px;
  font-weight: 700;
}

.urgent-phone:hover {
  text-decoration: underline;
}

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

@media screen and (max-width: 768px) {
  .contact-header {
    padding: 30px 0 0;
  }

  .contact-content {
    padding-bottom: 20px;
  }

  .split-layout {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }

  .contact-form-card,
  .contact-sidebar {
    width: 100%;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .contact-header h1 {
    font-size: 32px;
  }

  .urgent-phone {
    font-size: 24px;
  }
}

/* ======================================================= */
/* 9. BACK TO TOP BUTTON                                   */
/* ======================================================= */
.back-to-top {
  position: fixed;
  bottom: 15px;
  right: 20px;
  width: 45px;
  height: 45px;
  background-color: rgba(255, 255, 255, 0.5); /* Sfondo semitrasparente */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #356600; /* Freccia verde */
  border: 1px solid rgba(0, 0, 0, 0.05); /* Bordo leggerissimo */
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05); /* Ombra quasi impercettibile */
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease,
    visibility 0.4s ease,
    background-color 0.3s ease;
  z-index: 9999; /* Alto z-index per non finire sotto al footer */
}

.back-to-top svg {
  margin: 0; /* Assicura che la freccia sia centrata */
}

.back-to-top.visible {
  opacity: 0.6; /* Molto più trasparente e discreto */
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background-color: rgba(
    255,
    255,
    255,
    0.9
  ); /* Più opaco solo se ci passi sopra */
  opacity: 1;
}

@media (max-width: 768px) {
  .back-to-top {
    display: none !important; /* Nascosto su smartphone */
  }
}

/* ======================================================= */
/* 10. MOBILE NAVIGATOR BUTTON                             */
/* ======================================================= */
.mobile-nav-btn {
  display: none;
  background-color: #ffffff; /* Sfondo bianco elegante */
  color: #356600; /* Testo verde aziendale */
  border: 1px solid #e0e0e0; /* Bordo leggero */
  padding: 8px 16px; /* Più piccolo e compatto */
  border-radius: 50px; /* Forma a pillola arrotondata */
  text-decoration: none;
  font-weight: 600;
  font-size: 14px; /* Testo leggermente più piccolo */
  position: absolute; /* Sovrapposto alla mappa */
  top: 10px; /* Posizionato in alto */
  left: 10px; /* Posizionato a sinistra */
  z-index: 10; /* Sopra la mappa */
  margin: 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15); /* Ombra morbida */
  align-items: center;
  justify-content: center;
  gap: 6px; /* Spazio ridotto tra icona e testo */
  width: max-content; /* Larghezza adattata al testo */
  max-width: 80%;
  transition: all 0.3s ease;
}

.mobile-nav-btn svg {
  width: 16px; /* Icona leggermente più piccola */
  height: 16px;
}

.mobile-nav-btn:active {
  transform: scale(0.98);
  background-color: #f9f9f9;
}

@media (max-width: 768px) {
  .mobile-nav-btn {
    display: flex; /* Mostrato solo su smartphone */
  }
}
