/* ===========================
   Sistemi Accesso Remoto — Custom CSS
   Stile: Industriale | Blu acciaio, nero, bianco
   Font: Rajdhani + Roboto
=========================== */

@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=Roboto:wght@300;400;500;700&display=swap');

:root {
  --primary-color: #1a3a5c;
  --secondary-color: #1c1c1e;
  --accent-color: #4a8fc1;
  --accent-bright: #5ba3d9;
  --primary-dark: #0d1f30;
  --steel-blue: #2c5282;
  --text-dark: #333333;
  --text-light: #ffffff;
  --text-muted: #6c757d;
  --bg-light: #f0f4f8;
  --bg-dark: #1c1c1e;
  --border-steel: rgba(74, 143, 193, 0.25);
  --font-heading: 'Rajdhani', sans-serif;
  --font-body: 'Roboto', sans-serif;
}

/* ---- Reset & Base ---- */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
  font-family: var(--font-body);
  color: var(--text-dark);
  background-color: #f0f4f8;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f0f4f8; }
::-webkit-scrollbar-thumb { background: var(--accent-color); border-radius: 3px; }

/* =====================
   NAVBAR
===================== */
#mainNav {
  background: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.3s ease;
  padding-top: 1.2rem;
  padding-bottom: 1.2rem;
}

#mainNav .navbar-brand {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-light) !important;
  text-transform: uppercase;
}

#mainNav .navbar-brand span {
  color: var(--accent-bright);
}

#mainNav .nav-link {
  color: rgba(255,255,255,0.85) !important;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4rem 1rem !important;
  transition: color 0.2s;
  position: relative;
}

#mainNav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background: var(--accent-bright);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

#mainNav .nav-link:hover::after,
#mainNav .nav-link.active::after {
  transform: scaleX(1);
}

#mainNav .nav-link:hover,
#mainNav .nav-link.active {
  color: var(--text-light) !important;
}

#mainNav .navbar-toggler {
  border-color: rgba(255,255,255,0.4);
}

#mainNav .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.85)' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

#mainNav.scrolled {
  background: var(--primary-dark) !important;
  box-shadow: 0 2px 20px rgba(0,0,0,0.4);
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}

/* =====================
   HERO — Split-screen diagonal
===================== */
#hero {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--steel-blue) 50%, var(--primary-color) 100%);
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 60px,
      rgba(255,255,255,0.02) 60px,
      rgba(255,255,255,0.02) 61px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 60px,
      rgba(255,255,255,0.02) 60px,
      rgba(255,255,255,0.02) 61px
    );
}

#hero::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 80px;
  background: #f0f4f8;
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
}

.hero-badge {
  display: inline-block;
  background: rgba(74,143,193,0.2);
  border: 1px solid var(--accent-color);
  color: var(--accent-bright);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  border-radius: 2px;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--text-light);
  line-height: 1.1;
  margin-bottom: 1.2rem;
}

.hero-title .highlight {
  color: var(--accent-bright);
  display: block;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.75);
  font-weight: 300;
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 520px;
}

.hero-tech-badges {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.tech-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-light);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
}

.tech-badge i {
  color: var(--accent-bright);
}

.hero-visual {
  position: relative;
}

.hero-device-card {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(74,143,193,0.3);
  border-radius: 12px;
  padding: 2rem;
  backdrop-filter: blur(10px);
}

.hero-device-card .device-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--accent-color), var(--accent-bright));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.hero-device-card .device-icon i {
  font-size: 2.2rem;
  color: white;
}

.hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

.hero-stat {
  text-align: center;
  padding: 0.8rem;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
}

.hero-stat .stat-value {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent-bright);
  line-height: 1;
}

.hero-stat .stat-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.6);
  margin-top: 0.3rem;
}

/* =====================
   SECTION COMMONS
===================== */
section {
  padding: 5rem 0;
}

.section-tag {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent-color);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.section-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.section-divider .line {
  flex: 0 0 50px;
  height: 3px;
  background: var(--accent-color);
}

.section-divider .dot {
  width: 8px;
  height: 8px;
  background: var(--accent-color);
  border-radius: 50%;
}

.section-lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.8;
}

/* =====================
   CHI SIAMO
===================== */
#chi-siamo {
  background: #f0f4f8;
}

.chi-siamo-content {
  padding: 2rem 0;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.6rem 0;
  font-size: 1rem;
  color: var(--text-dark);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.feature-list li:last-child {
  border-bottom: none;
}

.feature-list li i {
  color: var(--accent-color);
  margin-top: 0.2rem;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.tech-panel {
  background: var(--primary-dark);
  border-radius: 16px;
  padding: 2.5rem;
  color: white;
  position: relative;
  overflow: hidden;
}

.tech-panel::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(74,143,193,0.2) 0%, transparent 70%);
}

.tech-panel-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--accent-bright);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tech-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.tech-item:last-child { border-bottom: none; }

.tech-icon {
  width: 50px;
  height: 50px;
  background: rgba(74,143,193,0.15);
  border: 1px solid rgba(74,143,193,0.3);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tech-icon i {
  font-size: 1.3rem;
  color: var(--accent-bright);
}

.tech-info h6 {
  color: white;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.tech-info p {
  color: rgba(255,255,255,0.55);
  font-size: 0.85rem;
  margin: 0;
}

/* =====================
   SERVIZI
===================== */
#servizi {
  background: white;
}

.service-card {
  background: #fff;
  border: 1px solid rgba(26,58,92,0.1);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(26,58,92,0.15);
  border-color: var(--accent-color);
}

.service-card .service-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.service-card .service-icon i {
  font-size: 1.6rem;
  color: white;
}

.service-card h4 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--primary-color);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 0;
}

/* =====================
   COME FUNZIONA
===================== */
#come-funziona {
  background: var(--bg-light);
}

.step-item {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  align-items: flex-start;
}

.step-number {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  position: relative;
}

.step-number::after {
  content: '';
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 30px;
  background: linear-gradient(to bottom, var(--primary-color), transparent);
}

.step-item:last-child .step-number::after {
  display: none;
}

.step-content h5 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
}

.step-content p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 0;
}

.dual-tech-box {
  background: var(--primary-dark);
  border-radius: 16px;
  padding: 2.5rem;
  color: white;
  text-align: center;
}

.dual-tech-box .dual-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--accent-bright);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
}

.dual-tech-vs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.dual-tech-pill {
  flex: 1;
  padding: 1.2rem;
  background: rgba(74,143,193,0.15);
  border: 1px solid rgba(74,143,193,0.35);
  border-radius: 10px;
}

.dual-tech-pill i {
  font-size: 2rem;
  color: var(--accent-bright);
  display: block;
  margin-bottom: 0.5rem;
}

.dual-tech-pill span {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
}

.dual-tech-plus {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--accent-bright);
  font-weight: 700;
}

.dual-tech-desc {
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
}

/* =====================
   CONTATTI / FORM
===================== */
#contatti {
  background: white;
}

.contact-form-wrapper {
  background: #fff;
  border: 1px solid rgba(26,58,92,0.12);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 10px 40px rgba(26,58,92,0.08);
}

.contact-form-wrapper h3 {
  font-family: var(--font-heading);
  color: var(--primary-color);
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.contact-form-wrapper .form-lead {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.8rem;
}

.form-label {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--primary-color);
  margin-bottom: 0.35rem;
}

.form-control, .form-select {
  border: 1.5px solid #d1dbe8;
  border-radius: 8px;
  padding: 0.65rem 1rem;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  color: var(--text-dark);
}

.form-control:focus, .form-select:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(74,143,193,0.15);
  outline: none;
}

.btn-submit {
  background: linear-gradient(135deg, var(--primary-color), var(--steel-blue));
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.85rem 2.5rem;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  width: 100%;
  transition: opacity 0.2s, transform 0.2s;
  cursor: pointer;
}

.btn-submit:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.contact-info-box {
  background: var(--primary-dark);
  border-radius: 16px;
  padding: 2.5rem;
  color: white;
  height: 100%;
}

.contact-info-box h4 {
  font-family: var(--font-heading);
  color: var(--accent-bright);
  text-transform: uppercase;
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.contact-item:last-child { border-bottom: none; }

.contact-item .ci-icon {
  width: 42px;
  height: 42px;
  background: rgba(74,143,193,0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-item .ci-icon i {
  color: var(--accent-bright);
  font-size: 1.1rem;
}

.contact-item .ci-text strong {
  display: block;
  color: rgba(255,255,255,0.55);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.2rem;
}

.contact-item .ci-text span,
.contact-item .ci-text a {
  color: white;
  font-size: 0.95rem;
  text-decoration: none;
}

.contact-item .ci-text a:hover {
  color: var(--accent-bright);
}

.map-wrapper {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(26,58,92,0.12);
  margin-top: 1.5rem;
}

.map-wrapper iframe {
  display: block;
  width: 100%;
}

/* =====================
   FORM FEEDBACK
===================== */
#form-success, #form-error {
  display: none;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-top: 1rem;
  font-size: 0.95rem;
}

#form-success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

#form-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

/* =====================
   FOOTER
===================== */
footer {
  background: var(--secondary-color);
  color: rgba(255,255,255,0.75);
  padding-top: 4rem;
}

.footer-brand {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.footer-brand span { color: var(--accent-bright); }

.footer-tagline {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.45);
  margin-bottom: 1.5rem;
}

.footer-col-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-bright);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1.2rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(74,143,193,0.25);
}

footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

footer ul li {
  margin-bottom: 0.5rem;
}

footer ul li a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

footer ul li a:hover {
  color: var(--accent-bright);
}

footer ul li a i {
  width: 16px;
  margin-right: 6px;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
  font-size: 0.9rem;
}

.footer-contact-item i {
  color: var(--accent-bright);
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.footer-contact-item a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
}

.footer-contact-item a:hover {
  color: var(--accent-bright);
}

.footer-divider {
  border-color: rgba(255,255,255,0.08);
  margin: 2rem 0 1.5rem;
}

.footer-bottom {
  padding-bottom: 1.5rem;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
}

.footer-legal-links a {
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  font-size: 0.82rem;
  margin-left: 1.5rem;
  transition: color 0.2s;
}

.footer-legal-links a:hover {
  color: var(--accent-bright);
}

/* =====================
   BUTTONS
===================== */
.btn-primary-custom {
  background: var(--accent-color);
  color: white;
  border: 2px solid var(--accent-color);
  border-radius: 6px;
  padding: 0.7rem 1.8rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.2s;
  display: inline-block;
}

.btn-primary-custom:hover {
  background: var(--accent-bright);
  border-color: var(--accent-bright);
  color: white;
  transform: translateY(-2px);
}

.btn-outline-custom {
  background: transparent;
  color: white;
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: 6px;
  padding: 0.7rem 1.8rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.2s;
  display: inline-block;
}

.btn-outline-custom:hover {
  background: rgba(255,255,255,0.1);
  border-color: white;
  color: white;
}

/* =====================
   SECTION — DARK STRIP
===================== */
.strip-dark {
  background: var(--primary-dark);
  padding: 3.5rem 0;
  color: white;
  text-align: center;
}

.strip-dark h3 {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  color: white;
  margin-bottom: 0.8rem;
}

.strip-dark p {
  color: rgba(255,255,255,0.65);
  margin-bottom: 1.8rem;
  font-size: 1.05rem;
}

/* =====================
   ANIMATIONS
===================== */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* =====================
   RESPONSIVE
===================== */
@media (max-width: 991.98px) {
  #mainNav {
    background: var(--primary-dark) !important;
  }

  #mainNav .navbar-collapse {
    padding: 1rem 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 0.5rem;
  }

  .hero-visual {
    margin-top: 3rem;
  }

  .hero-stats {
    grid-template-columns: 1fr 1fr;
  }

  .dual-tech-vs {
    flex-direction: column;
  }

  .dual-tech-plus {
    transform: rotate(90deg);
  }
}

@media (max-width: 767.98px) {
  section {
    padding: 3.5rem 0;
  }

  .hero-tech-badges {
    justify-content: center;
  }

  .contact-form-wrapper {
    padding: 1.5rem;
  }

  .contact-info-box {
    margin-top: 2rem;
  }

  .tech-panel {
    padding: 1.5rem;
  }

  .footer-col-title {
    margin-top: 1.5rem;
  }

  .footer-legal-links {
    margin-top: 0.5rem;
  }

  .footer-legal-links a {
    margin-left: 0;
    margin-right: 1rem;
  }
}

/* =====================
   PRIVACY / COOKIE MODAL tweaks
===================== */
.modal-body h6 {
  color: var(--primary-color);
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 1.2rem;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.modal-body p, .modal-body li {
  font-size: 0.9rem;
  color: #444;
  line-height: 1.7;
}

/* 404 */
.page-404 {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-code {
  font-family: var(--font-heading);
  font-size: 8rem;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1;
  opacity: 0.15;
}

.error-message {
  margin-top: -3rem;
  position: relative;
}

/* Servizi collegati */
.servizi-collegati { background: #f5f6f8; }
.servizi-collegati-title { color: #1f2328; font-weight: 700; }
.servizi-collegati-intro { color: #4a5058; max-width: 640px; margin-left: auto; margin-right: auto; }
.servizio-card { display: flex; flex-direction: column; gap: .5rem; height: 100%; padding: 1.5rem; background: #fff; border: 1px solid #e1e4e8; border-radius: 12px; color: #3d434a; text-decoration: none; transition: box-shadow .2s ease, transform .2s ease; }
.servizio-card:hover, .servizio-card:focus { color: #3d434a; box-shadow: 0 8px 24px rgba(0,0,0,.08); transform: translateY(-2px); }
.servizio-card-title { font-weight: 700; font-size: 1.15rem; color: var(--primary-color); }
.servizio-card-link { margin-top: auto; font-weight: 600; color: var(--primary-color); }

/* Badge reCAPTCHA nascosto: la nota sotto il form riporta privacy e termini di Google */
.grecaptcha-badge { visibility: hidden !important; }

/* WhatsApp FAB */
.wa-fab { position: fixed; right: 20px; bottom: 20px; width: 60px; height: 60px; border-radius: 50%; background: #25D366; color: #fff !important; display: flex; align-items: center; justify-content: center; font-size: 28px; box-shadow: 0 4px 12px rgba(0,0,0,0.25); z-index: 9998; transition: transform 0.2s; text-decoration: none; }
.wa-fab:hover { transform: scale(1.08); color: #fff; }
@media (max-width: 576px) { .wa-fab { width: 50px; height: 50px; font-size: 24px; right: 15px; bottom: 15px; } }

/* Form v2: toggle canale Messaggio / WhatsApp */
.form-channel-toggle { display: inline-flex; background: rgba(0,0,0,0.06); border-radius: 999px; padding: 4px; margin-bottom: 1.25rem; gap: 2px; }
.form-channel-toggle .channel-btn { border: none; background: transparent; color: #5f6670; padding: 8px 20px; border-radius: 999px; font-weight: 500; font-size: 0.92rem; cursor: pointer; transition: all 0.25s ease; display: inline-flex; align-items: center; }
.form-channel-toggle .channel-btn:hover { color: #1f2328; }
.form-channel-toggle .channel-btn.active { background: var(--primary-color, #1A1A1A); color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.form-channel-toggle .channel-btn[data-channel="whatsapp"].active { background: #1a7f45; color: #fff; box-shadow: 0 2px 8px rgba(37, 211, 102, 0.35); }
form[data-channel="whatsapp"] [type="submit"] { background: #1a7f45 !important; border-color: #1a7f45 !important; color: #fff !important; }
.channel-feedback { font-size: 0.9rem; }
@media (max-width: 480px) { .form-channel-toggle .channel-btn { padding: 7px 14px; font-size: 0.85rem; } }

/* Torna su: sopra il FAB WhatsApp, centrato sullo stesso asse */
.back-to-top { position: fixed; right: 28px; bottom: 90px; width: 44px; height: 44px; border: none; border-radius: 50%; background: var(--primary-color); color: #fff; font-size: 1rem; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(0,0,0,0.2); cursor: pointer; z-index: 9997; opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .25s, visibility .25s, transform .25s; }
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { filter: brightness(1.1); }
@media (max-width: 576px) { .back-to-top { right: 18px; bottom: 78px; } }

/* Mobile senza scorrimento orizzontale: righe g-5 dentro il contenitore; clip rispettato anche da Safari iOS (hidden su body no) */
@media (max-width: 767.98px) { .row.g-5 { --bs-gutter-x: 1.5rem; } }
html, body { overflow-x: clip; }
/* La colonna Chi siamo mantiene il padding laterale della griglia */
.chi-siamo-content { padding-left: calc(var(--bs-gutter-x) * .5); padding-right: calc(var(--bs-gutter-x) * .5); }
