/* Riqualificazione 360 - foglio di stile principale */

@font-face {
  font-family: "Alegreya";
  src: url("../fonts/alegreya-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Alegreya";
  src: url("../fonts/alegreya-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --rosso: #e01f26;
  --rosso-scuro: #b8151b;
  --azzurro: #c4ddf1;
  --testo: #1a1a1a;
  --grigio: #555;
  --bianco: #fff;
  --raggio: 18px;
  --max: 1100px;
  --header-h: 84px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Alegreya", Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.55;
  font-variant-numeric: lining-nums;
  color: var(--testo);
  background: var(--bianco);
}

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

a { color: var(--rosso); }

h1, h2, h3 { font-weight: 400; line-height: 1.2; margin: 0 0 .5em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--rosso); color: #fff;
  padding: 8px 14px; z-index: 1000;
}
.skip-link:focus { left: 10px; top: 10px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bianco);
  height: var(--header-h);
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
}
.site-header .container {
  max-width: none;
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
}
.logo-small img { width: 42px; height: auto; }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; }
.main-nav a {
  text-decoration: none; text-transform: uppercase; letter-spacing: .06em;
  color: var(--rosso); opacity: .75; font-size: 17px;
  transition: opacity .2s;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { opacity: 1; }
.main-nav a[aria-current="page"] { font-weight: 400; color: var(--rosso-scuro); }

.nav-toggle {
  display: none; background: none; border: 0; padding: 8px; cursor: pointer;
}
.nav-toggle span {
  display: block; width: 26px; height: 2px; background: var(--rosso); margin: 6px 0;
  transition: transform .25s, opacity .25s;
}

@media (max-width: 860px) {
  :root { --header-h: 68px; }
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    background: var(--bianco); border-top: 1px solid #eee;
    box-shadow: 0 10px 20px rgba(0,0,0,.08);
    display: none;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 10px 20px 20px; }
  .main-nav a { display: block; padding: 12px 0; font-size: 19px; border-bottom: 1px solid #f2f2f2; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

/* ---------- Sezioni ---------- */
.section { padding: 80px 0; }
.section--azzurro { background: var(--azzurro); }
.section-title {
  color: var(--rosso); text-align: center; font-size: clamp(30px, 4.5vw, 46px); margin-bottom: 30px;
}
.section-title--upper { text-transform: uppercase; }
.section-subtitle { text-align: center; font-size: clamp(24px, 3vw, 32px); margin-bottom: 24px; }
.lead { text-align: center; max-width: 900px; margin: 0 auto 40px; font-size: 17px; }

/* ---------- Hero (home) ---------- */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  display: flex; align-items: center; justify-content: center; text-align: center;
  color: #fff; overflow: hidden;
  background: #8fb0cf url("../img/hero.svg") center bottom / cover no-repeat;
}
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center bottom;
}
.hero::after { content: ""; position: absolute; inset: 0; background: rgba(120,150,185,.15); }
@media (prefers-reduced-motion: reduce) { .hero-video { display: none; } }
.hero-content { position: relative; z-index: 1; padding: 20px; }
.hero-logo { width: clamp(150px, 20vw, 220px); margin: 0 auto 24px; }
.hero h1 {
  font-size: clamp(32px, 5vw, 50px); text-shadow: 0 2px 10px rgba(0,0,0,.25);
}

/* ---------- Vantaggi ---------- */
.vantaggi-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.vantaggio-titolo {
  border: 2px solid var(--rosso); border-radius: var(--raggio);
  text-align: center; text-transform: uppercase; font-size: 16px;
  padding: 10px 12px; margin: 0 0 12px;
}
.vantaggio-testo {
  border: 2px solid var(--rosso); border-radius: var(--raggio);
  text-align: center; padding: 30px 16px; min-height: 175px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; margin: 0;
}
@media (max-width: 760px) { .vantaggi-grid { grid-template-columns: 1fr; } .vantaggio-testo { min-height: 0; } }

.btn {
  display: inline-block; text-decoration: none; color: var(--rosso);
  border: 2px solid var(--rosso); border-radius: 999px;
  padding: 12px 48px; font-size: 16px; background: transparent; cursor: pointer;
  font-family: inherit; transition: background .2s, color .2s;
}
.btn:hover, .btn:focus-visible { background: var(--rosso); color: #fff; }
.btn--pieno { background: var(--rosso); color: #fff; }
.btn--pieno:hover { background: var(--rosso-scuro); border-color: var(--rosso-scuro); }
.center { text-align: center; margin-top: 50px; }

/* ---------- Chi siamo ---------- */
.intro-text { max-width: 760px; margin: 0 auto; text-align: justify; }
.intro-text p { margin: 0 0 1.4em; }
.ritratto { max-width: 320px; margin: 40px auto 0; }

.timeline { max-width: 900px; margin: 0 auto; text-align: center; font-size: 16px; }
.timeline-item { margin-bottom: 22px; }
.timeline-item h3 { color: var(--rosso); font-size: 18px; margin: 0 0 4px; }
.timeline-item p { margin: 0; }

.valori { max-width: 900px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 28px 40px; }
.valore { display: flex; gap: 16px; align-items: flex-start; font-size: 16px; }
.valore-icona {
  flex: 0 0 72px; height: 72px; border-radius: 50%; background: #fdecec;
  display: flex; align-items: center; justify-content: center;
}
.valore-icona svg { width: 36px; height: 36px; stroke: var(--rosso); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.valore h3 { font-size: 17px; font-weight: 700; margin: 4px 0 2px; }
.valore p { margin: 0; text-align: justify; }
@media (max-width: 760px) { .valori { grid-template-columns: 1fr; } }

.fornitori-loghi { display: flex; justify-content: center; align-items: center; gap: 60px; flex-wrap: wrap; margin-top: 40px; }
.fornitori-loghi img { height: 60px; width: auto; }

/* ---------- Servizi ---------- */
.servizi-wrap { max-width: 460px; margin: 0 auto; }
.servizi-foto { border-radius: 4px; margin: 0 auto 30px; width: 100%; max-width: 460px; }
.servizio {
  display: grid; grid-template-columns: 50px 1fr 36px; gap: 4px 10px; align-items: start;
  background: #fff; border-radius: 12px; padding: 16px 18px; margin-bottom: 26px;
  text-decoration: none; color: var(--testo);
  transition: transform .2s, box-shadow .2s;
}
.servizio:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.08); }
.servizio-num { color: var(--rosso); font-size: 22px; }
.servizio h2 { color: var(--rosso); font-size: 26px; margin: 0; }
.servizio p { grid-column: 2; margin: 0; font-size: 15px; text-align: justify; }
.servizio-freccia {
  grid-column: 3; grid-row: 1; width: 30px; height: 30px; border-radius: 50%;
  border: 1.5px solid var(--rosso); color: var(--rosso);
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 30px; }
.progetto { margin: 0; background: #fff; }
.progetto img { width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; }
.progetto figcaption {
  background: var(--rosso); color: #fff; text-align: center; padding: 12px; font-size: 17px;
}
.claim { text-align: center; color: var(--rosso); font-size: clamp(24px, 3vw, 32px); margin: 60px 0 0; }

/* ---------- Contatti ---------- */
.contatti-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }
.contatti-titolo { color: var(--rosso); text-transform: uppercase; font-size: clamp(32px, 4.5vw, 46px); margin-bottom: 30px; }
.contatti-lista { margin: 0; font-size: 16px; }
.contatti-lista dt { color: var(--rosso); margin-top: 10px; }
.contatti-lista dd { margin: 0; }
.contatti-lista a { color: var(--testo); text-decoration: none; }
.contatti-lista a:hover { color: var(--rosso); text-decoration: underline; }

.mappa {
  border-radius: 22px; overflow: hidden; background: #e8eef3; aspect-ratio: 4 / 3;
  display: flex; align-items: center; justify-content: center; text-align: center;
  position: relative;
}
.mappa iframe { border: 0; width: 100%; height: 100%; position: absolute; inset: 0; }
.mappa-consenso { padding: 24px; font-size: 15px; max-width: 380px; }
.mappa-consenso p { margin: 0 0 14px; }

@media (max-width: 760px) { .contatti-grid { grid-template-columns: 1fr; } }

/* Form */
.form-box { background: #fff; border-radius: 22px; padding: 30px; max-width: 760px; margin: 0 auto; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.campo { display: flex; flex-direction: column; margin-bottom: 16px; min-width: 0; }
.campo input, .campo select { width: 100%; }
.campo label { font-size: 15px; color: var(--rosso); margin-bottom: 4px; }
.campo input, .campo select, .campo textarea {
  font-family: inherit; font-size: 17px; padding: 10px 12px; border: 1.5px solid #c9c9c9;
  border-radius: 10px; background: #fff; color: var(--testo);
}
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; border-color: var(--rosso); box-shadow: 0 0 0 3px rgba(224,31,38,.15); }
.campo textarea { min-height: 140px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; margin: 6px 0 20px; }
.check input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--rosso); }
.hp { position: absolute; left: -9999px; }
.esito { border-radius: 10px; padding: 14px 18px; margin-bottom: 20px; font-size: 16px; display: none; }
.esito--ok { background: #e6f5e9; color: #1b5e20; display: block; }
.esito--ko { background: #fdecec; color: #8e1116; display: block; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; gap: 0; } .form-box { padding: 22px 18px; } }

/* ---------- Pagine testuali (privacy) ---------- */
.testo-legale { max-width: 820px; margin: 0 auto; font-size: 17px; }
.testo-legale h1 { color: var(--rosso); font-size: clamp(30px, 4vw, 40px); }
.testo-legale h2 { color: var(--rosso); font-size: 24px; margin-top: 1.6em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--rosso); color: #fff; text-align: center; padding: 26px 0 18px; font-size: 15px; }
.partner-title { margin: 0 0 10px; font-size: 17px; }
.partner-loghi { display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; margin-bottom: 18px; }
.partner-loghi img { height: 50px; width: auto; background: #fff; border-radius: 4px; }
.footer-info { margin: 0; }
.footer-info a { color: #fff; text-decoration: none; }
.footer-info a:hover { text-decoration: underline; }
.footer-info .sep { opacity: .7; margin: 0 8px; }
.footer-legal { margin: 10px 0 0; font-size: 14px; opacity: .9; }
.footer-legal a { color: #fff; }
@media (max-width: 760px) {
  .footer-info .sep { display: none; }
  .footer-info span { display: block; }
}

/* WhatsApp flottante */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 90;
  width: 56px; height: 56px; border-radius: 50%; background: #25d366;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(0,0,0,.2);
}
.wa-float svg { width: 30px; height: 30px; fill: #fff; }
