/* 
Theme Name: Hello Elementor Child
Theme URI: https://github.com/elementor/hello-theme-child/
Description: Hello Elementor Child is a child theme of Hello Elementor, created by Elementor team
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 2.0.0
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/* =========================================================
   NEURALIGN — VARIABILI
========================================================= */

:root {
  --nlg-bronze: #C77316;
  --nlg-secondary: #FFE163;
  --nlg-text: #27231F;
  --nlg-highlight: #56A132;
  --nlg-red: #E30613;
  --nlg-yellow: #FFD739;
  --nlg-orange: #DDAA35;
  --nlg-white: #FFFFFF;
  --nlg-ink: #161311;
  --nlg-warm-gray: #6B655B;
  --nlg-line: #E5DFD2;
  --nlg-bronze-deep: #8C5418;
  --nlg-bronze-soft: #E2B583;
  --nlg-paper: #FAF7F1;
  --nlg-sand: #ECF3D2;
  --nlg-light: #F2EEE5;
  --nlg-transparent: #56A13200;
}

/* =========================================================
   NEURALIGN — BASE
========================================================= */

.elementor h1,
.elementor h2,
.elementor h3,
.elementor h4,
.elementor h5,
.elementor h6,
.elementor .elementor-heading-title {
  text-wrap: balance;
  overflow-wrap: anywhere;
  hyphens: manual;
}

.nlg-b-rad {
  border-radius: 0px;
}

.elementor-counter-number-suffix {
    font-size: clamp(1.5rem, 1.5577rem + -0.2564vw, 1.25rem);
    align-self: flex-end;
    padding-bottom: 5px;
}

/* =========================================================
   NEURALIGN — COLORI UTILITY
========================================================= */

.nlg-text-bronze {
  color: var(--nlg-bronze) !important;
}

.nlg-text-secondary {
  color: var(--nlg-secondary) !important;
}

.nlg-text-default,
.nlg-text-text {
  color: var(--nlg-text) !important;
}

.nlg-text-highlight {
  color: var(--nlg-highlight) !important;
}

.nlg-text-red {
  color: var(--nlg-red) !important;
}

.nlg-text-yellow {
  color: var(--nlg-yellow) !important;
}

.nlg-text-orange {
  color: var(--nlg-orange) !important;
}

.nlg-text-white {
  color: var(--nlg-white) !important;
}

.nlg-text-ink {
  color: var(--nlg-ink) !important;
}

.nlg-text-warm-gray {
  color: var(--nlg-warm-gray) !important;
}

.nlg-text-line {
  color: var(--nlg-line) !important;
}

.nlg-text-bronze-deep {
  color: var(--nlg-bronze-deep) !important;
}

.nlg-text-bronze-soft {
  color: var(--nlg-bronze-soft) !important;
}

.nlg-text-paper {
  color: var(--nlg-paper) !important;
}

.nlg-text-sand {
  color: var(--nlg-sand) !important;
}

.nlg-text-light {
  color: var(--nlg-light) !important;
}

.nlg-text-transparent {
  color: transparent !important;
}

/* =========================================================
   NEURALIGN — HERO ANIMATION
   Versione stabile senza ID Elementor
========================================================= */

.nl-hero-section {
  overflow: hidden;
}

/* Stato iniziale hero */
html.nl-hero-prep:not(.nl-hero-play) .nl-hero-section .nl-hero-kicker,
html.nl-hero-prep:not(.nl-hero-play) .nl-hero-section .nl-hero-title,
html.nl-hero-prep:not(.nl-hero-play) .nl-hero-section .nl-hero-text,
html.nl-hero-prep:not(.nl-hero-play) .nl-hero-section .nl-hero-actions,
html.nl-hero-prep:not(.nl-hero-play) .nl-hero-section .nl-hero-divider,
html.nl-hero-prep:not(.nl-hero-play) .nl-hero-section .nl-hero-stats,
html.nl-hero-prep:not(.nl-hero-play) .nl-hero-section .nl-hero-visual,
html.nl-hero-prep:not(.nl-hero-play) .nl-hero-section .elementor-background-video-container {
  opacity: 0;
  transform: translate3d(0, 30px, 0);
  filter: blur(8px);
}

/* Video/background: partenza leggermente zoomata, solo se presente */
html.nl-hero-prep:not(.nl-hero-play) .nl-hero-section .elementor-background-video-container {
  transform: scale(1.04);
}

/* Stato finale hero */
html.nl-hero-play .nl-hero-section .nl-hero-kicker,
html.nl-hero-play .nl-hero-section .nl-hero-title,
html.nl-hero-play .nl-hero-section .nl-hero-text,
html.nl-hero-play .nl-hero-section .nl-hero-actions,
html.nl-hero-play .nl-hero-section .nl-hero-divider,
html.nl-hero-play .nl-hero-section .nl-hero-stats,
html.nl-hero-play .nl-hero-section .nl-hero-visual,
html.nl-hero-play .nl-hero-section .elementor-background-video-container {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  filter: blur(0);
  transition:
    opacity 1.15s cubic-bezier(0.22, 1, 0.36, 1),
    transform 1.15s cubic-bezier(0.22, 1, 0.36, 1),
    filter 1.15s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Video/background: ingresso più lento, solo se presente */
html.nl-hero-play .nl-hero-section .elementor-background-video-container {
  transform: scale(1);
  transition:
    opacity 1.35s ease,
    transform 1.65s cubic-bezier(0.22, 1, 0.36, 1),
    filter 1.35s ease;
}

/* Ritardi progressivi hero */
html.nl-hero-play .nl-hero-section .elementor-background-video-container {
  transition-delay: 0ms;
}

html.nl-hero-play .nl-hero-section .nl-hero-kicker {
  transition-delay: 80ms;
}

html.nl-hero-play .nl-hero-section .nl-hero-title {
  transition-delay: 190ms;
}

html.nl-hero-play .nl-hero-section .nl-hero-text {
  transition-delay: 320ms;
}

html.nl-hero-play .nl-hero-section .nl-hero-visual {
  transition-delay: 380ms;
}

html.nl-hero-play .nl-hero-section .nl-hero-actions {
  transition-delay: 460ms;
}

html.nl-hero-play .nl-hero-section .nl-hero-divider {
  transition-delay: 590ms;
}

html.nl-hero-play .nl-hero-section .nl-hero-stats {
  transition-delay: 700ms;
}

/* Evita interferenze se per errore elementi della hero hanno classi nl-reveal */
.nl-hero-section .nl-reveal {
  opacity: 1;
  transform: none;
  filter: none;
}

/* Mobile: hero più rapida e meno sfocata */
@media (max-width: 767px) {
  html.nl-hero-prep:not(.nl-hero-play) .nl-hero-section .nl-hero-kicker,
  html.nl-hero-prep:not(.nl-hero-play) .nl-hero-section .nl-hero-title,
  html.nl-hero-prep:not(.nl-hero-play) .nl-hero-section .nl-hero-text,
  html.nl-hero-prep:not(.nl-hero-play) .nl-hero-section .nl-hero-actions,
  html.nl-hero-prep:not(.nl-hero-play) .nl-hero-section .nl-hero-divider,
  html.nl-hero-prep:not(.nl-hero-play) .nl-hero-section .nl-hero-stats,
  html.nl-hero-prep:not(.nl-hero-play) .nl-hero-section .nl-hero-visual,
  html.nl-hero-prep:not(.nl-hero-play) .nl-hero-section .elementor-background-video-container {
    transform: translate3d(0, 18px, 0);
    filter: blur(5px);
  }

  html.nl-hero-play .nl-hero-section .nl-hero-kicker,
  html.nl-hero-play .nl-hero-section .nl-hero-title,
  html.nl-hero-play .nl-hero-section .nl-hero-text,
  html.nl-hero-play .nl-hero-section .nl-hero-actions,
  html.nl-hero-play .nl-hero-section .nl-hero-divider,
  html.nl-hero-play .nl-hero-section .nl-hero-stats,
  html.nl-hero-play .nl-hero-section .nl-hero-visual,
  html.nl-hero-play .nl-hero-section .elementor-background-video-container {
    transition-duration: 0.85s;
  }
}

/* =========================================================
   NEURALIGN — REVEAL ANIMATIONS SEZIONI
========================================================= */

.nl-animate-section {
  overflow: hidden;
}

/* Stato iniziale degli elementi animati */
body.nl-animations-ready .nl-reveal {
  opacity: 0;
  transform: translate3d(0, var(--nl-y, 24px), 0) scale(var(--nl-scale, 1));
  filter: blur(var(--nl-blur, 6px));
  transition:
    opacity var(--nl-duration, 0.78s) cubic-bezier(0.22, 1, 0.36, 1),
    transform var(--nl-duration, 0.78s) cubic-bezier(0.22, 1, 0.36, 1),
    filter var(--nl-duration, 0.78s) cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--nl-delay, 0ms);
  will-change: opacity, transform, filter;
}

/* Stato visibile */
body.nl-animations-ready .nl-reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  filter: blur(0);
}

/* Titoli */
.nl-reveal-title {
  --nl-y: 30px;
  --nl-blur: 8px;
  --nl-duration: 0.85s;
}

/* Testi */
.nl-reveal-text {
  --nl-y: 18px;
  --nl-blur: 4px;
  --nl-duration: 0.72s;
}

/* Immagini normali */
.nl-reveal-image {
  --nl-y: 34px;
  --nl-scale: 0.985;
  --nl-blur: 8px;
  --nl-duration: 0.9s;
}

/* Card */
.nl-reveal-card {
  --nl-y: 34px;
  --nl-scale: 0.97;
  --nl-blur: 6px;
  --nl-duration: 0.82s;
}

/* Pulsanti */
.nl-reveal-button {
  --nl-y: 14px;
  --nl-scale: 0.98;
  --nl-blur: 3px;
  --nl-duration: 0.68s;
}

/* =========================================================
   NEURALIGN — MICROINTERAZIONI PULSANTI
========================================================= */

.nl-animate-section .elementor-button,
.nl-animate-section a.elementor-button {
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    opacity 0.22s ease;
  transform: translateZ(0);
}

.nl-animate-section .elementor-button:hover,
.nl-animate-section a.elementor-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
}

.nl-animate-section .elementor-button:active,
.nl-animate-section a.elementor-button:active {
  transform: translateY(0);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}
/* Bottoni senza ombra: classe no-shadow sul widget Elementor */
.nl-animate-section .no-shadow .elementor-button,
.nl-animate-section .no-shadow a.elementor-button {
  box-shadow: none !important;
}

/* Hover senza ombra */
.nl-animate-section .no-shadow .elementor-button:hover,
.nl-animate-section .no-shadow a.elementor-button:hover {
  transform: translateY(-2px);
  box-shadow: none !important;
}

/* Active senza ombra */
.nl-animate-section .no-shadow .elementor-button:active,
.nl-animate-section .no-shadow a.elementor-button:active {
  transform: translateY(0);
  box-shadow: none !important;
/* =========================================================
   NEURALIGN — BACKGROUND REVEAL
========================================================= */

body.nl-animations-ready .nl-bg-reveal {
  opacity: 0;
  transform: scale(1.015);
  clip-path: inset(0 0 7% 0);
  transition:
    opacity 1s cubic-bezier(0.22, 1, 0.36, 1),
    transform 1.2s cubic-bezier(0.22, 1, 0.36, 1),
    clip-path 1.2s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform, clip-path;
}

body.nl-animations-ready .nl-bg-reveal.is-bg-visible {
  opacity: 1;
  transform: scale(1);
  clip-path: inset(0 0 0 0);
}

/* Background Overlay Elementor */
body.nl-animations-ready .nl-bg-reveal .elementor-background-overlay {
  transform: scale(1.04);
  transition:
    transform 1.4s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

body.nl-animations-ready .nl-bg-reveal.is-bg-visible .elementor-background-overlay {
  transform: scale(1);
}

/* =========================================================
   NEURALIGN — MOBILE
========================================================= */

@media (max-width: 767px) {
  .nl-reveal-title {
    --nl-y: 22px;
    --nl-blur: 5px;
    --nl-duration: 0.65s;
  }

  .nl-reveal-text {
    --nl-y: 14px;
    --nl-blur: 3px;
    --nl-duration: 0.58s;
  }

  .nl-reveal-image,
  .nl-reveal-card {
    --nl-y: 22px;
    --nl-scale: 0.99;
    --nl-blur: 4px;
    --nl-duration: 0.68s;
  }

  .nl-animate-section .elementor-button:hover,
  .nl-animate-section a.elementor-button:hover {
    transform: none;
    box-shadow: none;
  }
}

/* =========================================================
   PUBBLICAZIONI / LOOP MOBILE
========================================================= */

@media (max-width: 767px) {
  .pubblicazioni-loop .elementor-loop-container.elementor-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
  }

  .pubblicazioni-loop .elementor-loop-container.elementor-grid > .e-loop-item {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
  }

  .pubblicazioni-loop .e-loop-item > .elementor,
  .pubblicazioni-loop .pubblicazione-card,
  .pubblicazioni-loop .pubblicazione-card > .e-con-inner {
    height: auto !important;
    min-height: 0 !important;
  }
}

/* =========================================================
   ACCESSIBILITÀ — RIDUZIONE MOVIMENTO
========================================================= */

@media (prefers-reduced-motion: reduce) {
  html.nl-hero-prep .nl-hero-section .nl-hero-kicker,
  html.nl-hero-prep .nl-hero-section .nl-hero-title,
  html.nl-hero-prep .nl-hero-section .nl-hero-text,
  html.nl-hero-prep .nl-hero-section .nl-hero-actions,
  html.nl-hero-prep .nl-hero-section .nl-hero-divider,
  html.nl-hero-prep .nl-hero-section .nl-hero-stats,
  html.nl-hero-prep .nl-hero-section .nl-hero-visual,
  html.nl-hero-prep .nl-hero-section .elementor-background-video-container,
  body.nl-animations-ready .nl-reveal,
  body.nl-animations-ready .nl-bg-reveal,
  body.nl-animations-ready .nl-bg-reveal .elementor-background-overlay {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    clip-path: none !important;
    transition: none !important;
  }
}

/* =========================================================
   NEURALIGN — FLUIDITÀ ANIMAZIONI MOBILE
   Riduce effetto “a scatti” durante lo scroll
========================================================= */

@media (max-width: 767px) {

  body.nl-animations-ready .nl-reveal {
    filter: none !important;
    transition:
      opacity var(--nl-duration, 0.5s) cubic-bezier(0.22, 1, 0.36, 1),
      transform var(--nl-duration, 0.5s) cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
  }

  .nl-reveal-title {
    --nl-y: 16px;
    --nl-scale: 1;
    --nl-blur: 0px;
    --nl-duration: 0.52s;
  }

  .nl-reveal-text {
    --nl-y: 12px;
    --nl-scale: 1;
    --nl-blur: 0px;
    --nl-duration: 0.48s;
  }

  .nl-reveal-image {
    --nl-y: 16px;
    --nl-scale: 0.995;
    --nl-blur: 0px;
    --nl-duration: 0.55s;
  }

  .nl-reveal-card {
    --nl-y: 16px;
    --nl-scale: 0.995;
    --nl-blur: 0px;
    --nl-duration: 0.52s;
  }

  .nl-reveal-button {
    --nl-y: 10px;
    --nl-scale: 1;
    --nl-blur: 0px;
    --nl-duration: 0.45s;
  }

  body.nl-animations-ready .nl-bg-reveal {
    opacity: 0;
    transform: translate3d(0, 12px, 0);
    clip-path: none !important;
    transition:
      opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
      transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
  }

  body.nl-animations-ready .nl-bg-reveal.is-bg-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    clip-path: none !important;
  }

  body.nl-animations-ready .nl-bg-reveal .elementor-background-overlay {
    transform: none !important;
    transition: opacity 0.45s ease;
  }
}
/* =========================================================
   NEURALIGN — ICON LIST REVEAL
========================================================= */

.nl-reveal-list-item {
  --nl-y: 14px;
  --nl-scale: 1;
  --nl-blur: 3px;
  --nl-duration: 0.62s;
}

body.nl-animations-ready .nl-list-reveal .elementor-icon-list-item {
  will-change: opacity, transform;
}

/* Mobile: più leggero */
@media (max-width: 767px) {
  .nl-reveal-list-item {
    --nl-y: 10px;
    --nl-scale: 1;
    --nl-blur: 0px;
    --nl-duration: 0.45s;
  }
}
/* =========================================================
   NEURALIGN — PREPARAZIONE ANTI-FLASH REVEAL
   Evita che gli elementi sotto hero appaiano,
   spariscano e poi rientrino
========================================================= */

html.nl-reveal-prep body:not(.nl-animations-ready)
  .nl-animate-section:not(.nl-hero-section)
  .elementor-heading-title,

html.nl-reveal-prep body:not(.nl-animations-ready)
  .nl-animate-section:not(.nl-hero-section)
  h1,

html.nl-reveal-prep body:not(.nl-animations-ready)
  .nl-animate-section:not(.nl-hero-section)
  h2,

html.nl-reveal-prep body:not(.nl-animations-ready)
  .nl-animate-section:not(.nl-hero-section)
  h3,

html.nl-reveal-prep body:not(.nl-animations-ready)
  .nl-animate-section:not(.nl-hero-section)
  h4,

html.nl-reveal-prep body:not(.nl-animations-ready)
  .nl-animate-section:not(.nl-hero-section)
  h5,

html.nl-reveal-prep body:not(.nl-animations-ready)
  .nl-animate-section:not(.nl-hero-section)
  h6,

html.nl-reveal-prep body:not(.nl-animations-ready)
  .nl-animate-section:not(.nl-hero-section)
  .elementor-widget-text-editor p,

html.nl-reveal-prep body:not(.nl-animations-ready)
  .nl-animate-section:not(.nl-hero-section)
  .elementor-widget-text-editor li,

html.nl-reveal-prep body:not(.nl-animations-ready)
  .nl-animate-section:not(.nl-hero-section)
  .nl-list-reveal .elementor-icon-list-item,

html.nl-reveal-prep body:not(.nl-animations-ready)
  .nl-animate-section:not(.nl-hero-section)
  .elementor-widget-image img,

html.nl-reveal-prep body:not(.nl-animations-ready)
  .nl-animate-section:not(.nl-hero-section)
  img.nl-image,

html.nl-reveal-prep body:not(.nl-animations-ready)
  .nl-animate-section:not(.nl-hero-section)
  .nl-card,

html.nl-reveal-prep body:not(.nl-animations-ready)
  .nl-animate-section:not(.nl-hero-section)
  .elementor-widget-button {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
}
/* =========================================================
   NEURALIGN — ANIMAZIONE CARD HOVER
   Compatibile con nl-reveal / is-visible
========================================================= */

.nl-card-hover-action {
  position: relative;
  transition:
    transform 0.3s ease-in-out,
    box-shadow 0.3s ease-in-out;
  will-change: transform;
}

/* Stato normale dopo l'animazione di ingresso */
body.nl-animations-ready .nl-card-hover-action.nl-reveal.is-visible {
  transform: translate3d(0, 0, 0) scale(1);
  transition:
    transform 0.3s ease-in-out,
    box-shadow 0.3s ease-in-out;
}

/* Hover normale */
.nl-card-hover-action:hover {
  transform: translate3d(0, -10px, 0);
}

/* Hover quando la card ha anche nl-reveal/is-visible */
body.nl-animations-ready .nl-card-hover-action.nl-reveal.is-visible:hover {
  transform: translate3d(0, -10px, 0) scale(1);
}

/* Linea verticale sul bordo sinistro */
.nl-card-hover-action::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 3px;
  height: 0;
  background-color: var(--nlg-orange);
  border: 0;
  transition: height 0.3s ease-in-out;
  pointer-events: none;
}

/* Linea in hover */
.nl-card-hover-action:hover::before {
  height: calc(100% + 2px);
}

/* Versione compatibile con reveal */
body.nl-animations-ready .nl-card-hover-action.nl-reveal.is-visible:hover::before {
  height: calc(100% + 2px);
}