/* ==========================================================================
   INOS PROJECT – foglio di stile unico
   Colori principali (cambiarli qui li cambia in tutto il sito)
   ========================================================================== */
:root {
  --scuro: #2C3E50;        /* blu notte: menu, footer, testi */
  --primario: #4A90E2;     /* azzurro: titoli h2, dettagli */
  --accento: #50E3C2;      /* verde acqua: pulsanti, link footer */
  --sfondo: #F3F4F6;       /* grigio chiaro di fondo pagina */
  --chiaro: #F3F4F6;
  --testo-footer: #dfe6ec;
  --giallo-novita: rgb(221, 226, 74);
  --bordo-campi: #cfd6de;
  --ombra: 0 8px 26px rgba(44, 62, 80, .1);
  --ombra-forte: 0 16px 36px rgba(44, 62, 80, .18);
  --larghezza: 61rem;      /* colonna dei contenuti (75rem su schermi grandi) */
  --font-testo: "Open Sans", Helvetica, Arial, sans-serif;
  --font-titoli: "Roboto", Helvetica, Arial, sans-serif;
}

/* ---------- Caratteri (scaricati in locale, nessun servizio esterno) ---------- */
@font-face {
  font-family: "Open Sans";
  src: url("../fonts/open-sans-400.woff2") format("woff2");
  font-weight: 200 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: url("../fonts/roboto.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-testo);
  font-size: 16px;
  line-height: 1.5;
  color: var(--scuro);
  background: var(--sfondo);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primario); }
p { margin: 0 0 .9em; line-height: 1.65; }
p:last-child { margin-bottom: 0; }
h1, h2, h3, h4 { font-family: var(--font-titoli); margin: 0; }
h2 { font-size: 28px; line-height: 1.3; font-weight: 600; color: var(--primario); letter-spacing: -.01em; }
h3 { font-size: 20px; line-height: 1.35; font-weight: 700; color: var(--scuro); }
h2.center { text-align: center; margin-bottom: 40px; }
h2.center::after {
  content: ""; display: block; width: 56px; height: 4px; border-radius: 2px;
  margin: 12px auto 0; background: linear-gradient(90deg, var(--primario), var(--accento));
}

.container { width: 100%; max-width: var(--larghezza); margin: 0 auto; padding: 0 16px; }
.section { padding: 80px 0; }
.section + .section { padding-top: 0; }

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: #fff; padding: 8px 14px; }
.skip-link:focus { left: 8px; top: 8px; }
:focus-visible { outline: 3px solid var(--accento); outline-offset: 2px; }

/* ---------- Pulsanti ---------- */
.button, button[type="submit"] {
  display: inline-block;
  font-family: var(--font-testo);
  font-size: 16px; line-height: 24px;
  font-weight: 600; letter-spacing: .03em; text-transform: uppercase;
  padding: 8px 28px;
  border: 0; border-radius: 999px;
  background: var(--accento); color: var(--scuro);
  text-decoration: none; cursor: pointer;
  box-shadow: 0 6px 18px rgba(80, 227, 194, .35);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.button:hover, button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(80, 227, 194, .45);
  filter: brightness(1.03);
}

/* ---------- Intestazione e menu ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--scuro);
  box-shadow: 0 2px 18px rgba(0, 0, 0, .22);
}
.header-inner { display: flex; align-items: center; min-height: 84px; padding-top: 10px; padding-bottom: 10px; }
.logo img { height: 64px; width: auto; }
.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 28px; }
.site-nav a {
  display: inline-block; position: relative;
  padding: 16px 0;
  color: var(--chiaro); text-decoration: none;
  font-size: 16px; line-height: 16px; font-weight: 500; letter-spacing: .02em;
  transition: color .2s ease;
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 2px;
  background: var(--accento); transform: scaleX(0); transition: transform .25s ease;
}
.site-nav a:hover { color: var(--accento); }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }
.lang-switch { display: flex; align-items: center; gap: 6px; margin-left: 8px; font-size: 14px; font-weight: 600; letter-spacing: .06em; }
.lang-switch a { padding: 0; color: var(--testo-footer); font-size: 14px; }
.lang-switch a::after { display: none; }
.lang-switch .cur { color: var(--accento); }
.lang-switch .sep { color: rgba(255, 255, 255, .35); }

.header-phone, .menu-toggle { display: none; }

/* ---------- Copertina (hero) con riquadro di testo ---------- */
.hero {
  position: relative;
  min-height: 580px;
  display: flex; align-items: center;
  padding: 80px 0;
  background: var(--scuro) center / cover no-repeat;
  overflow: hidden;
}
.hero-home { background-position: 50% 0; }
.hero .hero-slides { position: absolute; inset: 0; }
.hero .hero-slides div {
  position: absolute; inset: 0; background: center / cover no-repeat;
  opacity: 0; transition: opacity 1.2s ease;
}
.hero .hero-slides div.on { opacity: 1; }
.hero .container { position: relative; }
.hero-box {
  max-width: 472px;
  padding: 40px;
  color: var(--chiaro);
  background: linear-gradient(135deg, rgba(20, 32, 45, .82), rgba(44, 62, 80, .62));
  border-radius: 16px;
  border-left: 4px solid var(--accento);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .3);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.hero-box h1 {
  color: var(--chiaro);
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  font-weight: 600; line-height: 1.15; letter-spacing: -.01em;
  margin-bottom: 24px;
}
.page-novita .hero-box h1 { color: var(--giallo-novita); text-transform: uppercase; }
.hero-box p { line-height: 1.6; }
.hero-box a { color: var(--accento); }

/* Bollino ISO (copertina Home e footer) */
.badge-iso {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 10px; padding: 9px 18px 9px 10px;
  border-radius: 999px; border: 2px solid var(--accento);
  background: var(--scuro); color: #fff !important;
  font-weight: 700; letter-spacing: .02em; line-height: 1.2; text-decoration: none !important;
  box-shadow: 0 6px 18px rgba(80, 227, 194, .25);
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.badge-iso::before {
  content: "✓"; flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accento); color: var(--scuro); font-size: 14px; font-weight: 900;
}
.badge-iso:hover { transform: translateY(-2px); background: var(--accento); color: var(--scuro) !important; }
.badge-iso:hover::before { background: var(--scuro); color: var(--accento); }

/* ---------- Home: Chi siamo ---------- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.about-img { border-radius: 16px; overflow: hidden; box-shadow: 0 10px 30px rgba(44, 62, 80, .12); background: #fff; }
.about-img img { width: 100%; }
.about h2 { margin-bottom: 16px; }
.about .button { margin-top: 12px; }

/* ---------- Home: contatori ---------- */
.counters { display: flex; justify-content: center; gap: 24px; list-style: none; margin: 0; padding: 0; }
.counter {
  flex: 0 1 224px;
  background: #fff; border-radius: 16px; border-top: 4px solid var(--primario);
  box-shadow: var(--ombra);
  padding: 26px 16px; text-align: center;
  transition: transform .25s ease, box-shadow .25s ease;
}
.counter:hover { transform: translateY(-4px); box-shadow: 0 14px 32px rgba(44, 62, 80, .16); }
.counter strong { display: block; font-family: var(--font-titoli); font-size: 2.6rem; line-height: 1.1; font-weight: 700; color: var(--scuro); }
.counter span {
  display: block; margin-top: 6px;
  font-family: var(--font-titoli); font-size: 12px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--primario);
}

/* ---------- Home: elenco servizi ---------- */
.services { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.services li {
  display: flex; align-items: stretch;
  background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 4px 16px rgba(44, 62, 80, .08);
  transition: transform .2s ease, box-shadow .2s ease;
}
.services li:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(44, 62, 80, .15); }
.services .icon {
  flex: 0 0 48px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primario), var(--accento));
}
.services .icon svg { width: 16px; height: 16px; fill: var(--chiaro); }
.services h3 { padding: 16px; font-family: var(--font-testo); font-size: 16px; line-height: 1.4; font-weight: 600; }

/* ---------- Schede (Prodotti e Settori) ---------- */
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.card {
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: var(--ombra); text-align: center;
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--ombra-forte); }
.card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card-body { padding: 20px 20px 24px; }
.card h3 { margin-bottom: 10px; }
.card p { font-size: 15px; }
.page-settori .card h3 { color: var(--primario); font-weight: 400; font-size: 22px; }

/* ---------- Recensioni (scorrimento) ---------- */
.slider { position: relative; }
.slider-track { display: flex; transition: transform .6s ease; }
.slider-viewport { overflow: hidden; border-radius: 16px; }
.review {
  flex: 0 0 100%;
  margin: 0; padding: 48px 40px;
  background: linear-gradient(135deg, var(--scuro), #3E5A78);
  color: #EEF2F5;
}
.review h3 { color: var(--accento); font-size: 24px; margin-bottom: 10px; }
.review p { font-size: 1.05rem; }
.review footer { margin-top: 12px; font-weight: 700; color: var(--accento); letter-spacing: .03em; }
.slider-dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.slider-dots button {
  width: 28px; height: 4px; padding: 0; border: 0; border-radius: 2px;
  background: #c4ccd5; cursor: pointer;
}
.slider-dots button[aria-current="true"] { background: var(--primario); }

/* ---------- FAQ (domande frequenti) ---------- */
.faq { max-width: 760px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--primario); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 8px;
  font-family: var(--font-titoli); font-size: 17px; color: var(--primario); letter-spacing: .04em;
  border-radius: 10px; transition: background .2s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 26px; font-weight: 300; line-height: 1; color: var(--accento); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { background: rgba(74, 144, 226, .06); }
.faq details p { padding: 0 8px 18px; font-size: 15px; }

/* ---------- Novità: testo + immagine ---------- */
.news { display: flex; flex-direction: column; gap: 72px; }
.news-row { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; }
.news-text {
  background: #fff; border-radius: 16px 0 0 16px; padding: 32px;
  box-shadow: 0 8px 26px rgba(44, 62, 80, .08);
  display: flex; flex-direction: column; justify-content: center;
}
.news-text h2 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.news-img { border-radius: 0 16px 16px 0; overflow: hidden; min-height: 240px; background: #fff; }
.news-img img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Contatti: modulo ---------- */
.contact-form { max-width: 100%; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; }
.form-grid .full { grid-column: 1 / -1; }
.contact-form label.field { display: block; }
.contact-form label.field span { position: absolute; left: -9999px; }
.contact-form input[type="text"], .contact-form input[type="email"],
.contact-form input[type="tel"], .contact-form textarea {
  width: 100%; font: inherit; color: var(--scuro);
  padding: 12px 14px;
  background: #fff; border: 1px solid var(--bordo-campi); border-radius: 10px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.contact-form textarea { min-height: 140px; resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--primario); box-shadow: 0 0 0 3px rgba(74, 144, 226, .18);
}
.form-bottom { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-top: 18px; }
.privacy-check { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.privacy-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--primario); }
.contact-form button[type="submit"] { min-width: 280px; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-msg { padding: 14px 18px; border-radius: 10px; margin-bottom: 24px; font-weight: 600; }
.form-msg.ok { background: #e3f8f2; color: #17694f; border-left: 4px solid var(--accento); }
.form-msg.err { background: #fde8e8; color: #9b1c1c; border-left: 4px solid #e25555; }
.form-msg[hidden] { display: none; }

/* ---------- Pagine di testo (privacy, note legali, 404) ---------- */
.text-page { background: #fff; border-radius: 16px; box-shadow: var(--ombra); padding: 48px; }
.text-page h1 { font-size: 30px; color: var(--primario); margin-bottom: 24px; }
.text-page h2 { font-size: 19px; margin: 28px 0 10px; }
.text-page ul { padding-left: 1.2em; }
.text-page li { margin-bottom: .4em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--scuro); color: var(--testo-footer); padding: 80px 0; }
.footer-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; max-width: 77rem; }
.footer-info p { margin: 0 0 10px; line-height: 1.65; }
.site-footer a { color: var(--accento); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-instagram { display: inline-block; margin-bottom: 12px; }
.footer-instagram svg { width: 44px; height: 44px; fill: var(--primario); }
.footer-instagram:hover svg { fill: var(--accento); }
.footer-map iframe { display: block; width: 100%; height: 340px; border: 0; border-radius: 14px; }

/* ==========================================================================
   Schermi grandi (da 1400px): colonna più larga e menu più grande
   ========================================================================== */
@media (min-width: 1400px) {
  :root { --larghezza: 75rem; }
  .site-nav a { font-size: 17px; }
  .lang-switch a { font-size: 14px; }
}

/* ==========================================================================
   Tablet
   ========================================================================== */
@media (max-width: 975px) {
  .cards { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .about { gap: 32px; }
}

/* ==========================================================================
   Cellulare (fino a 767px)
   ========================================================================== */
@media (max-width: 767px) {
  .section { padding: 40px 0; }
  .header-inner { min-height: 0; padding-top: 8px; padding-bottom: 8px; }
  .logo img { height: 46px; }

  /* menu a scomparsa */
  .header-phone, .menu-toggle {
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; background: none; border: 0; padding: 0; cursor: pointer;
  }
  .header-phone { margin-left: auto; }
  .header-phone svg { width: 24px; height: 24px; fill: var(--accento); }
  .menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
    display: block; width: 26px; height: 2px; background: var(--chiaro); border-radius: 2px;
    position: relative; transition: transform .25s ease, background .25s ease;
  }
  .menu-toggle span::before, .menu-toggle span::after { content: ""; position: absolute; left: 0; }
  .menu-toggle span::before { top: -8px; }
  .menu-toggle span::after { top: 8px; }
  .menu-toggle[aria-expanded="true"] span { background: transparent; }
  .menu-toggle[aria-expanded="true"] span::before { transform: translateY(8px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span::after { transform: translateY(-8px) rotate(-45deg); }

  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--scuro); box-shadow: 0 12px 20px rgba(0, 0, 0, .25);
    display: none; padding: 8px 0 20px;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { padding: 14px 0; font-size: 18px; }
  .lang-switch { margin: 14px 0 0; justify-content: center; font-size: 16px; }
  .lang-switch a { font-size: 16px; }

  .hero { min-height: 0; padding: 48px 0; }
  .hero-box { padding: 28px 24px; border-radius: 12px; }

  .about { grid-template-columns: 1fr; gap: 24px; }
  .counters { gap: 14px; flex-wrap: wrap; }
  .counter { flex: 1 1 100%; padding: 18px 14px; }
  .counter strong { font-size: 2.1rem; }
  .services { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .review { padding: 32px 24px; }

  .news { gap: 28px; }
  .news-row { grid-template-columns: 1fr; }
  .news-text { border-radius: 16px 16px 0 0; box-shadow: none; padding: 24px; }
  .news-img { border-radius: 0 0 16px 16px; min-height: 0; }
  .news-img img { aspect-ratio: 3 / 2; height: auto; }

  .form-grid { grid-template-columns: 1fr; }
  .privacy-check input { width: 20px; height: 20px; }
  .contact-form button[type="submit"] { width: 100%; min-width: 0; }

  .text-page { padding: 28px 20px; }
  .site-footer { padding: 40px 0; text-align: center; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-map iframe { height: 280px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
