/*************************************************************
  0) TOKENS / RESET
*************************************************************/
:root{
  --max: 1200px;
  --radius: 14px;
  --gap: 1rem;
  --bg-alt: #f7f7f7;

  /* Navbar */
  --nav-h: 72px;

  /* Team */
  --team-max: 1280px;
  --team-gap: 18px;
  --team-card-w: clamp(240px, 22vw, 320px);
  --team-img-h: 360px;

  /* Partners marquee */
  --partners-logo-h: 85px;
  --partners-gap: 65px;
  --partners-speed: 30s;

  /* Progetti */
  --projects-gap: clamp(1rem, 2.5vw, 2rem);
  --projects-sidebar-min: 320px;
  --projects-accent: #8cbe4f;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
html, body{ overflow-x: hidden; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color:#111;
  line-height:1.55;
  background:#fff;
}

img{
  max-width:100%;
  height:auto;
  display:block;
}

a{
  color:inherit;
  text-decoration:none;
}

/*************************************************************
  1) LAYOUT GENERALE / TYPO
*************************************************************/
.container{
  width:min(100% - 2rem, var(--max));
  margin-inline:auto;
}

.section{
  padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.section--alt{
  background: var(--bg-alt);
}

.lead{
  font-size:clamp(1rem, .9rem + .5vw, 1.125rem);
  max-width:65ch;
}

h1,h2,h3{
  line-height:1.2;
  margin:0 0 .75rem;
}

h2{
  font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem);
}

/*************************************************************
  2) HERO
*************************************************************/
.hero{
  position:relative;
  width:100%;
  height:100vh;
  overflow:hidden;
}

.hero__video,
.hero__image{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
}

.hero__overlay{
  position:absolute;
  inset:0;
  display:flex;
  align-items:flex-start;
  justify-content:flex-start;
  padding:2rem;
  pointer-events:none;
}

.hero__logo{
  width:min(30vw, 260px);
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.35));
}

/*************************************************************
  3) NAVBAR
*************************************************************/
.nav{
  position:absolute;
  bottom:0;
  left:0;
  right:0;
  width:100%;
  z-index:1000;

  height: var(--nav-h);
  min-height: var(--nav-h);
  max-height: var(--nav-h);

  display:flex;
  align-items:center;
  justify-content:center;
  gap:3rem;

  padding:0 2rem;

  background:rgba(0,0,0,.92);
  backdrop-filter:blur(8px);
  border-bottom:4px solid #8cbe4f;
  box-shadow:0 3px 12px rgba(0,0,0,.25);

  overflow:visible;
}

.nav.nav--fixed{
  position:fixed;
  top:0;
  left:0;
  right:0;
  bottom:auto;
}

.nav__section{
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:1.5rem;
}

.nav__brand{
  font-weight:700;
  color:#fff;
  letter-spacing:.5px;
  display:inline-flex;
  align-items:center;
  height:44px;
}

.nav__brand span{
  font-weight:400;
  opacity:.85;
}

.nav__divider{
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1.3rem;
  font-weight:600;
  color:rgba(255,255,255,.4);
  padding:0 1rem;
}

.nav a{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:44px;
  color:#ddd;
  font-size:1.05rem;
  font-weight:500;
  padding:0 .9rem;
  border-radius:10px;
  transition: color .2s ease;
}

/* niente più hover verde */
.nav a:hover{
  color:#fff;
  background:none;
  transform:none;
}

/* linea animata */
.nav a::after{
  content:"";
  position:absolute;
  left:0;
  bottom:-1px;
  width:0%;
  height:2px;
  background:#8cbe4f;
  transition:width .25s ease;
}

.nav a:hover::after{
  width:100%;
}

.nav__toggle{
  right:.5rem;
  display:none;
  width:44px;
  height:44px;
  position:absolute;
  background:none;
  border:none;
  color:#fff;
  font-size:1.6rem;
  cursor:pointer;
}

/* Nav semplice per pagine senza hero */
.nav.nav--static{
  position:fixed;
  top:0;
  left:0;
  right:0;
  bottom:auto;
}

.nav.nav--static .nav__toggle{
  display:none;
}

/*************************************************************
  4) CHI SIAMO / ROW ALTERNATE
*************************************************************/
#chi-siamo{
  scroll-snap-type:y proximity;
}

#chi-siamo .about__row{
  scroll-snap-align:center;
  scroll-snap-stop:normal;
  scroll-margin-top: calc(var(--nav-h) + 16px);
  margin-block: clamp(1rem, 2.5vw, 2rem);
}

.about__alt{
  display:grid;
  gap: clamp(1.25rem, 2.5vw, 2rem);
}

.about__row{
  display:grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(1rem, 3vw, 2rem);
  align-items:center;
  background: rgba(175,177,173,0.3);
  border-radius: var(--radius);
  padding: clamp(1rem, 2vw, 2rem);
}

.about__row:nth-child(even){
  grid-template-columns: 0.9fr 1.1fr;
}

.about__row:nth-child(even) .about__figure{ order:2; }
.about__row:nth-child(even) .about__text{ order:1; }

.about__figure{
  position:relative;
  margin:0;
  overflow:hidden;
  border-radius:var(--radius);
  aspect-ratio:16/10;
  background:#ddd;
}

.parallax__img{
  position:absolute;
  inset:-6% 0 -6% 0;
  width:100%;
  height:auto;
  object-fit:cover;
  transform: translateY(0);
  will-change:transform;
  backface-visibility:hidden;
}

#chi-siamo .about__text{
  background:#f4f4f4;
  border-radius:18px;
  padding:1.75rem 1.9rem;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:.75rem;
  text-align:center;
  box-shadow:0 18px 40px rgba(0,0,0,0.03);
}

#chi-siamo .about__eyebrow{
  text-transform:uppercase;
  letter-spacing:0.16em;
  font-size:.78rem;
  font-weight:600;
  color:#777;
  margin:0 0 .25rem;
}

#chi-siamo .about__headline{
  margin:0 0 .5rem;
  font-size:clamp(1.15rem, 1.1vw + 1rem, 1.45rem);
  line-height:1.4;
  font-weight:600;
  color:#161616;
  text-wrap:balance;
  hyphens:none;
  max-width:40rem;
}

#chi-siamo .about__copy{
  margin:0;
  font-size:.98rem;
  line-height:1.7;
  color:#4e4e4e;
  text-wrap:balance;
  hyphens:none;
  max-width:40rem;
}

/*************************************************************
  5) REVEAL HELPERS
*************************************************************/
.reveal{
  opacity:0;
  transform: translateY(10px);
  transition: opacity .6s ease, transform .6s ease;
}

.reveal.is-visible{
  opacity:1;
  transform:none;
}

@media (prefers-reduced-motion: reduce){
  .reveal{
    opacity:1;
    transform:none;
    transition:none;
  }
}

/*************************************************************
  6) CAROSELLO GENERICO
*************************************************************/
.carousel{
  position:relative;
}

.carousel__track{
  list-style:none;
  display:flex;
  gap:var(--gap);
  padding:0;
  margin:1rem 0;
  overflow-x:auto;
  scroll-snap-type:x mandatory;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
  -ms-overflow-style:none;
}

.carousel__track::-webkit-scrollbar{
  display:none;
  width:0;
  height:0;
}

.carousel__track > li{
  min-width: clamp(220px, 60vw, 360px);
  scroll-snap-align:start;
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:0 8px 24px rgba(0,0,0,.06);
}

.carousel__btn{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:42px;
  height:42px;
  border-radius:50%;
  border:0;
  background:#111;
  color:#fff;
  cursor:pointer;
  opacity:.95;
}

.carousel__btn.prev{ left:-.5rem; }
.carousel__btn.next{ right:-.5rem; }

.card img{
  width:100%;
  height:220px;
  object-fit:cover;
}

.card h3{
  margin:.75rem 1rem 0;
  font-size:1.1rem;
}

.card p{
  margin:.25rem 1rem 1rem;
  color:#444;
}

/*************************************************************
  7) TEAM CAROUSEL
*************************************************************/
.team-title{
  text-align:center;
  margin:0 0 1rem;
  font-size:clamp(1.8rem, 1.2rem + 2.2vw, 3rem);
}

.team-carousel-container{
  background: rgba(175,177,173,.3);
  border-radius: var(--radius);
  padding: clamp(1rem, 2vw, 2rem);
  margin-top:2rem;
}

.team-carousel{
  position:relative;
  width:min(100%, var(--team-max));
  margin-inline:auto;
}

.team-carousel__track{
  list-style:none;
  display:flex;
  gap: var(--team-gap);
  padding:0;
  margin:1rem 0;
  overflow-x:auto;
  scroll-snap-type:x proximity;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior-inline:contain;
  cursor:grab;
  scrollbar-width:none;
  -ms-overflow-style:none;
}

.team-carousel__track::-webkit-scrollbar{
  display:none;
  width:0;
  height:0;
}

.team-carousel__track.is-dragging{
  cursor:grabbing;
}

.team-carousel__track > li{
  scroll-snap-align:start;
}

.team-carousel__btn{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:40px;
  height:40px;
  border-radius:50%;
  border:0;
  background:#111;
  color:#fff;
  cursor:pointer;
  opacity:.95;
}

.team-carousel__btn.prev{ left:-12px; }
.team-carousel__btn.next{ right:-12px; }
.team-carousel__btn.is-disabled{
  opacity:.35;
  pointer-events:none;
}

.team-card{
  background:#fff;
  border-radius: var(--radius);
  overflow:hidden;
  box-shadow:0 8px 24px rgba(0,0,0,.06);
  min-width: var(--team-card-w);
  display:flex;
  flex-direction:column;
  align-items:center;
}

.team-card img{
  width:100%;
  height: var(--team-img-h);
  object-fit:cover;
}

.team-card h3{
  margin:.7rem 0 0;
  font-size:1.06rem;
  text-align:center;
}

.team-card p{
  margin:.25rem 0 .9rem;
  color:#444;
  text-align:center;
  font-size:.92rem;
}

/*************************************************************
  8) SERVIZI
*************************************************************/
.services{
  text-align:center;
}

.services h2{
  margin-bottom:1rem;
}

.services__intro{
  max-width:75ch;
  margin:0 auto 1.75rem;
  font-size:1rem;
  line-height:1.75;
  color:#444;
}

.services__btn{
  margin-top:.5rem;
  padding:.75rem 1.4rem;
  border-radius:999px;
  font-weight:600;
  letter-spacing:.4px;
  transition: all .25s ease;
}

.services__btn:hover{
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
}

/*************************************************************
  9) SERVIZI MODAL
*************************************************************/
.services-modal{
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: none;
}

.services-modal.is-open{
  display: block;
}

.services-modal__backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
}

.services-modal__dialog{
  position: relative;
  margin: 3.5rem auto;
  width: min(900px, calc(100% - 2.5rem));
  max-height: calc(100vh - 7rem);
  overflow-y: auto;
  background:#fff;
  border-radius: 18px;
  padding: 2rem 2rem 2.5rem;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  animation: servicesFade .25s ease;
  scrollbar-width:none;
}

.services-modal__dialog::-webkit-scrollbar{
  width:0;
  height:0;
}

@keyframes servicesFade{
  from{
    opacity:0;
    transform: translateY(12px);
  }
  to{
    opacity:1;
    transform:none;
  }
}

.services-modal__close{
  position:absolute;
  top: 1rem;
  right: 1rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(0,0,0,0.04);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 1.4rem;
  cursor:pointer;
  transition: all .2s ease;
}

.services-modal__close:hover{
  background:#111;
  color:#fff;
  transform: scale(1.05);
}

.services-modal__dialog h3{
  margin-bottom: 1.25rem;
  font-size: 1.4rem;
}

.services-modal__list{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: .65rem;
}

.services-modal__list li{
  padding-left: 1.25rem;
  position: relative;
  line-height: 1.6;
  color:#333;
}

.services-modal__list li::before{
  content: "–";
  position: absolute;
  left: 0;
  color: #8cbe4f;
  font-weight: 600;
}

/*************************************************************
  10) PARTNERS MARQUEE
*************************************************************/
.partners{
  padding: clamp(1.5rem, 3vw, 2rem) 0;
  background:#fff;
}

.partners__marquee{
  position:relative;
  overflow:hidden;
  user-select:none;
  pointer-events:none;
}

.partners__track{
  display:flex;
  align-items:center;
  gap: var(--partners-gap);
  width:max-content;
  will-change:transform;
  animation: marquee-ltr var(--partners-speed) linear infinite;
}

.partners__group{
  display:flex;
  align-items:center;
  gap: var(--partners-gap);
  padding:0;
  margin:0;
  list-style:none;
}

.partners__logo{
  height:var(--partners-logo-h);
  width:auto;
  display:block;
  filter:grayscale(100%);
  opacity:.9;
}

.partners__marquee::before,
.partners__marquee::after{
  content:"";
  position:absolute;
  top:0;
  bottom:0;
  width:80px;
  pointer-events:none;
}

.partners__marquee::before{
  left:0;
  background: linear-gradient(to right, #fff 0%, rgba(255,255,255,0) 100%);
}

.partners__marquee::after{
  right:0;
  background: linear-gradient(to left, #fff 0%, rgba(255,255,255,0) 100%);
}

@keyframes marquee-ltr{
  0%{ transform: translateX(-50%); }
  100%{ transform: translateX(0); }
}

/*************************************************************
  11) CONTATTI + MAPPA
*************************************************************/
.contacts{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap: clamp(1rem, 3vw, 2rem);
  align-items:start;
}

.map-wrapper{
  width:100%;
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:0 8px 24px rgba(0,0,0,.06);
  aspect-ratio:16/10;
}

.map-wrapper iframe{
  width:100%;
  height:100%;
  border:0;
  display:block;
}

/*************************************************************
  12) WHATSAPP
*************************************************************/
.whatsapp-small{
  display:inline-flex;
  align-items:center;
  gap:.6rem;
  margin-top:1rem;
  padding:.55rem 1rem;
  border-radius:999px;
  background:#25D366;
  color:#fff;
  font-size:.9rem;
  font-weight:600;
  text-decoration:none;
  transition:all .2s ease;
}

.whatsapp-small:hover{
  transform:translateY(-2px);
  box-shadow:0 6px 16px rgba(0,0,0,.15);
}

.whatsapp-small__icon{
  width:18px;
  height:18px;
}

/*************************************************************
  13) FOOTER + BUTTON
*************************************************************/
.footer{
  background:#111;
  color:#fff;
  padding:2rem 0;
}

.footer a{
  color:#fff;
  opacity:.9;
}

.footer__nav{
  display:flex;
  flex-wrap:wrap;
  gap:1rem;
}

.btn{
  display:inline-block;
  margin-top:.5rem;
  padding:.6rem 1rem;
  border-radius:10px;
  background:#111;
  color:#fff;
}

/*************************************************************
  14) PROGETTI — LAYOUT DESKTOP
*************************************************************/
.projects-layout{
  display:grid;
  grid-template-columns: minmax(var(--projects-sidebar-min), 1fr) 2fr;
  gap: var(--projects-gap);
  align-items:start;
}

.projects-sidebar{
  position:sticky;
  top: calc(var(--nav-h) + 10px);
  align-self:start;
}

.projects-title{
  margin:0 0 .25rem;
  font-size:clamp(1.4rem, 1.1rem + 1.2vw, 2rem);
}

.projects-subtitle{
  margin:0 0 .75rem;
  color:#555;
}

.projects-list{
  list-style:none;
  padding:0;
  margin:0;
  display:grid;
  gap:.75rem;
  max-height: calc(100vh - var(--nav-h) - 140px);
  overflow:auto;
  scrollbar-width:thin;
}

.project-item{
  display:grid;
  grid-template-columns:72px 1fr;
  gap:.75rem;
  align-items:center;
  background:#fff;
  border:1px solid #e7e7e7;
  border-radius:12px;
  padding:.6rem;
  cursor:pointer;
  transition:border-color .2s, box-shadow .2s, background .2s;
}

.project-item:hover{
  border-color:#dcdcdc;
  box-shadow:0 4px 14px rgba(0,0,0,.06);
}

.project-item.is-active{
  border-color:var(--projects-accent);
  box-shadow:0 6px 20px rgba(0,0,0,.08);
  background:#f8fbf3;
}

.project-item__thumb{
  width:72px;
  height:72px;
  border-radius:10px;
  object-fit:cover;
  background:#f2f2f2;
}

.project-item__title{
  margin:0;
  font-size:.98rem;
  line-height:1.2;
}

.project-item__tags{
  margin:0;
  color:#666;
  font-size:.85rem;
}

.projects-detail{
  min-height:60vh;
  background:#fff;
  border-radius:14px;
  border:1px solid #e7e7e7;
  padding:clamp(1rem, 2vw, 1.5rem);
  box-shadow:0 8px 24px rgba(0,0,0,.06);
}

.projects-detail__hero{
  width:100%;
  aspect-ratio:16/9;
  border-radius:12px;
  object-fit:cover;
  background:#f2f2f2;
  margin-bottom:1rem;
}

.projects-detail__header{
  display:flex;
  flex-wrap:wrap;
  gap:.75rem 1rem;
  align-items:baseline;
  margin-bottom:.5rem;
}

.projects-detail__title{
  margin:0;
  font-size:clamp(1.4rem, 1.2rem + 1.2vw, 2.2rem);
}

.projects-detail__pill{
  font-size:.82rem;
  background:#f3f3f3;
  color:#333;
  border-radius:999px;
  padding:.25rem .6rem;
  border:1px solid #e0e0e0;
}

.projects-detail__summary{
  color:#444;
  margin-top:.5rem;
}

.projects-detail__gallery{
  display:grid;
  gap:.5rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top:1rem;
}

.projects-detail__img{
  width:100%;
  aspect-ratio:16/10;
  object-fit:cover;
  border-radius:10px;
}

.projects-detail__description{
  color:#333;
  line-height:1.6;
  margin-top:1rem;
}

.projects-detail__placeholder{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:40vh;
  color:#666;
}

/*************************************************************
  15) PROGETTI — MODAL
*************************************************************/
.project-modal{
  position:fixed;
  inset:0;
  z-index:1200;
  display:none;
}

.project-modal.is-open{
  display:block;
}

.project-modal__backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.6);
}

.project-modal__dialog{
  position:relative;
  margin:1.5rem auto;
  max-width:960px;
  max-height:calc(100vh - 3rem);
  background:#fff;
  border-radius:14px;
  box-shadow:0 10px 30px rgba(0,0,0,0.25);
  padding:clamp(1rem, 2vw, 1.5rem);
  overflow-y:auto;
  scrollbar-width:none;
}

.project-modal__dialog::-webkit-scrollbar{
  width:0;
  height:0;
}

.project-modal__close{
  position:absolute;
  top:.6rem;
  right:.6rem;
  width:2.2rem;
  height:2.2rem;
  border-radius:999px;
  border:1px solid rgba(0,0,0,0.08);
  background:rgba(0,0,0,0.03);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1.4rem;
  line-height:1;
  cursor:pointer;
  transition: background .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.project-modal__close:hover{
  background:#111;
  color:#fff;
  box-shadow:0 4px 12px rgba(0,0,0,0.25);
  transform:scale(1.03);
}

.project-modal__close:active{
  transform:scale(0.96);
}

body.modal-open{
  overflow:hidden;
}

/*************************************************************
  16) DETAIL GALLERY PROGETTI
*************************************************************/
.detail-gallery{
  position: relative;
  margin-bottom: 1rem;
  border-radius: 12px;
  overflow: hidden;
  background: #f2f2f2;
}

.detail-gallery__track{
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.detail-gallery__track::-webkit-scrollbar{
  width: 0;
  height: 0;
}

.detail-gallery__slide{
  flex: 0 0 100%;
  scroll-snap-align: center;
}

.detail-gallery__slide img{
  width: 100%;
  height: min(52vh, 460px);
  object-fit: cover;
  display: block;
}

.detail-gallery__btn{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 0;
  background: rgba(0,0,0,.75);
  color: #fff;
  cursor: pointer;
  z-index: 2;
}

.detail-gallery__btn.prev{ left: .6rem; }
.detail-gallery__btn.next{ right: .6rem; }

/*************************************************************
  17) PROGETTI — LAYOUT PAGINA DEDICATA
*************************************************************/
body.progetti-page{
  height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overscroll-behavior: none;
  background: #f2f2f2;
}

body.progetti-page .nav{
  flex: 0 0 auto;
}

body.progetti-page #projects-app.section{
  flex: 1 1 auto;
  min-height: 0;
  padding-block: 1rem;
}

body.progetti-page .footer{
  flex: 0 0 auto;
  padding: .75rem 0;
}

body.progetti-page .footer .container{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

body.progetti-page .footer small{
  font-size: .85rem;
}

body.progetti-page .footer__nav{
  gap: .75rem;
}

body.progetti-page .footer__nav a{
  font-size: .85rem;
}

body.progetti-page .projects-layout{
  height: 100%;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) 2fr;
  gap: var(--projects-gap, 1.5rem);
  overflow: hidden;
  min-height: 0;
  align-items: stretch;
  background: #fff;
  border-radius: 12px;
  padding: 1rem;
}

body.progetti-page .projects-sidebar{
  height: 100%;
  overflow-y: auto;
  min-height: 0;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

body.progetti-page .projects-detail{
  height: 100%;
  overflow-y: auto;
  min-height: 0;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

body.progetti-page .projects-sidebar,
body.progetti-page .projects-detail{
  scrollbar-gutter: stable;
}

/*************************************************************
  18) RESPONSIVE ≤ 980px
*************************************************************/
@media (max-width:980px){
  .about__row{
    grid-template-columns:1fr;
    text-align:center;
  }

  .about__row:nth-child(even) .about__figure,
  .about__row:nth-child(even) .about__text{
    order:initial;
  }

  .contacts{
    grid-template-columns:1fr;
    gap:1rem;
  }
}

/*************************************************************
  19) RESPONSIVE ≤ 720px
*************************************************************/
@media (max-width:720px){

  :root{
    --team-max: 560px;
    --team-card-w: clamp(230px, 70vw, 320px);
    --team-img-h: 300px;
    --partners-logo-h: 44px;
    --partners-gap: 32px;
    --partners-speed: 26s;
  }

  /**************** NAV MOBILE ****************/
  /******************************************************
 NAV MOBILE
******************************************************/

  .nav{
    position:fixed;
    top:0;
    bottom:auto;
    left:0;
    right:0;
  }

  .nav__divider{
    display:none;
  }

  .nav__toggle{
    display:block;
  }

  /* contenitore link */
  .nav__section--right{
    position:fixed;
    top:var(--nav-h);
    left:0;
    right:0;

    background:rgba(0,0,0,0.97);

    flex-direction:column;
    align-items:flex-start;

    padding:1rem 1.5rem;
    gap:.6rem;

    height:auto;
    max-height:calc(100vh - var(--nav-h));

    overflow-y:auto;

    opacity:0;
    transform:translateY(-10px);
    pointer-events:none;

    transition:opacity .25s ease, transform .25s ease;
  }

  /* menu aperto */
  .nav.nav--open .nav__section--right{
    opacity:1;
    transform:translateY(0);
    pointer-events:auto;
  }

  .nav__section--right a{
  width:100%;
  padding:.6rem 0;
  text-align:center;          /* centra il testo */
  justify-content:center;     /* centra se il link è flex */
}


  /**************** CAROUSEL MOBILE ****************/
  .carousel__track > li{
    min-width:100%;
    scroll-snap-align:center;
  }

  .carousel__btn.prev{ left:.25rem; }
  .carousel__btn.next{ right:.25rem; }

  /**************** MAPPA MOBILE ****************/
  .map-wrapper{
    margin-inline: calc(50% - 50vw);
    width:100vw;
    border-radius:0;
    box-shadow:none;
    aspect-ratio:16/11;
  }

  /**************** PROGETTI MOBILE ****************/
  .detail-gallery__slide img{
    height:42vh;
  }

  .project-modal__dialog{
    margin:2.5rem 1.25rem;
    max-width:none;
    width:auto;
    max-height:calc(100vh - 5rem);
    border-radius:18px;
  }

  body.progetti-page{
    height:auto;
    display:block;
    overflow:auto;
    padding-bottom:60px;
  }

  body.progetti-page #projects-app.section{
    padding-block:2rem;
    min-height:auto;
  }

  body.progetti-page .projects-layout{
    display:block;
    height:auto;
    overflow:visible;
    padding:1rem;
  }

  body.progetti-page .projects-sidebar{
    height:auto;
    overflow:visible;
  }

  body.progetti-page .projects-detail{
    display:none;
  }

  body.progetti-page .footer{
    position:fixed;
    bottom:0;
    left:0;
    right:0;
    z-index:1000;
    padding:.6rem 0;
    border-top:1px solid #ddd;
  }

  body.progetti-page .footer .container{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:1.2rem;
  }

  body.progetti-page .footer small{
    font-size:.8rem;
  }

  body.progetti-page .footer__nav a{
    font-size:.8rem;
  }

  /**************** WHATSAPP MOBILE ****************/
  .whatsapp-small{
    display:flex;
    align-items:center;
    justify-content:center;
    width:fit-content;
    margin:14px auto 0 auto;
  }

  /**************** HERO MOBILE ****************/



  .hero__overlay{
    align-items:flex-start;
    justify-content:flex-start;

    padding-top:calc(var(--nav-h) + 16px);
    padding-left:1rem;
  }

  .hero__logo{
    width:min(40vw,180px);
  }

  /******************************************************
 MOBILE — Chi siamo + Servizi
 immagine sempre sopra, testo sotto
******************************************************/

  .about__row{
    grid-template-columns:1fr;
    grid-template-rows:auto auto;
    gap:1rem;
  }

  /* forza l'ordine */
  .about__row .about__figure{
    order:1 !important;
  }

  .about__row .about__text{
    order:2 !important;
  }




}