* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
input::placeholder {
  color: #14405b;
  opacity: 0.85;
}
img {
  max-width: 100%;
}
.footer-nav-link {
  position: relative;
}
.legal-link:hover {
  color: #f5a01e !important;
}

/* ============ TABLET (<=1024px) ============ */
@media (max-width: 1024px) {
  .nowrap-sub {
    white-space: normal !important;
  }
  .page .hero-h1 {
    font-size: 62px !important;
    line-height: 62px !important;
  }
  .watermark {
    font-size: 160px !important;
  }
  .hero-h1,
  .hero-content > div {
    margin-left: 0 !important;
  }
  .why-row {
    flex-direction: column !important;
    width: 100% !important;
    align-items: stretch !important;
    gap: 25px !important;
  }
  .why-box {
    aspect-ratio: auto !important;
    padding: 40px 32px !important;
  }
  .why-sep {
    display: none !important;
  }
  .services-row {
    flex-direction: column !important;
    width: 100% !important;
    gap: 25px !important;
  }
  .service-card {
    aspect-ratio: auto !important;
    padding: 40px !important;
    gap: 32px !important;
  }
  .blog-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .blog-card {
    margin-top: 0 !important;
  }
  .choose-grid {
    grid-template-columns: 1fr !important;
    gap: 25px !important;
  }
  #choose-photo {
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
  }
  .vline {
    display: none !important;
  }
}

/* solo tablet: ritmo 30px nell'intestazione del box Servizi */
@media (min-width: 769px) and (max-width: 1024px) {
  section[data-screen-label="Servizi"] > div:nth-child(2) {
    padding-top: 30px !important;
  }
  section[data-screen-label="Servizi"] > div:nth-child(2) > h2:not([data-h1]) {
    margin-top: 30px !important;
  }
  section[data-screen-label="Servizi"] .services-row {
    margin-top: 30px !important;
  }
  section[data-screen-label="Intro"] > div,
  section[data-screen-label="Perché Stralent"] > h3:first-child {
    width: 70% !important;
    max-width: 70% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  section:not([data-screen-label]) > h3:first-child,
  .service-card h3,
  .emotion-circle > h3,
  section[data-screen-label="Scegliere Stralent"] h3 {
    width: 70% !important;
    max-width: 70% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* ============ MOBILE (<=768px) — sistema unificato ============
     Margine pagina 20px · margine interno dei box colorati 15px
     Ritmo verticale: 25px (quindi 50px tra una sezione e l'altra)
     Tutte le griglie a una colonna · CTA su una riga
  ============================================================== */
@media (max-width: 768px) {
  /* --- struttura e margini orizzontali --- */
  .page {
    padding: 0 20px !important;
  }
  /* ritmo verticale base: 30px tra paragrafi e pulsanti consecutivi */
  section h1,
    /* ritmo verticale base: 30px tra paragrafi e pulsanti consecutivi */
    section [data-h1], section h2:not([data-h1]), section h3, section h4, section p {
    margin-top: 0 !important;
    margin-bottom: 30px !important;
  }
  section > h1:last-child,
  section > [data-h1]:last-child,
  section > h2:not([data-h1]):last-child,
  section > h3:last-child,
  section > h4:last-child,
  section > p:last-child,
  section > *:last-child > h1:last-child,
  section > *:last-child > [data-h1]:last-child,
  section > *:last-child > h2:not([data-h1]):last-child,
  section > *:last-child > h3:last-child,
  section > *:last-child > p:last-child {
    margin-bottom: 0 !important;
  }
  section h1 + *,
  section [data-h1] + *,
  section h2:not([data-h1]) + *,
  section h3 + *,
  section h4 + *,
  section p + *,
  section ul + * {
    margin-top: 0 !important;
  }
  section ul,
  section ol {
    margin-top: 0 !important;
    margin-bottom: 30px !important;
  }
  .blog-row + div,
  .services-row + div,
  .method-row + div {
    margin-top: 30px !important;
  }
  .alpha-row {
    margin-top: 30px !important;
  }
  section form > * + *,
  section form div > * + *,
  section form label {
    margin-top: 30px !important;
  }
  section > div:has(> a > .pill),
  section > div:has(> .pill),
  section > a:has(.pill) {
    margin-top: 30px !important;
    margin-bottom: 30px !important;
  }
  section {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  /* sezioni su fondo bianco: contenuto allineato alla colonna di pagina (20px dallo schermo) */
  section > h1,
    /* sezioni su fondo bianco: contenuto allineato alla colonna di pagina (20px dallo schermo) */
    section > [data-h1], section > h2:not([data-h1]), section > h3, section > p,
    .why-row, .blog-row, .method-row, .gloss-bar, .services-row, .uniamo-grid {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  /* box colorati: il box occupa la colonna, il contenuto sta 20px dentro */
  section[data-screen-label="Servizi"] > *:not(:first-child),
  section[data-screen-label="Emozioni"] > *:not(:first-child) {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
  .hero {
    height: auto !important;
    min-height: 72vh !important;
    border-radius: 28px !important;
    padding: 0 !important;
  }
  .hero-topbar {
    padding: 20px 20px !important;
  }
  .hero-content {
    padding: 30px 20px 40px !important;
  }
  footer {
    padding-left: 25px !important;
    padding-right: 25px !important;
  }

  /* --- ritmo verticale --- */
  /* un solo spazio verticale: 30px tra i box visibili */
  section {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin: 0 0 30px !important;
  }
  footer {
    margin-top: 0 !important;
  }
  .hero {
    margin: 15px 0 30px !important;
  }
  div:has(> .vline) {
    padding: 0 !important;
  }
  section > h1,
  section > [data-h1],
  section > h2:not([data-h1]),
  section > h3,
  section > p,
  .emotion-circle > h1,
  .emotion-circle > [data-h1],
  .emotion-circle > h2:not([data-h1]),
  .emotion-circle > h3,
  .method-intro > h2:not([data-h1]),
  .method-intro > h3 {
    margin-top: 0 !important;
    margin-bottom: 30px !important;
  }
  section > *:last-child,
  .emotion-circle > *:last-child {
    margin-bottom: 0 !important;
  }
  /* contenuto interno dei box colorati: 30px dai bordi */
  section[data-screen-label="Servizi"] > div:nth-child(2),
  section[data-screen-label="Emozioni"] > div:nth-child(2),
  section > div[style*="padding-top"] {
    padding-top: 30px !important;
    padding-bottom: 30px !important;
  }
  section[data-screen-label="Servizi"] > div:nth-child(2) > *,
  .emotion-circle,
  .emotion-circle > * {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* box chiari (newsletter, contatti, ricerca): stesso padding interno di 20px */
  section[data-screen-label="Newsletter"] > div,
  section[data-screen-label="Contatti"] > div,
  section[data-screen-label="Ricerca glossario"] > div {
    padding: 30px 20px !important;
  }
  .page h1,
  .page [data-h1],
  .page h2:not([data-h1]),
  .page h3,
  .page p,
  .page form {
    max-width: 100% !important;
  }

  /* --- menu mobile: burger + overlay a tutto schermo --- */
  #menu-bar {
    position: relative !important;
    z-index: 70 !important;
    background: transparent !important;
  }
  #menu-toggle {
    width: 48px !important;
    height: 48px !important;
    padding: 0 !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0 !important;
    font-size: 0 !important;
    letter-spacing: 0 !important;
    background: #f5a01e !important;
    border-radius: 999px !important;
    position: relative !important;
    z-index: 80 !important;
  }
  #menu-icon {
    position: relative !important;
    display: block !important;
    width: 22px !important;
    height: 2px !important;
    font-size: 0 !important;
    color: transparent !important;
    background: #ffffff !important;
    border-radius: 2px !important;
    transition: background 0.18s ease !important;
  }
  #menu-icon::before,
  #menu-icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 22px;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  }
  #menu-icon::before {
    top: -7px;
  }
  #menu-icon::after {
    top: 7px;
  }
  #menu-panel[data-open="1"] ~ #menu-toggle {
    position: fixed !important;
    top: 38px !important;
    right: 40px !important;
    z-index: 80 !important;
    background: #f5a01e !important;
  }
  #menu-panel[data-open="1"] ~ #menu-toggle #menu-icon {
    background: transparent !important;
  }
  #menu-panel[data-open="1"] ~ #menu-toggle #menu-icon::before {
    transform: translateY(7px) rotate(45deg);
  }
  #menu-panel[data-open="1"] ~ #menu-toggle #menu-icon::after {
    transform: translateY(-7px) rotate(-45deg);
  }

  #menu-panel {
    position: fixed !important;
    inset: 0 !important;
    z-index: 60 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 30px !important;
    text-align: center !important;
    width: 100vw !important;
    max-width: none !important;
    min-width: 0 !important;
    padding: 0 20px !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    align-items: flex-start !important;
    text-align: left !important;
    padding-left: 40px !important;
    padding-right: 40px !important;
    background: linear-gradient(45deg, #0d2d4d 0%, #4a6489 55%, #c36ec6 100%) !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.26s ease !important;
  }
  #menu-panel[data-open="1"] {
    opacity: 1;
    pointer-events: auto;
  }
  #menu-panel a[href] {
    font-family: "Barlow", sans-serif !important;
    font-size: 26px !important;
    line-height: 34px !important;
    color: #ffffff !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    transition-delay: 0s !important;
    padding: 6px 2px 12px !important;
  }
  #menu-panel a[href] {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    position: relative !important;
    text-decoration: none !important;
  }
  #menu-panel a[href]::before {
    content: "" !important;
    display: block !important;
    position: static !important;
    width: 10px !important;
    height: 10px !important;
    margin: 0 !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    flex: none !important;
  }
  #menu-panel a[href]::after {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    left: 24px !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    height: 8px !important;
    background: #9ec9e8 !important;
    border-radius: 4px !important;
    transform: none !important;
    opacity: 0 !important;
    transition: opacity 0.12s ease !important;
  }
  #menu-panel a[href]:active::after {
    opacity: 0 !important;
  }
  #menu-panel a[href]:active {
    background: #ffffff !important;
    color: #14405b !important;
    border-radius: 14px !important;
    padding: 6px 14px 12px !important;
  }
  #menu-panel a[href]:active::before {
    background: #14405b !important;
  }
  #menu-panel a[href][aria-current="page"],
  #menu-panel a[aria-current="page"] {
    color: #ffffff !important;
    font-weight: 700 !important;
    background: transparent !important;
    border: 2px solid #ffffff !important;
    border-radius: 14px !important;
    padding: 6px 14px 12px !important;
  }
  .hero-topbar:has(#menu-panel[data-open="1"]) > div:first-child {
    opacity: 1 !important;
    position: fixed !important;
    top: 38px !important;
    left: 40px !important;
    z-index: 80 !important;
  }

  /* intro: 50px tra i tre blocchi di testo */
  section[data-screen-label="Intro"] {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
  }
  section[data-screen-label="Intro"] h1,
  section[data-screen-label="Intro"] [data-h1] {
    margin-bottom: 30px !important;
  }
  section[data-screen-label="Intro"] h2:not([data-h1]) {
    margin-bottom: 0 !important;
  }
  section[data-screen-label="Perché Stralent"] {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }
  section[data-screen-label="Perché Stralent"] > h3:first-child {
    margin-top: 30px !important;
  }

  /* paragrafo "In Stralent ti aiutiamo…": 50px sopra */
  section:has(> h3):not([data-screen-label]) {
    padding-top: 0 !important;
    margin-top: -42px !important;
  }
  section:not([data-screen-label]) > h3:first-child {
    margin-top: 72px !important;
  }

  /* CTA "Il metodo Stralent": 50px sopra e sotto */
  section:has(> h3):not([data-screen-label]) > div:has(> a .pill) {
    margin-top: 30px !important;
    margin-bottom: 52px !important;
  }
  section:has(> h3):not([data-screen-label]) > h3 {
    margin-bottom: 0 !important;
  }

  /* CTA dentro il box blu Servizi: 50px sopra e sotto */
  section[data-screen-label="Servizi"] {
    padding-bottom: 30px !important;
  }
  section[data-screen-label="Servizi"] > div:last-child {
    margin-top: 30px !important;
    margin-bottom: 0 !important;
  }

  /* CTA "Vai al blog": stesso spazio sopra e sotto */
  section[data-screen-label="Blog"] > div:last-child {
    margin-top: 30px !important;
    margin-bottom: 0 !important;
  }
  section[data-screen-label="Blog"] {
    padding-bottom: 52px !important;
    margin-bottom: 0 !important;
  }

  /* ritmo 30px uniforme dentro card e box */
  .service-text {
    margin: 0 !important;
    gap: 30px !important;
  }
  .service-text > *,
  .service-card > div > *,
  .blog-card > div > *,
  .emotion-circle > * {
    margin: 0 !important;
  }
  .emotion-circle {
    gap: 30px !important;
  }
  section[data-screen-label="Newsletter"] div > label {
    margin-top: 30px !important;
  }
  section div > *:last-child {
    margin-bottom: 0 !important;
  }
  section div > *:first-child {
    margin-top: 0 !important;
  }
  .services-row {
    margin-top: 30px !important;
    gap: 30px !important;
  }
  .service-card {
    padding: 30px 20px !important;
    gap: 30px !important;
  }
  .service-card > *,
  .blog-card > * {
    margin: 0 !important;
  }
  .blog-row {
    gap: 30px !important;
  }
  .blog-card {
    padding: 30px 20px !important;
    gap: 30px !important;
  }
  .choose-grid {
    gap: 30px !important;
  }
  .choose-grid > div {
    padding: 30px 20px !important;
    gap: 30px !important;
  }
  .choose-grid > div > * {
    margin: 0 !important;
  }
  section[data-screen-label="Newsletter"] > div > * {
    margin: 0 !important;
  }
  section[data-screen-label="Newsletter"] > div {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 30px !important;
  }
  section[data-screen-label="Newsletter"] label {
    margin: 0 !important;
  }
  section[data-screen-label="Newsletter"] form > * + * {
    margin-top: 30px !important;
  }

  /* --- tipografia --- */
  .page .hero-h1 {
    font-size: 40px !important;
    line-height: 44px !important;
    white-space: normal !important;
    margin-left: 0 !important;
  }
  .page h1,
  .page [data-h1] {
    font-size: 32px !important;
    line-height: 36px !important;
  }
  .page h2:not([data-h1]) {
    font-size: 22px !important;
    line-height: 28px !important;
  }
  .page h3 {
    font-size: 17px !important;
    line-height: 25px !important;
  }
  .watermark {
    font-size: 90px !important;
  }
  .hero-content > div {
    margin-left: 0 !important;
  }

  /* --- griglie: tutte a una colonna, gap 15px --- */
  .why-row,
  .services-row,
  .uniamo-grid,
  .blog-row,
  .choose-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 30px !important;
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .services-row,
  .uniamo-grid {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }
  .emotion-circle > h1,
  .emotion-circle > [data-h1],
  .emotion-circle > h2:not([data-h1]),
  .emotion-circle > h3,
  .emotion-circle > p,
  .emotion-circle > div,
  .emotion-circle > a,
  .emotion-circle .uniamo-grid {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }
  .why-sep {
    display: none !important;
  }
  /* text link a epigrafe */
  .txt-link,
  a.txt-link {
    display: inline !important;
    text-align: center !important;
    text-wrap: balance !important;
  }
  p:has(> .txt-link),
  h3:has(> .txt-link),
  div:has(> .txt-link) {
    text-align: center !important;
    text-wrap: balance !important;
  }

  /* social nel menu: visibili solo a menu aperto */
  #menu-panel .menu-social {
    display: none !important;
  }
  #menu-panel[data-open="1"] .menu-social {
    display: flex !important;
    position: fixed !important;
    right: 40px !important;
    bottom: 40px !important;
    margin: 0 !important;
  }
  #menu-panel .menu-social a::before,
  #menu-panel .menu-social a::after,
  #menu-panel .social-link::before,
  #menu-panel .social-link::after {
    content: none !important;
    display: none !important;
    background: none !important;
    width: 0 !important;
    height: 0 !important;
  }
  #menu-panel .menu-social::before,
  #menu-panel .menu-social::after,
  #menu-panel div::before,
  #menu-panel div::after {
    content: none !important;
    display: none !important;
    background: none !important;
    width: 0 !important;
    height: 0 !important;
  }
  #menu-panel .menu-social a {
    padding: 0 !important;
  }
  #menu-panel .menu-social svg {
    width: 34px !important;
    height: 34px !important;
  }

  /* logo al 60% */
  .hero-topbar img[alt="Stralent"] {
    height: 32px !important;
  }
  footer img[alt="Stralent"] {
    height: 36px !important;
  }

  /* header alta metà schermo */
  .hero,
  section[data-screen-label="Header"],
  section[data-screen-label="Hero"] {
    height: 50vh !important;
    min-height: 50vh !important;
    max-height: 50vh !important;
  }
  .hero-content {
    padding: 16px 20px 20px !important;
    gap: 16px !important;
    justify-content: flex-end !important;
  }
  .hero-content > * + * {
    margin-top: 16px !important;
  }
  .hero-content h1,
  .hero-content [data-h1],
  .hero-content h2:not([data-h1]),
  .hero-content h3,
  .hero-content p {
    margin-bottom: 0 !important;
  }
  .gloss-list {
    gap: 30px !important;
  }
  section div[style*="display:flex"][style*="gap"] {
    gap: 30px !important;
  }
  section div[style*="display:flex"] > h1,
  section div[style*="display:flex"] > [data-h1],
  section div[style*="display:flex"] > h2:not([data-h1]),
  section div[style*="display:flex"] > h3,
  section div[style*="display:flex"] > p {
    margin-bottom: 0 !important;
  }
  section h1 + h3,
  section [data-h1] + h3,
  section h1 + h2:not([data-h1]),
  section [data-h1] + h2:not([data-h1]),
  section h2:not([data-h1]) + h3,
  section h3 + a,
  section h3 + div,
  section p + a {
    margin-top: 0 !important;
  }
  section[data-screen-label="Contatti"] div > * + * {
    margin-top: 30px !important;
  }
  .emotion-circle,
  .emotion-circle > h1,
  .emotion-circle > [data-h1],
  .emotion-circle > h2:not([data-h1]),
  .emotion-circle > h3 {
    max-width: none !important;
  }

  /* --- card --- */
  .why-box {
    aspect-ratio: auto !important;
    padding: 30px 20px !important;
  }
  .service-card {
    aspect-ratio: auto !important;
    flex-direction: column !important;
    text-align: center !important;
    gap: 30px !important;
    padding: 30px 20px !important;
  }
  .service-card > div:first-child {
    flex: 0 0 auto !important;
    width: 100% !important;
    align-self: auto !important;
    aspect-ratio: 16/9 !important;
    min-height: 0 !important;
  }
  .service-text {
    align-items: center !important;
  }
  .uniamo-grid > div {
    padding: 30px 20px !important;
  }
  .uniamo-grid > div > div {
    white-space: normal !important;
    font-size: 17px !important;
    line-height: 24px !important;
  }
  .uniamo-grid svg {
    width: 56px !important;
    height: 56px !important;
  }
  .blog-card {
    width: 100% !important;
    margin-top: 0 !important;
    aspect-ratio: auto !important;
  }
  .blog-card > div {
    padding: 30px 20px !important;
    gap: 30px !important;
  }

  /* --- box "È il momento di scegliere": tutto centrato --- */
  .choose-grid > div:first-child {
    padding: 30px 20px !important;
    align-items: center !important;
    text-align: center !important;
  }
  .choose-grid > div:first-child > div:first-child {
    justify-content: center !important;
    gap: 0 !important;
  }
  .choose-grid > div:first-child > div:first-child > div:first-child {
    display: none !important;
  }
  .choose-grid h1 br,
  .choose-grid [data-h1] br {
    display: none !important;
  }
  .choose-grid > div:first-child > h3 {
    max-width: none !important;
  }
  .choose-grid > div:last-child {
    padding: 0 20px 30px !important;
  }

  /* --- CTA: sempre su una riga --- */
  .pill,
  button[data-cta],
  button[data-cta-hover],
  .choose-grid button,
  section button {
    white-space: nowrap !important;
    font-size: 17px !important;
    line-height: 17px !important;
    padding: 14px 22px !important;
    gap: 10px !important;
  }
  button[data-cta] {
    padding: 0 !important;
  }
  .pill > span:empty,
  button > span:empty {
    width: 10px !important;
    height: 10px !important;
  }
  .blog-cta {
    font-size: 15px !important;
    padding: 11px 18px !important;
  }

  /* --- raggio uniforme, come il box header --- */
  .hero,
  section[style*="border-radius"],
  section > div[style*="border-radius"],
  .why-box,
  .service-card,
  .uniamo-grid > div,
  .blog-card,
  .choose-grid,
  #newsletter > div,
  .m-card,
  .gloss-bar {
    border-radius: 28px !important;
  }
  .service-card > div:first-child image-slot,
  .choose-grid image-slot,
  #choose-photo,
  image-slot:not(#hero-bg),
  image-slot:not(#hero-bg) img {
    border-radius: 14px !important;
  }
  image-slot::part(frame) {
    border-radius: 14px !important;
  }

  /* --- newsletter e footer --- */
  #newsletter > div {
    padding: 30px 20px !important;
    border-radius: 28px !important;
  }
  .footer-legal {
    justify-content: center !important;
    flex-wrap: wrap !important;
  }
  .popup-panel {
    width: 100vw !important;
  }
  #choose-photo {
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
  }
}

#menu-panel a:hover {
  color: #0d2d4d;
}
#menu-panel a[href],
#menu-panel a[href]:visited,
#menu-panel a[href]:link {
  font-family: "Barlow", sans-serif !important;
  color: #ffffff !important;
  text-decoration: none !important;
}
#menu-panel a[aria-current="page"],
#menu-panel a[aria-current="page"]:visited {
  color: #14405b !important;
  font-weight: 700 !important;
}
#menu-panel .menu-social a:hover svg [fill="#f5a01e"] {
  fill: #14405b !important;
}
#menu-panel .menu-social a:hover svg [stroke="#f5a01e"] {
  stroke: #14405b !important;
}
#menu-panel .menu-social a::before,
#menu-panel .menu-social a::after,
#menu-panel .social-link::before,
#menu-panel .social-link::after {
  content: none !important;
  display: none !important;
  background: none !important;
  width: 0 !important;
  height: 0 !important;
}
#menu-panel a:not(:first-child)::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  border-radius: 50%;
  background: #ffffff;
}

a.blog-card:hover {
  transform: translateY(-8px) scale(1.035) !important;
  box-shadow: 0 40px 70px rgba(12, 44, 64, 0.3);
}
a.blog-card .blog-cta {
  background: #f5a01e !important;
  color: #ffffff !important;
}
a.blog-card .blog-cta .cta-dot {
  background: #ffffff !important;
}
a.blog-card:hover .blog-cta {
  background: #ffffff !important;
  color: #163e57 !important;
}
a.blog-card:hover .blog-cta .cta-dot {
  background: #163e57 !important;
}

.txt-link {
  position: relative;
  display: inline-block;
  font-family: "Barlow", sans-serif;
  font-weight: 400;
  font-size: 22px;
  line-height: 30px;
  color: #ffffff;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}
.txt-link.on-light {
  color: #14405b;
}

.txt-link:hover {
  text-decoration: none;
}
.cta-to-blue:hover {
  background: #163e57 !important;
  color: #ffffff !important;
}
.cta-to-blue:hover > span {
  background: #ffffff !important;
}

.uniamo-grid > div {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
@media (max-width: 1100px) {
  .uniamo-grid > div {
    padding: 18px 12px !important;
    gap: 12px !important;
  }
  .uniamo-grid > div svg {
    width: 68px !important;
    height: 68px !important;
  }
  .uniamo-grid > div > div {
    font-size: 16px !important;
    line-height: 20px !important;
  }
}
.uniamo-grid > div:hover {
  transform: none;
  box-shadow: none;
}

/* Failsafe CSS: se gli script non partono, i contenuti compaiono comunque. */

/* Menu: apertura/chiusura senza animazione */
#menu-panel {
  display: flex;
  align-items: center;
  max-width: 0;
  padding-left: 0;
  padding-right: 0;
  min-width: 0;
  flex: 0 1 auto;
  transition:
    max-width 0.38s cubic-bezier(0.4, 0, 0.2, 1),
    padding-left 0.38s cubic-bezier(0.4, 0, 0.2, 1),
    padding-right 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}
#menu-panel[data-open="1"] {
  max-width: 100%;
  padding-left: 44px;
  padding-right: 24px;
  transition:
    max-width 1.9s cubic-bezier(0.16, 0.84, 0.28, 1),
    padding-left 1.9s cubic-bezier(0.16, 0.84, 0.28, 1),
    padding-right 1.9s cubic-bezier(0.16, 0.84, 0.28, 1);
}
#menu-panel a {
  opacity: 0;
  transform: translateX(-22px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}
#menu-panel[data-open="1"] a {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(0.16, 0.84, 0.28, 1);
}
#menu-panel[data-open="1"] a:nth-child(1) {
  transition-delay: 0.4s;
}
#menu-panel[data-open="1"] a:nth-child(2) {
  transition-delay: 0.62s;
}
#menu-panel[data-open="1"] a:nth-child(3) {
  transition-delay: 0.84s;
}
#menu-panel[data-open="1"] a:nth-child(4) {
  transition-delay: 1.06s;
}
#menu-panel[data-open="1"] a:nth-child(5) {
  transition-delay: 1.28s;
}
#menu-panel[data-open="1"] a:nth-child(6) {
  transition-delay: 1.5s;
}
#menu-panel a {
  position: relative;
  padding: 8px 2px;
  font-size: 16px !important;
  line-height: 16px !important;
}
#menu-panel a::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 2px;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.38s cubic-bezier(0.22, 0.61, 0.36, 1);
}
#menu-panel a:hover {
  color: #0d2d4d;
}
#menu-panel a[href],
#menu-panel a[href]:visited,
#menu-panel a[href]:link {
  font-family: "Barlow", sans-serif !important;
  color: #ffffff !important;
  text-decoration: none !important;
}
#menu-panel a[aria-current="page"],
#menu-panel a[aria-current="page"]:visited {
  color: #14405b !important;
  font-weight: 700 !important;
}
#menu-panel .menu-social a:hover svg [fill="#f5a01e"] {
  fill: #14405b !important;
}
#menu-panel .menu-social a:hover svg [stroke="#f5a01e"] {
  stroke: #14405b !important;
}
#menu-panel .menu-social a::before,
#menu-panel .menu-social a::after,
#menu-panel .social-link::before,
#menu-panel .social-link::after {
  content: none !important;
  display: none !important;
  background: none !important;
  width: 0 !important;
  height: 0 !important;
}
#menu-panel a:hover::after {
  transform: scaleX(1);
}
#menu-panel a[aria-current="page"] {
  color: #163e57;
  font-weight: 700;
  pointer-events: none;
  cursor: default;
}
#menu-panel a[aria-current="page"]::after {
  display: none;
}
#menu-panel a:not(:first-child)::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  border-radius: 50%;
  background: #ffffff;
}
.footer-nav-link {
  transition: color 0.2s ease;
}
.social-link svg,
.social-link svg * {
  transition:
    fill 0.2s ease,
    stroke 0.2s ease;
}
.social-link:hover [fill="#ffffff"] {
  fill: #f5a01e;
}
.footer-nav-link:hover {
  color: #f5a01e !important;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.txt-link:hover {
  text-decoration-thickness: 2px;
}
a.blog-card:hover {
  background: linear-gradient(45deg, #0d2d4d 0%, #4a6489 55%, #c36ec6 100%) !important;
  color: #ffffff !important;
}
a.blog-card:hover .blog-cta {
  background: #ffffff !important;
  color: #163e57 !important;
}

/* Sotto 1400px il menu si apre come pannello verticale sotto la topbar */
@media (min-width: 769px) and (max-width: 1400px) {
  #menu-bar {
    position: relative;
  }
  #menu-panel {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    z-index: 40;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    width: max-content;
    min-width: 260px;
    max-width: min(360px, calc(100vw - 40px));
    background: #f5a01e;
    border-radius: 28px;
    padding: 26px 34px !important;
    white-space: normal;
    overflow: visible;
    box-shadow: 0 18px 40px rgba(12, 44, 64, 0.22);
  }
  #menu-panel[data-open="1"] {
    display: flex;
    max-width: min(360px, calc(100vw - 40px));
  }
  #menu-panel a:not(:first-child)::before {
    display: none;
  }
  #menu-panel a {
    font-size: 20px !important;
    line-height: 24px !important;
  }
}

/* ============ Glossario (from Glossario page) ============ */
.gloss-term {
  background: #ffffff;
  border: 2px solid #eef1f4;
  border-radius: 24px;
  overflow: hidden;
}
.gloss-term:not(.open):hover {
  border-color: #f5a01e;
}
.gloss-term.open {
  border-color: #eef1f4;
  box-shadow: 0 22px 50px rgba(12, 44, 64, 0.1);
}
.gloss-body {
  max-height: 0;
  overflow: hidden;
}
.gloss-term.open .gloss-body {
  max-height: 1400px;
}
.gloss-close {
  display: none;
}
.gloss-term.open .gloss-chev {
  display: none;
}
.gloss-term.open .gloss-close {
  display: block;
}
.gloss-head,
.gloss-head:hover {
  transform: none !important;
  box-shadow: none !important;
}
.alpha-letter {
  flex: 1;
  min-width: 0;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef1f4;
  border: none;
  border-radius: 14px;
  font-family: "Barlow", sans-serif;
  font-weight: 600;
  font-size: 22px;
  color: #14405b;
  cursor: pointer;
}
.alpha-letter:hover {
  background: #163e57;
  color: #ffffff;
  transform: scale(1.18);
}
.alpha-letter.active {
  background: #163e57;
  color: #ffffff;
  transform: translateY(-2px);
}
@media (max-width: 900px) {
  .alpha-row {
    flex-wrap: wrap;
    gap: 8px;
  }
  .alpha-letter {
    flex: 0 0 calc((100% - 8px * 8) / 9);
    font-size: 18px;
    border-radius: 12px;
  }
}
.gloss-bar:focus-within {
  box-shadow: 0 26px 64px rgba(12, 44, 64, 0.2);
}
.gloss-bar input::placeholder {
  color: #9aabbb;
  opacity: 1;
}
@media (max-width: 768px) {
  .blog-carousel-track div + div > div {
    border-radius: 28px !important;
  }
  .gloss-bar {
    flex-direction: column;
    border-radius: 28px;
  }
  .gloss-bar .gloss-seg {
    border-right: none;
    border-bottom: 2px solid #e2e7ec;
    justify-content: center;
    padding: 20px 24px;
  }
  .gloss-bar input {
    text-align: center;
    padding: 20px 24px;
  }
  .gloss-head > span {
    font-size: 22px !important;
    line-height: 28px !important;
  }
  .gloss-seg span {
    font-size: 16px !important;
  }
  .gloss-bar {
    border-radius: 16px !important;
  }
  .alpha-row {
    justify-content: center !important;
  }
  .gloss-head {
    padding: 16px 20px !important;
    gap: 12px !important;
  }
  .gloss-head > span {
    white-space: normal !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }
  .gloss-body > div {
    padding: 0 20px 20px !important;
  }
}

/* ============ Metodo / Chi siamo: method-row + eb-grid layouts ============ */
.method-row {
  display: flex;
  align-items: center;
  gap: 0;
}
.m-imgL {
  flex: 0 0 42%;
  position: relative;
  z-index: 2;
}
.m-card {
  flex: 1;
  position: relative;
  margin-left: -56px;
}
.m-txt {
  flex: 1;
  min-width: 0;
}
.m-imgR {
  flex: 1;
  min-width: 0;
}
@media (max-width: 1024px) {
  .method-row {
    flex-direction: column !important;
    gap: 32px !important;
  }
  .m-card {
    margin-left: 0 !important;
    padding-left: 52px !important;
  }
  .m-imgL,
  .m-imgR {
    flex-basis: auto !important;
    width: 100% !important;
    max-width: 520px;
    margin: 0 auto;
  }
  .method-row .m-imgR {
    order: -1 !important;
  }
}
@media (max-width: 768px) {
  .method-row {
    gap: 30px !important;
  }
  .m-card {
    padding: 30px 20px !important;
  }
  .method-intro h1,
  .method-intro [data-h1] {
    font-size: 40px !important;
    line-height: 42px !important;
  }
}
.eb-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 60px;
  align-items: stretch;
}
.eb-img {
  margin-left: 0;
}
@media (max-width: 1024px) {
  .eb-grid {
    grid-template-columns: 1fr !important;
    gap: 26px !important;
  }
  .eb-img {
    margin-left: 0 !important;
    align-items: center !important;
  }
  .eb-img > div {
    aspect-ratio: 4/3 !important;
  }
}
@media (max-width: 768px) {
  .eb-card {
    padding: 30px 20px !important;
  }
  .eb-card > svg {
    width: 70px !important;
    height: 70px !important;
    top: -20px !important;
    right: 12px !important;
  }
  .eb-grid {
    gap: 30px !important;
  }
}
@media (max-width: 480px) {
  .eb-card > svg {
    width: 70px !important;
    height: 70px !important;
    top: -20px !important;
    right: 12px !important;
  }
  .m-imgL,
  .m-imgR,
  .eb-img > div {
    max-width: 100% !important;
  }
}

/* ============ Think (blog index): featured card hover variant ============ */
.page-template-page-think a.blog-card:hover {
  background: linear-gradient(to top right, #0d2d4d 0%, #4a6489 50%, #c36ec6 100%) !important;
  color: #ffffff !important;
}
.page-template-page-think a.blog-card .blog-cta {
  background: #14405b;
  color: #ffffff;
}
.page-template-page-think a.blog-card .blog-cta .cta-dot {
  background: #ffffff;
}
.page-template-page-think a.blog-card:hover .blog-cta {
  background: #f5a01e !important;
  color: #ffffff !important;
}
.page-template-page-think a.blog-card:hover .blog-cta .cta-dot {
  background: #ffffff !important;
}

/* ============ CTA rollover colors (data-cta / data-cta-hover) ============ */
[data-cta="blue"]:hover {
  background: #f5a01e !important;
  color: #ffffff !important;
}
[data-cta="orange"]:hover {
  background: #163e57 !important;
  color: #ffffff !important;
}
[data-cta-hover="white"]:hover {
  background: #ffffff !important;
  color: #163e57 !important;
}
[data-cta-hover="white"]:hover > span:empty {
  background: #163e57 !important;
}
.pill:hover > span:empty,
button:hover > span:empty {
  background: #ffffff !important;
}

/* ============ Scroll reveal ============ */
@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ============ MailerLite embedded form (site-wide newsletter) ============ */
.newsletter-box .mailerlite-form {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
}
.newsletter-box .mailerlite-form-field {
  margin: 0;
}
.newsletter-box .mailerlite-form .mailerlite-form-field label[for*="field-email"] {
  display: none !important;
}
.newsletter-box .mailerlite-form input[type="email"] {
  width: 320px;
  max-width: 100%;
  border: none;
  outline: none;
  background: #ffffff;
  border-radius: 10px;
  text-align: center;
  font-family: "Barlow", sans-serif;
  font-weight: 500;
  font-size: 15px;
  color: #14405b;
  padding: 18px 12px;
  box-sizing: border-box;
}
.newsletter-box .mailerlite-subscribe-button-container {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}
.newsletter-box .mailerlite-subscribe-submit,
.newsletter-box .mailerlite-form button[type="submit"] {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: #163e57;
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 22px 44px;
  font-family: "Barlow", sans-serif;
  font-weight: 400;
  font-size: 30px;
  line-height: 30px;
  cursor: pointer;
}
.newsletter-box .mailerlite-subscribe-submit:hover,
.newsletter-box .mailerlite-form button[type="submit"]:hover {
  background: #f5a01e !important;
}
.newsletter-box .mailerlite-form-error,
.newsletter-box .mailerlite-form-response {
  font-size: 15px;
  color: #b3261e;
  margin-top: 10px;
  text-align: center;
}
@media (max-width: 768px) {
  .newsletter-box .mailerlite-subscribe-submit,
  .newsletter-box .mailerlite-form button[type="submit"] {
    white-space: nowrap !important;
    font-size: 17px !important;
    line-height: 17px !important;
    padding: 14px 22px !important;
  }
}

/* ============ Contact modal (CF7) ============ */
.contatti-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  z-index: 2000;
  transition: opacity 0.3s ease;
  padding: 24px;
  box-sizing: border-box;
}
.contatti-modal--open {
  opacity: 1;
  pointer-events: auto;
}
.contatti-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  cursor: pointer;
}
.contatti-modal__content {
  position: relative;
  width: min(760px, 94vw);
  max-height: 90vh;
  overflow-y: auto;
  background: #eef1f4;
  border-radius: 36px;
  padding: 48px 56px 52px;
  box-sizing: border-box;
  z-index: 1;
}
.contatti-modal__close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #14405b;
  font-family: "Barlow", sans-serif;
  font-size: 40px;
  line-height: 1;
}
.contatti-modal .contatti-modal__title {
  text-align: center;
  margin: 0 0 26px;
  font-family: "Barlow", sans-serif;
  font-weight: 400;
  font-size: 44px;
  line-height: 48px;
  color: #14405b;
}
.contatti-modal .wpcf7-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.contatti-modal .wpcf7-form p {
  margin: 0;
}
.contatti-modal .wpcf7-form input[type="text"],
.contatti-modal .wpcf7-form input[type="email"],
.contatti-modal .wpcf7-form input[type="tel"],
.contatti-modal .wpcf7-form textarea,
.contatti-modal .wpcf7-form select {
  width: 100%;
  box-sizing: border-box;
  border: none;
  outline: none;
  background: #ffffff;
  border-radius: 16px;
  text-align: center;
  font-family: "Barlow", sans-serif;
  font-weight: 500;
  font-size: 17px;
  color: #14405b;
  padding: 20px 18px;
}
.contatti-modal .wpcf7-form textarea {
  min-height: 130px;
  resize: vertical;
}
.contatti-modal .wpcf7-form .wpcf7-submit {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: #163e57;
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 20px 44px;
  font-family: "Barlow", sans-serif;
  font-weight: 400;
  font-size: 26px;
  line-height: 26px;
  cursor: pointer;
  margin: 6px auto 0;
  display: block;
}
.contatti-modal .wpcf7-form .wpcf7-submit:hover {
  background: #f5a01e !important;
}
.contatti-modal .wpcf7-form label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: "Barlow", sans-serif;
  font-weight: 300;
  font-size: 13px;
  color: #14405b;
  text-align: center;
}
.contatti-modal .wpcf7-not-valid-tip {
  color: #b3261e;
  font-size: 14px;
  margin-top: 4px;
  display: block;
}
.contatti-modal .wpcf7-response-output {
  border: none;
  padding: 0;
  margin: 16px 0 0;
  font-size: 15px;
  text-align: center;
}
@media (max-width: 640px) {
  .contatti-modal__content {
    padding: 30px 20px 34px;
    border-radius: 28px;
  }
  .contatti-modal .contatti-modal__title {
    font-size: 32px;
    line-height: 36px;
  }
}

/* ============ Blog post content typography ============ */
.entry-content > * + * {
  margin-top: 22px;
}
.entry-content h2 {
  font-family: "Barlow", sans-serif;
  font-weight: 400;
  font-size: 32px;
  line-height: 38px;
  color: #14405b;
}
.entry-content h3 {
  font-family: "Barlow", sans-serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 30px;
  color: #14405b;
}
.entry-content a {
  color: #f5a01e;
}
.entry-content img {
  border-radius: 24px;
}
.entry-content ul,
.entry-content ol {
  padding-left: 24px;
}
.entry-content blockquote {
  margin: 0;
  padding: 20px 28px;
  background: #eef1f4;
  border-left: 6px solid #f5a01e;
  border-radius: 16px;
}

.contatti__button {
  text-align: center;
}

.contatti__button button {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: #163e57;
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 22px 48px;
  font-family: "Barlow", sans-serif;
  font-weight: 400;
  font-size: 30px;
  line-height: 30px;
  cursor: pointer;
  white-space: nowrap;
}
.contatti-modal .wpcf7-form select {
  width: 100%;
  box-sizing: border-box;
  border: none;
  outline: none;
  background: #ffffff;
  border-radius: 16px;
  text-align: center;
  text-align-last: center;
  font-family: "Barlow", sans-serif;
  font-weight: 500;
  font-size: 18px;
  color: #14405b;
  padding: 22px 46px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="12" viewBox="0 0 18 12" fill="none"><path d="M2 2l7 7 7-7" stroke="%2314405b" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"/></svg>');
  background-repeat: no-repeat;
  background-position: right 22px center;
}
.contatti-modal .wpcf7-not-valid-tip {
  font-family: "Barlow";
}

.wpcf7 form .wpcf7-response-output {
  font-family: "Barlow";
  border: none;
  padding: 0;
}
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.payment-required .wpcf7-response-output {
  border-color: #ffb900;
  padding: 0;
  margin: 0;
  color: red;
}

.newsletter-box .mailerlite-form-field {
  margin: 0;
  text-align: center;
}

.social-link:hover [stroke="#f5a01e"] {
  stroke: white;
}

.social-link:hover [fill="#f5a01e"] {
  fill: white;
}

/* ============ Blog carousel (Think) ============ */
.blog-carousel-track {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.blog-carousel-track::-webkit-scrollbar {
  display: none;
}
.blog-carousel-slide:hover {
  transform: none !important;
  box-shadow: none !important;
}
.blog-carousel-nav {
  transition:
    opacity 0.2s ease,
    background 0.2s ease;
}
.blog-carousel-nav:hover {
  background: #f5a01e !important;
}
@media (max-width: 1400px) {
  .blog-carousel-nav.blog-carousel-prev {
    left: 8px !important;
  }
  .blog-carousel-nav.blog-carousel-next {
    right: 8px !important;
  }
}
@media (max-width: 1024px) {
  .blog-carousel-slide {
    min-height: 0 !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto !important;
  }
  .blog-carousel-slide > div:first-child {
    padding: 50px 40px !important;
    order: 2;
  }
  .blog-carousel-slide > div:last-child {
    padding: 40px 40px 0 !important;
    order: 1;
    aspect-ratio: 16/9;
  }
}
@media (max-width: 768px) {
  .blog-carousel-slide {
    border-radius: 28px !important;
  }
  .blog-carousel-slide > div:first-child {
    padding: 30px 20px !important;
  }
  .blog-carousel-slide > div:last-child {
    padding: 20px 20px 0 !important;
  }
  .blog-carousel-nav {
    width: 44px !important;
    height: 44px !important;
  }
  .blog-carousel-nav.blog-carousel-prev {
    left: 4px !important;
  }
  .blog-carousel-nav.blog-carousel-next {
    right: 4px !important;
  }
}
.cky-modal {
  font-family: "Barlow";
}

.cky-consent-container {
  font-family: "Barlow";
}

.single.single-post .hero {
  height: auto !important;
  min-height: 0 !important;
}
