/* ==========================================================================
   sergiopinna.it — foglio di stile unico
   Mobile-first. Breakpoint: 768px (tablet), 1025px (desktop).
   Valori ricavati dal sito WordPress originale (GeneratePress + GenerateBlocks
   + CSS personalizzato).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Font
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Michroma";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/michroma-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Font della landing "Web designer per agenzie" (Google Fonts, licenza SIL OFL 1.1,
   vedi OFL-*.txt). Il browser li scarica solo nelle pagine che li usano. */
@font-face {
  font-family: "Bebas Neue";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/bebas-neue-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/instrument-serif-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/instrument-serif-400-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700; /* font variabile: un solo file per i pesi 400-700 */
  font-display: swap;
  src: url("/assets/fonts/inter-400-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --------------------------------------------------------------------------
   2. Variabili
   -------------------------------------------------------------------------- */
:root {
  --c-navy: #041133;
  --c-navy-2: #1e2946;
  --c-navy-3: #061a45;
  --c-navy-4: #091d48;
  --c-footer: #02091c;
  --c-footer-bottom: #00030a;
  --c-sky: #22adf5;
  --c-blue: #2f8cff;
  --c-blue-2: #1885ff;
  --c-blue-light: #69b4ff;
  --c-coral: #ff8973;
  --c-white: #ffffff;
  --c-border: rgba(255, 255, 255, 0.25);
  --c-border-strong: rgba(255, 255, 255, 0.42);

  --f-display: "Michroma", Arial, sans-serif;
  --f-body: Arial, sans-serif;
  --f-mono: Consolas, Monaco, "Courier New", monospace;

  --container: 1400px;
  --gutter: 15px;
  --radius: 20px;
  --radius-btn: 10px;

  --shadow-btn: 0 18px 44px rgba(47, 140, 255, 0.28);
  --shadow-soft: 0 0 5px rgba(255, 255, 255, 0.18);
  --hero-bg: radial-gradient(circle at 82% 22%, rgba(47, 140, 255, 0.22), transparent 30%), radial-gradient(circle at 12% 16%, rgba(105, 180, 255, 0.15), transparent 28%), #041133;

  --header-h: 83px; /* 40 + 43 (mobile) */
}

@media (min-width: 768px) {
  :root { --header-h: 115px; } /* 40 + 75 */
}

/* --------------------------------------------------------------------------
   3. Reset e base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background-color: var(--c-navy);
  color: var(--c-white);
  font-family: var(--f-display);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote, pre {
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--c-white);
  font-family: var(--f-display);
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 20px;
}

h1 { font-size: 26px; }
h2 { font-size: 24px; }
h3 { font-size: 22px; }
h4 { font-size: 20px; }
h5 { font-size: 18px; }
h6 { font-size: 16px; }

p, li, button, input, select, textarea {
  font-family: var(--f-body);
  line-height: 1.7;
}

p, li {
  font-size: 16px;
}

p, ul, li, a {
  font-weight: 300;
}

p {
  margin-bottom: 1.5em;
}

ul, ol {
  margin: 0 0 1.5em 3em;
}

b, strong {
  font-weight: 700;
}

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

img {
  vertical-align: middle;
}

@media (min-width: 768px) {
  h1, h2, h3, h4, h5, h6 { line-height: 1.2; }
  h1 { font-size: 42px; }
  h2 { font-size: 35px; }
  h3 { font-size: 29px; }
  h4 { font-size: 24px; }
  h5 { font-size: 20px; }
  h6 { font-size: 18px; }
  p, li { font-size: 18px; }
}

/* Link: colore azzurro e sottolineatura animata */
a {
  color: var(--c-sky);
  text-decoration: none;
  position: relative;
  transition: color 0.1s ease-in-out, background-color 0.1s ease-in-out;
}

a:hover,
a:focus,
a:active {
  color: var(--c-sky);
}

b a,
strong a {
  font-weight: 700;
}

/* Sottolineatura animata: come l'originale, su tutti i link di testo
   (anche citazioni, firme, colonna laterale, "Leggi tutto", paginazione) */
.link-line::before,
.prose a::before,
.footer-list a::before,
.reviews__intro a::before,
.entry-card__meta a::before,
.post-head__byline a::before,
.entry-card__more::before,
.pagination a::before,
.form__consent a::before,
.entry-card__footer a::before,
.footer-bottom a::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 1px;
  border-radius: 1px;
  background-color: currentColor;
  bottom: 0;
  left: 0;
  transform-origin: right;
  transform: scaleX(0);
  transition: transform 0.3s ease-in-out;
}

.link-line:hover::before,
.link-line:focus-visible::before,
.prose a:hover::before,
.prose a:focus-visible::before,
.footer-list a:hover::before,
.footer-list a:focus-visible::before,
.reviews__intro a:hover::before,
.reviews__intro a:focus-visible::before,
.entry-card__meta a:hover::before,
.entry-card__meta a:focus-visible::before,
.post-head__byline a:hover::before,
.post-head__byline a:focus-visible::before,
.entry-card__more:hover::before,
.entry-card__more:focus-visible::before,
.pagination a:hover::before,
.pagination a:focus-visible::before,
.form__consent a:hover::before,
.form__consent a:focus-visible::before,
.entry-card__footer a:hover::before,
.entry-card__footer a:focus-visible::before,
.footer-bottom a:hover::before,
.footer-bottom a:focus-visible::before {
  transform-origin: left;
  transform: scaleX(1);
}

/* Stessa sottolineatura animata (1px, colore del testo, 0,3s, entra da
   sinistra ed esce verso destra) per titoli e "Leggi l'articolo" delle schede.
   Disegnata come sfondo perché i titoli vanno spesso su più righe:
   così la linea compare sotto ogni riga. */
.entry-card h2 a,
.post-card h3 a,
.related-card h3 a,
.post-card__more,
.related-card__more {
  background: linear-gradient(currentColor, currentColor) right bottom / 0 1px no-repeat;
  transition: color 0.1s ease-in-out, background-size 0.3s ease-in-out;
}

.entry-card h2 a:hover,
.entry-card h2 a:focus-visible,
.post-card h3 a:hover,
.post-card h3 a:focus-visible,
.related-card h3 a:hover,
.related-card h3 a:focus-visible,
.post-card__more:hover,
.post-card__more:focus-visible,
.related-card__more:hover,
.related-card__more:focus-visible {
  background-position: left bottom;
  background-size: 100% 1px;
}

/* Focus visibile (WCAG 2.4.7) */
:focus-visible {
  outline: 3px solid var(--c-blue-light);
  outline-offset: 3px;
}

/* Testo solo per screen reader */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Link "Vai al contenuto" */
.skip-link {
  position: absolute;
  top: -100px;
  left: 15px;
  z-index: 100000;
  padding: 12px 20px;
  background: var(--c-white);
  color: var(--c-navy);
  font-family: var(--f-body);
  font-weight: 700;
  border-radius: 0 0 var(--radius-btn) var(--radius-btn);
}

.skip-link:focus {
  top: 0;
  color: var(--c-navy);
}

main:focus {
  outline: none;
}

/* Le ancore (#preventivo-home, #recensioni…) non finiscono sotto l'header fisso */
[id] {
  scroll-margin-top: calc(var(--header-h) + 25px);
}

/* Contenitore standard */
.container {
  width: 100%;
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.container--narrow {
  max-width: 1370px;
}

/* --------------------------------------------------------------------------
   4. Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 9999;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  background-color: var(--c-sky);
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 10px 3px rgb(0 0 0 / 55%);
  /* Entrata: scende dall'alto e compare in dissolvenza, a ogni caricamento */
  animation: headerTopIn 1.6s ease-out both;
}

@keyframes headerTopIn {
  from { opacity: 0; transform: translateY(-100%); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .header-top { animation: none; }
}

.recruiter-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--c-navy);
  font-family: var(--f-body);
  font-size: 18px;
  font-weight: 300;
  line-height: 1.2;
}

.recruiter-cta:hover,
.recruiter-cta:focus {
  color: var(--c-navy);
}

.recruiter-cta__text {
  display: inline-block;
  position: relative;
}

.recruiter-cta__text::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 1px;
  background: var(--c-navy);
  bottom: 0;
  left: 0;
  transform-origin: right;
  transform: scaleX(0);
  transition: transform 0.3s ease-in-out;
}

.recruiter-cta:hover .recruiter-cta__text::before,
.recruiter-cta:focus-visible .recruiter-cta__text::before {
  transform-origin: left;
  transform: scaleX(1);
}

.recruiter-cta__arrow {
  position: absolute;
  top: 50%; /* centrata in verticale sul testo (metà altezza 11px + 1px di ottica) */
  margin-top: -12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: currentColor;
}

.recruiter-cta__arrow svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.recruiter-cta__arrow--left {
  left: -25px;
  animation: recruiterArrowLeft 1s ease-in-out infinite;
}

.recruiter-cta__arrow--right {
  right: -25px;
  transform: scaleX(-1);
  animation: recruiterArrowRight 1s ease-in-out infinite;
}

@keyframes recruiterArrowLeft {
  0%, 100% { transform: translateX(-6px); }
  50% { transform: translateX(0); }
}

@keyframes recruiterArrowRight {
  0%, 100% { transform: translateX(6px) scaleX(-1); }
  50% { transform: translateX(0) scaleX(-1); }
}

.header-bottom {
  position: relative;
  display: flex;
  align-items: center;
  height: 43px;
  background: var(--c-navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.18);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0 15px;
}

.site-logo {
  display: block;
  line-height: 0;
  margin-left: auto;
  margin-right: auto;
}

.site-logo img {
  width: auto;
  height: 40px;
}

/* Navigazione principale — mobile: pannello a scomparsa */
.main-nav {
  order: -1;
  display: flex;
  align-items: center;
}

.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  margin: 0;
  border: 0;
  background: transparent;
  color: var(--c-white);
  cursor: pointer;
  position: relative;
  z-index: 10002;
}

.menu-toggle svg {
  width: 25px;
  height: 25px;
}

.menu-toggle__close { display: none; }
.menu-toggle[aria-expanded="true"] { color: var(--c-navy); }
.menu-toggle[aria-expanded="true"] .menu-toggle__open { display: none; }
.menu-toggle[aria-expanded="true"] .menu-toggle__close { display: block; }

.menu {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 10001;
  width: 300px;
  max-width: 85vw;
  margin: 0;
  padding: 70px 20px 60px;
  list-style: none;
  overflow-y: auto;
  background: var(--c-white);
  border-top-right-radius: 30px;
  border-bottom-right-radius: 30px;
  box-shadow: 10px 0 300px 10px #000000;
  transform: translateX(-110%);
  visibility: hidden;
  transition: transform 0.3s ease, visibility 0s linear 0.3s;
}

.menu.is-open {
  transform: translateX(0);
  visibility: visible;
  transition: transform 0.3s ease, visibility 0s;
}

.menu__item {
  position: relative;
  margin: 20px 0;
  padding: 0;
  list-style: none;
}

.menu__link {
  display: inline-block;
  padding: 0;
  color: var(--c-navy);
  font-family: var(--f-display);
  font-size: 13px;
  font-weight: 400;
}

/* Voci del sottomenu: testo più piccolo del 20% rispetto al menu (13px x 0,8) */
.submenu .menu__link {
  font-size: 10.4px;
}

.menu__link:hover,
.menu__link:focus {
  color: var(--c-navy);
}

.menu__link::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 1px;
  border-radius: 1px;
  background-color: currentColor;
  bottom: 0;
  left: 0;
  transform-origin: right;
  transform: scaleX(0);
  transition: transform 0.3s ease-in-out;
}

.menu__link:hover::before,
.menu__link:focus-visible::before,
.menu__link[aria-current="page"]::before {
  transform-origin: left;
  transform: scaleX(1);
}

.menu__item--has-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 6px;
}

.submenu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--c-navy);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.submenu-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.submenu {
  display: none;
  flex-basis: 100%;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  border-radius: var(--radius);
  border: 1px solid var(--c-border);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.submenu.is-open {
  display: block;
}

.submenu .menu__item {
  margin: 0;
  padding: 20px 20px 0;
  background: var(--c-white);
}

.submenu .menu__item:last-child {
  padding: 20px;
}

/* CTA "Richiedi un preventivo" */
.menu__item--cta .menu__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}

.menu__item--cta .menu__link::before {
  display: none;
}

.menu__item--cta .menu__link[aria-current="page"] {
  color: var(--c-navy);
}

/* Telefono ed email */
.header-contacts {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-contacts__link {
  display: inline-flex;
  color: var(--c-white);
  line-height: 0;
}

.header-contacts__link:hover,
.header-contacts__link:focus {
  color: var(--c-sky);
}

/* Header: tablet e desktop (menu orizzontale) */
@media (min-width: 769px) {
  .header-bottom {
    height: 75px;
  }

  .site-logo {
    margin-left: 0;
    margin-right: 0;
  }

  .main-nav {
    order: 0;
    margin-left: auto;
    margin-right: auto;
  }

  .menu-toggle {
    display: none;
  }

  .menu {
    position: static;
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    align-items: center;
    width: auto;
    max-width: none;
    height: 60px;
    padding: 0;
    overflow: visible;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    transform: none;
    visibility: visible;
    transition: none;
  }

  .menu > .menu__item {
    margin: 0px 20px 0 0;
  }

  .menu > .menu__item:last-child {
    margin-right: 0;
  }

  .menu__link {
    color: var(--c-white);
    font-size: 15px;
  }

  /* sottomenu: 20% in meno (15px x 0,8) */
  .submenu .menu__link {
    font-size: 12px;
  }

  .menu__link:hover,
  .menu__link:focus,
  .menu__link[aria-current="page"] {
    color: var(--c-sky);
  }

  .menu__item--has-sub {
    flex-wrap: nowrap;
  }

  .submenu-toggle {
    color: var(--c-white);
    width: 24px;
    height: 24px;
  }

  .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    display: block;
    width: 200px;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 80ms linear, visibility 0s linear 80ms;
  }

  .menu__item--has-sub:hover > .submenu,
  .menu__item--has-sub:focus-within > .submenu,
  .submenu.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition-delay: 150ms, 0s;
  }

  .submenu .menu__item {
    background: var(--c-navy-2);
  }

  .menu__item--cta {
    margin-top: 2px !important;
  }

  .menu__item--cta .menu__link {
    gap: 10px;
    padding: 14px 24px;
    color: var(--c-white);
    background: var(--c-navy-4);
    border: 1px solid var(--c-border-strong);
    border-radius: var(--radius-btn);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  }

  .menu__item--cta .menu__link:hover,
  .menu__item--cta .menu__link:focus,
  .menu__item--cta .menu__link[aria-current="page"] {
    color: var(--c-white);
    border-color: var(--c-blue-light);
    background: rgba(47, 140, 255, 0.1);
    transform: translateY(-2px);
  }
}

@media (min-width: 1025px) {
  .menu > .menu__item {
    margin-right: 40px;
  }
}

/* --------------------------------------------------------------------------
   5. Pulsanti
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-btn);
  color: var(--c-white);
  font-family: var(--f-body);
  /* 24px senza grassetto = "testo grande" per WCAG: il contrasto del bianco
     sul blu (3,3-3,6:1) supera il minimo di 3:1. Non scendere sotto 24px
     (oppure 18,66px se si rimette il grassetto). */
  font-size: 24px;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  background: linear-gradient(135deg, var(--c-blue-2), var(--c-blue));
  box-shadow: var(--shadow-btn);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn:hover,
.btn:focus,
.btn:active {
  color: var(--c-white);
  transform: translateY(-2px);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--c-border-strong);
  box-shadow: none;
}

.btn--ghost:hover,
.btn--ghost:focus {
  border-color: var(--c-blue-light);
  background: rgba(47, 140, 255, 0.1);
  box-shadow: none;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

/* --------------------------------------------------------------------------
   6. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  font-family: var(--f-display);
}

.footer-top {
  padding: 30px 0;
  background: var(--c-footer);
}

.footer-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 60px;
  max-width: 1370px;
  margin: 0 auto;
  padding: 0 15px;
}

.footer-col {
  margin-bottom: 20px;
}

.footer-col--intro {
  text-align: center;
}

.footer-col--intro img {
  display: block;
  width: 200px;
  margin: 0 auto 40px;
  border-radius: var(--radius);
}

.footer-col--intro .footer-title {
  font-size: 20px;
  border-bottom: 0;
  text-align: center;
}

.footer-title {
  margin-bottom: 20px;
  color: var(--c-white);
  font-size: 20px;
  line-height: 1.4;
  border-bottom: 1px solid var(--c-white);
}

.footer-list {
  margin: 0 0 0 30px;
  padding: 0;
  list-style: none;
  list-style-image: url("/assets/img/flag-lista.png");
}

.footer-list li {
  margin-bottom: 18px;
  padding-left: 10px;
  font-family: var(--f-body);
  font-size: 16px;
}

.footer-list li:last-child {
  margin-bottom: 0;
}

.footer-bottom {
  padding: 40px 15px;
  background: var(--c-footer-bottom);
  font-size: 15px;
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  font-size: 15px;
}

@media (min-width: 768px) {
  .footer-top {
    padding: 100px 0;
  }

  .footer-main {
    grid-template-columns: 1fr 1fr;
  }

  .footer-col--intro {
    grid-column: 1 / -1;
    margin-bottom: 40px;
  }

  .footer-title {
    font-size: 24px;
    line-height: 1.2;
  }

  .footer-list li {
    font-size: 18px;
  }
}

@media (min-width: 1025px) {
  .footer-main {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-col--intro {
    grid-column: auto;
    margin-bottom: 0;
  }

  .footer-col {
    margin-bottom: 0;
  }
}

/* --------------------------------------------------------------------------
   7. Sezioni generiche
   -------------------------------------------------------------------------- */
.section {
  padding: 30px 0;
}

.section--alt {
  background-color: var(--c-navy-2);
}

.section__title {
  width: 100%;
  text-align: center;
}

.section__lead {
  width: 100%;
  margin-bottom: 30px;
  text-align: center;
}

@media (min-width: 768px) {
  .section { padding: 50px 0; }
}

@media (min-width: 1025px) {
  .section { padding: 100px 0; }
  .section--xl { padding: 200px 0; }
  .section__lead { margin-bottom: 50px; }
}

/* Testata delle pagine interne (sfondo con bagliori blu) */
.page-hero {
  background: var(--hero-bg);
  border-bottom: 1px solid var(--c-border);
}

.page-hero__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 30px var(--gutter);
}

@media (min-width: 768px) {
  .page-hero__inner { padding-top: 100px; padding-bottom: 100px; }
}

/* Breadcrumb */
.breadcrumb {
  margin-bottom: 15px;
  font-family: var(--f-body);
  font-size: 16px;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumb li {
  font-size: inherit;
}

.breadcrumb li + li::before {
  content: "»";
  margin: 0 0.35em;
}

.breadcrumb a::first-letter {
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   8. Home
   -------------------------------------------------------------------------- */

/* 8.1 Hero con video */
.hero {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  padding: 0 15px;
  background: url("/assets/img/mare.webp") center / cover;
  border-bottom: 1px solid var(--c-border);
  box-shadow: inset 0 0 10px 0 rgba(0, 0, 0, 0.33);
}

.hero__inner {
  position: relative;
  z-index: 30;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 15px;
}

.hero h1 {
  font-size: 30px;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.77);
}

/* Schermi stretti: a 30px "PROFESSIONALI" è più larga dello schermo,
   e i due pulsanti affiancati (testo a 19px) hanno bisogno di qualche pixel */
@media (max-width: 399px) {
  .hero h1 { font-size: 28px; }
  .hero__actions .btn { padding-left: 20px; padding-right: 20px; }
}

.hero__lead {
  font-weight: 400;
  letter-spacing: 0;
  text-align: center;
}

.hero__actions {
  display: flex;
  justify-content: space-between;
  column-gap: 15px;
  max-width: 100%;
  margin: 0 auto;
}

.hero__actions .btn {
  margin: 0 auto;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 10;
  overflow: hidden;
  pointer-events: none;
}

.hero__media video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: auto;
  height: auto;
  min-width: 100%;
  min-height: 100%;
  max-width: none;
  transform: translate(-50%, -50%);
  background: url("/assets/img/mare.webp") center / cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 48%);
}

@media (min-width: 768px) {
  .hero { padding: 0; margin: 0 15px; }
  .hero__lead { font-size: 22px; }
  .hero__actions { column-gap: 30px; }
}

@media (min-width: 1025px) {
  .hero { margin: 0; }
  .hero h1 { font-size: 38px; }
  .hero__actions { max-width: 75%; }
}

/* Home da 769px: header-bottom staccato di 10px (sopra e ai lati) sotto la
   barra azzurra, angoli arrotondati, sfondo blu al 70%; il video sale sotto
   l'header e si vede intorno. Lo stacco resta anche scorrendo la pagina. */
@media (min-width: 769px) {
  .home { --header-h: 112px; } /* 40 + 10 + 62 (altezza auto di header-bottom) */
  .home .header-bottom {
    margin: 10px auto 0;
    background: rgb(4 17 51 / 70%);
    border-radius: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    border-bottom: 1px solid #000;
    height: auto;
    width: calc(100% - 20px); /* almeno 10px ai lati quando la finestra è stretta */
    max-width: 1370px;
  }
  .home .hero {
    margin: -112px 0 0; /* 40 + 10 + 62: il video parte dal bordo alto dello schermo, sotto tutto l'header */
    padding-top: 112px;
    min-height: 100vh;
    min-height: 100svh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__media video { display: none; }
}

/* 8.2 Card dei servizi (con effetto luce al passaggio del mouse) */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  width: 100%;
}

.card {
  position: relative;
  padding: 20px;
  background: var(--c-navy);
  color: var(--c-white);
  border: 1px solid rgba(255, 225, 225, 0.5);
  transition: background 0.1s;
}

.card__icon {
  display: flex;
  width: 85px;
  margin: 0 auto 10px;
}

.card__icon svg {
  width: 100%;
  height: auto;
}

.card h3 {
  margin: 0 0 20px;
  text-align: center;
}

.card p {
  margin: 0;
  text-align: center;
}

@media (hover: hover) and (pointer: fine) {
  .card:hover { --active: 1; }

  .card::after,
  .card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
  }

  /* background-attachment: fixed va DOPO la scorciatoia "background",
     che altrimenti lo azzera: la luce va calcolata rispetto allo schermo
     (le coordinate --x/--y arrivano da main.js come clientX/clientY). */
  .card::after {
    background: radial-gradient(circle at calc(var(--x, -999) * 1px) calc(var(--y, -999) * 1px), rgba(255, 255, 255, 0.15), transparent 15vmin);
    background-attachment: fixed;
    opacity: var(--active, 0);
    transition: opacity 0.2s;
  }

  .card::before {
    background: radial-gradient(circle at calc(var(--x, -999) * 1px) calc(var(--y, -999) * 1px), rgba(255, 255, 255, 0.5), transparent 15vmin);
    background-attachment: fixed;
    -webkit-mask:
      linear-gradient(#fff, #fff) 50% 0 / 100% 4px no-repeat,
      linear-gradient(#fff, #fff) 50% 100% / 100% 4px no-repeat,
      linear-gradient(#fff, #fff) 0 50% / 4px 100% no-repeat,
      linear-gradient(#fff, #fff) 100% 50% / 4px 100% no-repeat;
    mask:
      linear-gradient(#fff, #fff) 50% 0 / 100% 4px no-repeat,
      linear-gradient(#fff, #fff) 50% 100% / 100% 4px no-repeat,
      linear-gradient(#fff, #fff) 0 50% / 4px 100% no-repeat,
      linear-gradient(#fff, #fff) 100% 50% / 4px 100% no-repeat;
  }
}

.section-cta {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 30px 0 0;
}

@media (min-width: 768px) {
  .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
  .card p { font-size: 20px; }
  .section-cta { padding: 50px 50px 0; }
}

@media (min-width: 1025px) {
  .cards-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
  .section-cta { padding: 50px; }
}

/* 8.3 Competenze (riquadri bianchi con loghi) */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  width: 100%;
}

.skill {
  display: grid;
  align-content: start;
  height: 100%;
  padding: 20px;
  background: var(--c-white);
}

.skill img {
  display: block;
  max-width: 100%;
  width: auto;
  margin: 0 auto 20px;
  background: var(--c-white);
  object-fit: cover;
}

.skill h3,
.skill p {
  color: var(--c-navy);
  text-align: center;
}

.skill h3 {
  margin: 0 0 20px;
}

.skill p {
  margin: 0;
}

/* misure dei singoli loghi come nell'originale */
.skill__logo--generatepress { height: 51px; margin: 33px auto 53px !important; }
.skill__logo--generateblocks { margin: 33px auto 53px !important; }
.skill__logo--uxui { height: 112px; margin: 0 auto 50px !important; }
.skill__logo--woo { height: 62px; margin: 0 auto 65px !important; }

@media (min-width: 768px) {
  .skills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
  .skill__logo--uxui { margin-top: 55px !important; }
  .skill__logo--woo { margin-top: 80px !important; }
}

@media (min-width: 1025px) {
  .skills-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
}

/* 8.4 Esperienza */
.experience h2 {
  margin-bottom: 30px;
  text-align: center;
}

.experience p {
  margin: 0;
  text-align: justify;
}

@media (min-width: 768px) {
  .experience h2 { font-size: 39px; margin-bottom: 50px; }
  .experience p { font-size: 20px; }
}

/* 8.5 Recensioni (masonry a colonne) */
.reviews {
  position: relative;
}

.reviews__intro {
  margin-bottom: 0;
  text-align: center;
}

.reviews__intro + .reviews__intro {
  margin-bottom: 30px;
}

.reviews h2 {
  margin-bottom: 30px;
  text-align: center;
}

.masonry {
  margin: 0 auto;
  padding: 0;
  columns: 1;
  column-gap: 30px;
}

.review {
  break-inside: avoid;
  margin-bottom: 30px;
  padding: 20px;
  background: var(--c-navy);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.review:last-child {
  margin-bottom: 0;
}

.review__text {
  display: block;
  font-family: "Times New Roman", Times, serif;
  text-align: center;
}

/* Il testo è dentro un <p>, che altrimenti prende Arial e 16/18px dalla
   regola generale dei paragrafi. Originale: Times New Roman 20px, interlinea 34px. */
.review__text p {
  font-family: inherit;
  font-size: 20px;
  line-height: 1.7;
}

.review__name {
  margin-bottom: 0;
  font-family: var(--f-display);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.4;
  text-align: center;
}

.review__role {
  margin-bottom: 0;
  text-align: center;
}

@media (min-width: 768px) {
  .reviews h2 { font-size: 46px; margin-bottom: 25px; }
  .reviews__intro + .reviews__intro { margin-bottom: 100px; }
  .masonry { columns: 2; padding: 1rem; }
  .review__name { font-size: 30px; line-height: 1.5; }
}

@media (min-width: 1025px) {
  .masonry { columns: 3; }
}

/* 8.6 Ultimi articoli (card articolo, usate anche nel blog) */
.posts-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 30px 0;
  width: 100%;
}

.post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--c-navy-2);
  border: 1px solid var(--c-border);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.post-card__img {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.post-card__img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.post-card:hover .post-card__img img {
  transform: scale(1.04);
}

.post-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 22px;
}

.post-card__meta {
  margin-bottom: 12px;
  color: var(--c-white);
  font-size: 0.85rem;
}

.post-card h3 {
  margin: 0 0 14px;
  font-size: 22px;
  line-height: 1.4;
}

.post-card h3 a {
  color: var(--c-sky);
  line-height: 1.7;
}

.post-card p {
  margin: 0 0 20px;
  color: var(--c-white);
  text-align: justify;
  line-height: 1.65;
}

.post-card__more {
  display: block;
  align-self: flex-start; /* larga quanto il testo: la linea in hover non va oltre */
  margin-top: auto;
  color: var(--c-sky);
}

@media (min-width: 768px) {
  .post-card__body { padding: 20px; }
  .post-card h3 { font-size: 1.25rem; line-height: 1.25; }
}

@media (min-width: 1025px) {
  .posts-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
}

/* --------------------------------------------------------------------------
   9. Form preventivo (Web3Forms)
   -------------------------------------------------------------------------- */
.quote h2 {
  text-align: center;
}

.quote__lead {
  margin-bottom: 30px;
  text-align: center;
}

.form {
  width: 100%;
}

.form__row {
  display: flex;
  flex-direction: column;
}

.form__field {
  margin-bottom: 30px;
}

.form__field label {
  display: block;
  margin-bottom: 8px;
  font-family: var(--f-body);
  font-size: 16px;
  font-weight: 300;
}

.form input[type="text"],
.form input[type="email"],
.form input[type="tel"],
.form textarea {
  display: block;
  width: 100%;
  padding: 10px 15px;
  color: var(--c-white);
  font-family: var(--f-body);
  font-size: 16px;
  background-color: var(--c-navy-3);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  -webkit-font-smoothing: antialiased;
}

.form textarea {
  min-height: 180px;
  max-height: 300px;
  resize: vertical;
}

/* Focus, e hover dei campi di testo: stesso aspetto (bordo 1px #69b4ff, alone leggero) */
.form input:focus,
.form textarea:focus,
.form input[type="text"]:hover,
.form input[type="email"]:hover,
.form input[type="tel"]:hover,
.form textarea:hover {
  outline: none;
  background-color: transparent;
  border-color: var(--c-blue-light);
  box-shadow: 0 0 0 4px rgba(47, 140, 255, 0.12);
}

/* In focus il bordo #69b4ff (var(--c-blue-light)) è spesso solo 1px:
   è il bordo del campo, senza contorno aggiuntivo */
.form input:focus-visible,
.form textarea:focus-visible {
  outline: none;
  outline-offset: 0px;
}

.form__consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 20px;
  font-family: var(--f-body);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.7;
}

.form__consent input {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 5px;
}

.form__note {
  margin-bottom: 0;
}

.form .btn {
  display: flex;
  width: 100%;
  margin-top: 20px;
}

.required-star {
  margin-left: 2px;
  color: red;
  font-weight: 700;
}

/* Honeypot anti-spam di Web3Forms: invisibile per tutti */
.form__botcheck {
  display: none !important;
}

@media (min-width: 768px) {
  .quote h2 { font-size: 46px; }
  .quote__lead { margin-bottom: 50px; }
  .form__field label,
  .form__consent { font-size: 18px; }
}

@media (min-width: 1025px) {
  .form__row--3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
  }

  .form .btn {
    display: inline-flex;
    width: auto;
  }
}

/* --------------------------------------------------------------------------
   10. Pagine interne: elementi comuni
   -------------------------------------------------------------------------- */
.page-hero h1 {
  margin-bottom: 30px;
  text-align: center;
}

.page-hero__lead {
  margin-bottom: 0;
}

.muted {
  color: rgba(255, 255, 255, 0.78);
}

.center { text-align: center; }
.justify { text-align: justify; }

.btn-center {
  display: flex;
  justify-content: center;
}

@media (min-width: 768px) {
  .page-hero h1 { font-size: 46px; text-align: left; }
}

/* Riquadro CTA con bagliori (Servizi) */
.cta-panel {
  position: relative;
  overflow: hidden;
  padding: 30px;
  border: 1px solid rgba(105, 180, 255, 0.24);
  border-radius: 22px;
  background: radial-gradient(circle at 18% 100%, rgba(47, 140, 255, 0.2), transparent 30%), radial-gradient(circle at 88% 0%, rgba(105, 180, 255, 0.16), transparent 35%), var(--c-navy-3);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.cta-panel h2 {
  text-align: center;
}

/* Passaggi numerati (Servizi, Preventivo) */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 50%;
  margin: 0 auto 30px;
  text-align: center;
}

.step__num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 82px;
  height: 82px;
  margin: 0 auto 30px;
  color: var(--c-blue-light);
  font-family: var(--f-body);
  font-size: 30px;
  font-weight: 700;
  background: #131f3f;
  border: 1px solid var(--c-border);
  border-radius: 50%;
}

.step h3,
.step h4 {
  font-family: var(--f-body);
  font-size: 20px;
  font-weight: 700;
  text-align: center;
}

.step p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.78);
  text-align: center;
}

.steps--3 .step {
  width: 100%;
}

.steps--3 .step__num {
  width: 80px;
  height: 80px;
}

@media (min-width: 768px) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .steps--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
  .step { width: auto; margin: 0; }

  .step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 41px;
    left: calc(50% + 45px);
    width: calc(100% - 65px);
    border-top: 2px dashed rgba(105, 180, 255, 0.35);
  }
}

/* Richiedi un preventivo */
.quote-page {
  margin-bottom: 30px;
  padding-top: 30px;
}

.quote-page__title {
  margin: 30px 0;
}

.quote-page__form {
  margin-top: 0;
}

@media (min-width: 768px) {
  .quote-page__title { margin-top: 0; }
  .quote-page__form { margin-top: 50px; }
}

/* --------------------------------------------------------------------------
   11. Servizi
   -------------------------------------------------------------------------- */
.split-hero {
  display: flex;
  align-items: center;
  max-width: var(--container);
  margin: 0 auto;
  padding: 30px var(--gutter);
}

.split-hero h1 {
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.split-hero p {
  font-family: var(--f-body);
  text-align: center;
}

.split-hero .btn-row {
  justify-content: center;
}

.split-hero__media {
  display: none;
}

@media (min-width: 768px) {
  .split-hero {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 30px;
    padding-top: 100px;
    padding-bottom: 100px;
  }

  .split-hero h1 { font-size: 42px; text-align: left; }
  .split-hero p { text-align: left; }
  .split-hero .btn-row { justify-content: flex-start; gap: 30px; }

  .split-hero__media {
    display: flex;
    justify-content: flex-end;
  }
}

.section-intro {
  max-width: 870px;
  margin: 0 auto 30px;
  text-align: center;
}

.section-intro p:last-child {
  margin-bottom: 0;
  color: #ced0d6;
  font-size: 16px;
}

.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.feature {
  display: grid;
  grid-template-columns: 70px 1fr;
  align-items: start;
  gap: 22px;
  padding: 28px;
  background: #111c3c;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 22px;
}

.feature__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: #142d5a;
  border: 1px solid rgba(105, 180, 255, 0.18);
  border-radius: 50%;
}

.feature__icon svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: var(--c-blue-light);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature h3 {
  font-family: var(--f-body);
  font-size: 20px;
}

.feature p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.78);
}

@media (min-width: 768px) {
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1025px) {
  .features { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.includes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.label-title {
  color: var(--c-blue-light);
  font-family: var(--f-body);
  font-size: 16px;
  text-align: center;
  text-transform: uppercase;
}

.checklist {
  margin: 0 0 0 5px;
  padding: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 30px;
  color: var(--c-white);
  font-size: 0.98rem;
  font-weight: 700;
}

.checklist li::before {
  content: "✓";
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 18px;
  height: 18px;
  color: var(--c-white);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.5;
  text-align: center;
  background: var(--c-blue);
  border-radius: 50%;
}

@media (min-width: 768px) {
  .includes { grid-template-columns: 1fr 3fr; }
  .includes .label-title--left { text-align: left; }
}

/* --------------------------------------------------------------------------
   12. Chi sono
   -------------------------------------------------------------------------- */
.about {
  max-width: var(--container);
  margin: 0 auto;
  padding: 30px var(--gutter);
}

.stats,
.values {
  display: grid;
  grid-template-columns: 1fr;
  margin: 0 0 30px;
  padding: 0 0 30px;
  border-bottom: 1px solid var(--c-white);
}

.stat {
  margin-bottom: 50px;
}

.stat:last-child {
  margin-bottom: 0;
}

.stat .counter {
  margin-bottom: 0;
  font-family: var(--f-display);
  font-size: 60px;
  line-height: 1.2;
  text-align: center;
}

.stat h3 {
  margin-bottom: 0;
  font-size: 22px;
  text-align: center;
}

.about__photo {
  display: block;
  width: auto;
  height: 300px;
  margin: 0 auto 30px;
  background: var(--c-white);
  border-radius: 3px;
}

.about .prose p {
  text-align: justify;
}

.about h2 {
  margin: 30px 0 0;
  text-align: center;
}

.values {
  row-gap: 30px;
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid var(--c-white);
}

.value p {
  margin-bottom: 0;
  text-align: center;
}

.value__title {
  font-family: var(--f-display);
  font-size: 20px !important;
  line-height: 1.2 !important;
}

.about__cta-text {
  margin: 30px 0;
  text-align: center;
}

@media (min-width: 768px) {
  .about { padding-bottom: 100px; }
  .stats,
  .values { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 30px; }
  .stats { margin: 0 0 100px; padding: 50px 0; border-top: 1px solid var(--c-white); }
  .values { margin: 100px 0; padding: 50px 0; row-gap: 0; }
  .value { margin-bottom: 50px; }
  .about__photo { float: left; margin: 0 20px 20px 0; }
  .about h2 { margin-top: 100px; font-size: 40px; }
  .about__cta-text { margin: 50px 0; }
}

@media (min-width: 1025px) {
  .stats,
  .values { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stat,
  .value { margin-bottom: 0; }
  .stats { margin-top: 100px; }
  .about__photo { width: 300px; height: auto; }
}

/* Timeline */
.timeline {
  clear: both;
  position: relative;
  margin: 30px auto;
  padding: 20px 0 20px 26px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  left: 8px;
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, #d8dee8 8%, #d8dee8 92%, transparent);
}

.timeline__item {
  position: relative;
  width: 100%;
  padding: 0 0 30px 7px;
  text-align: left;
}

.timeline__dot {
  position: absolute;
  top: 35px;
  left: -27px;
  z-index: 2;
  width: 18px;
  height: 18px;
  background: var(--c-navy);
  border: 4px solid var(--c-white);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--c-navy);
}

.timeline__content {
  position: relative;
  padding: 24px;
  background: var(--c-white);
  border: 1px solid #e8edf3;
  border-radius: 3px;
  box-shadow: 0 18px 45px rgba(18, 18, 18, 0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.timeline__content::after {
  content: "";
  position: absolute;
  top: 28px;
  right: 100%;
  width: 0;
  height: 0;
  border: 15px solid transparent;
  border-right-color: var(--c-white);
  pointer-events: none;
}

.timeline__content:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(18, 18, 18, 0.11);
}

.timeline__date {
  display: inline-block;
  margin-bottom: 12px;
  padding: 6px 12px;
  color: var(--c-white);
  font-family: var(--f-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: var(--c-navy);
  border-radius: 999px;
}

.timeline__content h3 {
  margin: 0 0 12px;
  color: var(--c-navy);
  font-size: clamp(1.25rem, 2vw, 1.6rem) !important;
  line-height: 1.2 !important;
}

.timeline__content p {
  margin: 0;
  color: var(--c-navy);
  font-size: 1rem !important;
}

@media (min-width: 769px) {
  .timeline {
    margin: 80px auto;
    padding: 20px 0;
  }

  .timeline::before {
    left: 50%;
    transform: translateX(-50%);
  }

  .timeline__item {
    width: 50%;
    padding: 0 48px 56px;
  }

  .timeline__item:first-child { margin-top: 75px; }
  .timeline__item:last-child { margin-bottom: 75px; padding-bottom: 0; }

  .timeline__item:nth-child(odd) { left: 0; padding-left: 0; text-align: right; }
  .timeline__item:nth-child(even) { left: 50%; padding-right: 0; text-align: left; }

  .timeline__item:nth-child(odd) .timeline__dot { left: auto; right: -9px; }
  .timeline__item:nth-child(even) .timeline__dot { left: -9px; }

  .timeline__content { padding: 28px; }

  .timeline__item:nth-child(odd) .timeline__content::after {
    right: auto;
    left: 100%;
    border-right-color: transparent;
    border-left-color: var(--c-white);
  }
}

/* --------------------------------------------------------------------------
   13. Portfolio
   -------------------------------------------------------------------------- */
.portfolio-wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 30px var(--gutter);
}

.portfolio-wrap > h2 {
  margin-bottom: 30px;
  text-align: center;
}

.portfolio-intro {
  margin-bottom: 30px;
  text-align: justify;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px 0;
  padding-bottom: 15px;
}

.project-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  color: var(--c-white);
  background: linear-gradient(190deg, var(--c-navy-2) 0%, var(--c-navy) 90%);
  border-top: 1px solid var(--c-border);
  border-radius: var(--radius);
}

.project-card:hover,
.project-card:focus {
  color: var(--c-white);
}

.project-card__img {
  position: relative;
  height: 300px;
  margin-bottom: 20px;
  overflow: hidden;
  border-radius: var(--radius);
}

.project-card__img::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 10;
  border-radius: var(--radius);
  box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.46);
}

.project-card__img img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  transition: transform 0.5s ease;
}

.project-card:hover .project-card__img img,
.project-card:focus-visible .project-card__img img {
  transform: scale(1.075);
}

.project-card__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -20px;
  padding: 20px;
}

.project-card h3 {
  position: relative;
  margin-bottom: 3px;
  color: var(--c-sky);
  font-family: var(--f-display);
  font-size: 22px !important;
  text-align: center;
}

.project-card h3::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: var(--c-sky);
  transform-origin: right;
  transform: scaleX(0);
  transition: transform 0.3s ease-in-out;
}

.project-card:hover h3::before,
.project-card:focus-visible h3::before {
  transform-origin: left;
  transform: scaleX(1);
}

.project-card p {
  margin-bottom: 0;
  color: var(--c-white);
  text-align: center;
}

.project-card__more {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 14px;
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.2;
  opacity: 0.85;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.project-card__more::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.project-card:hover .project-card__more,
.project-card:focus-visible .project-card__more {
  opacity: 1;
  transform: translateX(4px);
}

.project-card:hover .project-card__more::after,
.project-card:focus-visible .project-card__more::after {
  transform: scaleX(1);
}

.portfolio-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: var(--container);
  margin: 0 auto;
  padding: 30px var(--gutter);
  text-align: center;
}

.portfolio-cta p {
  max-width: 800px;
  margin-bottom: 30px;
}

@media (min-width: 768px) {
  .portfolio-wrap { padding-top: 50px; padding-bottom: 100px; }
  .portfolio-intro { margin-bottom: 50px; }
  .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 60px 30px;
    margin-bottom: 100px;
    padding-bottom: 100px;
    border-bottom: 1px solid var(--c-white);
  }
  .portfolio-cta { padding-top: 0; padding-bottom: 100px; }
}

@media (min-width: 1025px) {
  .portfolio-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Singolo progetto */
.project {
  display: flex;
  flex-wrap: wrap;
  max-width: 1370px;
  margin: 0 auto;
  padding: 30px var(--gutter);
}

.project__text {
  width: 100%;
  margin-bottom: 50px;
}

.project__text-inner {
  text-align: justify;
}

.project__text a {
  font-weight: 700;
}

.project__image {
  width: 100%;
}

.project__image img {
  display: block;
  width: auto;
  max-width: 100%;
}

.project-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 30px var(--gutter);
  text-align: center;
}

.project-cta h2 {
  width: 100%;
  margin-bottom: 25px;
  font-size: 22px;
}

@media (min-width: 768px) {
  .project-cta h2 { font-size: 29px; }
}

.page-hero--project .breadcrumb {
  text-align: center;
}

.page-hero--project .breadcrumb ol {
  justify-content: center;
}

@media (min-width: 769px) {
  .page-hero--project .breadcrumb { text-align: left; }
  .page-hero--project .breadcrumb ol { justify-content: flex-start; }
}

.project-cta p {
  width: 100%;
  margin-bottom: 30px;
}

@media (min-width: 768px) {
  .project { padding-top: 100px; }
  .project-cta { margin: 100px auto; padding: 0 var(--gutter); }
  .project-cta p { margin-bottom: 50px; }
}

@media (min-width: 1025px) {
  .project__text { width: 33.333%; padding-right: 30px; margin-bottom: 0; }
  .project__text-inner { position: sticky; top: calc(var(--header-h) + 31px); }
  .project__image { width: 66.666%; }
}

/* --------------------------------------------------------------------------
   14. Web designer per agenzie (landing senza header e footer)
       Design "cinematic": Bebas Neue (titoli), Instrument Serif (corsivi e
       citazioni), Inter (testi). Tutte le classi iniziano con "lp-" e valgono
       solo in questa pagina (body.lp).
   -------------------------------------------------------------------------- */
body.lp {
  --lp-bg: #05070e;
  --lp-bg-2: #070a14;
  --lp-bg-3: #03040a;
  --lp-text: #eef1f7;
  --lp-title: #f4f6fb;
  --lp-lead: #b4bdd0;
  --lp-body: #a9b3c7;
  --lp-soft: #8e99ae;
  --lp-accent: #6ea6ff;
  --lp-accent-2: #8dbbff;
  --lp-blue: #1f6fe5;
  --lp-line: rgba(255, 255, 255, 0.08);
  --lp-pad: clamp(20px, 5vw, 64px);
  --lp-ease: cubic-bezier(0.19, 1, 0.22, 1);
  --lp-f-display: "Bebas Neue", Impact, "Arial Narrow", sans-serif;
  --lp-f-serif: "Instrument Serif", Georgia, serif;
  --lp-f-text: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  background-color: var(--lp-bg);
  color: var(--lp-text);
  font-family: var(--lp-f-text);
  -webkit-font-smoothing: antialiased;
}

.lp ::selection {
  background: var(--lp-blue);
  color: #fff;
}

/* le ancore (es. #referenze) non finiscono sotto la barra scorrevole fissa (52px) */
.lp [id] {
  scroll-margin-top: 76px;
}

.lp main {
  overflow: hidden;
}

/* Parte in corsivo dei titoli: su una riga propria (display: block),
   così sui grandi schermi resta tutta su una riga */
.lp-serif {
  display: block;
  font-family: var(--lp-f-serif);
  font-style: italic;
  text-transform: none;
  color: var(--lp-accent);
}

/* Contenitore */
.lp-wrap {
  position: relative;
  max-width: 1312px;
  margin: 0 auto;
  padding: 140px var(--lp-pad);
}

/* Numero di sezione "01 ——" (decorativo) */
.lp-num {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  color: var(--lp-accent-2);
  font-family: var(--lp-f-text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.2em;
}

.lp-num::after,
.lp-num--center::before {
  content: "";
  width: 40px;
  height: 1px;
  background: var(--lp-accent-2);
}

/* Titoli di sezione */
.lp-title {
  margin: 0;
  color: var(--lp-title);
  font-family: var(--lp-f-display);
  font-size: clamp(48px, 6.4vw, 96px);
  font-weight: 400;
  line-height: 0.92;
  text-transform: uppercase;
}

.lp-head {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 72px;
}

.lp-lead {
  margin: 0;
  color: var(--lp-lead);
  font-family: var(--lp-f-text);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.65;
  text-wrap: pretty;
}

/* Pulsanti (arrotondati, Inter 15px) */
.lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 28px;
  border-radius: 999px;
  font-family: var(--lp-f-text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: transform 0.35s var(--lp-ease), background 0.35s, border-color 0.35s, box-shadow 0.35s;
}

.lp-btn svg {
  flex: none;
  transition: transform 0.35s var(--lp-ease);
}

.lp-btn:hover svg {
  transform: translateX(4px);
}

.lp-btn--primary,
.lp-btn--primary:focus {
  color: #fff;
  background: var(--lp-blue);
  box-shadow: 0 0 0 1px rgba(141, 187, 255, 0.35), 0 20px 60px -14px rgba(31, 111, 229, 0.85);
}

.lp-btn--primary:hover {
  color: #fff;
  background: #2f7cf0;
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(141, 187, 255, 0.6), 0 28px 70px -12px rgba(31, 111, 229, 1);
}

.lp-btn--ghost,
.lp-btn--ghost:focus {
  color: var(--lp-text);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(238, 241, 247, 0.28);
}

.lp-btn--ghost:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  border-color: #fff;
  transform: translateY(-2px);
}

/* Grana "pellicola" (decorativa) */
.lp-grain {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  mix-blend-mode: overlay;
  opacity: 0.22;
}

.lp-grain svg {
  position: absolute;
  left: -10%;
  top: -10%;
  width: 120%;
  height: 120%;
  animation: lpGrain 0.9s steps(5) infinite;
}

/* 14.1 Barra scorrevole */
/* resta attaccata in alto allo schermo durante lo scorrimento */
.lp-marquee {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  height: 52px;
  overflow: hidden;
  background: var(--lp-bg-3);
  border-bottom: 1px solid rgb(255 255 255 / 35%);
}

.lp-marquee__track {
  display: flex;
  flex-wrap: nowrap;
  width: max-content;
  animation: lpMarquee 42s linear infinite;
}

.lp-marquee__group {
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 0;
  padding: 0 28px 0 0;
  list-style: none;
}

.lp-marquee__group li {
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 0;
  color: #c9d3e6;
  font-family: var(--lp-f-display);
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.lp-marquee__group li::after {
  content: "★";
  color: var(--lp-blue);
}

/* 14.2 Testata */
.lp-hero {
  position: relative;
  display: flex;
  align-items: center;
  /* alta quanto lo schermo meno la barra scorrevole (52px); svh = altezza
     visibile sui telefoni. Minima: se il contenuto è più alto, si allunga */
  min-height: calc(100vh - 52px);
  min-height: calc(100svh - 52px);
  overflow: hidden;
  background:
    radial-gradient(55% 65% at 76% 42%, rgba(38, 98, 214, 0.3), rgba(5, 7, 14, 0) 62%),
    radial-gradient(40% 45% at 6% 96%, rgba(255, 168, 76, 0.08), rgba(5, 7, 14, 0) 70%),
    var(--lp-bg);
}

.lp-hero__beam {
  position: absolute;
  top: -20%;
  right: 4%;
  width: 520px;
  height: 1200px;
  background: linear-gradient(180deg, rgba(141, 187, 255, 0.16), rgba(141, 187, 255, 0) 70%);
  filter: blur(40px);
  rotate: 18deg;
  transform-origin: top;
  pointer-events: none;
  animation: lpDrift 14s ease-in-out infinite;
}

.lp-hero__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 50% 50%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.65) 100%);
  pointer-events: none;
}


.lp-hero__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 56px;
  width: 100%;
  max-width: 1312px;
  margin: 0 auto;
  /* 40px sopra e sotto: sugli schermi grandi il contenuto è centrato e non si nota;
     dove riempie lo schermo (telefono, tablet, portatili bassi) evita che il testo
     tocchi la barra scorrevole e il fondo della sezione */
  padding: 40px var(--lp-pad);
}

.lp-hero__text {
  display: flex;
  flex: 1 1 600px;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
}

/* h1: "Web Designer WordPress per agenzie…" (piccolo, sopra il titolo) */
.lp-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  color: var(--lp-accent-2);
  font-family: var(--lp-f-text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.lp-eyebrow::before {
  content: "";
  flex: none;
  width: 40px;
  height: 1px;
  background: var(--lp-accent-2);
}

/* h2: il titolo grande, riga per riga */
.lp-hero__title {
  margin: 0;
  color: var(--lp-title);
  font-family: var(--lp-f-display);
  font-size: clamp(60px, 7.8vw, 118px);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}

.lp-ln {
  display: block;
  overflow: hidden;
  padding-bottom: 0.02em;
}

.lp-ln > span {
  display: block;
  animation: lpLineUp 3.2s var(--lp-ease) both;
}

.lp-ln:nth-child(1) > span { animation-delay: 0.55s; }
.lp-ln:nth-child(2) > span { animation-delay: 0.68s; }
.lp-ln:nth-child(3) > span { animation-delay: 0.81s; }
.lp-ln:nth-child(4) > span { animation-delay: 0.94s; }
.lp-ln:nth-child(5) > span { animation-delay: 1.07s; }

.lp-ln .lp-serif {
  font-size: 0.92em;
  line-height: 1.02;
}

.lp-hero__lead {
  max-width: 560px;
}

.lp-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.lp-hero__contacts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin: 0;
  color: var(--lp-soft);
  font-family: var(--lp-f-text);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}

.lp-hero__contacts a,
.lp-hero__contacts a:focus {
  color: var(--lp-accent-2);
}

.lp-hero__contacts a:hover {
  color: #fff;
}

.lp-hero__contacts span {
  color: #3a4560;
}

/* Animazioni di entrata dei testi */
.lp-fade {
  animation: lpFadeUp 3.2s var(--lp-ease) both;
}

.lp-eyebrow.lp-fade { animation-delay: 0.35s; }
.lp-hero__lead.lp-fade { animation-delay: 1.25s; }
.lp-hero__actions.lp-fade { animation-delay: 1.4s; }
.lp-hero__contacts.lp-fade { animation-delay: 1.55s; }

/* Foto con anello di testo che gira */
.lp-hero__media {
  display: flex;
  flex: 0 1 470px;
  justify-content: center;
}

.lp-portrait {
  position: relative;
  width: min(470px, 86vw);
  aspect-ratio: 1 / 1;
}

.lp-portrait__glow {
  position: absolute;
  inset: -14%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(46, 120, 255, 0.45), rgba(46, 120, 255, 0));
  animation: lpFlick 6s linear infinite;
}

.lp-portrait__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  animation: lpSpin 40s linear infinite;
}

.lp-portrait__ring text {
  fill: #9fc2ff;
  font-family: var(--lp-f-display);
  font-size: 19px;
  letter-spacing: 6px;
}

.lp-portrait__circle {
  position: absolute;
  inset: 11%;
  border: 1px solid rgba(141, 187, 255, 0.35);
  border-radius: 50%;
}

.lp-portrait__photo {
  position: absolute;
  inset: 14%;
  overflow: hidden;
  border-radius: 50%;
  box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.08);
  animation: lpIris 3.2s cubic-bezier(0.77, 0, 0.18, 1) 0.5s both;
}

.lp-portrait__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Effetto flip: al passaggio del mouse (o con il focus da tastiera sui link)
   la foto ruota sull'asse Y e mostra email, telefono e CV */
.lp-flip {
  width: 100%;
  height: 100%;
  perspective: 1000px;
}

.lp-flip__inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 3.2s var(--lp-ease);
}

.lp-portrait__photo:hover .lp-flip__inner,
.lp-portrait__photo:focus-within .lp-flip__inner {
  transform: rotateY(180deg);
}

.lp-flip__front,
.lp-flip__back {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 50%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.lp-flip__back {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 12%;
  background: radial-gradient(circle at 50% 30%, #13265a, #070a14 72%);
  transform: rotateY(180deg);
}

.lp-flip__back a,
.lp-flip__back a:focus {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--lp-text);
  font-family: var(--lp-f-text);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  transition: color 0.3s;
}

.lp-flip__back a:hover {
  color: var(--lp-accent-2);
}

.lp-flip__back svg {
  flex: none;
  color: var(--lp-accent);
}

@media (max-width: 767px) {
  .lp-flip__back { gap: 10px; padding: 8%; }
  .lp-flip__back a { gap: 8px; font-size: 14px; }
  .lp-flip__back svg { width: 16px; height: 16px; }
}

@media (min-width: 1100px) {
  .lp-flip__back { gap: 18px; }
  .lp-flip__back a { font-size: 18px; }
}

/* 14.3 Sezioni */
.lp-section {
  position: relative;
  background: var(--lp-bg);
}

.lp-section--alt {
  background: var(--lp-bg-2);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.lp-glow {
  position: absolute;
  background: radial-gradient(closest-side, rgba(38, 98, 214, 0.14), rgba(5, 7, 14, 0));
  pointer-events: none;
}

.lp-glow--left { left: -10%; top: 10%; width: 60%; height: 70%; }
.lp-glow--right { right: -10%; top: 0; width: 60%; height: 50%; }

/* "Perché potrei essere utile al tuo team" */
.lp-why {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.lp-why__item {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 36px 0;
  border-bottom: 1px solid var(--lp-line);
}

.lp-why__item:last-child {
  border-bottom: 0;
}

.lp-why__num {
  color: transparent;
  font-family: var(--lp-f-display);
  font-size: 96px;
  line-height: 0.8;
  -webkit-text-stroke: 1px rgba(141, 187, 255, 0.6);
  transition: color 0.5s, -webkit-text-stroke-color 0.5s;
}

.lp-why__item:hover .lp-why__num {
  color: var(--lp-blue);
  -webkit-text-stroke-color: var(--lp-blue);
}

.lp-why__item h3 {
  margin: 0;
  color: var(--lp-title);
  font-family: var(--lp-f-serif);
  font-size: 34px;
  font-weight: 400;
  line-height: 1.05;
}

.lp-why__item p {
  margin: 0;
  color: var(--lp-body);
  font-family: var(--lp-f-text);
  font-size: 15.5px;
  font-weight: 400;
  line-height: 1.7;
}

/* "Cosa posso fare concretamente in agenzia" */
.lp-tasks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(520px, 100%), 1fr));
  gap: 72px 80px;
}

.lp-task {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.lp-task h3 {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin: 0;
  color: var(--lp-title);
  font-family: var(--lp-f-display);
  font-size: 52px;
  font-weight: 400;
  line-height: 1;
}

.lp-task__letter {
  color: var(--lp-accent);
  font-size: 18px;
  letter-spacing: 0.1em;
}

.lp-list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.lp-list li {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  padding: 16px 0;
  color: #c3cbdb;
  font-family: var(--lp-f-text);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  transition: padding 0.35s var(--lp-ease), color 0.35s;
}

.lp-list li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  background: var(--lp-blue);
}

.lp-list li:hover {
  padding-left: 12px;
  color: #fff;
}

/* "Gli strumenti con cui lavoro" */
.lp-section--tools {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.lp-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  max-width: 1100px;
  text-align: center;
}

.lp-center .lp-lead {
  max-width: 680px;
}

.lp-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.lp-chips li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 14px 22px;
  color: #dfe6f3;
  font-family: var(--lp-f-text);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  background: rgba(31, 111, 229, 0.07);
  border: 1px solid rgba(141, 187, 255, 0.25);
  border-radius: 999px;
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
}

.lp-chips li:hover {
  background: rgba(31, 111, 229, 0.18);
  border-color: rgba(141, 187, 255, 0.6);
  transform: translateY(-2px);
}

.lp-chips svg {
  flex: none;
}

/* "Cosa dicono di me" */
.lp-head--split {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px 64px;
  margin-bottom: 64px;
}

.lp-head--split > div {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.lp-head--split .lp-title {
  font-size: clamp(56px, 8vw, 128px);
  line-height: 0.88;
}

.lp-head--split .lp-lead {
  max-width: 460px;
  font-size: 17px;
}

.lp-refs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
  align-items: start;
  gap: 24px;
}

.lp-ref {
  display: flex;
  flex-direction: column;
  gap: 26px;
  margin: 0;
  padding: 36px;
  background: rgba(14, 20, 38, 0.55);
  border: 1px solid var(--lp-line);
  border-radius: 22px;
  transition: transform 0.6s var(--lp-ease), border-color 0.6s, background 0.6s;
}

.lp-ref:hover {
  background: rgba(20, 32, 60, 0.55);
  border-color: rgba(141, 187, 255, 0.4);
  transform: translateY(-6px);
}

.lp-ref__quote {
  margin: 0;
  color: #e6eaf3;
  font-family: var(--lp-f-serif);
  font-size: 21px;
  line-height: 1.45;
}

/* Con JavaScript le referenze lunghe sono tagliate a 8 righe (con "…")
   e si aprono con "Leggi tutta la referenza" (main.js, sezione 6) */
.lp-ref.is-collapsible .lp-ref__quote {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 8;
  line-clamp: 8;
}

.lp-ref.is-expanded .lp-ref__quote {
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
}

/* Apertura e chiusura lente: main.js anima l'altezza (1,6 secondi,
   stesso valore di REF_DURATION in main.js) */
.lp-ref__quote.is-animating {
  overflow: hidden;
  transition: height 1.6s ease-in-out;
}

.lp-more {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
  padding: 0;
  color: var(--lp-accent-2);
  font-family: var(--lp-f-text);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: none;
  border: 0;
  cursor: pointer;
}

.lp-more:hover {
  color: #fff;
}

.lp-more[hidden] {
  display: none;
}

.lp-more svg {
  transition: transform 0.35s var(--lp-ease);
}

/* freccia girata verso l'alto quando la referenza è aperta (segue il pulsante,
   non la classe dell'animazione) */
.lp-more[aria-expanded="true"] svg {
  transform: rotate(-90deg);
}

.lp-ref__author {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 22px;
  border-top: 1px solid var(--lp-line);
}

.lp-ref__author img {
  flex: none;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.lp-ref__author div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lp-ref__author h3 {
  margin: 0;
  color: var(--lp-title);
  font-family: var(--lp-f-display);
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.02em;
}

.lp-ref__author p {
  margin: 0;
  color: #98a3b8;
  font-family: var(--lp-f-text);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
}

/* "Vuoi valutarmi per il tuo team?" */
/* alta quanto lo schermo meno la barra scorrevole (52px), come la prima sezione;
   se il contenuto è più alto, si allunga */
.lp-cta {
  position: relative;
  display: flex;
  align-items: center;
  min-height: calc(100vh - 52px);
  min-height: calc(100svh - 52px);
  overflow: hidden;
  background: radial-gradient(60% 70% at 50% 0%, rgba(38, 98, 214, 0.34), rgba(5, 7, 14, 0) 65%), var(--lp-bg-3);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.lp-cta__beam {
  position: absolute;
  left: 50%;
  top: -30%;
  width: 900px;
  height: 900px;
  margin-left: -450px;
  background: conic-gradient(from 160deg at 50% 0%, rgba(141, 187, 255, 0) 0deg, rgba(141, 187, 255, 0.14) 20deg, rgba(141, 187, 255, 0) 40deg);
  filter: blur(30px);
  pointer-events: none;
  animation: lpDrift 14s ease-in-out infinite;
}

.lp-cta .lp-grain { opacity: 0.2; }

.lp-cta .lp-wrap {
  z-index: 2;
  width: 100%;
  padding-top: 40px;
  padding-bottom: 40px;
}

.lp-cta .lp-center {
  gap: 32px;
}

.lp-cta .lp-title {
  font-size: clamp(60px, 9.5vw, 156px);
  line-height: 0.86;
}

.lp-cta .lp-title .lp-serif {
  font-size: 0.9em;
}

.lp-cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 8px;
}

.lp-cta__note {
  max-width: 620px;
  margin: 24px 0 0;
  color: var(--lp-soft);
  font-family: var(--lp-f-text);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.7;
  text-wrap: pretty;
}

/* Animazioni */
@keyframes lpMarquee { to { transform: translateX(-50%); } }
@keyframes lpLineUp { from { transform: translateY(110%); } to { transform: none; } }
@keyframes lpFadeUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes lpIris {
  from { clip-path: circle(0% at 50% 50%); filter: grayscale(1) brightness(0.5); }
  60% { filter: grayscale(0.6) brightness(0.8); }
  to { clip-path: circle(50% at 50% 50%); filter: none; }
}
@keyframes lpSpin { to { transform: rotate(360deg); } }
@keyframes lpDrift {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.9; }
  50% { transform: translate(-4%, 3%) scale(1.1); opacity: 1; }
}
@keyframes lpGrain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-4%, 3%); }
  40% { transform: translate(3%, -5%); }
  60% { transform: translate(-2%, 6%); }
  80% { transform: translate(5%, -2%); }
  100% { transform: translate(0, 0); }
}
@keyframes lpFlick {
  0%, 100% { opacity: 0.55; }
  47% { opacity: 0.55; }
  50% { opacity: 0.35; }
  53% { opacity: 0.6; }
}

/* Comparsa allo scroll (solo nei browser che la supportano) */
@supports (animation-timeline: view()) {
  /* comparsa senza sfocatura (tolta su richiesta dell'utente) */
  @keyframes lpReveal { from { opacity: 0; transform: translateY(70px); } to { opacity: 1; transform: none; } }
  @keyframes lpZoom { from { transform: scale(1.18); opacity: 0.2; letter-spacing: 0.08em; } to { transform: none; opacity: 1; letter-spacing: 0; } }

  .lp-reveal {
    animation: lpReveal linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 28%;
  }

  .lp-title {
    transform-origin: left;
    animation: lpZoom linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 40%;
  }

  .lp-center .lp-title { transform-origin: center; }
}

@media (min-width: 768px) {
  .lp-why { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-why__item { padding: 40px 28px; border-bottom: 1px solid var(--lp-line); }
  .lp-why__item:nth-child(odd) { padding-left: 0; border-right: 1px solid var(--lp-line); }
  .lp-why__item:nth-child(even) { padding-right: 0; }
  .lp-why__item:nth-last-child(-n + 2) { border-bottom: 0; }
}

@media (min-width: 1100px) {
  .lp-why { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lp-why__item,
  .lp-why__item:nth-child(odd),
  .lp-why__item:nth-child(even) { padding: 40px 28px; border-right: 1px solid var(--lp-line); border-bottom: 0; }
  .lp-why__item:first-child { padding-left: 0; }
  .lp-why__item:last-child { padding-right: 0; border-right: 0; }
}

@media (max-width: 767px) {
  .lp-wrap { padding-top: 90px; padding-bottom: 90px; }
  .lp-head { margin-bottom: 48px; }
  .lp-ref { padding: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .lp *,
  .lp *::before,
  .lp *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* --------------------------------------------------------------------------
   15. Grazie e 404
   -------------------------------------------------------------------------- */
.thanks {
  max-width: var(--container);
  margin: 0 auto;
  padding: 30px var(--gutter);
  text-align: center;
}

.thanks h1 {
  text-align: center;
}

.thanks__lead {
  margin-bottom: 50px;
}

.thanks__actions {
  display: block;
  max-width: 75%;
  margin: 0 auto 50px;
}

.thanks__actions .btn {
  display: flex;
  width: 100%;
  margin: 0 auto 50px;
}

.thanks__actions .btn:last-child {
  margin-bottom: 0;
}

.thanks img {
  display: block;
  width: 400px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .thanks { padding-top: 50px; padding-bottom: 50px; }
  .thanks h1 { font-size: 46px; }
  .thanks__lead { font-size: 20px; }
  .thanks__actions { display: flex; justify-content: space-around; }
  .thanks__actions .btn { display: inline-flex; width: auto; margin: 0; }
}

@media (min-width: 1025px) {
  .thanks { padding-top: 100px; padding-bottom: 100px; }
}

.not-found {
  max-width: 870px;
  margin: 0 auto;
  padding: 30px var(--gutter);
  text-align: center;
}

.not-found img {
  display: block;
  width: auto;
  margin: 0 auto 30px;
  animation: flipIn 1s both;
}

.not-found h1 {
  margin-bottom: 30px;
  text-align: center;
}

.not-found p {
  margin-bottom: 30px;
}

@keyframes flipIn {
  from { transform: perspective(400px) rotateY(90deg); opacity: 0; }
  to { transform: perspective(400px) rotateY(0); opacity: 1; }
}

@media (min-width: 768px) {
  .not-found { padding-top: 100px; padding-bottom: 100px; }
  .not-found img { margin-bottom: 50px; }
  .not-found h1 { font-size: 32px; margin-bottom: 25px; }
  .not-found p { font-size: 20px; margin-bottom: 50px; }
}

/* --------------------------------------------------------------------------
   16. Cursore personalizzato e popup exit intent
   -------------------------------------------------------------------------- */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999999;
  width: 20px;
  height: 20px;
  border: 1px solid var(--c-white);
  border-radius: 50%;
  pointer-events: none;
  transition: top 200ms ease-out, left 200ms ease-out;
  animation: cursorAnim 0.5s infinite alternate;
}

.cursor::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border: 8px solid var(--c-white);
  border-radius: 50%;
  opacity: 0.5;
  animation: cursorAnim2 0.5s infinite alternate;
}

.cursor.expand {
  border: 1px solid var(--c-white);
  animation: cursorAnim3 0.5s forwards;
}

@keyframes cursorAnim { from { transform: scale(1); } to { transform: scale(0.7); } }
@keyframes cursorAnim2 { from { transform: scale(1); } to { transform: scale(0.4); } }
@keyframes cursorAnim3 { 0% { transform: scale(1); } 50% { transform: scale(3); } 100% { transform: scale(1); opacity: 0; } }

@media (hover: none), (pointer: coarse) {
  .cursor { display: none !important; }
}

.sp-exit-popup {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(18, 18, 18, 0);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 520ms cubic-bezier(0.22, 1, 0.36, 1), background-color 520ms cubic-bezier(0.22, 1, 0.36, 1), backdrop-filter 520ms cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 520ms;
}

.sp-exit-popup[hidden] {
  display: none;
}

.sp-exit-popup.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  background: rgba(18, 18, 18, 0.68);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  transition: opacity 520ms cubic-bezier(0.22, 1, 0.36, 1), background-color 520ms cubic-bezier(0.22, 1, 0.36, 1), backdrop-filter 520ms cubic-bezier(0.22, 1, 0.36, 1), visibility 0s;
}

.sp-exit-popup__box {
  position: relative;
  width: 100%;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 30px 24px 26px;
  color: #121212;
  background: var(--c-white);
  border: 10px solid var(--c-sky);
  border-radius: 22px;
  box-shadow: 0 10px 10px #000;
  opacity: 0;
  transform: translate3d(0, 42px, 0) scale(0.98);
  filter: blur(2px);
  transition: opacity 520ms cubic-bezier(0.22, 1, 0.36, 1), transform 520ms cubic-bezier(0.22, 1, 0.36, 1), filter 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.sp-exit-popup.is-visible .sp-exit-popup__box {
  opacity: 1;
  transform: none;
  filter: none;
}

.sp-exit-popup__box h2,
.sp-exit-popup__box p {
  color: var(--c-navy);
}

.sp-exit-popup__box h2 {
  margin: 0 0 20px;
  padding-right: 40px;
}

.sp-exit-popup__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--c-white);
  font-size: 26px;
  line-height: 1;
  background: var(--c-sky);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 160ms ease;
}

.sp-exit-popup__close:hover,
.sp-exit-popup__close:focus {
  transform: scale(1.04);
}

.sp-exit-popup__close:focus-visible {
  outline: 3px solid var(--c-navy);
  outline-offset: 2px;
}

html.sp-popup-open,
html.sp-popup-open body {
  overflow: hidden;
}

@media (min-width: 521px) {
  .sp-exit-popup { padding: 24px; }
  .sp-exit-popup__box {
    width: min(92vw, 560px);
    padding: 36px;
    border-radius: var(--radius);
    transform: translate3d(0, 34px, 0) scale(0.94);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .sp-exit-popup__box { filter: none; transform: none; }
}

/* --------------------------------------------------------------------------
   17. Blog: archivi (indice, categorie, tag)
   -------------------------------------------------------------------------- */
.archive-hero {
  display: flex;
  align-items: center;
  min-height: 172px;
  background: var(--hero-bg);
  border-bottom: 1px solid var(--c-border);
}

.archive-hero__inner {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 30px var(--gutter);
}

.archive-hero h1 {
  margin-bottom: 0;
}

.archive-hero--tag h1::first-letter {
  text-transform: uppercase;
}

.archive-hero__intro {
  margin: 20px 0 0;
}

.archive-hero__intro p:last-child {
  margin-bottom: 0;
}

.archive {
  max-width: var(--container);
  margin: 0 auto 30px;
  padding: 30px var(--gutter) 0;
}

.archive-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.entry-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--c-navy-2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
}

.entry-card__img {
  display: block;
  aspect-ratio: 16 / 9;
  margin-bottom: 20px;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
}

.entry-card__img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.entry-card:hover .entry-card__img img {
  transform: scale(1.04);
}

.entry-card__header {
  padding: 0 20px;
}

.entry-card h2 {
  margin-bottom: 0;
  font-size: 20px !important;
  line-height: 1.4 !important;
}

.entry-card h2 a {
  color: var(--c-sky);
}

.entry-card__meta {
  margin: 25px 0 0;
  color: var(--c-white);
  font-family: var(--f-display);
  font-size: 14px !important;
}

.entry-card__meta a {
  color: var(--c-sky);
}

.entry-card__summary {
  margin-top: 20px;
  padding: 0 20px;
}

.entry-card__summary p {
  text-align: justify;
}

.entry-card__more {
  display: inline-block;
  font-family: var(--f-body);
  transition: background-color 0.1s ease-in-out;
}

/* Freccia animata (stesse classi della barra recruiter) a destra del testo,
   DENTRO il link: la sottolineatura animata passa sotto testo e freccia */
.entry-card__more .recruiter-cta__arrow--left {
  position: relative;
  top: -1px; /* centratura ottica sul testo */
  left: auto;
  margin: 0 0 0 10px; /* l'animazione la avvicina al testo fino a 4px */
  vertical-align: middle;
}

.entry-card__footer {
  margin-top: auto;
  padding: 0 20px 20px;
  color: var(--c-white);
  font-family: var(--f-body);
  font-size: 16px;
}

.entry-card__footer > span {
  display: block;
}

.entry-card__footer svg {
  width: 1em;
  height: 1em;
  margin-right: 0.6em;
  fill: currentColor;
  vertical-align: -0.1em;
}

.entry-card__footer a {
  color: var(--c-sky);
}

/* Paginazione */
/* Paginazione: come l'originale (GeneratePress). Michroma 18px, link azzurri
   peso 300 distanziati da 5px + uno spazio, pagina corrente in grassetto bianco.
   Su mobile va a capo allineata a sinistra. */
.pagination {
  display: flex;
  justify-content: center;
  margin: 30px 0 0;
  padding: 0;
  color: var(--c-white);
  background-color: var(--c-navy);
  font-family: var(--f-display);
  font-size: 18px;
  line-height: 1.5;
}

.pagination .nav-links > * {
  padding: 0 5px;
  font-weight: 300;
}

.pagination .nav-links > :first-child {
  padding-left: 0;
}

.pagination .nav-links .current {
  color: var(--c-white);
  font-weight: 700;
}

@media (min-width: 769px) {
  .pagination { padding: 20px 40px; }
}

@media (min-width: 768px) {
  .archive-hero { min-height: 330px; }
  .archive-hero__inner { padding-top: 50px; padding-bottom: 50px; }
}

@media (min-width: 1025px) {
  .archive-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* --------------------------------------------------------------------------
   18. Blog: articolo
   -------------------------------------------------------------------------- */
.post-head {
  max-width: var(--container);
  margin: 0 auto;
  padding: 50px var(--gutter) 0;
}

.post-head__img {
  display: block;
  width: 100%;
  max-width: 872px;
  height: auto;
  aspect-ratio: 16 / 9;
  margin: 0 auto 30px;
  object-fit: cover;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.post-head .breadcrumb {
  margin-bottom: 30px;
  text-align: center;
}

.post-head .breadcrumb ol {
  justify-content: center;
}

.post-head h1 {
  margin-bottom: 30px;
  font-size: 25px;
  line-height: 1.7;
  text-align: center;
}

.post-head__byline {
  margin: 0 0 50px;
  text-align: center;
}

.post-layout {
  max-width: 1370px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.post-sidebar {
  margin-top: 30px;
}

.widget {
  margin-bottom: 30px;
  padding: 20px;
  background: var(--c-navy-2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.widget:last-child {
  margin-bottom: 0;
}

.widget__title {
  margin: 0 0 20px;
  color: var(--c-white);
  font-size: 20px !important;
  line-height: 1.7 !important;
}

.widget__title--center {
  text-align: center;
}

.social-links {
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.social-links a {
  display: block;
  width: 60px;
  line-height: 0;
  color: var(--c-white);
}

.social-links svg {
  width: 100%;
  height: auto;
  fill: currentColor;
}

@media (min-width: 768px) {
  .post-head h1 { font-size: 42px; line-height: 1.2; }
}

@media (min-width: 1025px) {
  .post-head__img { max-width: 872px; }

  .post-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    column-gap: 30px;
  }

  .post-sidebar {
    margin-top: 0;
  }

  .post-sidebar__inner {
    position: sticky;
    top: calc(var(--header-h) + 30px);
  }
}

/* Testo dell'articolo */
.post-content h2 {
  margin: 30px 0;
  padding-top: 30px;
  border-top: 1px solid var(--c-white);
  scroll-margin-top: 80px;
}

.post-content > h2:first-child,
.post-content .toc + h2 {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.post-content h3 {
  margin-top: 30px;
  scroll-margin-top: 80px;
}

.post-content ul,
.post-content ol {
  margin-bottom: 15px;
}

.post-content pre {
  display: block;
  max-width: 893px;
  margin: 28px 0;
  padding: 22px;
  overflow-x: auto;
  color: #f9fafb;
  font-family: var(--f-mono);
  font-size: 15px;
  line-height: 1.7;
  white-space: pre;
  background: var(--c-footer-bottom);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

.post-content pre code {
  font: inherit;
  color: inherit;
  background: none;
  padding: 0;
}

.post-content code {
  padding: 2px 6px;
  color: var(--c-white);
  font-family: var(--f-mono);
  font-size: 0.92em;
  border-radius: 6px;
}

.post-content blockquote {
  margin: 0 0 1.5em;
  padding: 20px;
  font-size: 1.2em;
  font-style: italic;
  background: var(--c-footer-bottom);
  border-left: 5px solid #7683a5;
}

.post-content blockquote p:last-child {
  margin-bottom: 0;
}

.post-content figure {
  margin: 0 0 1.5em;
}

.post-content img {
  display: block;
  height: auto;
  max-width: 100%;
}

.post-content table {
  width: 100%;
  margin: 0 0 1.5em;
  border-collapse: collapse;
  font-family: var(--f-body);
  font-size: 16px;
}

.post-content th,
.post-content td {
  padding: 8px;
  text-align: left;
  vertical-align: top;
  border: 1px solid var(--c-border);
}

.post-content hr {
  margin: 0 0 1.5em;
  border: 0;
  height: 1px;
  background: var(--c-white);
}

@media (min-width: 769px) {
  .post-content h2 {
    margin: 100px 0 40px;
    padding-top: 80px;
    scroll-margin-top: 70px;
  }

  .post-content h3 {
    margin-top: 50px;
    scroll-margin-top: 140px;
  }
}

/* Sommario apribile */
.toc {
  max-height: 460px;
  margin: 0 0 32px;
  overflow-y: auto;
  background: var(--c-navy-2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
}

.toc__toggle {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 22px;
  color: var(--c-white);
  font-family: var(--f-display);
  font-size: 1rem;
  text-align: left;
  background: var(--c-navy-2);
  border: 0;
  cursor: pointer;
}

.toc__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  color: var(--c-white);
  font-size: 16px;
  line-height: 27.2px;
  white-space: nowrap;
  background: #1e2940;
  border-radius: 50%;
}

.toc__content {
  margin: 0;
  padding: 0 20px 20px;
  overflow: hidden;
  opacity: 1;
  transform: translateY(0);
  transition: max-height 0.5s ease, opacity 0.3s ease, transform 0.35s ease;
}

.toc__content ol {
  margin: 0;
  padding-left: 35px;
}

.toc__content li {
  margin-bottom: 8px;
}

.toc__level-3 {
  margin-left: 18px;
  font-size: 0.95rem !important;
}

.toc.is-closed .toc__content {
  max-height: 0;
  padding: 0 20px;
  opacity: 0;
  transform: translateY(-6px);
}

@media (min-width: 769px) {
  .toc { margin-bottom: 40px; }
  .toc__toggle { font-size: 1.1rem; }
  .toc__icon { font-size: 20px; line-height: 1; }
}

/* Articoli correlati */
.related {
  max-width: 1370px;
  margin: 100px auto 0;
  padding: 0 var(--gutter) 30px;
}

.related__title {
  margin-bottom: 30px;
  font-size: 22px;
}

.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.related-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--c-navy-2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.related-card__img {
  display: block;
  margin-bottom: 20px;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
}

.related-card__img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.related-card:hover .related-card__img img {
  transform: scale(1.04);
}

.related-card h3 {
  margin: 0 0 15px;
  padding: 0 20px;
  font-size: 20px !important;
  line-height: 1.7 !important;
}

.related-card__date {
  margin-bottom: 30px;
  padding: 0 20px;
  font-size: 14px !important;
}

.related-card__excerpt {
  padding: 0 20px;
  text-align: justify;
}

.related-card__more {
  align-self: flex-start; /* larga quanto il testo: la linea in hover non va oltre */
  margin: auto 20px 20px;
  color: var(--c-sky);
}

@media (min-width: 768px) {
  .related__title { font-size: 29px; }
}

@media (min-width: 1025px) {
  .related-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* --------------------------------------------------------------------------
   19. Pagine legali (Privacy Policy, Cookie Policy)
       Come l'originale: contenitore 1400px, titolo subito sotto l'header,
       paragrafi 18px, separatori sottili tra le sezioni.
   -------------------------------------------------------------------------- */
.legal {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 15px 1px;
}

.legal h1,
.legal h2,
.legal h3 {
  margin: 0 0 20px;
}

.legal p {
  margin: 0 0 27px;
}

.legal ul {
  margin: 0 0 27px 54px;
  padding: 0;
}

.legal hr {
  height: 1px;
  margin: 40px 0;
  border: 0;
  background: var(--c-border);
}

.legal__table {
  margin: 0 0 27px;
  overflow-x: auto;
}

.legal table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.5;
}

.legal th,
.legal td {
  padding: 10px 12px;
  border: 1px solid var(--c-border);
  text-align: left;
  vertical-align: top;
}

.legal th {
  background-color: var(--c-navy-2);
}

.legal code {
  font-size: 15px;
  overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------------
   20. Merlino, l'assistente AI (chatbot con Groq)
       Stili del sito originale (sergio-groq-chatbot), con l'immagine in
       /assets/img/. Come l'originale, è nascosto fino a 768px.
       Logica in main.js (sezione 9), risposte da /api/merlino.php.
   -------------------------------------------------------------------------- */
.sergio-groq-chatbot,
.sergio-groq-chatbot * {
  box-sizing: border-box;
}

/* Contenitore fisso in basso a destra */
.sergio-groq-chatbot {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 99999;
  font-family: inherit;
}

/* Pulsante "Chiedi a Merlino!" */
.sergio-groq-chatbot-launcher {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: #1e2946;
  font: inherit;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 1);
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
  -webkit-appearance: none;
  appearance: none;
}

.sergio-groq-chatbot-launcher:hover,
.sergio-groq-chatbot-launcher:focus-visible {
  transform: translateY(-2px);
  background: #ffffff;
  color: #1e2946;
  outline: 3px solid rgba(30, 41, 70, 0.18);
  outline-offset: 3px;
}

/* Pannello chiuso: non occupa spazio */
.sergio-groq-chatbot-panel[hidden] {
  display: none !important;
}

/* Pannello della chat */
.sergio-groq-chatbot-panel {
  position: absolute;
  right: 0;
  bottom: 70px;
  width: 410px;
  max-width: calc(100vw - 32px);
  height: min(700px, calc(100vh - 110px));
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  overflow: hidden;
  background: #ffffff;
  color: #111827;
  border-radius: 0;
  box-shadow: 0 0 80px rgba(0, 0, 0, 1);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(14px) scale(0.98);
  transform-origin: bottom right;
  transition: opacity 220ms ease, transform 220ms ease, visibility 0s linear 220ms;
}

.sergio-groq-chatbot.is-open .sergio-groq-chatbot-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  transition: opacity 220ms ease, transform 220ms ease, visibility 0s linear 0s;
}

/* Intestazione */
.sergio-groq-chatbot-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  background: #1e2946;
  color: #ffffff;
}

.sergio-groq-chatbot-title {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
  font-family: Arial, sans-serif;
}

.sergio-groq-chatbot-subtitle {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  line-height: 1.45;
  font-family: Arial, sans-serif;
}

/* Pulsante di chiusura */
.sergio-groq-chatbot-close {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.sergio-groq-chatbot-close:hover,
.sergio-groq-chatbot-close:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  outline: 3px solid rgba(255, 255, 255, 0.22);
  outline-offset: 2px;
}

/* Area dei messaggi, con l'immagine di Merlino come sfondo */
.sergio-groq-chatbot-log {
  min-height: 0;
  padding: 18px;
  overflow-y: auto;
  background:
    linear-gradient(rgba(248, 250, 252, 0.15), rgba(255, 255, 255, 0.15)),
    url("/assets/img/merlino.webp") center center no-repeat;
}

/* Messaggi */
.sergio-groq-chatbot-message {
  width: fit-content;
  max-width: 92%;
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.48;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: Arial, sans-serif;
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  animation: sergio-groq-chatbot-message-in 260ms ease forwards;
  will-change: opacity, transform;
}

@keyframes sergio-groq-chatbot-message-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.sergio-groq-chatbot-message.is-bot {
  transform-origin: left bottom;
  border-radius: 0 20px 20px 20px;
  background: #eef2ff;
  color: #111827;
  box-shadow: 0 5px 5px #00000036;
}

.sergio-groq-chatbot-message.is-user {
  transform-origin: right bottom;
  margin-left: auto;
  border-radius: 20px 5px 20px 20px;
  background: #1e2946;
  color: #ffffff;
  box-shadow: 0 5px 5px #00000036;
}

/* "Sto preparando una risposta..." */
.sergio-groq-chatbot-message.is-loading {
  color: #4b5563;
}

/* Modulo di invio */
.sergio-groq-chatbot-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0;
  padding: 14px 18px 0;
  background: #ffffff;
}

.sergio-groq-chatbot-input {
  min-width: 0;
  width: 100%;
  min-height: 44px;
  border-radius: 20px 0 0 20px;
  padding: 0 14px;
  border: 1px solid rgba(30, 41, 70, 0.22);
  background: #ffffff;
  color: #111827;
  font: inherit;
  font-size: 14px;
  font-family: Arial, sans-serif;
}

.sergio-groq-chatbot-input:focus {
  border-color: #1e2946;
  outline: 3px solid rgba(30, 41, 70, 0.12);
}

.sergio-groq-chatbot-send {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 0 999px 999px 0;
  background: #1e2946;
  color: #ffffff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.sergio-groq-chatbot-send[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Nota di sicurezza sotto il modulo */
.sergio-groq-chatbot-note {
  margin: 0;
  padding: 10px 18px 16px;
  background: #ffffff;
  color: #6b7280;
  font-size: 11px;
  line-height: 1.4;
  font-family: Arial, sans-serif;
}

/* Testo solo per i lettori di schermo */
.sergio-groq-chatbot-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Link automatici nelle risposte di Merlino */
.sergio-groq-chatbot-message-link {
  color: inherit;
  font-weight: 800;
  text-decoration: none;
  text-underline-offset: 3px;
}

/* Come l'originale: nascosto fino a 768px */
@media (max-width: 768px) {
  #sergio-groq-chatbot {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sergio-groq-chatbot-launcher,
  .sergio-groq-chatbot-panel {
    transition: none;
  }

  .sergio-groq-chatbot-panel {
    transform: none;
  }

  .sergio-groq-chatbot-message {
    opacity: 1;
    transform: none;
    animation: none;
  }
}
