/*Bg open site*/
.open-bg {
  background: url("../img/cover.webp") no-repeat center;
  -webkit-background-size: cover !important;
  -moz-background-size: cover !important;
  -o-background-size: cover !important;
  background-size: cover !important;
  height: 100vh !important;
  border-radius: 30px;
  position: relative;
}
.glass {
  background: rgba(255, 255, 255, 0.18) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  border-radius: 20px;
  padding: 24px 28px;
}
.glass-dark {
  background: rgba(0, 0, 0, 0.3) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border: none !important;
  border-radius: 20px;
  padding: 24px 28px;
}
.title {
  font-size: 5em;
  line-height: 1.2em;
  margin-bottom: 15px;
}
.subtitle {
  letter-spacing: 2px;
  font-size: 1em;
  font-weight: 500;
  text-transform: uppercase;
  color: #437b8a !important;
}
.text-shadow {
  background: linear-gradient(90deg, #b57b2d 0%, #437b8a 55%, #1c274c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section-bg {
  margin: 0 15px;
  padding: 15px 30px;
}
.section-bg-w {
  padding: 20px 60px;
}
.section-bg-w a.pi-link-white {
  color: #fff !important;
}
.header-transparent {
  background-color: transparent !important;
}
.pi-simple-menu > li > a span:hover {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 40px;
  line-height: 50px;
  padding: 0 20px !important;
}
/* Immagine decorativabox */
.pi-hero-card {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background-color: #ffffff;
  background-image: url("../img/wave.webp") !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  background-position: center center !important;
  z-index: 1;
  padding: 70px 80px;
}
.pi-hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.pi-hero-card > * {
  position: relative;
  z-index: 2;
}
/*Animation Loop*/ :root {
  --gap: 5rem; /* spazio tra le voci */
  --duration: 50s; /* più alto = più lento */
  --marquee-font-size: clamp(2em, 4vw, 4em);
}
.marquee {
  display: flex;
  overflow: hidden;
  gap: var(--gap);
  align-items: center;
  white-space: nowrap;
  text-decoration: none;
  color: #437b8a;
  font-weight: 500;
  font-size: var(--marquee-font-size);
  line-height: 1.05;
  transition: color 0.3s ease;
}
/* Gruppi duplicati per loop continuo */
.marquee__group {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: var(--gap);
  animation: scroll var(--duration) linear infinite;
  margin: 15px 0;
}
/* Ferma l’animazione al passaggio del mouse */
.marquee:hover .marquee__group {
  animation-play-state: paused;
}
/* Sostituiamo i punti elenco con "/" */
.marquee__group li {
  list-style: none;
  position: relative;
}
.marquee__group li::after {
  content: " /";
  margin-left: 2rem;
  opacity: 0.6;
}
/* Rimuove la "/" dall’ultimo elemento per eleganza */
.marquee__group li:last-child::after {
  content: "";
}
/* Effetto fade ai bordi */
.mask {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
/* Animazione */
@keyframes scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-100% - var(--gap)));
  }
}
/* Mobile responsive */
@media (max-width: 480px) {
  :root {
    --gap: 3rem;
    --duration: 55s; /* ancora più lento su schermi piccoli */
  }
}
/*Section*/
.section.header-section {
  overflow: visible !important;
  position: relative;
  z-index: 9999;
  padding: 10px 20px;
}
.header-section .pi-submenu {
  z-index: 10000;
}
.section {
  margin: 15px;
  border-radius: 30px;
  overflow: hidden; /* ✅ importante */
}
.section-title {
  font-size: 3em;
  line-height: 1.2em;
  margin-bottom: 15px;
}
.pi-section-gradient {
  background-color: #ffffff;
  background-image:
    radial-gradient(circle at 100% 0%, rgba(28, 39, 76, 0.20) 0%, rgba(28, 39, 76, 0) 48%), radial-gradient(circle at 0% 100%, rgba(181, 123, 45, 0.18) 0%, rgba(181, 123, 45, 0) 45%), linear-gradient(135deg, #ffffff 0%, rgba(67, 123, 138, 0.16) 100%);
}
/* Sticky */
#pi-all.pi-all-sticky-fix {
  overflow: visible !important;
}
.pi-sticky-title {
  position: -webkit-sticky;
  position: sticky;
  top: 120px;
  z-index: 2;
  transition: transform .3s ease, opacity .3s ease;
}
.pi-sticky-img {
  position: -webkit-sticky;
  position: sticky;
  top: 120px; /* distanza dall’header */
  align-self: flex-start;
  z-index: 1;
}
/* evita che l’immagine “sbordi” */
.pi-sticky-img .pi-img-w {
  overflow: hidden;
}
/* Mobile: niente sticky */
@media (max-width: 767px) {
  .pi-sticky-img {
    position: static;
    top: auto;
  }
}
.box-white {
  background-color: #fff !important;
  padding: 40px 35px !important;
}
.box-base {
  background-color: #8aa094 !important;
  color: #3d3d3d !important;
  padding: 35px;
}
.btn-white {
  background-color: #fff !important;
  color: #181818 !important;
  border: 1px solid #fff !important;
}
.btn-white:hover {
  background-color: #8aa094 !important;
  color: #fff !important;
  border: 1px solid #8aa094 !important;
}
.btn-white-2 {
  background-color: #fff !important;
  color: #181818 !important;
  border: 1px solid #fff !important;
}
.btn-white-2:hover {
  background-color: #437b8a !important;
  color: #fff !important;
  border: 1px solid #437b8a !important;
}
.pi-icon-box-icon-gradient i::before {
  display: inline-block;
  background: conic-gradient(from 0deg, #b57b2d 0deg, #437b8a 120deg, #1c274c 240deg, #b57b2d 360deg);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.img-psicologia {
  background: url("../img/psicologia-livorno.webp") no-repeat center;
  -webkit-background-size: cover !important;
  -moz-background-size: cover !important;
  -o-background-size: cover !important;
  background-size: cover !important;
  border-top-left-radius: 20px;
  border-bottom-left-radius: 20px;
}
.pi-img-overlay-glass {
  background: rgba(255, 255, 255, 0.18) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
}
/* ============================
   GLASS FULL + mantiene pi-overlay-slide + pi-show-heading
   (sostituisci con questo il tuo blocco GLASS FULL attuale)
============================ */
.glass-hover {
  position: relative;
  overflow: hidden;
}
/* assicura lo stacking corretto: immagine sotto, glass sopra */
.glass-hover img {
  display: block;
  position: relative;
  z-index: 0;
}
/* GLASS layer full-cover (solo hover) */
.glass-hover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s ease;
  background: rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.glass-hover:hover::before {
  opacity: 1;
}
/* overlay del template sopra il glass (così lo slide resta) */
.glass-hover .pi-img-overlay {
  z-index: 2;
  background: transparent !important; /* <-- QUESTA è la chiave */
}
/* se il template usa pseudo-elementi per “scurire” l’overlay, li spegniamo */
.glass-hover .pi-img-overlay::before, .glass-hover .pi-img-overlay::after {
  background: transparent !important;
  opacity: 0 !important;
}
/* testo leggibile */
.glass-hover .pi-img-overlay p {
  color: rgba(255, 255, 255, .9);
}
/* opzionale: titolo sempre gestito da pi-show-heading
   (noi facciamo comparire solo testo + bottone in hover) */
.glass-hover .pi-img-overlay p, .glass-hover .pi-img-overlay .btn {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease;
}
.glass-hover:hover .pi-img-overlay p, .glass-hover:hover .pi-img-overlay .btn {
  opacity: 1;
  transform: translateY(0);
}
.border-map iframe {
  border-radius: 40px 40px 40px 40px;
}
.border-video {
  position: relative;
  padding: 56.25% 0 0 0;
  overflow: hidden;
  border-radius: 24px;
}
.border-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 24px;
}
.cta-bg {
  background: url("../img/cta.webp") no-repeat top;
  -webkit-background-size: cover !important;
  -moz-background-size: cover !important;
  -o-background-size: cover !important;
  background-size: cover !important;
}
.pi-box.box-cta {
  background: url("../img/cta.webp") no-repeat center;
  -webkit-background-size: cover !important;
  -moz-background-size: cover !important;
  -o-background-size: cover !important;
  background-size: cover !important;
}
/*Article*/
.pi-breadcrumb ul li:last-child {
  display: inline-block;
  padding-bottom: 6px;
  background-image: linear-gradient(90deg, #b57b2d 0%, #437b8a 45%, #1c274c 75%, #b57b2d 100%);
  background-repeat: no-repeat;
  background-size: 100% 3px;
  background-position: left bottom;
}
.bg-article.servizi {
  background: url("../img/servizi.webp") no-repeat center;
  -webkit-background-size: cover !important;
  -moz-background-size: cover !important;
  -o-background-size: cover !important;
  background-size: cover !important;
  height: 80vh !important;
  border-radius: 30px;
  position: relative;
}
.bg-article.psicologia {
  background: url("../img/psicologia-livorno.webp") no-repeat center;
  -webkit-background-size: cover !important;
  -moz-background-size: cover !important;
  -o-background-size: cover !important;
  background-size: cover !important;
  height: 80vh !important;
  border-radius: 30px;
  position: relative;
}
.bg-article.mental-coaching {
  background: url("../img/mental-coaching-livorno.webp") no-repeat center;
  -webkit-background-size: cover !important;
  -moz-background-size: cover !important;
  -o-background-size: cover !important;
  background-size: cover !important;
  height: 80vh !important;
  border-radius: 30px;
  position: relative;
}
.subtitle-article span {
  background-color: #ea6645;
  color: #181818;
  border-radius: 30px;
  padding: 5px 8px;
  font-weight: 500;
  text-transform: uppercase;
}
.bg-article .push-bottom {
  min-height: 70vh;
  display: flex;
  align-items: flex-end;
  padding-bottom: 30px;
}
@media (max-width: 768px) {
  .bg-article .push-bottom {
    padding: 20px 16px 24px; /* più respiro su mobile */
  }
}
/*Footer*/
.btn-whatsapp {
  z-index: 999999;
  background: #3BBF5A;
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  box-shadow: 0px 0px 1px 1px rgba(59, 191, 90, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-whatsapp i {
  color: #fff;
  font-size: 40px;
}
.pulse {
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0px rgba(37, 211, 102, 0.5);
  }
  100% {
    box-shadow: 0 0 0 20px rgba(37, 211, 102, 0);
  }
}
.wa-center {
  display: block;
  margin: 10px auto;
}
.footer-fixed {
  position: fixed;
  z-index: 1002;
  bottom: 0;
  width: 100%;
}
@media (min-width: 320px) and (max-width: 400px) {
  .title {
    font-size: 2em;
  }
  .open-bg {
    background: url("../img/cover-xs.webp") no-repeat center;
  }
  .box-bottom-element {
    position: relative;
    bottom: 20%;
  }
  .btn-bottom-element {
    position: relative;
    bottom: 5%;
    left: 60%;
  }
  .subtitle-box-eventi {
    font-size: 2em;
    color: #fff !important;
  }
  /* ============================
   MOBILE: card glass SEMPRE visibile con titolo + testo + bottone
============================ */
  @media (max-width: 767px) {
    /* niente glass full-cover su touch */
    .glass-hover::before {
      opacity: 0 !important;
    }
    /* overlay = card */
    .glass-hover .pi-img-overlay {
      opacity: 1 !important;
      transform: none !important;
      visibility: visible !important;
      left: 14px !important;
      right: 14px !important;
      bottom: 14px !important;
      top: auto !important;
      width: auto !important;
      height: auto !important;
      border-radius: 18px;
      padding: 16px;
      background: rgba(255, 255, 255, .14) !important;
      -webkit-backdrop-filter: blur(14px);
      backdrop-filter: blur(14px);
      border: 1px solid rgba(255, 255, 255, .22);
      /* IMPORTANTI per evitare “tagli” */
      overflow: auto !important;
      max-height: 65% !important; /* se il testo è lungo, scroll */
    }
    /* spegni overlay scuro del template */
    .glass-hover .pi-img-overlay::before, .glass-hover .pi-img-overlay::after {
      background: transparent !important;
      opacity: 0 !important;
    }
    /* forza visibilità dei figli (il template spesso li nasconde) */
    .glass-hover .pi-img-overlay * {
      opacity: 1 !important;
      transform: none !important;
      visibility: visible !important;
      max-height: none !important;
    }
    /* specifico: testo + bottone */
    .glass-hover .pi-img-overlay p {
      display: block !important;
      margin: 10px 0 14px !important;
      color: rgba(255, 255, 255, .9) !important;
    }
    .glass-hover .pi-img-overlay .btn {
      display: inline-block !important;
    }
  }
}
@media (min-width: 401px) and (max-width: 767px) {
  .title {
    font-size: 2.1em;
  }
  .box-bottom-element {
    position: relative;
    bottom: 20%;
  }
  .btn-bottom-element {
    position: relative;
    bottom: 5%;
    left: 60%;
  }
  .pi-sticky-title {
    position: static;
    top: auto;
  }
  .subtitle-box-eventi {
    font-size: 2em;
    color: #fff !important;
  }
  /* ============================
   MOBILE: card glass SEMPRE visibile con titolo + testo + bottone
============================ */
  @media (max-width: 767px) {
    /* niente glass full-cover su touch */
    .glass-hover::before {
      opacity: 0 !important;
    }
    /* overlay = card */
    .glass-hover .pi-img-overlay {
      opacity: 1 !important;
      transform: none !important;
      visibility: visible !important;
      left: 14px !important;
      right: 14px !important;
      bottom: 14px !important;
      top: auto !important;
      width: auto !important;
      height: auto !important;
      border-radius: 18px;
      padding: 16px;
      background: rgba(255, 255, 255, .14) !important;
      -webkit-backdrop-filter: blur(14px);
      backdrop-filter: blur(14px);
      border: 1px solid rgba(255, 255, 255, .22);
      /* IMPORTANTI per evitare “tagli” */
      overflow: auto !important;
      max-height: 65% !important; /* se il testo è lungo, scroll */
    }
    /* spegni overlay scuro del template */
    .glass-hover .pi-img-overlay::before, .glass-hover .pi-img-overlay::after {
      background: transparent !important;
      opacity: 0 !important;
    }
    /* forza visibilità dei figli (il template spesso li nasconde) */
    .glass-hover .pi-img-overlay * {
      opacity: 1 !important;
      transform: none !important;
      visibility: visible !important;
      max-height: none !important;
    }
    /* specifico: testo + bottone */
    .glass-hover .pi-img-overlay p {
      display: block !important;
      margin: 10px 0 14px !important;
      color: rgba(255, 255, 255, .9) !important;
    }
    .glass-hover .pi-img-overlay .btn {
      display: inline-block !important;
    }
  }
}
@media (min-width: 768px) and (max-width: 991px) {
  .open-bg {
    background: url("../img/cover-s.webp") no-repeat center;
  }
}
@media (min-width: 992px) and (max-width: 1279px) {}
@media (min-width: 1280px) and (max-width: 1539px) {
  .title {
    font-size: 3em;
  }
}
@media (min-width: 1540px) {}

/* Smartphone: hero senza immagine di sfondo e titolo non sticky */
@media (max-width: 767px) {
  .open-bg {
    background-image: none !important;
  }

  .pi-sticky-title {
    position: static !important;
    top: auto !important;
    z-index: auto;
    transform: none !important;
  }
}

/* 03/11/2026 - pulsante WhatsApp fisso */
.btn-whatsapp:focus-visible {
  outline: 3px solid #1c274c;
  outline-offset: 3px;
}
.btn-whatsapp i {
  color: #fff;
  font-size: 40px;
  line-height: 1;
  display: block;
}
@media (max-width: 768px) {
  .btn-whatsapp {
    width: 56px;
    height: 56px;
    bottom: 20px;
    right: 20px;
  }
  .btn-whatsapp i {
    font-size: 32px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .btn-whatsapp.pulse {
    animation: none;
  }
}
