/* ===============================
   PALETTE PERSONALIZZATA
=============================== */
:root {
  --lucco-blue: #0056b3;   /* Blu meno acceso */
  --lucco-dark: #0a1f44;   /* Blu notte */
  --lucco-gray-light: #f5f5f5;
  --lucco-gray-medium: #cccccc;
  --lucco-gray-dark: #333333;
}

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

html, body {
  height: 100%;
}

body {
  font-family: 'Roboto Condensed', Arial, sans-serif;
  line-height: 1.6;
  color: var(--lucco-gray-dark);
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700; /* grassetto per titoli */
}

p, a, li {
  font-weight: 400; /* testo regolare */
}

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


.navbar {
  background-color: rgba(10, 31, 68, 0.6) !important; /* blu notte trasparente */
  backdrop-filter: blur(6px); /* effetto vetro satinato */
  -webkit-backdrop-filter: blur(6px); /* per Safari */
  border-bottom: 1px solid rgba(255, 255, 255, 0.2); /* linea sottile di separazione */
  transition: background-color 0.3s ease;
}

.navbar .navbar-brand img.navbar-logo {
  max-height: 40px;
}

.navbar .nav-link {
  color: #fff !important;
  transition: color 0.3s ease;
}

.navbar .nav-link:hover {
  color: var(--lucco-gray-medium) !important; /* argento */
}

.navbar .nav-link.active {
  color: #b0b0b0 !important; /* argento più visibile */
  border-bottom: 2px solid #b0b0b0;
  padding-bottom: 2px;
}

/* LANGUAGE SWITCH - ICONA GLOBO */
.nav-lang {
  position: relative;
}

.lang-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.25rem;
  padding: 6px 8px;
  border-radius: 8px;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.lang-btn:hover {
  background: rgba(255,255,255,0.15);
  color: #e5e7eb;
}

/* Menu */
.lang-menu {
  min-width: 140px;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
}

.lang-menu .dropdown-item {
  color: #e5e7eb;
  padding: 8px 14px;
  font-size: 0.85rem;
}

.lang-menu .dropdown-item:hover {
  background: rgba(255,255,255,0.15);
  color: #ffffff;
}
.lang-menu .active-lang {
  background: rgba(255,255,255,0.18);
  color: #ffffff !important;
  font-weight: 600;
}
@media (max-width: 991.98px) {
  .nav-lang .dropdown-menu {
    right: auto !important;
    left: 0 !important;
    transform: none !important;
  }
}

/* ===============================
   HERO
=============================== */
.hero {
  background: url('../img/hero.jpeg') no-repeat center center/cover;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
  flex-shrink: 0;
  position: relative; /* necessario per overlay */
}


/* Hero di default (index) */
body.index .hero {
  background-image: url("../img/hero.jpg");
}

body.azienda .hero {
  background-image: url("../img/hero_azienda.jpg");
}

/* Hero per la pagina processi */
body.processi .hero {
  background-image: url("../img/hero_processi1.jpg");
}

/* Hero per la pagina prodotti */
body.prodotti .hero {
  background-image: url("../img/hero_prodotti.jpg");
}

/* Hero per la pagina processi */
body.contatti .hero {
  background-image: url("../img/hero_contatti.jpg");
}

body.azienda .hero,
body.index .hero,
body.contatti .hero,
body.processi .hero,
body.prodotti .hero {
  position: relative;
  background-size: cover;
  background-position: center;
  padding: 120px 0;
  text-align: center;
}

/* Contenitore del testo nelle hero */
body.azienda .hero .container,
body.index   .hero .container,
body.contatti   .hero .container,
body.processi .hero .container,
body.prodotti .hero .container {
  position: relative;
  display: inline-block;
  padding: 20px 35px;
}

/* Alone sfumato solo dietro al testo */
body.azienda .hero .container::before,
body.index   .hero .container::before,
body.contatti   .hero .container::before,
body.processi .hero .container::before,
body.prodotti .hero .container::before {
  content: "";
  position: absolute;
  top: -20px;
  left: -30px;
  right: -30px;
  bottom: -20px;
  z-index: -1;

  background: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.75) 0%,
    rgba(255, 255, 255, 0.35) 40%,
    rgba(255, 255, 255, 0.00) 100%
  );

  filter: blur(10px);
}

body.azienda .hero,
body.index .hero,
body.contatti .hero,
body.processi .hero,
body.prodotti .hero {
  color: #153154; /* blu scuro */
}

.hero h1 {
  font-size: 3rem;
  font-weight: bold;
}
.hero p {
  font-size: 1.2rem;
  margin-bottom: 20px;
}
.hero .btn {
  background-color: var(--lucco-blue);
  border: none;
}
.hero .btn:hover {
  background-color: var(--lucco-dark);
}

/* Overlay semitrasparente */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Contenuto hero sopra overlay */
.hero .container {
  position: relative;
  z-index: 2;
}

/* ===============================
   INTRO
=============================== */
main {
  flex: 1 0 auto;
}

.btn-minimal {
  display: inline-block;
  padding: 10px 24px;
  border: 1px solid #0a63b0; /* blu Lucco */
  color: #0a63b0;
  border-radius: 50px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  letter-spacing: 0.3px;
}

.btn-minimal:hover {
  background-color: #0a63b0;
  color: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  text-decoration: none;
}


.small-map {
  max-width: 420px;
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden;
}

/* ===============================
   TIMELINE COMPATTA
=============================== */
.timeline {
  position: relative;
  margin: 0 auto;
  max-width: 900px;
  padding: 0;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: var(--lucco-gray-dark, #444);
  transform: translateX(-50%);
  z-index: 1;
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 10px 10px;
}

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

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

.timeline-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  background: #007bff;
  border: 3px solid #fff;
  border-radius: 50%;
  z-index: 3;
}

.timeline-item.left .timeline-marker {
  left: 100%;
}

.timeline-item.right .timeline-marker {
  left: 0;
}

.timeline-content {
  font-size: 0.95rem;
  position: relative;
  display: inline-block;
  max-width: 320px;
  background: #fff;
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  z-index: 2;
}

.timeline-year {
  font-weight: bold;
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: var(--lucco-gray-dark, #333);
}

.timeline-img {
  position: absolute;
  width: 200px;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.25);
  transition: all 0.4s ease;
  z-index: 0;
}

.left .timeline-img {
  right: 100%;
  margin-right: 30px;
  transform: rotate(-6deg);
}

.right .timeline-img {
  left: 100%;
  margin-left: 30px;
  transform: rotate(6deg);
}

.timeline-img:hover {
  transform: scale(1.8) rotate(0deg);
  z-index: 5;
}

/* immagine principale */
.timeline-img.img-main {
  z-index: 2;
}

.timeline-img.img-second {
  top: 25px;
  right: calc(100% - 80px);
  transform: rotate(-3deg);
  z-index: 1;
}

/* ===============================
   TIMELINE - MOBILE OTTIMIZZATA
=============================== */
@media (max-width: 768px) {
  .timeline::before {
    left: 12px;
    width: 3px;
  }

  .timeline-item,
  .timeline-item.left,
  .timeline-item.right {
    left: 0;
    width: 100%;
    text-align: left;
    padding: 15px 15px;
  }

  .timeline-item.left .timeline-marker,
  .timeline-item.right .timeline-marker {
    left: 12px;
    transform: translateY(-50%);
  }

  .timeline-marker {
    width: 14px;
    height: 14px;
    border: 2px solid #fff;
  }

  .timeline-marker::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 100%;
    width: 35px;
    height: 2px;
    background: var(--lucco-gray-dark, #444);
    transform: translateY(-50%);
  }

  .timeline-content {
    max-width: 100%;
    margin-left: 45px;
    padding: 10px 14px;
    font-size: 0.9rem;
    line-height: 1.4;
  }

  .timeline-year {
    font-size: 1.1rem;
    margin-bottom: 6px;
  }

  .timeline-img {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    margin: 15px auto;
    display: block;
    transform: none !important;
    width: 90%;
    max-width: 250px;
  }

  .timeline-img:hover {
    transform: scale(1.05);
  }
}





/* Pulsante scroll to top minimal */
.btn-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 99;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 2px solid var(--lucco-blue);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  opacity: 0;
  visibility: hidden;
}
.btn-to-top.show {
  opacity: 1;
  visibility: visible;
}

.btn-to-top:hover {
  background: var(--lucco-blue);
}
.btn-to-top i {
  font-size: 1.5rem;
  color: var(--lucco-dark);    /* blu notte più leggibile */
  line-height: 1;
  transition: color 0.3s ease;
}
.btn-to-top:hover i {
  color: #fff;
}

/* ===============================
   PROCESSI
=============================== */


.process-grid {
  display: grid;
  grid-template-columns: 1fr; /* default: mobile 1 colonna */
  gap: 25px;
  padding: 40px;
}

.process-card {
  position: relative;
  height: 280px; /* box più lungo */
  background-size: cover;
  background-position: center;
  border-radius: 15px;
  overflow: hidden;
  cursor: pointer;
}

.process-card .title {
  position: absolute;
  bottom: 15px;
  left: 20px;
  font-size: 1.4rem;
  font-weight: bold;
  color: #002244; /* blu scuro */
  z-index: 2;
  text-shadow: none; /* nessuna ombra */
  transition: color 0.3s ease;
}

.process-card:hover .title {
  color: #0066cc; /* blu medio */
}


.process-card .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 34, 68, 0.85); /* blu scuro trasparente */
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.process-card:hover .overlay {
  opacity: 1;
}


/* da 768px in su: 2 colonne */
@media (min-width: 768px) {
  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* da 1200px in su: 4 colonne */
@media (min-width: 1200px) {
  .process-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}




/* ===============================
   FOOTER
=============================== */

footer {
  background: rgba(10, 31, 68, 0.8); /* blu notte trasparente */
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  position: relative;
  color: #fff;
}

/* sfumatura in alto per stacco */
footer::before {
  content: "";
  position: absolute;
  top: -20px;
  left: 0;
  width: 100%;
  height: 20px;
  background: linear-gradient(to bottom, transparent, rgba(10, 31, 68, 0.8));
}

.footer-logo {
  max-width: 80px;
  height: auto;
}

.footer-tagline {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--lucco-gray-medium);
  margin: 0;
  margin-bottom: 0.25rem;
}

footer h6 {
  margin-bottom: 0.5rem;
  color: var(--lucco-blue);
}

footer a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s ease;
}
footer a:hover {
  color: var(--lucco-gray-medium); /* come i link hover navbar */
}

footer .copyright {
  border-top: 1px solid rgba(255,255,255,0.2);
  font-size: 0.8rem;
  color: #ddd;
}

.footer-top {
  padding-top: 1.5rem !important;
  padding-bottom: 1.5rem !important;
}
footer i {
  color: var(--lucco-blue);   /* icone blu acceso */
  font-size: 1rem;
  vertical-align: middle;
}
footer ul li::before {
  content: "– ";
  color: var(--lucco-blue);
}
footer ul li::after {
  content: " –";
  color: var(--lucco-blue);
}
footer ul {
  padding: 0;
  list-style: none;
}
footer ul li {
  margin-bottom: 0.5rem;
}
footer ul li a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease, transform 0.2s ease;
}
footer ul li a:hover {
  color: var(--lucco-blue);
  transform: translateX(4px); /* leggero movimento a destra */
}


/* ===============================
   IMMAGINI
=============================== */
.intro img {
  max-width: 100%;
  height: auto;
  border-radius: 0.25rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}



/* ===============================
   HOME
=============================== */
/* SFONDI SEZIONI (ritmo visivo) */
.home-azienda {
  background: radial-gradient(circle at top left, #e5e7eb 0, #f7f7f8 40%, #ffffff 100%);
}

.home-processi {
  background: linear-gradient(120deg, #ffffff 0, #f3f4f6 45%, #ffffff 100%);
}

.home-prodotti {
  background: radial-gradient(circle at top right, #e5e7eb 0, #f7f7f8 35%, #ffffff 100%);
}

.home-contatti {
  background: linear-gradient(120deg, #ffffff 0, #f5f5f6 60%, #ffffff 100%);
}

/* CARD INTERNA DINAMICA */
.home-block-inner {
  position: relative;                /* necessario per .stretched-link */
  background: #ffffff;
  border-radius: 1.5rem;
  padding: 1.6rem 1.8rem;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.18);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: row !important;
  justify-content: flex-start;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  align-items: center;
}

.home-block-inner::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12%;
  bottom: 12%;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #071427 0, #0a3c72 100%); /* blu più scuro */
}

/* glow neutro in scala di grigi */
.home-block-inner::after {
  content: "";
  position: absolute;
  right: -80px;
  top: 50%;
  width: 180px;
  height: 180px;
  transform: translateY(-50%);
  background: radial-gradient(circle, rgba(148, 163, 184, 0.25), transparent 65%);
  pointer-events: none;
}


.home-block-inner:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
  border-color: #B1BAC4;
}

/* KICKER */
.home-block-kicker {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #6b7280;
}

/* TITOLI */
.home-block-title {
  font-size: 1.9rem;
  font-weight: 650;
  margin: 0.25rem 0 0.7rem;
}

.home-block-title a {
  color: #0f172a;
  text-decoration: none;
}

.home-block-title a:hover {
  color: #0a63b0;
}

/* TESTO */
.home-block-text {
  font-size: 0.95rem;
  color: #4b5563;
  max-width: 430px;
}

/* CTA testo */
.home-block-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #0a63b0;
  text-decoration: none;
}

.home-block-link::after {
  content: "↗";
  font-size: 0.85rem;
  transition: transform 0.15s ease;
}

.home-block-link:hover::after {
  transform: translateX(2px);
}

.home-block-link:hover {
  text-decoration: underline;
}

/* IMMAGINE INTEGRATA NEL BLOCCO */
.home-block-image-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 300px;
  margin-top: 1rem;  
  border-radius: 4px;
  object-fit: cover;
  height: auto;

}

.home-block-image {
  max-width: 45%;     /* qui regoli la dimensione finale */
  border-radius: 1rem;
  box-shadow: none;
  transform: none;
  transition: transform 0.25s ease;
}

.home-block-inner:hover .home-block-image {
  transform: translateY(-2px);
}

/* TAGS */
.home-block-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-start;
}

.home-tag {
  font-size: 0.8rem;
  padding: 0.32rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.9);
  background: rgba(255, 255, 255, 0.9);
  color: #374151;
  backdrop-filter: blur(4px);
}


/* CONTATTI INLINE */
.home-contact-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: #4b5563;
}

.home-contact-inline a {
  color: #0a63b0;
  text-decoration: none;
}

.home-contact-inline a:hover {
  text-decoration: underline;
}

/* RESPONSIVE */
@media (max-width: 767.98px) {
  .home-block-inner {
    padding: 1.6rem 1.4rem;
  }

  .home-block-inner::after {
    display: none; /* meno “glow” su mobile */
  }

  .home-block-title {
    font-size: 1.6rem;
  }

  .home-block-image {
    max-width: 85%;
  }

  .home-numbers-inner {
    border-radius: 1.3rem;
    padding: 1rem 1.2rem;
  }
}

/* RIGHE SUPERIORE/INFERIORE */
.home-row-top {
  background: linear-gradient(120deg, #f5f5f6 0, #ffffff 40%);
}
.home-row-top .col-lg-6,
.home-row-bottom .col-lg-6 {
  display: flex;
}

.home-row-bottom {
  background: linear-gradient(120deg, #ffffff 0, #f3f4f6 40%, #ffffff 100%);
}


/* DIVISORE NUMERI ORIZZONTALE */
.home-numbers-divider {
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}

.home-numbers-inline {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  padding: 0.3rem 0;
}

/* ITEM */
.home-number-item {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ICONA TONDA GRIGIA, SIMBOLO BLU */
.home-number-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.35rem;
}

.home-number-icon i {
  font-size: 1.2rem;
  color: #0a3c72; /* blu scuro */
}

/* NUMERO */
.home-number {
  font-size: 1.15rem;
  font-weight: 600;
  color: #111827;
  line-height: 1.1;
}

/* LABEL */
.home-number-label {
  font-size: 0.8rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.1rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .home-numbers-inline {
    gap: 1.8rem;
  }
}

@media (max-width: 576px) {
  .home-numbers-inline {
    flex-direction: column;
    gap: 0.8rem;
  }
}

.home-number-item,
.home-number-icon,
.home-number,
.home-number-label {
  transition: all 0.2s ease-out;
}
.home-number-item:hover {
  transform: translateY(-2px);
}

.home-number-item:hover .home-number-icon {
  background: #e5ecf5;              /* grigio appena più carico */
  border-color: #cbd5e1;
}

.home-number-item:hover .home-number-icon i {
  color: #0b5394;                    /* blu leggermente più acceso */
}

.home-number-item:hover .home-number {
  color: #0b5394;                    /* numero in blu scuro */
}

.home-number-item:hover .home-number-label {
  color: #4b5563;                    /* grigio un filo più forte */
}
.home-number-item:hover .home-number-icon {
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.15);
}


.home-contact-email {
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  color: #0a63b0;
}

.home-contact-email:hover {
  text-decoration: underline;
}

.home-row-bottom {
  margin-bottom: 3rem;
}


/*ANIMAZIONE HOME Stato iniziale: nascosti e leggermente spostati in basso */

.home-number-item {
  opacity: 0;
  transform: translateY(40px); /* prima era 20px */
  transition: opacity 1.8s ease, transform 1.8s ease; /* prima 0.6s */
}

/* Quando diventano visibili */
.home-number-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Effetto "stagger" più lento */
.home-number-item:nth-child(1) {
  transition-delay: 0.0s;
}
.home-number-item:nth-child(2) {
  transition-delay: 0.2s;
}
.home-number-item:nth-child(3) {
  transition-delay: 0.4s;
}
.home-number-item:nth-child(4) {
  transition-delay: 0.6s;
}


/*MAPPA HOME*/
/* layout interno: testo a sinistra, immagine a destra */
.home-block-contatti-layout {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

/* testo: prende lo spazio principale */
.home-block-contatti-text {
  flex: 1 1 auto;
}

/* immagine: resta a destra e non va sotto */
.home-block-contatti-image {
  flex: 0 0 auto;
}

.home-block-contatti-image img {
  width: 250px;   /* prima era 120px → puoi aumentare a 200px se vuoi */
  height: auto;
  display: block;
  border-radius: 8px;
}

.map-fade {
  opacity: 0;
  filter: brightness(2);
  transition: opacity 4s ease, filter 4s ease;  /* durata aumentata */
}

.map-fade.visible {
  opacity: 1;
  filter: brightness(1);
}


/* Layout interno specifico per il blocco "Chi siamo" */
.home-block-azienda .home-block-azienda-text {
  flex: 1 1 auto;          /* il testo prende tutto lo spazio disponibile */
}

.home-block-azienda .home-block-image-wrapper {
  flex: 0 0 auto;          /* l'immagine resta compatta a destra */
  margin-top: 0;           /* annulla il margin-top globale */
  margin-left: 2rem;       /* spazio tra testo e immagine */
  max-width: 260px;        /* aumenta/diminuisci per regolare la dimensione */
}

.home-block-azienda .home-block-image {
  max-width: 100%;         /* annulla il 45% globale per questo blocco */
}

/* Se vuoi che su mobile tornino impilati */
@media (max-width: 767.98px) {
  .home-block-azienda .home-block-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-block-azienda .home-block-image-wrapper {
    margin-left: 0;
    margin-top: 1rem;
    max-width: 85%;
  }
}
.fade-img {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 1.8s ease, transform 1.8s ease;
}

.fade-img.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Blocchi che NON hanno immagine e devono rimanere layout verticale */
.home-block-processi,
.home-block-prodotti {
  flex-direction: column !important;
  align-items: flex-start !important;
}

.home-processi-img-wrapper {
  width: 70%;
  margin: 0 auto; /* centra l'immagine */
  overflow: hidden;
  border-radius: 10px;
}

.home-processi-img {
  width: 85%;
  height: auto;
  display: block;
  border-radius: 10px;
  transition: transform 0.4s ease;

}

/* Effetto hover leggero sulla card */
.home-block-inner:hover .home-processi-img {
  transform: scale(1.03);
}

/* DISSOLVENZA IMMAGINE PROCESSI - più lenta */
.home-processi-img {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 3s ease, transform 3s ease; /* più lenta */
}

.home-block-inner:hover .home-processi-img,
.home-processi-img.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Testo a sinistra */
.prodotti-content {
  flex: 1 1 auto;
}


.home-prodotti-img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 1.8s ease, transform 1.8s ease;
}

/* ATTIVA DISSOLVENZA */
.home-prodotti-img.visible,
.home-block-inner:hover .home-prodotti-img {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile: immagine sotto SOLO in mobile */
@media (max-width: 768px) {
  .home-block-prodotti {
    flex-direction: column !important;
    text-align: left;
  }

  .home-prodotti-img-wrapper {
    width: 80%;
    max-width: none;
    margin-top: 20px;
  }
}



/* ===================================
   HOME – BLOCCO PRODOTTI (SLIDESHOW)
=================================== */

/* layout del blocco prodotti SOLO in home: verticale, testo sopra + fascia sotto */
body.index .home-block-prodotti {
  flex-direction: column !important;
  align-items: flex-start !important;
}

/* contenitore della fascia immagini */
body.index .home-prodotti-slideshow {
  width: 100%;
  height: 170px;           /* altezza fascia: alza/abbassa a piacere */
  margin-top: 1rem;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

/* singola slide (le due immagini) */
body.index .home-prodotti-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;       /* l'immagine si adatta all'altezza della fascia */
  opacity: 0;
  animation: homeProdottiFade 10s infinite;
}

/* prima immagine: parte per prima */
body.index .home-prodotti-slide-1 {
  animation-delay: 0s;
}

/* seconda immagine: entra dopo 5s */
body.index .home-prodotti-slide-2 {
  animation-delay: 5s;
}

/* animazione: fade in / hold / fade out */
@keyframes homeProdottiFade {
  0%   { opacity: 0; }
  10%  { opacity: 1; }
  40%  { opacity: 1; }
  50%  { opacity: 0; }
  100% { opacity: 0; }
}





/* COOKIE BANNER */
/* -------------- */
/* COOKIE INFO BANNER */
.cookie-info-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 650px;
  background: #ffffff;
  border: 1px solid #dcdcdc;
  border-radius: 10px;
  padding: 18px 22px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.cookie-info-banner.hidden {
  opacity: 0;
  pointer-events: none;
}

.cookie-info-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.cookie-info-banner p {
  color: #153154;
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
}

.cookie-info-btn {
  background: #153154;
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  white-space: nowrap;
}

.cookie-info-btn:hover {
  background: #1d3b6a;
}

/*PRODOTTI */
/* ------------------------*/

body.prodotti .prodotti-gallery {
  background-color: #f7f7f7;
}
.prodotti-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

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

@media (min-width: 1400px) {
  .prodotti-gallery-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr)); /* 9 per riga */
  }
}


.prodotti-item {
  border: none;
  padding: 0;
  background: none;
  cursor: pointer;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 1 / 1;          /* celle quadrate */
  background-color: #ffffff;    /* sfondo bianco dietro alle immagini */
}

.prodotti-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;          /* mostra tutta l’immagine senza tagliare */
  display: block;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.prodotti-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(21, 49, 84, 0.08);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.prodotti-item:hover img {
  transform: scale(1.02);
  filter: grayscale(0.05);
}

.prodotti-item:hover::after {
  opacity: 1;
}


#productModalImg {
  max-height: 80vh;
  object-fit: contain;
}

/* Modale prodotti: immagine su sfondo bianco */
.modal-content {
  background-color: #ffffff !important;
  border-radius: 8px;
}

.modal-img-wrapper {
  background: #ffffff;
  padding: 10px;
  border-radius: 6px;
}

#productModalImg {
  max-height: 70vh;
  object-fit: contain;
  background: #ffffff;
}
/* --- MODALE PRODOTTO --- */

/* Dimensione modale personalizzata (più piccola) */
.modal-custom-sm {
  max-width: 480px !important; /* puoi ridurre ancora se vuoi */
}

/* Contenuto modale */
.product-modal-content {
  background: #ffffff !important;
  border-radius: 10px;
  border: 1px solid #e6e6e6;
  box-shadow: 0 8px 25px rgba(0,0,0,0.18);
  padding: 15px;
}

/* Wrapper dell'immagine (bianco e con bordino) */
.modal-img-wrapper {
  background: #ffffff;
  padding: 12px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
}

/* Immagine */
#productModalImg {
  max-height: 55vh;     /* più compatta */
  object-fit: contain;
  background: #ffffff;
}

/* Titolo sotto l'immagine */
.product-modal-title {
  color: #153154;
  font-weight: 600;
  font-size: 1rem;
}

/* Bottone chiudi */
.product-modal-content .btn {
  border-radius: 4px;
}


/* CONTATTI -------*/
/*-------------------*/

/* sulla pagina contatti la piccola mappa (img.mappa.png) è subito visibile */
body.contatti .map-fade {
  opacity: 1;
  filter: brightness(1);
}

/* Sezione contatti con mappa di sfondo */
.contact-with-map {
  position: relative;
  overflow: hidden;
  padding-top: 50px;    /* meno bianco sopra */
  padding-bottom: 70px; /* meno bianco sotto */
}

/* iframe della mappa come background, centrato verticalmente */
.map-iframe-bg {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 90%;                 /* quanto “alta” è la fascia di mappa */
  transform: translateY(-50%); /* centrata verticalmente */
  z-index: 0;
}

.map-iframe-bg iframe {
  width: 100%;
  height: 100%;
  filter: grayscale(0.1) brightness(0.95); /* leggero trattamento, molto leggibile */
}

/* velo sopra la mappa per dare contrasto al biglietto ma lasciarla visibile */
.contact-map-overlay {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 90%;
  transform: translateY(-50%);
  z-index: 1;
  pointer-events: none;  /* non blocca i click sulla mappa */
  background: radial-gradient(circle at center,
    rgba(255,255,255,0.55) 0%,
    rgba(255,255,255,0.35) 45%,
    rgba(255,255,255,0.20) 100%);
}

/* contenuto (biglietto da visita) sopra tutto */
.contact-with-map .container {
  position: relative;
  z-index: 2;
}


/* ===============================
   HOME – FASCIA PRODOTTI CHE SCORRE
   (solo in index)
=============================== */

body.index .home-block-prodotti {
  flex-direction: column !important;
  align-items: flex-start !important;
}

/* Contenitore della fascia */
body.index .home-prodotti-strip-wrapper {
  width: 100%;
  height: 130px;
  margin-top: 1rem;
  overflow: hidden;
  border-radius: 12px;
  position: relative;
}

/* Striscia immagini */
body.index .home-prodotti-strip {
  display: flex;
  align-items: center;
  height: 100%;
  will-change: transform;   /* aiuta le performance */
}

/* Immagini nella fascia */
body.index .home-prodotti-strip img {
  height: 100%;
  width: auto;
  flex-shrink: 0;
  display: block;
}

/* Pausa animazione su hover NON serve più: puoi toglierla */


/* Pausa animazione su hover */
body.index .home-block-prodotti:hover .home-prodotti-strip {
  animation-play-state: paused;
}

@keyframes homeProdottiScroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}





/* ===============================
   HOME – RIGA PROCESSI AZIENDALI
=============================== */

.home-row-processi-dettaglio {
  background: linear-gradient(120deg, #ffffff 0, #f3f4f6 40%, #ffffff 100%);
}

.home-process-flow {
  align-items: stretch;
}

.process-flow-card {
  background: #ffffff;
  border-radius: 1.2rem;
  padding: 1.2rem 1.4rem 1.4rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08); /* un filo più soft */
  border: 1px solid rgba(148, 163, 184, 0.35);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: border-color 0.2s ease; /* niente movimento */
  position: relative;
  overflow: hidden;
  cursor: default; /* non mano */
}

/* Barra blu alta come nei blocchi principali ma orizzontale */
.process-flow-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 2px; /* spessore barra */
  width: 100%;
  background: linear-gradient(90deg, #071427 0%, #0a3c72 100%);
  border-radius: 6px 6px 0 0;
}


.process-flow-card:hover {
  transform: none;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08); /* identico allo stato normale */
  border-color: #b0becd; /* solo un leggero cambio di bordo, se vuoi puoi togliere anche questo */
}
.process-flow-image-wrapper {
  width: 100%;
  margin-bottom: 0.75rem;
  border-radius: 0.9rem;
  overflow: hidden;
}

.process-flow-image {
  width: 100%;
  height: auto;              /* niente altezza forzata */
  max-height: 220px;         /* limite di sicurezza: puoi alzare/abbassare */
  object-fit: contain;       /* mostra tutta l’immagine, senza tagli né deformazioni */
  display: block;
  transition: transform 0.4s ease;
}
.process-flow-card:hover .process-flow-image {
  transform: none;
}

/* titolo + testo */
.process-flow-title {
  font-size: 1.1rem;
  font-weight: 650;
  margin: 0.4rem 0 0.35rem;
  color: #153154;
}

.process-flow-text {
  font-size: 0.9rem;
  color: #4b5563;
  margin-bottom: 0.45rem;
}

/* lista macchine */
.process-flow-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
  margin-top: auto; /* spinge in basso su card alte */
  font-size: 0.85rem;
  color: #374151;
}

.process-flow-list li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.15rem;
}

.process-flow-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  color: #0a63b0;
}

/* responsive leggero */
@media (max-width: 767.98px) {
  .process-flow-card {
    padding: 1.1rem 1.1rem 1.3rem;
  }
  .process-flow-image {
    height: 140px;
  }
}

/* CERTIFICATO IATF */
.process-flow-cert a {
  font-size: 0.85rem;
  color: #0a63b0;
  text-decoration: none;
  font-weight: 600;
}

.process-flow-cert a:hover {
  text-decoration: underline;
}
