/* ============================================================
   ELECTRA — Design system condiviso
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #ffffff;
  --bg2: #f8fafc;
  --bg3: #f1f5f9;
  --accent: #1b5a7d;
  --accent-hover: #123f59;
  --accent-soft: rgba(27, 90, 125, 0.08);
  --whatsapp: #25D366;
  --whatsapp-hover: #1ebe5b;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --shadow-sm: 0 2px 4px rgba(15,23,42,0.04);
  --shadow-md: 0 10px 25px -5px rgba(15,23,42,0.08);
  --max: 1200px;
  --r: 12px;

  /* Colore unico per il tasto Contatti: distinto dal blu/verde usati altrove, così risalta */
  --highlight: #ee6c2c;
  --highlight-hover: #d4591f;
  --highlight-soft: rgba(238, 108, 44, 0.12);

  /* Accenti per area (usati solo su icone/badge, i CTA restano coerenti) */
  --a-carpenteria: #45647d;
  --a-quadri: #c2660d;
  --a-manutenzione: #1b5a7d;
  --a-software: #6d28d9;
}

html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.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; }

/* ── NAV ── */
nav {
  position: sticky; top: 0; z-index: 200;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 48px;
  background: rgba(255,255,255,0.94); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); flex-shrink: 0; }
.logo-icon-img { width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.logo-icon-img img { width: 100%; height: 100%; object-fit: contain; }
.logo-text { font-size: 19px; font-weight: 800; letter-spacing: -0.5px; line-height: 1.2; }
.logo-sub { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }

/* Centrati sull'intera barra (indipendentemente dalla larghezza di logo e tasto Contatti) */
.nav-links {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: flex; gap: 28px; list-style: none; align-items: center; white-space: nowrap;
}
.nav-links a { color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; transition: color .2s; }
.nav-links a:hover { color: var(--accent); }
.nav-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.nav-whatsapp {
  display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  background: var(--whatsapp); color: #fff; font-size: 20px;
  text-decoration: none; transition: background .2s, transform .2s;
  box-shadow: 0 4px 14px rgba(37,211,102,0.35);
}
.nav-whatsapp:hover { background: var(--whatsapp-hover); transform: translateY(-1px); }
.nav-cta {
  background: var(--highlight); color: #fff; padding: 11px 24px;
  border-radius: 8px; font-weight: 700; font-size: 13px; letter-spacing: 0.5px; text-transform: uppercase;
  text-decoration: none; transition: background .2s, transform .2s; white-space: nowrap;
  box-shadow: 0 4px 14px rgba(238, 108, 44, 0.35);
}
.nav-cta:hover { background: var(--highlight-hover); transform: translateY(-1px); }

.nav-toggle {
  display: none; width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--border);
  background: #fff; align-items: center; justify-content: center; font-size: 20px; cursor: pointer; color: var(--text);
}

.mobile-menu {
  display: none; position: fixed; top: 0; right: 0; bottom: 0; width: min(320px, 84vw);
  background: #fff; z-index: 400; box-shadow: -10px 0 30px rgba(15,23,42,0.18);
  padding: 22px; flex-direction: column; gap: 4px;
  transform: translateX(100%); transition: transform .25s ease;
}
.mobile-menu.is-open { transform: translateX(0); }
.mobile-menu-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.mobile-menu-close { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg2); display: flex; align-items: center; justify-content: center; font-size: 18px; cursor: pointer; }
.mobile-menu a { display: block; padding: 13px 8px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 14px; letter-spacing: 0.4px; text-transform: uppercase; border-bottom: 1px solid var(--border); }
.mobile-menu .nav-cta { margin-top: 16px; text-align: center; }
.mobile-menu .btn-whatsapp { display: flex; width: 100%; align-items: center; justify-content: center; text-align: center; margin-top: 10px; border-bottom: none; }
.menu-overlay { display: none; position: fixed; inset: 0; background: rgba(15,23,42,0.45); z-index: 350; opacity: 0; transition: opacity .25s ease; }
.menu-overlay.is-open { display: flex; opacity: 1; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 8px; font-weight: 600; font-size: 15px;
  text-decoration: none; transition: all .2s; cursor: pointer; border: none;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(27, 90, 125, 0.3); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); }
.btn-outline { background: #fff; color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.btn-outline:hover { background: var(--bg2); border-color: #cbd5e1; }
.btn-whatsapp { background: var(--whatsapp); color: #fff; box-shadow: 0 4px 14px rgba(37,211,102,0.35); }
.btn-whatsapp:hover { background: var(--whatsapp-hover); transform: translateY(-2px); color: #fff; }

/* ── HERO (homepage) ── */
.hero { padding: 0; }
.full-bleed { width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }

/* ── CAROSELLO DI FRASI (hero) ── */
.text-carousel-wrap { background: #0f172a; }
.text-carousel { position: relative; overflow: hidden; min-height: 160px; display: flex; align-items: center; justify-content: center; padding: 32px 24px; }
.text-carousel-track { position: relative; width: 100%; max-width: 1100px; margin: 0 auto; }
.text-carousel-slide {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center;
  opacity: 0; transition: opacity .9s ease; color: #fff; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.5px; line-height: 1.35; font-size: clamp(18px, 2.6vw, 32px); padding: 0 16px;
}
.text-carousel-slide.is-active { opacity: 1; position: relative; }

.hero-card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 30px; box-shadow: var(--shadow-md); }
.hero-card-title { font-size: 17px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.hero-card-title i { color: var(--accent); }
.hero-card-lead { font-size: 13.5px; color: var(--muted); line-height: 1.6; margin-bottom: 20px; }

.spare-parts-box { background: var(--bg2); border: 1px dashed var(--whatsapp); border-radius: 10px; padding: 18px; }
.spare-parts-box h4 { font-size: 13.5px; font-weight: 700; margin-bottom: 5px; }
.spare-parts-box p { font-size: 12px; color: var(--muted); margin-bottom: 12px; }

/* ── CAROSELLO FOTO (hero, card aree, banner pagine) ── */
.carousel { position: relative; overflow: hidden; background: var(--bg2); }
.carousel-track { position: relative; width: 100%; height: 100%; }
.carousel-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease; z-index: 1; }
.carousel-slide.is-active { opacity: 1; z-index: 2; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease, object-fit .1s; }

/* Sfondo dinamico dietro alla foto: la foto stessa ingrandita e sfocata (solo banner, in hover) */
.carousel-slide-bg {
  position: absolute; inset: -20px; background-size: cover; background-position: center;
  filter: blur(34px) saturate(1.2) brightness(0.82); transform: scale(1.15); z-index: 0;
}
img.carousel-slide-img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease, object-fit .1s; }
.carousel-placeholder {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 44px; color: var(--carousel-accent, var(--accent)); opacity: .45;
  background: linear-gradient(135deg, color-mix(in srgb, var(--carousel-accent, var(--accent)) 20%, var(--bg2)), var(--bg3));
  z-index: 0;
}
.carousel-dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 3; }
.carousel-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.55); border: none; cursor: pointer; padding: 0; transition: background .2s, transform .2s; }
.carousel-dot.is-active { background: #fff; transform: scale(1.2); }

.carousel--card { position: absolute; inset: 0; }
.carousel--banner { border-radius: var(--r); border: 1px solid var(--border); aspect-ratio: 21/8; }

/* Su hover: la foto si allarga e si vede intera (non più ritagliata) */
.carousel--banner:hover .carousel-slide-img { object-fit: contain; }

/* ── SEZIONI GENERALI ── */
.section { padding: 64px 48px; }
.section-inner { max-width: var(--max); margin: 0 auto; }
.tag { color: var(--accent); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.section-title { font-size: clamp(26px, 3vw, 36px); font-weight: 800; letter-spacing: -1px; margin-bottom: 12px; }
.section-sub { color: var(--muted); max-width: 640px; margin-bottom: 40px; font-size: 16px; }

/* ── AREE (macro-aree homepage) ── */
#aree { background: var(--bg2); }
.aree-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.area-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--r);
  padding: 0; overflow: hidden; transition: all .3s; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
}
.area-card:hover { border-color: var(--card-accent, var(--accent)); transform: translateY(-4px); box-shadow: var(--shadow-md); }
.area-media { position: relative; aspect-ratio: 16/9; }
.area-num {
  position: absolute; top: 14px; left: 14px; z-index: 5; background: rgba(15,23,42,0.55); color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: 1px; padding: 5px 10px; border-radius: 20px;
  backdrop-filter: blur(4px);
}
.a-icon-badge {
  position: absolute; bottom: -22px; right: 20px; z-index: 5; width: 48px; height: 48px; border-radius: 12px;
  background: #fff; box-shadow: var(--shadow-md); display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--card-accent, var(--accent)); border: 1px solid var(--border);
}
.area-card-body { padding: 34px 28px 28px; display: flex; flex-direction: column; flex-grow: 1; }
.area-card h3 { font-size: 19px; font-weight: 700; margin-bottom: 10px; }
.area-card p { font-size: 14.5px; color: var(--muted); line-height: 1.65; margin-bottom: 16px; flex-grow: 1; }
.area-card .area-list { list-style: none; display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.area-card .area-list li { font-size: 13px; color: var(--muted); display: flex; align-items: flex-start; gap: 8px; }
.area-card .area-list li i { color: var(--card-accent, var(--accent)); font-size: 14px; margin-top: 3px; flex-shrink: 0; }
.area-link { font-size: 13.5px; font-weight: 700; color: var(--card-accent, var(--accent)); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }

/* ── TRAFILETTO CERTIFICAZIONI (scorrimento continuo) ── */
.cert-ticker { background: #0f172a; overflow: hidden; padding: 13px 0; border-top: 1px solid rgba(255,255,255,0.08); border-bottom: 1px solid rgba(255,255,255,0.08); }
.cert-ticker-track { display: flex; align-items: center; gap: 44px; width: max-content; animation: cert-scroll 26s linear infinite; }
.cert-ticker:hover .cert-ticker-track { animation-play-state: paused; }
.cert-ticker-item { display: inline-flex; align-items: center; gap: 8px; color: #cbd5e1; font-size: 12.5px; font-weight: 600; white-space: nowrap; letter-spacing: 0.2px; }
.cert-ticker-item i { color: #5ab3d8; font-size: 16px; flex-shrink: 0; }
@keyframes cert-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── STANDARD/NORME BADGE GRID (pagine di dettaglio) ── */
.standards-grid { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 8px; }
.standard-badge { background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; padding: 9px 14px; font-size: 12.5px; font-weight: 700; color: var(--text); display: inline-flex; align-items: center; gap: 7px; }
.standard-badge i { color: var(--page-accent, var(--accent)); font-size: 15px; }

/* ── CONTATTI ── */
#contatti { background: var(--bg2); }
.contatti-grid { display: grid; grid-template-columns: 0.85fr 0.85fr 1.3fr; gap: 28px; align-items: stretch; }
.contatti-grid .hero-card, .contatti-grid .contact-info, .contatti-grid form { height: 100%; }
.contatti-grid .contact-info { display: flex; flex-direction: column; }
.contatti-grid .contact-info .contact-item:last-child { margin-bottom: 0; }
.contatti-grid .hero-card { display: flex; flex-direction: column; }
.contatti-grid .hero-card .spare-parts-box { margin-top: auto; }
.contact-info h3 { font-size: 23px; font-weight: 800; margin-bottom: 12px; }
.contact-info p { color: var(--muted); margin-bottom: 24px; }
.contact-item {
  display: flex; align-items: center; gap: 16px;
  padding: 15px 16px; background: #fff; border-radius: var(--r);
  border: 1px solid var(--border); margin-bottom: 12px; text-decoration: none; color: var(--text);
  box-shadow: var(--shadow-sm); transition: border-color .2s;
}
.contact-item:hover { border-color: var(--accent); }
.contact-item.is-whatsapp:hover { border-color: var(--whatsapp); }
.c-icon { width: 44px; height: 44px; background: var(--accent-soft); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--accent); flex-shrink: 0; }
.c-info .c-lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.c-info .c-val { font-size: 15px; font-weight: 600; }

form { background: #fff; padding: 32px; border-radius: 16px; border: 1px solid var(--border); box-shadow: var(--shadow-md); display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 12px; font-weight: 700; color: var(--text); text-transform: uppercase; letter-spacing: 0.5px; }
input, textarea, select {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 16px; color: var(--text);
  font-size: 14px; font-family: inherit; outline: none; transition: border-color .2s; width: 100%;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); background: #fff; }
textarea { resize: vertical; min-height: 90px; }
.form-submit-row { display: flex; align-items: stretch; gap: 12px; }
.form-submit-row .btn { flex: 1 1 0; justify-content: center; }

/* ── FOOTER ── */
footer { background: #0f172a; color: #94a3b8; padding: 40px 48px 28px; font-size: 13px; border-top: 1px solid rgba(255,255,255,0.1); }
.footer-inner { max-width: var(--max); margin: 0 auto; }
.footer-top { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; padding-bottom: 28px; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 20px; }
.footer-logo { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 16px; margin-bottom: 8px; }
.footer-logo img { width: 28px; height: 28px; object-fit: contain; }
.footer-motto { color: #cbd5e1; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.footer-brand p { max-width: 320px; color: #94a3b8; line-height: 1.6; }
.footer-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-col h4 { color: #fff; font-size: 13px; font-weight: 700; margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-col a { display: block; color: #94a3b8; text-decoration: none; margin-bottom: 10px; font-size: 13.5px; }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; color: #64748b; font-size: 12.5px; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: #64748b; text-decoration: none; }
.footer-links a:hover { color: #fff; }

/* ── WHATSAPP FLOATING BUTTON ── */
.whatsapp-fab {
  position: fixed; bottom: 24px; right: 24px; width: 58px; height: 58px;
  background: var(--whatsapp); color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; box-shadow: 0 6px 20px rgba(37,211,102,0.45);
  z-index: 250; text-decoration: none; transition: transform .2s;
}
.whatsapp-fab:hover { transform: scale(1.08); color: #fff; }

/* ── MOBILE CTA BAR ── */
.mobile-cta-bar { display: none; }
@media (max-width: 768px) {
  .whatsapp-fab { display: none; }
  body { padding-bottom: 68px; }
  .mobile-cta-bar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 300;
    background: #fff; border-top: 1px solid var(--border); box-shadow: 0 -6px 20px rgba(15,23,42,0.1);
  }
  .mobile-cta-bar a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 15px 10px; font-weight: 700; font-size: 14px; text-decoration: none; color: #fff; }
  .mobile-cta-bar .mcb-call { background: var(--accent); }
  .mobile-cta-bar .mcb-wa { background: var(--whatsapp); }
}

/* ── PAGINE DI DETTAGLIO SERVIZIO ── */
.breadcrumb { max-width: var(--max); margin: 0 auto; padding: 26px 48px 0; }
.breadcrumb a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.breadcrumb a:hover { color: var(--accent); }

.service-hero { max-width: var(--max); margin: 0 auto; padding: 22px 48px 8px; }
.service-hero .tag { color: var(--page-accent, var(--accent)); }
.service-hero .tag i { font-size: 18px; }
.service-hero h1 { font-size: clamp(28px, 4vw, 44px); font-weight: 800; letter-spacing: -1px; margin-bottom: 16px; max-width: 800px; }
.service-hero .lead { font-size: 17px; color: var(--muted); max-width: 740px; line-height: 1.65; }

.service-banner-wrap { max-width: var(--max); margin: 0 auto; padding: 22px 48px 0; }

.service-body { max-width: var(--max); margin: 0 auto; padding: 36px 48px 20px; display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 48px; align-items: start; }
.service-content p { font-size: 15.5px; color: var(--text); margin-bottom: 18px; line-height: 1.75; }
.service-content h2 { font-size: 19px; font-weight: 700; margin: 30px 0 12px; }
.service-content h2:first-child { margin-top: 0; }
.service-content p:last-child { margin-bottom: 0; }

.includes-box { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r); padding: 26px; position: sticky; top: 100px; }
.includes-box h3 { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.includes-box ul { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-bottom: 22px; }
.includes-box li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--muted); line-height: 1.5; }
.includes-box li i { color: var(--page-accent, var(--accent)); font-size: 16px; margin-top: 2px; flex-shrink: 0; }
.includes-box .btn { width: 100%; justify-content: center; margin-bottom: 10px; }

.feature-strip { max-width: var(--max); margin: 8px auto 56px; padding: 0 48px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature-tile { background: #fff; border: 1px solid var(--border); border-radius: var(--r); padding: 22px 20px; box-shadow: var(--shadow-sm); }
.feature-tile i { font-size: 24px; color: var(--page-accent, var(--accent)); margin-bottom: 12px; display: block; }
.feature-tile h4 { font-size: 14.5px; font-weight: 700; margin-bottom: 6px; }
.feature-tile p { font-size: 12.5px; color: var(--muted); line-height: 1.5; }

/* ── RESPONSIVE ── */
@media (max-width: 992px) {
  .contatti-grid, .aree-grid { grid-template-columns: 1fr; }
  .service-body { grid-template-columns: 1fr; }
  .includes-box { position: static; }
  .feature-strip { grid-template-columns: repeat(2, 1fr); }
  .footer-top { flex-direction: column; }

  .nav-links { display: none; }
  .nav-cta.desktop-only, .nav-whatsapp.desktop-only { display: none; }
  .nav-toggle { display: flex; }
  .mobile-menu { display: flex; }

  nav { padding: 14px 20px; }
  .section { padding: 48px 20px; }
  .hero { padding: 0; }
  .breadcrumb, .service-hero, .service-banner-wrap, .service-body, .feature-strip { padding-left: 20px; padding-right: 20px; }
  .carousel--banner { aspect-ratio: 16/9; }
  .text-carousel { min-height: 130px; padding: 26px 20px; }
  .footer-cols { gap: 32px; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .feature-strip { grid-template-columns: 1fr; }
  .carousel--banner { aspect-ratio: 4/3; }
  .text-carousel { min-height: 110px; padding: 22px 16px; }
}
@media (max-width: 480px) {
  .whatsapp-fab { width: 50px; height: 50px; font-size: 25px; bottom: 16px; right: 16px; }
  nav { padding: 10px 14px; }
  .logo-icon-img { width: 34px; height: 34px; }
  .logo-text { font-size: 15px; }
  .logo-sub { font-size: 9px; }
  .nav-cta { padding: 9px 14px; font-size: 13px; white-space: nowrap; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
