/* ==========================================================================
   Ampere – stile del sito
   Colori e font in :root: cambiandoli qui si aggiorna tutto il sito.
   ========================================================================== */

@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url(assets/fonts/poppins-400.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url(assets/fonts/poppins-500.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url(assets/fonts/poppins-600.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url(assets/fonts/poppins-700.woff2) format("woff2"); }

:root {
  --navy: #0b1b69;
  --navy-dark: #002c5b;
  --yellow: #fee026;
  --text: #3d3d3d;
  --grey: #f8f8f8;
  --grey-line: #d9dbe3;
  --grey-text: #8a8a8a;
  --white: #fff;
  --black: #000;
  --font: "Poppins", system-ui, sans-serif;
  --container: 1140px;
  --header-h: 100px;
}

/* --- base ----------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body { margin: 0; font: 400 16px/1.6 var(--font); color: var(--text); background: var(--white); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.2; font-weight: 600; color: var(--navy); }
p { margin: 0 0 .9rem; }
p:last-child { margin-bottom: 0; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 10px; top: 10px; z-index: 100; padding: 8px 12px; background: var(--white); }
.icon { width: 15px; height: 15px; flex-shrink: 0; fill: currentColor; }

/* titolo di sezione con trattino giallo sotto ("I nostri Brand", "Servizi", "Dicono di noi") */
.title { margin-bottom: 40px; font-size: 32px; text-align: center; }
.title::after { content: ""; display: block; width: 110px; margin: 14px auto 0; border-top: 3px solid var(--yellow); }

.button { display: inline-block; padding: 12px 24px; border: 0; border-radius: 3px; background: var(--yellow); color: var(--navy); font: 600 14px var(--font); text-transform: uppercase; cursor: pointer; transition: transform .2s; }
.button:hover { transform: scale(.95); }

/* --- barra superiore e header -------------------------------------------- */

.topbar { border-bottom: 3px solid var(--yellow); background: linear-gradient(180deg, var(--white) 0%, #f2f2f2 100%); }
.topbar .container { display: flex; justify-content: space-between; gap: 10px; padding-top: 10px; padding-bottom: 10px; }
.topbar a, .topbar span { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: #012c6d; }
.topbar .icon { color: var(--yellow); }

.site-header { position: sticky; top: 0; z-index: 50; background: var(--navy); }
.navbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: var(--header-h); }
.logo img { width: 210px; }

.menu { display: flex; align-items: center; margin: 0; padding: 0; list-style: none; }
.menu a, .submenu-toggle { display: flex; align-items: center; gap: 6px; padding: 18px 28px; border: 0; background: none; font: 500 16px var(--font); text-transform: uppercase; color: var(--white); cursor: pointer; }
.menu a:hover, .submenu-toggle:hover, .menu [aria-current="page"] { color: var(--yellow); }
.submenu-toggle .icon { width: 10px; height: 10px; transition: transform .2s; }

/* sottomenu "Servizi": a comparsa al passaggio del mouse (desktop) o con il pulsante (script.js) */
.has-submenu { position: relative; }
.submenu { display: none; position: absolute; top: 100%; left: 0; min-width: 300px; margin: 0; padding: 0; list-style: none; background: var(--white); box-shadow: 0 10px 20px rgba(0, 0, 0, .12); }
.submenu a { padding: 12px 20px; font-size: 14px; text-transform: none; color: var(--navy); }
.submenu a:hover, .submenu [aria-current="page"] { background: var(--navy); color: var(--white); }
.has-submenu:hover .submenu, .has-submenu:focus-within .submenu, .has-submenu.open .submenu { display: block; }

.menu-toggle { display: none; padding: 8px; border: 0; background: none; cursor: pointer; }
.menu-toggle span { display: block; width: 26px; height: 2px; margin: 6px 0; background: var(--white); transition: transform .2s, opacity .2s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* --- home ----------------------------------------------------------------- */

.banner-home { width: 100%; max-width: 1080px; margin: 0 auto; }

.brands { padding: 80px 0 100px; }
/* nastro di loghi che scorre all'infinito (la lista è ripetuta due volte) */
.marquee { overflow: hidden; -webkit-mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee__track { display: flex; width: max-content; animation: marquee 50s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee img { width: 256px; height: 128px; margin: 0 20px; }
@keyframes marquee { to { transform: translateX(-50%); } }

.services { padding: 0 0 100px; }
.services__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service { display: block; text-align: center; }
.service img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 6px; transition: transform .3s; }
.service:hover img { transform: scale(1.03); }
.service h3 { padding: 16px 10px 10px; font-size: 20px; }

.numbers { position: relative; padding: 100px 0; background: url(assets/img/sfondo-numeri.webp) center / cover; color: var(--white); }
.numbers::before { content: ""; position: absolute; inset: 0; background: var(--black); opacity: .78; }
.numbers .container { position: relative; display: flex; align-items: center; gap: 40px; min-height: 300px; }
.numbers__box { flex: 1; display: flex; justify-content: center; }
/* riquadro "10000+ Prodotti in catalogo": il numero sale da 0 quando entra nello schermo (script.js) */
.counter { display: flex; align-items: center; width: 390px; max-width: 100%; margin: 0; padding: 12px 18px; background: var(--white); }
.counter strong { flex: 0 0 45%; font-size: 30px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--yellow); }
.counter > span { font-size: 32px; font-weight: 600; line-height: 1; color: var(--navy-dark); }
.numbers__text { flex: 1; }
.numbers__text .button { margin-top: 20px; }

.about { display: flex; align-items: center; gap: 40px; padding-top: 60px; padding-bottom: 60px; }
.about__text { flex: 1; text-align: center; }
.about__text h2 { margin-bottom: 20px; font-size: 32px; color: var(--navy-dark); }
.about__text p { color: var(--navy); }
.about__text .button { margin-top: 20px; }
.about__img { flex: 1; position: relative; padding-bottom: 80px; }
.about__img img:last-child { position: absolute; right: 0; bottom: 0; width: 50%; border: 6px solid var(--white); }

/* recensioni Google: carosello a scorrimento orizzontale, frecce e scorrimento automatico in script.js */
.reviews { padding: 60px 0 100px; }
.slider { position: relative; padding: 0 30px; }
.slider__track { --per-view: 3; display: flex; gap: 16px; margin: 0; padding: 32px 0 4px; list-style: none; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; }
.slider__track::-webkit-scrollbar { display: none; }
.slider__prev, .slider__next { position: absolute; top: 50%; z-index: 1; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: var(--white); box-shadow: 0 1px 4px rgba(0, 0, 0, .25); cursor: pointer; }
.slider__prev { left: 0; }
.slider__next { right: 0; }
.slider__prev svg, .slider__next svg { width: 18px; height: 18px; fill: none; stroke: #333; stroke-width: 2.2; }

.review { position: relative; flex: 0 0 calc((100% - (var(--per-view) - 1) * 16px) / var(--per-view)); display: flex; flex-direction: column; align-items: center; padding: 40px 20px 24px; border-radius: 10px; background: #f4f4f4; text-align: center; scroll-snap-align: start; }
.review p { margin: 0; }
.review__head { position: absolute; top: -32px; }
.review__avatar { width: 64px; height: 64px; border-radius: 50%; }
.review__google { position: absolute; right: -4px; bottom: 2px; width: 24px; height: 24px; }
.review__name { margin-top: 12px; font-size: 15px; font-weight: 600; color: var(--black); }
.review__date { font-size: 13px; color: #8c8c8c; }
.review__stars { display: flex; align-items: center; gap: 1px; margin: 8px 0 !important; }
.review__stars svg { width: 19px; height: 19px; }
.review__stars .review__verified { width: 16px; height: 16px; margin-left: 6px; }
.review__text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; overflow: hidden; font-size: 15px; color: var(--black); }
.review__text.open { -webkit-line-clamp: unset; }
.review__more { margin-top: 6px; padding: 0; border: 0; background: none; color: #8c8c8c; font: inherit; font-size: 13px; cursor: pointer; }

/* --- testata delle pagine interne ---------------------------------------- */

.page-hero { position: relative; display: flex; align-items: center; min-height: 400px; background: center / cover; color: var(--white); }
.page-hero::before { content: ""; position: absolute; inset: 0; background: var(--black); opacity: .35; }
.page-hero h1, .page-hero__title { margin: 0; line-height: 1.1; position: relative; max-width: 560px; font-size: 65px; font-weight: 700; color: var(--white); }
/* versione bassa e centrata con velo blu (Chi siamo, Contatti, I nostri brand, Servizi) */
.page-hero--small { min-height: 221px; justify-content: center; text-align: center; background-image: url(assets/img/sfondo-pagine.webp); }
.page-hero--small::before { background: var(--navy); opacity: .8; }
.page-hero--small h1 { max-width: none; font-size: 32px; }

/* --- pagine dei servizi --------------------------------------------------- */

.category { max-width: 81%; margin: 150px auto; text-align: center; }
.category h1 { margin-bottom: 20px; font-size: 40px; font-weight: 500; }
.category p { font-size: 17px; }
.category .button { margin-top: 30px; }

/* --- chi siamo ------------------------------------------------------------ */

.story { padding-top: 30px; padding-bottom: 20px; color: var(--navy); }
.gallery { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; padding-bottom: 30px; }
.gallery a { display: block; position: relative; overflow: hidden; }
.gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .3s; }
.gallery a:hover img { transform: scale(1.05); }

/* ingrandimento (creato da script.js) */
.lightbox { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .9); }
.lightbox img { max-width: 92vw; max-height: 88vh; width: auto; }
.lightbox button { position: absolute; padding: 10px 16px; border: 0; background: none; color: var(--white); font-size: 40px; line-height: 1; cursor: pointer; }
.lightbox .close { top: 10px; right: 10px; }
.lightbox .prev { left: 10px; }
.lightbox .next { right: 10px; }

/* --- i nostri brand ------------------------------------------------------- */

.brands-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; margin: 0 auto; padding: 60px 20px; list-style: none; }
.brands-grid img { margin: 0 auto; }

/* --- contatti ------------------------------------------------------------- */

.contact-info { padding-top: 70px; padding-bottom: 70px; }
.contact-info h2 { margin-bottom: 16px; font-size: 3em; font-weight: 400; color: var(--black); }
.contact-list { margin: 0 0 24px; padding: 0; list-style: none; }
.contact-list li { display: flex; align-items: center; gap: 10px; padding: 5px 0; color: var(--navy); }
.contact-list .icon { color: var(--yellow); }

.contact-form { padding: 40px 0 50px; background: var(--grey); }
.contact-form h2 { margin-bottom: 16px; font-size: 23px; font-weight: 400; color: var(--black); }
.contact-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact-map iframe { display: block; width: 100%; height: 450px; border: 0; }
.form { display: flex; flex-direction: column; gap: 10px; max-width: 550px; }
.form input:not([type="checkbox"]), .form textarea {
  width: 100%; padding: 8px 16px; border: 1px solid var(--grey-line); border-radius: 0;
  background: var(--white); font: inherit; font-size: 15px; color: var(--text);
}
.form ::placeholder { color: var(--grey-text); }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--navy); }
.form__privacy { display: flex; align-items: flex-start; gap: 8px; font-size: 15px; }
.form__privacy input { margin-top: 6px; accent-color: var(--navy); }
.form__privacy a { color: var(--grey-text); }
.form button { align-self: flex-start; padding: 10px 24px; border: 0; background: var(--navy); color: var(--white); font: 500 15px var(--font); cursor: pointer; }
.form button:hover { filter: brightness(1.3); }

/* --- footer --------------------------------------------------------------- */

.site-footer { padding: 70px 0 50px; background: var(--navy); color: var(--white); }
.footer__grid { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 30px; }
.site-footer h2 { margin-bottom: 16px; font-size: 18px; font-weight: 500; color: var(--white); }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.site-footer a { color: rgba(255, 255, 255, .82); }
.site-footer a:hover { color: var(--yellow); }
.site-footer .icon { color: var(--yellow); }
.footer__contacts { font-size: 14px; font-weight: 300; }
.footer__logo img { width: 160px; margin: 0 auto; }
.credits { padding: 14px 20px; border-top: 1px solid rgba(255, 255, 255, .15); background: var(--navy); color: #adadad; font-size: 12px; font-weight: 300; text-align: center; }
.credits a { color: inherit; }

/* --- WhatsApp ------------------------------------------------------------- */

.whatsapp { position: fixed; right: 15px; bottom: 15px; z-index: 60; display: flex; padding: 12px; border-radius: 50%; background: #25d366; color: var(--white); box-shadow: 0 4px 12px rgba(0, 0, 0, .2); }
.whatsapp .icon { width: 28px; height: 28px; }

/* --- pagine di testo (privacy, cookie, 404) ------------------------------ */

.page { max-width: 820px; margin: 0 auto; padding: 40px 20px 100px; }
.page h1 { margin-bottom: 1.5rem; font-size: 2.2rem; }
.page h2 { margin: 2rem 0 1rem; font-size: 1.4rem; }
.page h3 { margin: 1.2rem 0 .5rem; font-size: 1.1rem; }
.page li { margin-bottom: .35rem; }
.page a { text-decoration: underline; }
.page .updated { margin-top: 2rem; color: var(--grey-text); font-size: .9em; }
.page--404 { padding: 100px 20px; text-align: center; }
.page--404 .button { text-decoration: none; }

/* --- blog: pagine generate da SiteHub con _sitehub/templates/ ---------------- */

.page-hero--small .page-hero__title { font-size: 32px; }
.blog { max-width: 1140px; }
.blog__griglia { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; margin-top: 1rem; }
.blog__card { display: flex; flex-direction: column; border: 1px solid var(--grey-line); background: var(--white); }
.blog__card > a { color: var(--text); text-decoration: none; }
.blog__card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.blog__card h2 { margin: 20px 20px 8px; font-size: 1.2rem; color: var(--navy); transition: opacity .2s; }
.blog__card > a:hover h2, .blog__card > a:focus-visible h2 { opacity: .75; }
.blog__data { margin: 0 20px 10px; color: var(--grey-text); font-size: .9em; }
.blog__card .blog__estratto { margin: 0 20px 20px; }

.articolo__meta { margin-bottom: 1rem; color: var(--grey-text); font-size: .95em; }
.articolo__immagine { width: 100%; margin: 0 0 2rem; }
.articolo__testo { font-size: 1.05rem; }
.articolo__testo figure { margin: 1.5rem 0; }
.articolo__testo img { display: block; max-width: 100%; height: auto; margin: 1.5rem auto; }
.articolo__testo figure img { margin: 0 auto; }
.articolo__testo figcaption { margin-top: .5rem; font-size: .9em; color: var(--grey-text); text-align: center; }
.articolo__testo .img--media { width: 50%; }
.articolo__testo .img--piccola { width: 30%; }
.articolo__testo figure.img--media img, .articolo__testo figure.img--piccola img { width: 100%; }
.articolo__testo .img--sinistra { float: left; margin: .3rem 1.5rem 1rem 0; }
.articolo__testo .img--destra { float: right; margin: .3rem 0 1rem 1.5rem; }
.articolo__testo::after { content: ""; display: block; clear: both; }
.articolo__testo ul, .articolo__testo ol { margin: 0 0 1rem; padding-left: 1.4rem; }
.articolo__testo blockquote { margin: 1.5rem 0; padding: .4rem 0 .4rem 1.2rem; border-left: 4px solid var(--yellow); color: var(--text); }
.articolo__testo hr { margin: 2rem 0; border: 0; border-top: 1px solid var(--grey-line); }

.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 3rem; }
.pagination .page-numbers { padding: 6px 14px; border: 1px solid var(--grey-line); color: var(--navy); text-decoration: none; }
.pagination .current { border-color: var(--navy); background: var(--navy); color: var(--white); }

@media (max-width: 600px) {
  .articolo__testo .img--media, .articolo__testo .img--sinistra, .articolo__testo .img--destra { float: none; width: 100%; margin: 1.5rem 0; }
}
.eyebrow { margin: 0 0 10px; font-size: 16px; font-weight: 600; text-transform: uppercase; color: var(--grey-text); }

@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
  .marquee__track [aria-hidden] { display: none; }
}

/* --- tablet --------------------------------------------------------------- */

@media (max-width: 1024px) {
  :root { --header-h: 80px; }
  .topbar { display: none; }
  .logo img { width: 160px; }
  .menu-toggle { display: block; }
  .menu {
    display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch;
    max-height: calc(100vh - var(--header-h)); overflow-y: auto; background: var(--navy); box-shadow: 0 10px 20px rgba(0, 0, 0, .15);
  }
  .menu.open { display: flex; }
  .menu a, .submenu-toggle { width: 100%; padding: 14px 20px; }
  .submenu { position: static; min-width: 0; box-shadow: none; background: #13257f; }
  .has-submenu:hover .submenu, .has-submenu:focus-within .submenu { display: none; }
  .has-submenu.open .submenu { display: block; }
  .has-submenu.open .submenu-toggle .icon { transform: rotate(180deg); }
  .submenu a { padding-left: 36px; color: var(--white); }
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .slider__track { --per-view: 2; }
  .gallery, .brands-grid { grid-template-columns: repeat(3, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

/* --- mobile --------------------------------------------------------------- */

@media (max-width: 767px) {
  .title { font-size: 26px; }
  .brands { padding: 50px 0 60px; }
  .marquee img { width: 160px; height: 80px; margin: 0 10px; }
  .services { padding-bottom: 60px; }
  .services__grid { grid-template-columns: 1fr; }
  .numbers .container { flex-direction: column; text-align: center; }
  .counter { width: 320px; }
  .counter strong { font-size: 26px; }
  .counter > span { font-size: 24px; }
  .about { flex-direction: column; }
  .slider__track { --per-view: 1; }
  .page-hero { min-height: 300px; }
  .page-hero h1, .page-hero__title { font-size: 40px; }
  .page-hero--small { min-height: 180px; }
  .page-hero--small h1 { font-size: 28px; }
  .category { max-width: none; margin: 60px 20px; }
  .category h1 { font-size: 28px; }
  .contact-info h2 { font-size: 2.2em; }
  .contact-form__grid { grid-template-columns: 1fr; }
  .contact-map iframe { height: 320px; }
  .gallery, .brands-grid { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr; text-align: center; }
  .site-footer li { justify-content: center; }
  .footer__logo { order: -1; }
  .footer__logo img { width: 35%; }
}
