/* network-theme-ai: misure prese dal vecchio sito (Uncode con il tema figlio network-netaddiction-theme) */

:root {
  --accent: #f46262;
  --text: #323232;
  --blue: #76a3e8;
  --light: #f4f8fb;
  --border: #eaeaea;
  --gradient: linear-gradient(to right, #78a3e8, #f46262 50%, #ffc444 100%);
  --header-h: 74px;
  --gutter: 36px;
  --main-width: 1200px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font: 400 16px/1.75 Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video { max-width: 100%; height: auto; vertical-align: middle; }

a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--text); }

h1, h2, h3, h4, h5, h6 { margin: 27px 0 0; color: var(--text); font-weight: 800; line-height: 1.2; }
h1, .h1 { font-size: 35px; }
h2, .h2 { font-size: 29px; }
h3, .h3 { font-size: 24px; }
h4, .h4 { font-size: 20px; }
h5, .h5 { font-size: 17px; }
h6, .h6 { font-size: 14px; }
.fs-display { font-size: 72px; }
p, ul, ol, table { margin: 18px 0 0; }
:is(h1, h2, h3, h4, h5, h6, p, ul, ol, table, hr):first-child { margin-top: 0; }
strong, b { font-weight: 800; }
table { width: 100%; border-collapse: collapse; }
td { padding: 9px 0; border-bottom: 1px solid var(--border); vertical-align: top; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}
.skip-link:focus {
  clip: auto; width: auto; height: auto;
  z-index: 1000; top: 8px; left: 8px;
  padding: 8px 16px;
  background: #fff;
  color: var(--text);
}

.container { max-width: var(--main-width); margin: 0 auto; padding: 0 var(--gutter); }
.align-center { text-align: center; }

/* ---------- Intestazione ---------- */

/* Su desktop l'intestazione scorre con la pagina, su mobile resta in alto (come in Uncode) */
.site-header {
  position: relative;
  z-index: 100;
  background: #fff;
  box-shadow: 0 4px 10px -10px rgba(0, 0, 0, .6);
}
.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 36px;
}
.site-logo {
  font-size: 20px;
  font-weight: 800;
  line-height: 20px;
  letter-spacing: -.5px;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.main-nav .menu { display: flex; margin: 0; padding: 0; list-style: none; }
.main-nav .menu a {
  display: flex;
  align-items: center;
  gap: 5px;
  height: var(--header-h);
  padding: 0 14px;
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  line-height: 16px;
}
.main-nav .menu li:first-child a { padding-left: 0; }
.main-nav .menu li:last-child a { padding-right: 0; }
.main-nav .menu a:hover,
.main-nav .menu .current-menu-item > a { color: var(--accent); }
/* Bandiera del selettore di lingua di Polylang, 16 × 11 px come prima */
.main-nav .menu .pll-switcher-flag { --pll-flag-width: 16px; }
.main-nav .menu img { width: 16px; height: 11px; }
.menu-toggle { display: none; }

/* ---------- Righe e colonne di WPBakery ---------- */

.vc-row {
  position: relative;
  background: var(--row-bg, transparent);
}
.vc-row__inner {
  padding: var(--pt, 36px) var(--ph, 36px) var(--pb, 36px);
  min-height: var(--row-h, 0);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.vc-row.is-full-width > .vc-row__inner { padding: 0; }

.vc-grid { display: flex; flex-wrap: wrap; gap: var(--gap, 36px) var(--gap, 36px); }
.vc-row-inner > .vc-grid { gap: 0 var(--gap, 36px); }
.equal-height > .vc-row__inner > .vc-grid, .equal-height > .vc-grid { align-items: stretch; flex: 1; }
.vc-row.equal-height > .vc-row__inner { min-height: var(--row-h, 0); }
.vc-row[style*="--row-h"] > .vc-row__inner > .vc-grid { flex: 1; }

.vc-col {
  /* Le colonne interne non ereditano larghezza e spaziatura della colonna che le contiene */
  --content-w: 100%;
  --el-gap: 36px;
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 0 0 calc((100% - (12 / var(--span) - 1) * var(--gap, 36px)) * var(--span) / 12);
  min-width: 0;
  padding: var(--col-pad, 0);
}
.vc-col-12 { --span: 12; flex-basis: 100%; }
.vc-col-9 { --span: 9; }
.vc-col-8 { --span: 8; }
.vc-col-6 { --span: 6; }
.vc-col-4 { --span: 4; }
.vc-col-3 { --span: 3; }
/* Le colonne riempiono la riga anche quando la somma non fa 12 per arrotondamenti */
.vc-grid > .vc-col { flex-basis: calc(var(--span) / 12 * (100% + var(--gap, 36px)) - var(--gap, 36px)); }
.vc-grid > .vc-col-12 { flex-basis: 100%; }

.vc-col.valign-middle { justify-content: center; }
.vc-col.valign-bottom { justify-content: flex-end; }
.vc-col.align-center { text-align: center; }
.vc-col.align-right { text-align: right; }
.vc-col.has-bg { background-size: cover; background-position: center; background-repeat: no-repeat; }
.vc-col__content { width: 100%; max-width: var(--content-w); margin-inline: auto; }
/* Spazio tra gli elementi di una colonna (gutter 3 di Uncode) */
.vc-col__content > * + * { margin-top: var(--el-gap); }
.vc-col__content > style + *, .vc-col__content > style:first-child + * { margin-top: 0; }

/* ---------- Testi ---------- */

.text-column > :first-child { margin-top: 0; }
.text-lead { font-size: 18px; line-height: 1.75; }
.text-small { font-size: 14px; line-height: 1.75; }

/* Titoli grandi delle pagine (classe heading-display-1 del tema figlio) */
.heading-display-1 { display: flex; flex-direction: column; justify-content: center; }
.heading-display-1 h1 {
  align-self: center;
  margin: 0;
  font-size: 112px;
  line-height: 1;
  letter-spacing: -1.6px;
  text-transform: uppercase;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.heading-display-1 h2 { font-size: 40px; }
.heading-display-1 h3 { color: var(--accent); font-size: 32px; }
.heading-display-1 p { color: rgba(0, 0, 0, .5); line-height: 1.3; font-size: 20.8px; }

.custom-heading { margin: 0; }
.heading-sub { margin-top: 18px; }
.heading-sub > :first-child { margin-top: 0; }

/* Blocchi immagine + testo (classe promo-box del tema figlio) */
.promo-titoletto { font-size: 20.8px; font-weight: 400; }
.promo-titoletto strong { font-weight: 800; }
.promo-claim,
.wrapper-form h1,
.client-box h1 {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.promo-claim { margin: 0; font-size: 48px; }
.promo-abstract { font-size: 22.4px; line-height: 1.5; }
.client-box h1 { display: inline; font-size: 48px; }
.client-box .promo-abstract { font-size: 20.8px; }
.wrapper-form .text-column { display: flex; flex-direction: column; }
.wrapper-form .text-column h1 { margin: 0 auto; font-size: 48px; }
.wrapper-form .text-column p { font-size: 20.8px; }

/* ---------- Elementi ---------- */

.btn-container { line-height: 0; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 31px;
  border: var(--btn-border, 1px) solid var(--btn, var(--accent));
  border-radius: 8px;
  background: var(--btn, var(--accent));
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: background .2s, color .2s;
}
.btn .icon { width: 17px; height: 15px; }
.btn-outline { background: transparent; color: var(--btn, var(--accent)); }
.btn-outline:hover { background: var(--btn, var(--accent)); color: #fff; }
.btn-wide { min-width: 379px; }

.single-image { max-width: 100%; }
.single-image img { width: 100%; }
.single-image.align-center { margin-inline: auto; }
.single-image.align-right { margin-left: auto; }
.single-image.has-shadow img { box-shadow: 0 25px 30px -15px rgba(0, 0, 0, .45); }
.align-center .single-image { margin-inline: auto; }

.separator { width: 100%; height: 0; margin-inline: auto; border: 0; border-top: 1px solid var(--border); }

.counter { text-align: center; }
.counter__value { font-weight: 800; line-height: 1.2; }
.counter__sep { width: 90px; margin: 27px auto 0; border: 0; border-top: 2px solid var(--accent); }
.counter__text { margin-top: 27px; font-size: 16px; font-weight: 800; line-height: 28px; }

.accordion__item { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.accordion__item + .accordion__item { border-top: 0; }
.accordion__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  font-size: 14px;
  font-weight: 800;
  line-height: 24.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}
.accordion__title::-webkit-details-marker { display: none; }
.accordion__title .icon { width: 14px; height: 14px; transition: transform .2s; }
.accordion__item[open] > .accordion__title .icon { transform: rotate(90deg); }
.accordion__body { padding: 9px 0 36px; }
.accordion__body .vc-row-inner + *, .accordion__body .text-column + .text-column { margin-top: 36px; }

/* Carosello di loghi (vc_gallery): striscia a scorrimento orizzontale */
.gallery-carousel { --per: var(--lg); overflow: hidden; }
.gallery-carousel__track {
  display: flex;
  gap: 36px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.gallery-carousel__track::-webkit-scrollbar { display: none; }
.gallery-carousel__item {
  flex: 0 0 calc((100% - (var(--per) - 1) * 36px) / var(--per));
  scroll-snap-align: start;
}
.gallery-carousel__item img { display: block; width: 100%; }
.gallery-carousel.ratio-3-2 img { aspect-ratio: 3 / 2; object-fit: contain; }
.gallery-carousel.is-round img { border-radius: 4px; }
.gallery-carousel__dots { display: flex; align-items: center; justify-content: center; gap: 12px; height: 40px; padding-top: 18px; }
.gallery-carousel__dots button {
  width: 8px; height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(25, 27, 30, .25);
  cursor: pointer;
}
.gallery-carousel__dots button[aria-current="true"] { width: 10px; height: 10px; background: rgba(25, 27, 30, .5); }

.raw-html { line-height: 0; }

/* Formato precedente / successivo sotto le demo */
.post-nav { display: flex; justify-content: space-between; gap: 36px; }
.post-nav__item {
  display: flex;
  flex: 0 1 451px;
  align-items: center;
  gap: 24px;
  padding: 8px 16px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: var(--accent);
}
.post-nav__item--next { justify-content: flex-end; text-align: right; }
.post-nav__item--empty { border: 0; }
.post-nav__text { display: flex; flex-direction: column; }
.post-nav__label { font-size: 16px; line-height: 28px; }
.post-nav__title { font-size: 17px; font-weight: 800; line-height: 20.4px; text-transform: uppercase; }
.post-nav__item .icon { width: 16px; height: 16px; flex: none; }
.post-nav__item:hover { background: var(--accent); color: #fff; }

/* Demo dei formati: Uncode lasciava uno spazio vuoto sotto il contenuto degli articoli */
.single-post .page-content { padding-bottom: 180px; }

/* Telefoni dei formati ADV */
.format-img img { width: 255px; }

.archive-list { margin: 36px auto 0; padding: 0; max-width: 600px; list-style: none; text-align: center; }
.archive-list li { padding: 9px 0; border-bottom: 1px solid var(--border); }

/* ---------- Moduli (Contact Form 7) ---------- */

.wpcf7 form > div > :first-child { margin-top: 0; }
.wpcf7 p { margin: 18px 0 0; font-weight: 800; line-height: 28px; }
.wpcf7 h4 { margin-top: 27px; }
.wpcf7 hr { margin: 27px 0; border: 0; border-top: 1px solid var(--border); }
.wpcf7-inline-wrapper { display: flex; margin-top: 18px; }
.wpcf7-inline-wrapper:first-child { margin-top: 0; }
.wpcf7-inline-field { flex: 1; margin: 0; }
.wpcf7-inline-field:first-child { padding-right: 9px; }
.wpcf7-inline-field:last-child { padding-left: 9px; }
.wpcf7-form-control-wrap { display: block; }
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 input[type="number"],
.wpcf7 textarea {
  display: block;
  width: 100%;
  padding: 10px 15px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
}
.wpcf7 fieldset { margin: 0; padding: 0; border: 0; }
.wpcf7 textarea { height: 242px; resize: vertical; }
.wpcf7 ::placeholder { color: var(--text); opacity: 1; }
.wpcf7 input:focus, .wpcf7 textarea:focus { outline: none; border-color: #c8c8c8; }
.wpcf7-acceptance { display: block; margin-top: 21px; font-size: 11px; font-weight: 400; line-height: 22px; }
.wpcf7-acceptance .wpcf7-list-item { margin: 0; }
.wpcf7-acceptance label { display: flex; align-items: center; gap: 10px; }
.wpcf7-acceptance input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.wpcf7 input[type="submit"] {
  display: block;
  width: 100%;
  max-width: 400px;
  margin: 21px auto 0;
  padding: 13px 31px;
  border: 1px solid var(--accent);
  border-radius: 2px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 20px;
  font-weight: 800;
  line-height: 27px;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
}
.wpcf7 input[type="submit"]:hover { filter: brightness(.92); }
.wpcf7 input[type="submit"]:disabled { opacity: .6; cursor: default; }
.wpcf7-spinner { display: none; }
.wpcf7-not-valid-tip { display: block; margin-top: 4px; color: var(--accent); font-size: 13px; font-weight: 400; }
.wpcf7-response-output { margin: 18px 0 0; font-size: 14px; font-weight: 400; text-align: center; }
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output { color: var(--accent); }
.wpcf7 form .wpcf7-response-output:empty { display: none; }
.form-info a { color: var(--accent); }

/* ---------- Piede ---------- */

.site-footer { padding: 27px 0 108px; text-align: center; }
.site-footer h4 { margin: 0; font-size: 20px; }
.site-footer p { margin-top: 18px; font-size: 13px; line-height: 22.75px; }
.site-footer a { color: inherit; }
.site-footer a:hover { color: var(--accent); }

.scroll-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--text);
  color: #fff;
}
.scroll-top .icon { width: 16px; height: 16px; }
.scroll-top:hover { background: #000; color: #fff; }

/* ---------- Schermi intermedi e mobile ---------- */

@media (max-width: 1199px) {
  .heading-display-1 h1 { font-size: 80px; }
  .heading-display-1 h2 { font-size: 32px; }
  .heading-display-1 h3 { font-size: 27.2px; }
  .promo-claim, .client-box h1, .wrapper-form .text-column h1 { font-size: 35px; }
  .promo-abstract { font-size: 17.6px; }
}

@media (min-width: 570px) and (max-width: 959px) {
  .hide-medium { display: none !important; }
}

@media (max-width: 959px) {
  .site-header { position: sticky; top: 0; }
  .site-header__bar { padding: 0 27px; }
  .menu-toggle {
    display: flex;
    padding: 8px;
    border: 0;
    background: none;
    color: var(--text);
    cursor: pointer;
  }
  .menu-toggle .icon { width: 24px; height: 24px; }
  .menu-toggle__close, .menu-open .menu-toggle__open { display: none; }
  .menu-open .menu-toggle__close { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 9px 27px 27px;
    background: #fff;
    box-shadow: 0 10px 10px -10px rgba(0, 0, 0, .3);
  }
  .menu-open .main-nav { display: block; }
  .main-nav .menu { flex-direction: column; }
  .main-nav .menu a, .main-nav .menu li:first-child a { height: auto; padding: 12px 0; }

  .vc-grid > .vc-col { flex-basis: 100%; }
  /* Righe interne impilate: spazio sopra ogni colonna tranne la prima, anche se la prima è nascosta (come in Uncode) */
  .vc-row-inner > .vc-grid > .vc-col:not(:first-child) { margin-top: 36px; }
  .vc-grid > .vc-col-3 { flex-basis: calc(50% - var(--gap, 36px) / 2); }
  .vc-col.has-bg { min-height: var(--mobile-h, 300px); }
  /* La larghezza ridotta del contenuto (column_width_percent) vale solo su desktop */
  .vc-col__content { max-width: 100%; }
  .vc-col.align-center-mobile { text-align: center; }
  .vc-col.align-center-mobile .single-image { margin-inline: auto; }
  .inverted-mobile > .vc-row__inner > .vc-grid, .inverted-mobile > .vc-grid { flex-direction: column-reverse; flex-wrap: nowrap; }
  .vc-row[style*="--row-h"] > .vc-row__inner { min-height: 0; }
  .gallery-carousel { --per: var(--md); }
  .btn-wide { min-width: 0; }
}

@media (max-width: 569px) {
  .hide-mobile { display: none !important; }
  .vc-row__inner { padding-left: 36px; padding-right: 36px; }
  .btn:not(.btn-wide) { padding: 10px 20px; font-size: 12px; letter-spacing: 1.2px; }
  .btn-wide { width: 100%; }
  .text-small { font-size: 13px; }
  .format-img img { width: 220px; }
  .vc-grid > .vc-col-3 { flex-basis: 100%; }
  .vc-grid > .vc-col.mobile-half { flex-basis: calc(50% - var(--gap, 36px) / 2); }
  .heading-display-1 h1 { font-size: 40px; letter-spacing: -1.6px; }
  .heading-display-1 h2 { font-size: 19.2px; }
  .heading-display-1 h3 { font-size: 17.6px; }
  .heading-display-1 p { font-size: 16px; }
  .fs-display { font-size: 35px; }
  .promo-claim, .client-box h1, .wrapper-form .text-column h1 { font-size: 35px; }
  .promo-abstract { font-size: 17.6px; }
  .gallery-carousel { --per: var(--sm); }
  .post-nav { flex-direction: column; gap: 18px; }
  .post-nav__item { flex-basis: auto; }
}

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