/* Menu header visibile */
header .wp-block-navigation a,
header .wp-block-navigation .wp-block-navigation-item__content{
  color:#2f5f6d; font-weight:600; text-decoration:none;
}
header .wp-block-navigation a:hover{ color:#4893a9; }
header .wp-block-navigation__responsive-container-open,
header .wp-block-navigation__responsive-container-close{ color:#2f5f6d; }

/* Schede: stessa altezza reale + hover con overlay a contrasto */
.af-grid .wp-block-column{ display:flex; }
.af-grid .wp-block-column > .wp-block-group{ width:100%; }

.af-card{
  box-shadow:0 3px 14px rgba(35,50,56,.08);
  transition:background-color .25s ease, border-color .25s ease,
             transform .25s ease, box-shadow .25s ease;
}
.af-card:hover{
  background-color:#2f5f6d !important;
  border-color:#2f5f6d !important;
  transform:translateY(-6px);
  box-shadow:0 16px 34px rgba(47,95,109,.30);
}
.af-card:hover h3,
.af-card:hover p{ color:#f2f8fa !important; }
.af-card:hover .af-kicker{ color:#9fd3e0 !important; }

@media (prefers-reduced-motion:reduce){
  .af-card{ transition:none; }
  .af-card:hover{ transform:none; }
}
/* Header sempre visibile durante lo scroll */
header.wp-block-group{
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-bar header.wp-block-group{ top: 32px; }
@media screen and (max-width:782px){
  .admin-bar header.wp-block-group{ top: 46px; }
}

header.wp-block-group a{ text-decoration: none; }
header.wp-block-group p a:hover{ color: #4893a9; }
/* Header sempre visibile durante lo scroll */
.wp-site-blocks > header{
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
}
.admin-bar .wp-site-blocks > header{ top: 32px; }
@media screen and (max-width: 782px){
  .admin-bar .wp-site-blocks > header{ top: 46px; }
}

/* evita che un overflow del tema disattivi lo sticky */
html, body{ overflow-x: clip; }
/* ===== Percorso servizi ===== */
.af-path{ position:relative; }
.af-path::before{
  content:""; position:absolute; left:27px; top:40px; bottom:40px;
  width:2px; background:#cfe4ea;
}
.af-step{ position:relative; margin:0 0 26px 78px; }
.af-step:last-child{ margin-bottom:0; }

.af-step__n{
  position:absolute; left:-78px; top:26px; margin:0;
  width:56px; height:56px; box-sizing:border-box;
  display:flex; align-items:center; justify-content:center;
  border:2px solid #4893a9; border-radius:50%;
  background:#fff; color:#2f5f6d;
  font-size:1rem; font-weight:800; line-height:1;
}

.af-step__t{ position:relative; padding-left:36px; }
.af-step__t::before{
  content:""; position:absolute; left:0; top:50%; transform:translateY(-50%);
  width:24px; height:24px; background:no-repeat center/contain;
}
.af-step--1 .af-step__t::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234893a9' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v11H9l-5 4V5Z'/%3E%3C/svg%3E");}
.af-step--2 .af-step__t::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234893a9' stroke-width='1.7' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6'/%3E%3Cpath d='M19.5 19.5 15.5 15.5'/%3E%3C/svg%3E");}
.af-step--3 .af-step__t::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234893a9' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H6v18h12V7l-4-4Z'/%3E%3Cpath d='M14 3v4h4'/%3E%3Cpath d='M9 12h6M9 16h6'/%3E%3C/svg%3E");}
.af-step--4 .af-step__t::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234893a9' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h4L18 10l-4-4L4 16v4Z'/%3E%3Cpath d='m14 6 4 4'/%3E%3C/svg%3E");}
.af-step--5 .af-step__t::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234893a9' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Cpath d='M12 8v4.5l3 2'/%3E%3C/svg%3E");}
.af-step--6 .af-step__t::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234893a9' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='12' r='4'/%3E%3Cpath d='M12 12h9M17 12v3M20 12v2'/%3E%3C/svg%3E");}

/* Tablet e smartphone: linea e numero passano in colonna */
@media (max-width:781px){
  .af-path::before{ display:none; }
  .af-step{ margin-left:0; }
  .af-step__n{ position:static; margin:0 0 16px; width:48px; height:48px; }
  .af-step__t{ padding-left:32px; }
}

/* Accessibilità: stato focus visibile su link e pulsanti */
a:focus-visible,
.wp-block-button__link:focus-visible,
button:focus-visible{
  outline:3px solid #4893a9; outline-offset:3px; border-radius:4px;
}
/* Telefono: scheda su desktop, pulsante su mobile */
.af-tel-mob{ display: none; }

@media (max-width: 781px){
  .af-tel-desk{ display: none; }
  .af-tel-mob{ display: flex; }
  p.af-tel-mob{ display: block; }
}
.af-contact:hover{
  background-color: #ffffff !important;
  border-color: #cfe4ea !important;
  transform: none;
  box-shadow: 0 3px 14px rgba(35,50,56,.08);
}