/* ═══════════════ RESET & VARIABILI ═══════════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --brand: #53b6b2;
  --brand-2: #005f6a;
  --brand-dark: #007481;
  --brand-deep: #00545e;
  --brand-tint: #eaf5f4;
  --charcoal: #222c2e;
  --charcoal-2: #2b3739;
  --ink: #324245;
  --muted: #64777a;
  --bg: #fbfaf8;
  --line: #e3e9e8;
  --gold: #e2b04a;
  --shadow-sm: 0 2px 10px rgba(34, 44, 46, 0.07);
  --shadow-md: 0 10px 34px rgba(34, 44, 46, 0.12);
  --shadow-lg: 0 24px 64px rgba(34, 44, 46, 0.16);
  --radius: 20px;
  --font-head: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;
}

/* Fondo del documento come il piè di pagina: su Mac (Chrome/Safari) il "rimbalzo" oltre la fine
   della pagina mostrava una striscia chiara sotto il footer scuro. Il contenuto resta sul fondo del body. */
html { scroll-behavior: smooth; background: #1b2426; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--font-head); color: var(--charcoal); line-height: 1.12; }
h1 { font-size: clamp(2.6rem, 5.4vw, 4.3rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.7rem); font-weight: 800; letter-spacing: -0.015em; }
h3 { font-size: 1.15rem; font-weight: 700; }
a { text-decoration: none; color: inherit; }
img, svg { display: block; }
::selection { background: var(--brand-dark); color: #fff; }

.container { width: min(1180px, 92%); margin: 0 auto; }
.section { padding: 110px 0; }
.section-white { background: #fff; }
.section-tint { background: var(--brand-tint); }
.section-dark { background: var(--charcoal); }
.section-dark h2 { color: #fff; }
.section-dark .section-head p { color: #9fb3b1; }
.section-dark .eyebrow { color: var(--brand); }
.section-dark .eyebrow::before { background: var(--brand); }

:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

/* ═══════════════ BOTTONI ═══════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-head); font-weight: 700; font-size: 0.92rem;
  padding: 15px 30px; border-radius: 999px; border: none; cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-brand {
  background: var(--brand-dark); color: #fff;
  box-shadow: 0 10px 26px rgba(0, 116, 129, 0.35);
}
.btn-brand:hover { background: var(--brand-2); transform: translateY(-3px); box-shadow: 0 16px 34px rgba(0, 116, 129, 0.45); }
.btn-white { background: #fff; color: var(--brand-deep); box-shadow: var(--shadow-md); }
.btn-white:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.btn-outline-white { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.55); }
.btn-outline-white:hover { border-color: #fff; background: rgba(255,255,255,0.12); transform: translateY(-3px); }
.btn-sm { padding: 11px 24px; font-size: 0.85rem; }
.btn-lg { padding: 18px 36px; font-size: 1rem; }
.btn-full { width: 100%; }

/* ═══════════════ NAVBAR ═══════════════ */
.navbar {
  --nav-ink: #ffffff;
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 20px 0; transition: all 0.3s ease;
}
.navbar.scrolled {
  --nav-ink: var(--charcoal);
  box-shadow: var(--shadow-sm);
  padding: 12px 0;
}
/* Sfondo bianco "vetro" su uno strato a parte: un backdrop-filter sulla navbar
   stessa la renderebbe il riferimento dei figli position:fixed, e su iPhone il
   pannello del menu mobile si ridurrebbe all'altezza della navbar. */
.navbar::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  opacity: 0; transition: opacity 0.3s ease; pointer-events: none;
}
.navbar.scrolled::before { opacity: 1; }
/* Menu mobile aperto: la pagina sotto non scorre. */
html.menu-aperto body { overflow: hidden; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.logo { display: flex; align-items: center; gap: 13px; }
.logo-mark {
  width: 50px; height: 50px; border-radius: 14px; flex-shrink: 0;
  background: var(--brand); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 6px 18px rgba(0, 116, 129, 0.35);
}
.logo-mark img { width: 29px; height: auto; }
.logo-word { display: flex; flex-direction: column; line-height: 1.25; color: var(--nav-ink); transition: color 0.3s; }
.logo-word strong {
  font-family: var(--font-head); font-weight: 800; font-size: 0.82rem;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.logo-word span {
  font-family: var(--font-head); font-weight: 300; font-size: 0.94rem;
  text-transform: uppercase; letter-spacing: 0.16em;
}
.logo-light .logo-word { color: #fff; }

.nav-links { display: flex; gap: 30px; }
.nav-links a {
  font-family: var(--font-head);
  font-weight: 600; font-size: 0.88rem; color: var(--nav-ink);
  position: relative; transition: color 0.3s;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -6px;
  width: 0; height: 2.5px; background: var(--brand); border-radius: 2px;
  transition: width 0.25s ease;
}
.nav-links a:hover::after { width: 100%; }

.nav-actions { display: flex; align-items: center; gap: 18px; }
.nav-phone {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-head);
  font-weight: 700; font-size: 0.88rem; color: var(--nav-ink);
  transition: color 0.3s;
}
.nav-phone svg { width: 16px; height: 16px; color: var(--brand); }

.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.hamburger span { width: 25px; height: 2.5px; background: var(--nav-ink); border-radius: 2px; transition: all 0.3s; }
.hamburger.open span { background: var(--charcoal); }
.hamburger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ═══════════════ HERO ═══════════════ */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex; align-items: center;
  padding: 170px 0 160px;
  background:
    linear-gradient(100deg, rgba(20, 28, 29, 0.88) 8%, rgba(20, 30, 31, 0.6) 48%, rgba(0, 116, 129, 0.42) 100%),
    var(--charcoal) var(--hero-img, none) center/cover no-repeat;
}
.hero-content { max-width: 640px; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 10px 20px; border-radius: 999px;
  font-family: var(--font-head);
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.04em;
  color: #fff; margin-bottom: 30px;
}
.pulse-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--brand);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(83, 182, 178, 0.6); }
  50% { box-shadow: 0 0 0 8px rgba(83, 182, 178, 0); }
}

.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; color: var(--brand); }

.hero-sub {
  font-size: 1.12rem; color: rgba(255, 255, 255, 0.82);
  margin: 26px 0 38px; max-width: 540px;
}

.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 38px; }

.hero-trust { display: flex; align-items: center; gap: 14px; font-size: 0.92rem; color: rgba(255, 255, 255, 0.75); }
.stars { color: var(--gold); letter-spacing: 3px; font-size: 1rem; }
.hero-trust strong { color: #fff; }

/* ═══════════════ STATS ═══════════════ */
.stats-wrap { position: relative; z-index: 5; margin-top: -84px; }
.stats-bar {
  background: #fff;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 40px 20px;
}
.stat { text-align: center; padding: 0 12px; }
.stat:not(:last-child) { border-right: 1px solid var(--line); }
.stat-num, .stat-suffix {
  font-family: var(--font-head); font-weight: 800;
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  color: var(--brand-dark);
}
.stat-label {
  display: block; font-family: var(--font-head);
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted); margin-top: 6px;
}

/* ═══════════════ MARQUEE ═══════════════ */
.marquee {
  margin-top: 80px;
  background: var(--brand-dark);
  color: #fff;
  overflow: hidden;
  padding: 15px 0;
}
.marquee-track { display: flex; width: max-content; animation: marquee 30s linear infinite; }
.marquee-group { display: flex; align-items: center; white-space: nowrap; }
.marquee-group span {
  font-family: var(--font-head); font-weight: 700; font-size: 0.85rem;
  text-transform: uppercase; letter-spacing: 0.16em;
  margin-right: 46px;
}
.marquee-group i { font-style: normal; opacity: 0.55; margin-right: 46px; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* ═══════════════ SEZIONI GENERICHE ═══════════════ */
.section-head { text-align: center; max-width: 660px; margin: 0 auto 66px; }
.section-head p { color: var(--muted); font-size: 1.05rem; margin-top: 18px; }
.section-head .eyebrow { justify-content: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--font-head); font-weight: 700; font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.22em;
  color: var(--brand-dark);
  margin-bottom: 20px;
}
.eyebrow::before {
  content: ''; width: 36px; height: 2px; background: var(--brand); border-radius: 2px;
}

/* ═══════════════ SERVIZI ═══════════════ */
.services-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px;
}
.service-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 38px 32px;
  overflow: hidden;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}
.service-card::before {
  content: attr(data-num);
  position: absolute; top: 18px; right: 26px;
  font-family: var(--font-head); font-weight: 800; font-size: 3rem;
  color: var(--brand); opacity: 0.13;
  line-height: 1;
}
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand);
}
.service-card.featured {
  background: linear-gradient(160deg, var(--charcoal) 0%, #00545e 100%);
  border-color: transparent;
}
.service-card.featured::before { color: #fff; opacity: 0.1; }
.service-card.featured h3 { color: #fff; }
.service-card.featured p { color: #aec4c2; }
.service-card.featured .service-icon { background: rgba(83, 182, 178, 0.16); color: var(--brand); }
.service-card.featured .service-link { color: var(--brand); }
.featured-tag {
  position: absolute; top: 24px; right: 24px;
  background: var(--brand-dark); color: #fff;
  font-family: var(--font-head);
  font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  padding: 6px 13px; border-radius: 999px;
}
.service-card.featured::before { content: none; }
.service-icon {
  width: 62px; height: 62px; border-radius: 17px;
  background: var(--brand-tint); color: var(--brand-dark);
  display: grid; place-items: center;
  margin-bottom: 24px;
  transition: transform 0.28s ease;
}
.service-icon svg { width: 30px; height: 30px; }
.service-card:hover .service-icon { transform: scale(1.08) rotate(-4deg); }
.service-card h3 { margin-bottom: 10px; }
.service-card p { color: var(--muted); font-size: 0.94rem; margin-bottom: 20px; }
.service-link {
  font-family: var(--font-head); font-weight: 700; font-size: 0.88rem;
  color: var(--brand-dark);
}
.service-link:hover { text-decoration: underline; }

/* ═══════════════ CHI SIAMO ═══════════════ */
.about-grid {
  display: grid; grid-template-columns: 0.92fr 1.08fr;
  gap: 76px; align-items: center;
}
.about-frame { position: relative; }
.about-frame::before {
  content: '';
  position: absolute; inset: 0;
  border: 2px solid var(--brand);
  border-radius: 28px;
  transform: translate(20px, 20px);
}
.about-img {
  position: relative;
  border-radius: 28px; overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 5/6;
  background: linear-gradient(140deg, var(--brand) 0%, var(--brand-deep) 100%);
}
.about-img img { width: 100%; height: 100%; object-fit: cover; }
.experience-badge {
  position: absolute; bottom: -26px; right: -14px;
  background: var(--charcoal); color: #fff;
  border-radius: 20px; padding: 22px 28px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow-lg);
  z-index: 2;
}
.experience-badge strong { font-family: var(--font-head); font-size: 2.2rem; font-weight: 800; color: var(--brand); }
.experience-badge span {
  font-family: var(--font-head);
  font-size: 0.72rem; font-weight: 600; line-height: 1.4;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: #c3d2d0;
}

.about-content h2 { margin-bottom: 22px; }
.about-content > p { color: var(--muted); font-size: 1.03rem; margin-bottom: 32px; }

.check-list { list-style: none; display: grid; gap: 22px; margin-bottom: 38px; }
.check-list li { display: flex; gap: 16px; align-items: flex-start; }
.check {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: var(--brand); color: #fff;
  display: grid; place-items: center;
  font-weight: 800; font-size: 0.82rem;
  margin-top: 2px;
}
.check-list strong { display: block; font-family: var(--font-head); font-weight: 700; color: var(--charcoal); }
.check-list span:not(.check) { color: var(--muted); font-size: 0.92rem; }

/* ═══════════════ TEAM ═══════════════ */
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.team-card { text-align: center; }
.team-photo {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
  background: linear-gradient(140deg, var(--brand) 0%, var(--brand-deep) 100%);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.team-photo::before {
  content: attr(data-initials);
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 800; font-size: 3rem;
  color: rgba(255, 255, 255, 0.9);
}
.team-photo img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.team-card:hover .team-photo { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.team-card:hover .team-photo img { transform: scale(1.05); }
.team-card h3 { font-size: 1.08rem; margin-bottom: 8px; }
.team-role {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--brand-dark);
  background: var(--brand-tint);
  padding: 6px 14px; border-radius: 999px;
}

/* ═══════════════ CTA BANNER ═══════════════ */
.cta-banner {
  position: relative;
  background: linear-gradient(115deg, var(--brand-deep) 0%, var(--brand-dark) 90%);
  padding: 76px 0;
  overflow: hidden;
}
.cta-watermark {
  position: absolute; top: 50%; right: -90px;
  transform: translateY(-50%);
  height: 128%; width: auto;
  color: #fff; opacity: 0.08;
  pointer-events: none;
}
.cta-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 36px; flex-wrap: wrap;
  position: relative;
}
.cta-inner h2 { color: #fff; margin-bottom: 10px; }
.cta-inner p { color: rgba(255, 255, 255, 0.85); font-size: 1.05rem; }
.cta-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ═══════════════ RECENSIONI ═══════════════ */
.reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.review-card {
  background: var(--charcoal-2);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius); padding: 36px 32px;
  transition: transform 0.28s ease, border-color 0.28s ease;
}
.review-card:hover { transform: translateY(-6px); border-color: rgba(83, 182, 178, 0.5); }
.review-card .stars { margin-bottom: 20px; }
.review-card blockquote {
  font-size: 0.97rem; color: #cfdad9;
  margin-bottom: 26px; line-height: 1.75;
}
.review-card figcaption { display: flex; align-items: center; gap: 14px; }
.review-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(140deg, var(--brand) 0%, var(--brand-deep) 100%);
  color: #fff; font-weight: 700; font-size: 0.92rem; font-family: var(--font-head);
  display: grid; place-items: center;
}
.review-card figcaption strong { display: block; font-family: var(--font-head); font-size: 0.94rem; color: #fff; }
.review-card figcaption span { font-size: 0.8rem; color: #8fa3a1; }

/* ═══════════════ CONTATTI ═══════════════ */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1.05fr;
  gap: 70px; align-items: start;
}
.contact-info h2 { margin-bottom: 18px; }
.contact-info > p { color: var(--muted); font-size: 1.03rem; margin-bottom: 36px; }

.info-cards { display: grid; gap: 18px; }
.info-card {
  display: flex; gap: 18px; align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px; padding: 22px 24px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.info-card:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.info-icon {
  width: 48px; height: 48px; border-radius: 14px; flex-shrink: 0;
  background: var(--brand); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 6px 16px rgba(0, 116, 129, 0.3);
}
.info-icon svg { width: 22px; height: 22px; }
.info-card strong { display: block; font-family: var(--font-head); font-weight: 700; color: var(--charcoal); margin-bottom: 3px; }
.info-card span { font-size: 0.9rem; color: var(--muted); }

.contact-form {
  background: #fff;
  border-radius: 26px;
  padding: 44px 40px;
  box-shadow: var(--shadow-lg);
}
.contact-form h3 { font-size: 1.35rem; margin-bottom: 28px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { margin-bottom: 18px; }
.form-field label {
  display: block;
  font-family: var(--font-head); font-weight: 600; font-size: 0.84rem;
  color: var(--charcoal); margin-bottom: 8px;
}
.form-field input, .form-field select, .form-field textarea {
  width: 100%;
  font-family: var(--font-body); font-size: 0.95rem; color: var(--ink);
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: 13px;
  padding: 13px 16px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  appearance: none;
}
.form-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364777a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--brand); background: #fff;
  box-shadow: 0 0 0 4px rgba(83, 182, 178, 0.18);
}
.form-field textarea { resize: vertical; min-height: 80px; }

.privacy-check {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 0.85rem; color: var(--muted);
  margin: 4px 0 22px; cursor: pointer;
}
.privacy-check input { margin-top: 3px; accent-color: var(--brand-dark); width: 16px; height: 16px; }
.privacy-check a { color: var(--brand-dark); text-decoration: underline; }
.form-note { text-align: center; font-size: 0.83rem; color: var(--muted); margin-top: 16px; }

/* ═══════════════ FOOTER ═══════════════ */
.footer {
  background: #1b2426;
  color: #92a5a3;
  padding: 70px 0 0;
}
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 44px; padding-bottom: 50px;
}
.footer-brand p { font-size: 0.92rem; margin-top: 20px; max-width: 280px; }
.footer-col h4, .footer-col h2 {
  color: #fff; font-size: 0.82rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  margin-bottom: 20px;
}
.footer-col a, .footer-col span {
  display: block; font-size: 0.9rem; color: #92a5a3;
  margin-bottom: 12px; transition: color 0.2s;
}
.footer-col a:hover { color: var(--brand); }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 24px 0; font-size: 0.8rem;
}

/* ═══════════════ TOAST ═══════════════ */
.toast {
  position: fixed; bottom: 30px; left: 50%;
  transform: translate(-50%, 120px);
  background: var(--charcoal); color: #fff;
  font-family: var(--font-head); font-weight: 600; font-size: 0.95rem;
  padding: 16px 30px; border-radius: 999px;
  box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  z-index: 200;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ═══════════════ ANIMAZIONI REVEAL ═══════════════ */
.reveal {
  opacity: 0; transform: translateY(34px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.12s; }
.delay-2 { transition-delay: 0.24s; }
.delay-3 { transition-delay: 0.36s; }

/* ═══════════════ RESPONSIVE ═══════════════ */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 60px; }
  .about-visual { max-width: 440px; margin: 0 auto; }
  .reviews-grid { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-phone span { display: none; }
}

@media (max-width: 720px) {
  .section { padding: 80px 0; }
  .hero { padding: 150px 0 140px; min-height: auto; }
  .nav-links {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: min(320px, 82vw);
    background: #fff;
    flex-direction: column; gap: 8px;
    padding: 110px 36px 36px;
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    transition: transform 0.35s ease;
    z-index: 99;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { font-size: 1.1rem; padding: 12px 0; color: var(--charcoal); }
  .hamburger { display: flex; z-index: 100; }
  .nav-phone { display: none; }
  .logo-word strong { font-size: 0.7rem; }
  .logo-word span { font-size: 0.8rem; }
  .services-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; max-width: 340px; margin: 0 auto; }
  .stats-wrap { margin-top: -64px; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); gap: 28px 0; padding: 32px 12px; }
  .stat:nth-child(2) { border-right: none; }
  .marquee { margin-top: 64px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .contact-form { padding: 34px 26px; }
  .about-frame::before { transform: translate(12px, 12px); }
  .experience-badge { right: 0; padding: 18px 22px; }
  .footer-grid { grid-template-columns: 1fr; gap: 34px; }
  .footer-bottom { justify-content: center; text-align: center; }
  .cta-inner { justify-content: center; text-align: center; }
}

/* ═══════════════ PAGE HERO (pagine interne) ═══════════════ */
.page-hero {
  position: relative;
  background: linear-gradient(115deg, var(--charcoal) 0%, #00545e 72%, var(--brand-dark) 100%);
  padding: 185px 0 90px;
  overflow: hidden;
}
.page-hero--overlap { padding-bottom: 160px; }
.page-hero .container { position: relative; z-index: 1; }
.page-hero .eyebrow { color: var(--brand); }
.page-hero .eyebrow::before { background: var(--brand); }
.page-hero h1 { color: #fff; font-size: clamp(2.3rem, 4.6vw, 3.5rem); }
.page-hero p { color: rgba(255, 255, 255, 0.8); font-size: 1.08rem; max-width: 580px; margin-top: 18px; }
.page-hero .hero-trust { margin-top: 24px; }

.breadcrumb {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 28px;
}
.breadcrumb a { transition: color 0.2s; }
.breadcrumb a:hover { color: #fff; }
.breadcrumb .current { color: var(--brand); }

.nav-links a.active { color: var(--brand); }
.nav-links a.active::after { width: 100%; }
.navbar.scrolled .nav-links a.active { color: var(--brand-dark); }

/* ═══════════════ STEPS (pagina servizi) ═══════════════ */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.step-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 38px 30px;
  text-align: center;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}
.step-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--brand); }
.step-num {
  width: 56px; height: 56px; margin: 0 auto 22px;
  border-radius: 50%;
  background: var(--brand-dark); color: #fff;
  font-family: var(--font-head); font-weight: 800; font-size: 1.25rem;
  display: grid; place-items: center;
  box-shadow: 0 8px 20px rgba(0, 116, 129, 0.3);
}
.step-card h3 { margin-bottom: 10px; }
.step-card p { color: var(--muted); font-size: 0.93rem; }

/* ═══════════════ MAPPA (pagina contatti) ═══════════════ */
.map-embed {
  margin-top: 70px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}
.map-embed iframe { display: block; width: 100%; height: 420px; border: 0; }

@media (max-width: 1024px) {
  .steps-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
}
@media (max-width: 720px) {
  .page-hero { padding: 150px 0 70px; }
  .page-hero--overlap { padding-bottom: 135px; }
  .nav-links a.active { color: var(--brand-dark); }
  .map-embed iframe { height: 320px; }
}

/* ═══════════════ COOKIE BANNER ═══════════════ */
.cookie-banner {
  position: fixed; left: 20px; right: 20px; bottom: 20px; z-index: 300;
  max-width: 760px; margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  padding: 22px 26px;
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  transform: translateY(140%); opacity: 0; pointer-events: none;
  transition: transform 0.45s cubic-bezier(0.34, 1.2, 0.64, 1), opacity 0.3s ease;
}
.cookie-banner.show { transform: translateY(0); opacity: 1; pointer-events: auto; }
.cookie-text { flex: 1 1 320px; font-size: 0.88rem; color: var(--muted); line-height: 1.55; }
.cookie-text strong {
  display: block; font-family: var(--font-head); font-size: 0.95rem;
  color: var(--charcoal); margin-bottom: 5px;
}
.cookie-text a { color: var(--brand-dark); text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; }
.btn-ghost { background: transparent; border: 1.5px solid var(--line); color: var(--charcoal); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-dark); transform: translateY(-2px); }

.map-placeholder {
  display: grid; place-items: center; gap: 16px;
  text-align: center;
  padding: 70px 26px;
  background: #fff;
}
.map-placeholder p { color: var(--muted); font-size: 0.93rem; max-width: 420px; }

.footer-bottom a { transition: color 0.2s; }
.footer-bottom a:hover { color: var(--brand); }

/* ═══════════════ PAGINE LEGALI ═══════════════ */
.legal-content { max-width: 800px; margin: 0 auto; }
.legal-content h2 { font-size: 1.45rem; margin: 46px 0 14px; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 { font-size: 1.05rem; margin: 26px 0 10px; }
.legal-content p, .legal-content li { color: var(--muted); font-size: 0.97rem; }
.legal-content p { margin-bottom: 14px; }
.legal-content ul { padding-left: 22px; margin-bottom: 14px; }
.legal-content li { margin-bottom: 8px; }
.legal-content a { color: var(--brand-dark); text-decoration: underline; }
.legal-content table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 0.9rem; }
.legal-content th, .legal-content td {
  text-align: left; padding: 12px 14px;
  border: 1px solid var(--line);
  color: var(--muted); vertical-align: top;
}
.legal-content th {
  background: var(--brand-tint); color: var(--charcoal);
  font-family: var(--font-head); font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.legal-updated { font-size: 0.85rem; font-style: italic; margin-top: 44px; }

@media (max-width: 720px) {
  .cookie-banner { left: 12px; right: 12px; bottom: 12px; padding: 20px; }
  .cookie-actions { width: 100%; }
  .cookie-actions .btn { flex: 1; }
  .legal-content table { display: block; overflow-x: auto; }
}

/* ─── WordPress: la barra di amministrazione sta sopra la navbar fissa ─── */
body.admin-bar .navbar { top: 32px; }
@media (max-width: 782px) { body.admin-bar .navbar { top: 46px; } }
.toast.toast-errore { background: #b91c1c; }

/* ─── Telefoni stretti: logo + "Prenota visita" spingevano l'hamburger fuori schermo ─── */
@media (max-width: 480px) {
  .nav-actions .btn-sm { display: none; }
}

/* Titoli solo per lettori di schermo e motori di ricerca (gerarchia h1 > h2 > h3). */
.dtsq-sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ─── Pulsante WhatsApp in basso a sinistra (templates/parti/whatsapp.php) ─── */
.wa-widget { position: fixed; left: 20px; bottom: 20px; z-index: 250; font-family: var(--font-body, inherit); }
.wa-widget--su { bottom: 84px; } /* sopra la barra "Modifica pagina" di chi e' collegato */
.wa-bottone {
  width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; color: #fff; background: #25d366;
  box-shadow: 0 10px 26px rgba(37, 211, 102, 0.45), 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
  animation: wa-pulsa 2.6s ease-out 1.5s 2;
}
.wa-bottone:hover { transform: scale(1.06); }
.wa-bottone svg { width: 32px; height: 32px; }
@keyframes wa-pulsa {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55), 0 10px 26px rgba(37, 211, 102, 0.45); }
  100% { box-shadow: 0 0 0 18px rgba(37, 211, 102, 0), 0 10px 26px rgba(37, 211, 102, 0.45); }
}
.wa-card {
  position: absolute; left: 0; bottom: 72px; width: min(320px, calc(100vw - 40px));
  background: #fff; border-radius: 18px; overflow: hidden;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.25);
  transform-origin: bottom left; animation: wa-apri 0.18s ease-out;
}
.wa-card[hidden] { display: none; }
@keyframes wa-apri { from { opacity: 0; transform: translateY(8px) scale(0.97); } to { opacity: 1; transform: none; } }
.wa-card-testa { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; background: #075e54; color: #fff; }
.wa-avatar { position: relative; width: 38px; height: 38px; border-radius: 50%; background: #25d366; display: grid; place-items: center; flex-shrink: 0; }
.wa-avatar img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.wa-avatar svg { width: 22px; height: 22px; }
.wa-online { position: absolute; right: 0; bottom: 0; width: 10px; height: 10px; border-radius: 50%; background: #25d366; border: 2px solid #075e54; }
.wa-testa-testi { min-width: 0; }
.wa-testa-testi strong { display: block; font-size: 0.92rem; line-height: 1.2; }
.wa-testa-testi span { display: block; font-size: 0.74rem; opacity: 0.8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-chiudi { margin-left: auto; background: none; border: 0; color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; opacity: 0.85; padding: 4px 6px; }
.wa-log { background: #efeae2; padding: 14px 12px 6px; display: flex; flex-direction: column; gap: 6px; max-height: min(52vh, 360px); overflow-y: auto; }
.wa-msg { max-width: 85%; padding: 8px 11px; border-radius: 12px; font-size: 0.88rem; line-height: 1.4; color: #111b21; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08); animation: wa-entra 0.2s ease-out; white-space: pre-line; }
.wa-msg--bot { align-self: flex-start; background: #fff; border-top-left-radius: 3px; }
.wa-msg--io { align-self: flex-end; background: #d9fdd3; border-top-right-radius: 3px; }
.wa-msg a { color: #027eb5; }
.wa-sede { margin-top: 6px; padding-top: 6px; border-top: 1px solid #eef0f1; }
.wa-sede:first-of-type { margin-top: 4px; padding-top: 0; border-top: 0; }
.wa-sede strong { display: block; }
.wa-scrive { align-self: flex-start; background: #fff; border-radius: 12px; border-top-left-radius: 3px; padding: 10px 12px; display: flex; gap: 4px; }
.wa-scrive i { width: 6px; height: 6px; border-radius: 50%; background: #8696a0; animation: wa-punti 1s infinite ease-in-out; }
.wa-scrive i:nth-child(2) { animation-delay: 0.15s; }
.wa-scrive i:nth-child(3) { animation-delay: 0.3s; }
@keyframes wa-punti { 0%, 80%, 100% { opacity: 0.3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@keyframes wa-entra { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.wa-azioni { background: #efeae2; padding: 6px 12px 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.wa-azioni:empty { display: none; }
.wa-scelta { border: 1px solid #25d366; background: #fff; color: #075e54; border-radius: 999px; padding: 7px 12px; font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.wa-scelta:hover { background: #e7f8ee; }
.wa-scelta--piccola { border-color: #c9d1d5; color: #54656f; font-weight: 500; }
.wa-apri { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; background: #25d366; color: #fff; border-radius: 12px; padding: 10px 14px; font-weight: 600; font-size: 0.92rem; text-decoration: none; }
.wa-apri:hover { background: #1fb958; color: #fff; }
.wa-apri svg { width: 20px; height: 20px; flex-shrink: 0; }
.wa-chiama { display: flex; align-items: center; justify-content: center; width: 100%; background: #fff; color: #075e54; border: 1px solid #075e54; border-radius: 12px; padding: 9px 14px; font-weight: 600; font-size: 0.9rem; text-decoration: none; }
@media (max-width: 720px) {
  .wa-widget { left: 14px; bottom: 14px; }
  .wa-widget--su { bottom: 78px; }
  .wa-bottone { width: 54px; height: 54px; }
}
/* Con il menu mobile aperto il pulsante non deve coprire le voci. */
html.menu-aperto .wa-widget { display: none; }

/* ═══════════════ PAGINA NON TROVATA (404) ═══════════════ */
.dtsq-404-hero { padding-bottom: 110px; }
.dtsq-404-hero h1 { margin-top: 6px; }
.dtsq-404-azioni { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.dtsq-404-scorciatoie .section-head { margin-bottom: 36px; }
.dtsq-404-link { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.dtsq-404-link .btn svg { width: 16px; height: 16px; }
@media (max-width: 720px) {
  .dtsq-404-hero { padding-bottom: 80px; }
  .dtsq-404-azioni .btn { width: 100%; }
}
