/* ROOT VARIABLES */
:root {
  --body-font: "arial-nova", sans-serif;
  --colore-verde: #0f3c35;
  --colore-giallo: #ffb823;
  --colore-testi: #31302b;
  --colore-testi-opaco: rgba(49, 48, 43, 0.7);
  --colore-bianco-opaco: rgba(255, 255, 255, 0.4) 40%;
  --colore-grigio-light: #f2f3f5;

  /* Tipografia in rem (scala dinamica basata su html font-size) */
  --body-size: 1.13rem;
  --h1-font-size: 3rem;
  --h2-font-size: 2rem;
  --h3-font-size: 1.25rem;
  --h4-font-size: 1rem;
  --h5-font-size: 1.4rem;
  --h6-font-size: 1rem;

  /* Variabili responsive pronte per override o clamp se servisse */
  --h1-font-size-responsive: 2.5rem;
  --h2-font-size-responsive: 1.6rem;
  --h5-font-size-responsive: 1.3rem;
  --h6-font-size-responsive: 0.9rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* MEDIA QUERIES GRANDI SCHERMI */
@media (min-width: 2400px) {
  html {
    font-size: 150% !important; /* scala tutto +50% */
  }
  .container {
    max-width: 2200px !important;
  }
}

@media (min-width: 1800px) and (max-width: 2400px) {
  html {
    font-size: 120%;
  }
  .container {
    max-width: 1800px !important;
  }
}

html,
body {
  overflow-x: hidden;
}

.test {
  border: 2px solid black;
}

/* BODY */
body {
  font-family: var(--body-font) !important;
  font-weight: 400;
  margin: 0;
  padding: 0;
  font-size: var(--body-size);
  line-height: 1.5;
}

/* MAIN */
main {
  padding-top: 0;
  position: relative;
}

p {
  font-size: var(--body-size);
  line-height: 1.5rem;
}

.text {
  color: var(--colore-testi) !important;
}

.text-white {
  color: white !important;
}

h1 {
  font-size: var(--h1-font-size);
  font-weight: bold;
}

.shadow-h {
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

h2 {
  font-size: var(--h2-font-size);
  color: var(--colore-verde);
  font-weight: 600;
}

h3 {
  font-size: var(--h3-font-size);
  font-weight: 500;
}

h4 {
  font-size: var(--h4-font-size);
  color: var(--colore-testi-opaco);
  font-weight: 600;
}

h5 {
  font-size: var(--h5-font-size);
  color: white;
  font-weight: 600;
}

@media (max-width: 648px) {
  h1 {
    font-size: var(--h1-font-size-responsive);
    text-shadow: none;
  }

  h2 {
    font-size: var(--h2-font-size-responsive);
  }

  h3 {
    font-size: var(--h3-font-size);
    text-shadow: none;
  }
}

.button-giallo {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-site, "Host Grotesk", sans-serif);
  font-size: var(--body-size);
  font-weight: 600;
  color: var(--colore-giallo, #ffd300);
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: color 0.3s ease;
}

.button-giallo::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background-color: var(--colore-giallo, #ffd300);
}

.button-giallo .icon-contatti {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  transition: transform 0.3s ease;
}

.button-giallo:hover .icon-contatti {
  transform: translateX(4px);
}

.button-giallo:focus-visible {
  outline: 2px solid var(--colore-giallo, #ffd300);
  outline-offset: 4px;
}

.carousel {
  width: 80%;
}

.carousel-control-next-icon,
.carousel-control-prev-icon {
  background-color: var(--colore-giallo) !important;
  width: 1.5rem !important;
  height: 1.5rem !important;
  border-radius: 50px;
}

.carousel-inner {
  border-radius: 1rem;
  overflow: hidden;
  position: relative;
}

.carousel-inner img {
  height: 350px;
  object-fit: cover;
  width: 100%;
}

.carousel-caption-title {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: var(--font-site);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.5rem 1.5rem;
  border-radius: 3rem;
  margin: 0;
  pointer-events: none; /* evita interferenze con i click */
}

@media (max-width: 648px) {
  .carousel {
    width: 100%;
  }
}

/******************** NAVBAR ********************/
.navbar-custom {
  padding: 1rem;
  background-color: transparent !important;
  transition:
    background-color 0.3s ease,
    backdrop-filter 0.3s ease,
    box-shadow 0.3s ease;
  z-index: 1000;
  margin-top: 1rem;
}

.d-none {
  display: none !important;
}

.navbar-custom .nav-link,
.navbar-custom .navbar-brand,
.navbar-custom .navbar-toggler {
  color: white !important;
  font-size: 1rem;
}

.navbar-custom .nav-link::after {
  background-color: white;
}

/* Stato scrollato: GLASS (non più bianco pieno) */
.navbar-scrolled {
  background: rgba(255, 255, 255, 0.15) !important;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  margin: 0 !important;
}

.navbar-scrolled .nav-link,
.navbar-scrolled .navbar-brand,
.navbar-scrolled .navbar-toggler {
  color: black !important;
}

.navbar-scrolled .nav-link::after {
  background-color: black;
}

.navbar-brand img {
  max-height: 40px;
  width: auto;
}

.navbar-nav .nav-link {
  margin-left: 1.5rem;
  margin-right: 1.5rem;
  position: relative;
  transition: color 0.3s ease;
  text-transform: uppercase;
}

.navbar-nav .nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 1px;
  bottom: 0;
  left: 0;
  transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover::after {
  width: 100%;
}

.navbar-toggler {
  border: 0 !important;
}

/* Rimuovi focus/outline su mobile per hamburger e X */
@media (max-width: 980px) {
  .navbar-toggler:focus,
  .navbar-toggler:focus-visible,
  .btn-close:focus,
  .btn-close:focus-visible {
    outline: none !important;
    box-shadow: none !important;
  }
}

/******************** LINK CONTATTI SEMPRE GIALLO ********************/
.navbar-nav .nav-link.nav-contatti {
  color: var(--colore-giallo) !important;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  position: relative;
}

.navbar-nav .nav-link.nav-contatti::after {
  background-color: var(--colore-giallo);
}

.icon-contatti svg {
  display: inline-block;
  vertical-align: middle;
  transition: transform 0.3s ease;
}

.navbar-nav .nav-link.nav-contatti:hover .icon-contatti svg {
  transform: translateX(3px);
}

/******************** OFFCANVAS (VETRO + TESTO BIANCO) ********************/

.offcanvas,
.offcanvas.show {
  background: rgba(255, 255, 255, 0.15) !important;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-right: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  will-change: transform, backdrop-filter;
}

.offcanvas-start {
  border-radius: 0 20px 20px 0;
  transition: transform 0.3s ease-in-out;
}

.offcanvas-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.offcanvas-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: start;
  height: 100%;
}

.offcanvas-body .navbar-nav {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.offcanvas-body .nav-link {
  color: white !important;
  font-weight: 500 !important;
  font-size: 1.3rem;
  margin: 0.5rem 0;
  display: flex;
  align-items: center;
  justify-content: center; /* centra “Contatti” con icona */
  gap: 0.4rem;
  text-align: center;
}

.offcanvas-body .nav-link:hover {
  color: var(--colore-giallo) !important;
}

.offcanvas .btn-close {
  filter: invert(1);
  opacity: 1;
}
.offcanvas .btn-close:hover {
  opacity: 0.8;
}

/******************** RESPONSIVE ********************/
@media (max-width: 980px) and (min-width: 541px) {
  .offcanvas-start {
    width: 60vw !important;
  }
}

@media (max-width: 540px) {
  .offcanvas-start {
    width: 100vw;
    border-radius: 0;
  }

  .navbar-nav .nav-link {
    font-size: 3vh;
  }
}

/******************** BOX DECORATIVO ********************/
.menu-responsive {
  height: 100%;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 3rem;
}

/******************** HOMEPAGE ********************/

.hero-image {
  position: relative;
  height: 100%;
  padding: 0;
  margin: 1rem;
  border-radius: 50px;
  background-image: url("energy-service-solutions-img/Hero-Energy-Service-Solution.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  height: 90vh;
}

.hero-image .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-left,
.hero-right,
.hero-content {
  position: relative;
  z-index: 2;
  color: white;
}

.hero-left {
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 90vh;
  padding: 2rem;
}

.hero-right {
  height: 90vh;
}

.box-hero {
  max-width: 500px;
}

@media (min-width: 2400px) {
  .hero-image,
  .hero-left {
    height: 50vh;
  }
}

@media (min-width: 1600px) and (max-width: 2400px) {
  .hero-image,
  .hero-left {
    height: 70vh;
  }
}

@media (min-width: 1200px) {
  .box-hero {
    max-width: 100%;
  }
}

@media (max-width: 1025px) {
  .hero-left {
    height: auto;
    text-align: center;
    padding: 2rem 1rem;
  }

  .hero-right {
    display: none;
  }

  .box-hero {
    max-width: 500px;
    margin: 0 auto;
  }
}

@media (max-width: 1024px) {
  .hero-image {
    height: 50vh;
  }
}

@media (max-width: 820px) and (min-width: 540px) {
  .hero-image {
    height: 70vh;
  }
}

/************HERO MOBILE A 
@media (max-width: 540px) {
  .hero-image {
    height: 50vh;
    margin: 0;
    background-image: url("energy-service-solutions-img/Hero-mobile-Energy-Service-Solution.webp");
    border-top-left-radius: 0;
    border-top-right-radius: 0;
  }
}

@media (max-width: 499px) {
  .hero-image {
    height: 50vh;
    margin: 1rem;
    border-radius: 50px;
  }

  .hero-left {
    margin: 0 auto;
    max-width: 380px !important;
  }
}

@media (max-width: 380px) {
  .hero-image {
    height: 50vh;
  }

  .hero-left {
    margin: 0 auto;
    max-width: 370px !important;
  }
}

*************/

@media (min-width: 540px) {
  .hide-hero-mobile {
    display: none !important;
  }
}

@media (max-width: 540px) {
  .hide-hero-desktop {
    display: none !important;
  }
}

.mobile-hero {
  display: flex;
  justify-content: center;
  align-items: flex-start;

  overflow: hidden;
}

.img-hero-mobile {
  width: 100%;
  max-width: 600px;
  border-radius: 30px;
  object-fit: cover;
  display: block;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  margin: 1rem auto; /* centrata e senza sommare padding extra */
}

.h1-mobile {
  color: var(--colore-verde);
  line-height: 1.1;
  font-size: var(--h1-font-size-responsive);
}

.img-hero-mobile {
  width: calc(100% - 2rem); /* evita overflow dovuto ai padding */
}

/******************** SECTION 1 ********************/
.img-section {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 1.5rem auto;
  object-fit: cover;
  border-radius: 20px;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.text-section-1 {
  color: var(--colore-giallo);
  font-weight: 600;
  font-size: var(--h2-font-size);
  margin-bottom: 0.25rem;
}

@media (min-width: 1200px) {
  .img-section {
    max-width: 90%;
  }
}

.text-2-section-1 {
  color: var(--colore-verde);
  font-weight: 500;
  font-size: 1.6rem;
  line-height: 2rem;
}

.text-3-section-1 {
  color: var(--colore-testi);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.9rem;
  display: block;
  width: 100%;
  border-bottom: 1px solid var(--colore-giallo);
  padding-bottom: 0.5rem;
}

@media (max-width: 480px) {
  .img-section {
    margin: 0 0 1rem 0;
  }
}

@media (max-width: 400px) {
  .text-3-section-1 {
    font-size: 1.3rem;
  }
}

/******************** SECTION 2 ********************/
.green-section {
  background-color: var(--colore-verde);
  border-radius: 50px;
  color: white;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

.h2-color {
  color: white !important;
  max-width: 640px;
}

.text-white-box {
  margin-left: auto;
}

.parent {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  grid-column-gap: 0;
  grid-row-gap: 0;
}

.div1 {
  grid-area: 1 / 1 / 2 / 3;
}
.div2 {
  grid-area: 1 / 3 / 2 / 5;
}
.div3 {
  grid-area: 2 / 1 / 3 / 3;
}
.div4 {
  grid-area: 2 / 3 / 3 / 5;
}

@media (max-width: 1024px) {
  .parent {
    display: flex;
    flex-direction: column;
    gap: 2rem; /* spazio tra titolo e testo */
  }

  .parent-1 {
    gap: 0 !important;
  }

  .div2,
  .div3 {
    display: none;
  }

  .div1,
  .div4 {
    grid-area: unset;
    width: 100%;
  }

  .h2-color,
  .text-white-box {
    max-width: 100%;
    margin: 0;
    text-align: left;
  }

  .div4 {
    margin-top: 1rem;
  }
}

@media (min-width: 1600px) {
  .h2-color {
    max-width: 980px;
  }
}

.slider-section {
  background-color: var(--colore-verde);
  border-radius: 20px;
  overflow: hidden;
  color: var(--colore-testi);
  position: relative;
}

.slider-tabs {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.slider-tab {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 500;
  font-size: var(--body-size);
  padding: 0.75rem 0;
  cursor: pointer;
  position: relative;
  transition: color 0.3s ease;
}

.slider-tab::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 0;
  height: 2px;
  background-color: var(--colore-giallo);
  transition: width 0.3s ease;
}

.slider-tab:hover,
.slider-tab.active {
  color: var(--colore-giallo);
}

.slider-tab:hover::after,
.slider-tab.active::after {
  width: 100%;
}

.slider-content {
  position: relative;
  border-radius: 20px;
}

.slider-item {
  display: none;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  transition: opacity 0.4s ease-in-out;
}

.slider-item.active {
  display: block;
}

.slider-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 20px;
  cursor: pointer;
}

.slider-arrow {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  animation: pulse-zoom 2s ease-in-out infinite;
  transform-origin: center;
}

@keyframes pulse-zoom {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.9;
  }
}

@media (max-width: 992px) {
  .slider-tabs {
    border-bottom: none;
  }
  .slider-tab {
    border-bottom: none;
  }
}

@media (max-width: 640px) {
  .slider-item img {
    width: 100%;
    height: 60vh;
    object-fit: cover;
  }

  .slider-arrow {
    bottom: 1rem;
    right: 1rem;
    width: 28px;
    height: 28px;
  }
}

.slide-pubblici {
  height: 500px;
  background-image: url("energy-service-solutions-img/Pubblici-Sezione-progetti .webp");
  background-size: cover;
  background-position: center;
}

@media (max-width: 680px) {
  .slide-pubblici {
    height: 450px;
    background-image: url("energy-service-solutions-img/Pubblici-Mobile-Sezione-progetti .webp");
  }
}

.slide-privati {
  height: 500px;
  background-image: url("energy-service-solutions-img/Privati-Sezione-progetti.webp");
  background-size: cover;
  background-position: bottom;
}

@media (max-width: 680px) {
  .slide-privati {
    height: 450px;
    background-image: url("energy-service-solutions-img/Privati-Mobile-Sezione-progetti .webp");
    background-position: center;
    background-size: cover;
  }
}

.slide-superbonus {
  height: 500px;
  background-image: url("energy-service-solutions-img/Superbonus-Sezione-progetti.webp");
  background-position: center;
  background-size: cover;
}

@media (max-width: 680px) {
  .slide-superbonus {
    height: 450px;
    background-image: url("energy-service-solutions-img/Superbonus-Mobile-Sezione-progetti\ .webp");
    background-position: center;
    background-size: cover;
  }
}

.slide-ristrutturazioni {
  height: 500px;
  background-image: url("energy-service-solutions-img/Ristrutturazioni-Sezione-progetti.webp");
  background-position: center;
  background-size: cover;
}

@media (max-width: 680px) {
  .slide-ristrutturazioni {
    height: 450px;
    background-image: url("energy-service-solutions-img/Ristrutturazioni-Mobile-Sezione-progetti .webp");
    background-position: center;
    background-size: cover;
  }
}

/******************** SECTION 3 ********************/

.border-color-giallo {
  border-color: var(--colore-giallo) !important;
}

.no-line {
  border: none !important;
  position: static !important;
}

.no-line::after {
  content: none !important;
}

@media (min-width: 1400px) {
  .servizi-section .row {
    flex-direction: column;
    text-align: left;
  }

  .servizi-section .col-12 {
    margin-bottom: 0.5rem;
  }
}

/******************** SECTION 4 ********************/
.hero-progetti {
  height: 80vh;
  border-radius: 50px;
  background-image: url("energy-service-solutions-img/Energy-Service-Solution-3.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

@media (min-width: 1600px) {
  .hero-progetti {
    height: 60vh;
  }
}

@media (max-width: 1024px) {
  .hero-progetti {
    height: 40vh;
  }
}

@media (max-width: 820px) {
  .hero-progetti {
    height: 50vh;
  }
}

@media (max-width: 540px) {
  .hero-progetti {
    height: 80vh;
    border-radius: 0 !important;
  }
}

/******************** SECTION 5 ********************/
.img-section-5 {
  width: 80%;
  height: auto;
  object-fit: cover;
  border-radius: 20px;
  display: block;
  margin: 0 auto;
}

.content-wrapper {
  overflow-x: hidden; /* blocca eventuali sbordi interni */
}

@media (max-width: 1024px) {
  .img-section-5 {
    width: 60%;
    height: auto;
    object-fit: cover;
    border-radius: 20px;
    display: block;
    margin: 0 auto;
  }
}

@media (max-width: 540px) {
  .img-section-5 {
    width: 90%;
    height: auto;
    object-fit: cover;
    border-radius: 20px;
    margin: 0 auto;
  }
}

/******************** SECTION 6 ********************/
.h4-color {
  color: white;
}

@media (max-width: 540px) {
  .green-section {
    border-radius: 0 !important;
  }
}

/******************** SECTION 7 ********************/
.hero-form {
  min-height: 80vh;
  border-radius: 50px;
  background-image: url("energy-service-solutions-img/Form-Energy-Service-Solution.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

@media (min-width: 1600px) {
  .hero-form {
    min-height: 50vh;
  }
}

@media (max-width: 1024px) {
  .hero-form {
    min-height: 60vh;
    padding: 2rem;
  }
}

@media (max-width: 820px) {
  .hero-form {
    min-height: 70vh;
    padding: 3rem 1.5rem;
  }
}

@media (max-width: 540px) {
  .hero-form {
    min-height: 100vh;
    border-radius: 0 !important;
    padding: 2rem 1rem;
  }
}

.form-box {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  width: 100%;
  max-width: 500px;
  color: white;
  box-sizing: border-box;
}

@media (min-width: 1600px) {
  .form-box {
    max-width: 650px;
  }
}

@media (min-width: 2000px) {
  .form-box {
    max-width: 750px;
  }
}

.form-box h3 {
  font-size: clamp(1.2rem, 2vw, 1.8rem);
}

.text-white.small {
  font-size: clamp(0.85rem, 1.5vw, 0.95rem);
  line-height: 1.4;
  margin-bottom: 1.5rem;
}

.form-control {
  background: rgba(255, 255, 255, 0.85);
  border: none;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  width: 100%;
}

.form-control:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--colore-giallo, #ffc107);
}

.btn-submit {
  display: block;
  width: 100%;
  background-color: var(--colore-giallo, #ffc107);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 0.9rem 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.btn-submit:hover {
  background-color: #ffb300;
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .form-box {
    padding: 1.75rem;
    max-width: 100%;
  }

  .contact-form .row {
    gap: 1rem;
  }

  .contact-form input,
  .contact-form textarea {
    font-size: 1rem;
  }

  .btn-submit {
    font-size: 1rem;
    padding: 1rem;
  }
}

/******************** FOOTER ********************/
footer {
  background: linear-gradient(180deg, #0f3c35 0%, #0b2e29 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}

footer a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  color: #ffb823;
}

.footer-logo img {
  max-width: 160px;
  filter: brightness(0) invert(1);
}

.footer-nav a {
  display: block;
  padding: 0.25rem 0;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
}

.footer-nav a:hover {
  transform: translateX(4px);
}

.footer-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.85;
}

.contact-info p {
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
}

.divider {
  border-left: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.8rem;
  text-align: center;
  opacity: 0.8;
  padding-top: 1.2rem;
  margin-top: 3rem;
}

@media (max-width: 991px) {
  .divider {
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin-top: 2rem;
    padding-top: 2rem;
  }
}

/******************** CHI SIAMO ***
*********************************/

.h1-chi-siamo {
  font-size: var(--h2-font-size);
  color: var(--colore-verde);
  line-height: 1.2;
}

@media (max-width: 768px) {
  .h1-chi-siamo {
    font-size: var(--h2-font-size-responsive);
  }
}

.hero-chi-siamo {
  width: 100%;
  height: 300px;
  object-fit: cover; /* riempie l’area senza deformarsi */
  border-radius: 30px;
  display: block;
  margin: 0 auto;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25); /* facoltativo ma coerente con le altre immagini */
}

.box-title-chi-siamo {
  max-width: 820px;
}

/********SEZIONE 2 *********/

.parent1 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(12, 1fr);
  column-gap: 50px;
  position: relative;
}

.parent1::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 100%;
  background-color: var(--colore-giallo);
  z-index: 0;
}

.div6 {
  grid-row: span 2 / span 2;
}
.div7 {
  grid-row: span 2 / span 2;
  grid-column-start: 2;
  grid-row-start: 3;
}
.div8 {
  grid-row: span 2 / span 2;
  grid-row-start: 5;
}
.div9 {
  grid-row: span 2 / span 2;
  grid-column-start: 2;
  grid-row-start: 7;
}
.div10 {
  grid-row: span 2 / span 2;
  grid-row-start: 9;
}
.div11 {
  grid-row: span 2 / span 2;
  grid-column-start: 2;
  grid-row-start: 11;
}

.img-timeline {
  position: relative;
  width: 500px;
  height: 350px;
  object-fit: cover;
  border-radius: 30px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

.readmore {
  max-width: 550px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0.75rem 0;
}

.readmore-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.readmore .text {
  color: var(--colore-verde) !important;
}

.more .text {
  color: var(--colore-testiS) !important;
}

.readmore .toggle {
  background: none;
  border: none;
  color: var(--colore-verde);
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: transform 0.25s ease;
}

.readmore.open .toggle {
  transform: rotate(45deg); /* + diventa × */
}

.more {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition:
    max-height 0.5s cubic-bezier(0.23, 1, 0.32, 1),
    opacity 0.4s ease;
  will-change: max-height, opacity;
}

.readmore.open .more {
  max-height: 200px;
  opacity: 1;
}

@media (max-width: 1024px) {
  .parent1 {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4rem;
    position: relative;
  }

  .parent1::before {
    left: 0;
    transform: none;
    width: 3px;
    height: 100%;
    background-color: var(--colore-giallo);
  }

  .div6,
  .div7,
  .div8,
  .div9,
  .div10,
  .div11 {
    grid-column: auto !important;
    grid-row: auto !important;
    align-items: flex-start !important;
    text-align: left !important;
    margin-left: 3rem;
    max-width: 600px;
  }

  .img-timeline {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 24px;
  }

  .readmore {
    max-width: 100%;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.75rem 0;
  }

  .readmore-header {
    justify-content: space-between;
    align-items: center;
  }
}

@media (max-width: 560px) {
  .div6,
  .div7,
  .div8,
  .div9,
  .div10,
  .div11 {
    margin-left: 1rem;
  }
}

.last-section {
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: 1rem;
}

.last-img-timeline {
  width: 500px;
  height: 350px;
  object-fit: contain;
  border-radius: 30px;

  z-index: 1;
  padding: 1.5rem;
}

.text-last {
  color: var(--colore-verde) !important;
  font-weight: 700 !important;
}

@media (max-width: 1025px) {
  .last-section .row {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  .box-last-text {
    text-align: left;
    align-items: flex-start !important;
    margin-left: 3rem !important;
  }

  .last-section .col-lg-6 {
    width: 100%;
  }

  .box-last-text h4 {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
  }

  .last-img-timeline {
    height: auto;
    margin-left: 2rem;
    padding: 2rem;
  }
}

@media (max-width: 540px) {
  .last-section .row {
    flex-direction: column;
    align-items: center;
    text-align: left;
    gap: 1.5rem;
  }

  .last-img-timeline {
    width: 100%;
    max-width: 420px;
    height: auto;
    margin-inline: auto;
    display: block;
    padding: 1.5rem;
  }

  .box-last-text {
    width: 100%;
    text-align: left;
    align-items: flex-start !important;
    margin-left: 0 !important;
  }

  .box-last-text h4 {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
  }
}

/********SEZIONE 3 *********/
.green-section-img {
  width: 100%;
  max-width: 420px;
  height: auto;
  border-radius: 24px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

/******************** PROGETTI ***
*********************************/

/********SEZIONE 1 *********/
.parent2 {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(4, 130px); /* ridotto da 180px a 130px */
  grid-auto-rows: 130px;
  gap: 16px;
}

.div12 {
  grid-area: 1 / 1 / 5 / 4;
}
.div14 {
  grid-area: 1 / 4 / 3 / 6;
}
.div15 {
  grid-area: 1 / 6 / 3 / 8;
}
.div13 {
  grid-area: 3 / 4 / 5 / 8;
}

.card-custom {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-custom a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.card-custom h3 a:hover {
  text-decoration: underline;
}

.card-custom .img-container {
  flex: 1 1 auto;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-custom .img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  border-radius: 16px;
}

.img-container a {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition:
    transform 1.2s cubic-bezier(0.23, 1, 0.32, 1),
    filter 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.img-container:hover img {
  transform: scale(1.06);
  filter: brightness(1.03);
  cursor: pointer;
}

.card-custom .content {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.div12 .content,
.div13 .content {
  min-height: 110px;
}

.div12 .img-container {
  min-height: 65%;
}

.div14 .content,
.div15 .content {
  min-height: 90px;
}

.card-custom h3 {
  color: var(--colore-verde);
  font-weight: 700;
  margin: 0 0 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.card-custom p {
  margin: 0;
  line-height: 1.3;
  font-size: 0.95rem;
}

@media (min-width: 1600px) {
  .parent2 {
    grid-template-rows: repeat(4, 170px);
    grid-auto-rows: 170px;
    gap: 22px;
  }

  .card-custom {
    border-radius: 20px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.18);
  }

  .card-custom .content {
    padding: 24px 32px;
  }

  .div12 .content,
  .div13 .content {
    min-height: 150px;
  }

  .div14 .content,
  .div15 .content {
    min-height: 120px;
  }

  .div12 .img-container {
    min-height: 65%;
  }

  .img-container img {
    transition:
      transform 1.3s cubic-bezier(0.25, 1, 0.3, 1),
      filter 1.3s cubic-bezier(0.25, 1, 0.3, 1);
  }

  .img-container:hover img {
    transform: scale(1.05);
    filter: brightness(1.04);
  }
}

@media (max-width: 992px) {
  .parent2 {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    grid-auto-rows: auto;
    gap: 3rem;
  }
  .div12,
  .div13,
  .div14,
  .div15 {
    grid-area: auto;
  }
  .div12 .img-container {
    min-height: unset;
  }
}

@media (max-width: 540px) {
  .card-custom {
    height: 350px !important;
  }
}

/********SEZIONE 2 *********/
.title-para-section-2 {
  max-width: 680px;
}

.card-portfolio {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  transition: box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Immagine */
.img-wrapper {
  position: relative;
  height: 230px;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
}

.img-wrapper a {
  display: block;
  width: 100%;
  height: 100%;
}

.img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  transition:
    transform 1.2s cubic-bezier(0.23, 1, 0.32, 1),
    filter 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.img-wrapper:hover img {
  transform: scale(1.06);
  filter: brightness(1.05);
}

.card-body {
  padding: 15px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.card-body h5 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  color: #004b32;
  margin-bottom: 6px;
  font-size: 1.25rem;
}

.card-body h5 a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: inherit;
  text-decoration: none;
  width: 100%;
}

.card-body h5 a:hover {
  text-decoration: underline;
}

.card-body p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.35;
  color: #333;
}

.card-body .descrizione {
  color: #555;
  margin-top: 6px;
}

@media (min-width: 992px) {
  .img-wrapper {
    height: 250px;
  }
}

@media (min-width: 1600px) {
  .img-wrapper {
    height: 280px;
  }
  .card-body {
    padding: 26px 32px;
  }
  .card-body h5 {
    font-size: 1.15rem;
  }
  .card-body p {
    font-size: 1rem;
    line-height: 1.45;
  }
}

/******************** PAGINA PROGETTI ********************/
.breadcrumb-item a {
  color: var(--colore-testi);
  text-decoration: none;
  opacity: 0.6;
}

.breadcrumb-item a:hover {
  text-decoration: underline;
}

.breadcrumb-item {
  color: var(--colore-testi) !important;
  font-weight: 500;
}

.h2-progetto {
  max-width: 680px;
  margin: auto 0;
}

.h4-progetto {
  color: var(--colore-verde);
  font-size: var(--h3-font-size);
}

/******************** PAGINA PROGETTO ********************/

.button-progetto {
  border-radius: 48px;
  padding: 0.5rem 1rem;
  border: none;
  color: white;
  background-color: var(--colore-verde);
}

.box-progetto {
  background-color: var(--colore-grigio-light);
  padding: 1rem;
  border-radius: 18px;
}

.img-progetto {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 24px;
}

.custom-swiper {
  width: 100%;
  max-width: 600px;
  margin: auto;
  display: flex;
  flex-direction: column;
}

/* ---- SLIDER PRINCIPALE ---- */
.swiper-main {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
}

.swiper-track {
  display: flex;
  height: 100%;
  transition: transform 0.4s ease-in-out;
}

.swiper-track img {
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 24px;
}

/* BOTTONI */
.swiper-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--colore-giallo);
  color: #fff;
  border: none;
  padding: 8px 12px;
  font-size: 22px;
  cursor: pointer;
  z-index: 10;
  border-radius: 14px;
}

.prev {
  left: 8px;
}
.next {
  right: 8px;
}

/* ---- THUMBNAILS ---- */
.swiper-thumbs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
}

.swiper-thumbs img {
  width: 90px;
  height: 70px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.5;
  border: 2px solid transparent;
  transition: 0.2s;
  border-radius: 14px;
}

.swiper-thumbs img.active {
  opacity: 1;
  border: 2px solid var(--colore-giallo);
}

@media (min-width: 1600px) {
  .custom-swiper {
    max-width: 100%;
  }

  .swiper-main {
    height: 400px;
  }

  .swiper-thumbs img {
    width: 130px;
    height: 90px;
  }
}

/* ---------------- MOBILE ---------------- */
@media (max-width: 768px) {
  .swiper-main {
    height: 280px;
  }

  .swiper-thumbs img {
    width: 60px;
    height: 45px;
  }

  .swiper-thumbs {
    margin-top: 5px;
    gap: 6px;
  }
}

/* ---------------- MOBILE PICCOLO ---------------- */
@media (max-width: 480px) {
  .swiper-main {
    height: 220px;
  }

  .swiper-thumbs img {
    width: 55px;
    height: 40px;
  }

  .swiper-thumbs {
    margin-top: 4px;
    gap: 5px;
  }

  .swiper-btn {
    padding: 6px 10px;
    font-size: 18px;
  }
}

.img-green-progetto img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  border-radius: 24px;
}

@media (min-width: 1600px) {
  .img-green-progetto img {
    height: 450px;
  }
}

.img-progetto-1 {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 24px;
}

.h6-progetto {
  font-size: 18px;
  color: var(--colore-verde);
  font-weight: 600 !important;
}

.gs-slider-area {
  width: 100%;
  padding: 20px 0;
}

.gs-slider-box {
  position: relative;
  overflow: hidden;
}

.gs-slider-strip {
  display: flex;
  transition: transform 0.4s ease-in-out;
}

.gs-slide {
  padding: 10px;
  flex: 0 0 25%;
}

.gs-slide img {
  width: 100%;
  border-radius: 8px;
  display: block;
}

/* FRECCE */
.gs-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--colore-giallo);
  color: white;
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  font-size: 26px;
  cursor: pointer;
  z-index: 15;
}

.gs-left {
  left: 15px;
}
.gs-right {
  right: 15px;
}

/* RESPONSIVE */
@media (max-width: 992px) {
  /* sotto LG */
  .gs-slide {
    flex: 0 0 33.3333%; /* 3 */
  }
}

@media (max-width: 768px) {
  /* sotto MD */
  .gs-slide {
    flex: 0 0 100%; /* 1 */
  }
}

.img-contatti img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #ccc;
}

.contact-item:last-child {
  border-bottom: none;
}

.contact-link {
  text-decoration: none;
  color: #333;
  font-weight: 500;
}

.contact-link:hover {
  text-decoration: underline;
}

.img-right {
  width: 100%;
  height: 400px;
  border-radius: 0.5rem;
  object-fit: cover;
  border-radius: 24px;
}
