/* APSP Grigno — Suor Filippina — stub da Grigno: adattare colori/logo */
/* APSP Grigno — Suor Filippina — override Design Comuni (allineato a apsp-grigno.it) */

:root {
  /* Verde AGID Design Comuni — palette chat modifiche Grigno */
  --apsp-blue: #007a52;
  --apsp-blue-dark: #004d33;
  --apsp-blue-active: #003824;
  --apsp-blue-soft: #e5f2ec;
  --apsp-blue-mid: #4d9a7a;
  --apsp-trees-texture: url("images/apsp-grigno-trees-texture.png");
  /* Contorno focus AGID / Bootstrap Italia (ambra) */
  --apsp-focus: #995c00;
  --bs-primary: #007a52;
  --bs-primary-rgb: 0, 122, 82;
  --bs-link-color: #007a52;
  --bs-link-hover-color: #004d33;
  --bs-focus-ring-color: rgba(153, 92, 0, 0.45);
}

/* Bootstrap Italia primary → brand APSP (no green #007a52) */
.btn-primary,
.btn-primary:visited {
  background-color: var(--apsp-blue) !important;
  border-color: var(--apsp-blue) !important;
  color: #fff !important;
  box-shadow: none !important;
}
.btn-primary:hover,
.btn-primary:active,
.btn-primary:not(:disabled):not(.disabled):active {
  background-color: var(--apsp-blue-dark) !important;
  border-color: var(--apsp-blue-dark) !important;
  color: #fff !important;
  box-shadow: none !important;
}

/* Outline: BI usa box-shadow inset verde — va sostituito */
.btn-outline-primary,
.btn-outline-primary:visited {
  color: var(--apsp-blue) !important;
  border-color: transparent !important;
  background-color: transparent !important;
  box-shadow: inset 0 0 0 2px var(--apsp-blue) !important;
}
.btn-outline-primary:hover {
  color: #fff !important;
  background-color: var(--apsp-blue) !important;
  border-color: transparent !important;
  box-shadow: inset 0 0 0 2px var(--apsp-blue) !important;
}
.btn-outline-primary:not(:disabled):not(.disabled):active,
.btn-outline-primary:not(:disabled):not(.disabled).active,
.show > .btn-outline-primary.dropdown-toggle {
  color: #fff !important;
  background-color: var(--apsp-blue) !important;
  box-shadow: inset 0 0 0 2px var(--apsp-blue) !important;
}
a {
  color: var(--apsp-blue);
}
a:hover {
  color: var(--apsp-blue-dark);
}

/* Icone / utility primary BI (fill verde #007a52) */
.icon,
svg.icon,
.it-btn-close .icon,
.btn .icon {
  fill: var(--apsp-blue) !important;
}
.it-header-navbar-wrapper .icon,
.it-header-slim-wrapper .icon,
.btn-primary .icon,
.btn-primary:hover .icon {
  fill: #fff !important;
}
.text-primary {
  color: var(--apsp-blue) !important;
}
.bg-primary {
  background-color: var(--apsp-blue) !important;
}
.border-primary {
  border-color: var(--apsp-blue) !important;
}
.form-check-input:checked {
  background-color: var(--apsp-blue) !important;
  border-color: var(--apsp-blue) !important;
}
.form-check-input:focus:not(.focus--mouse),
.form-check-input:focus-visible {
  border-color: var(--apsp-focus) !important;
  box-shadow: 0 0 0 2px var(--apsp-focus) !important;
}
.logo-hamburger,
.logo-hamburger .it-brand-text,
.close-menu {
  color: var(--apsp-blue) !important;
}
.close-menu .icon {
  fill: var(--apsp-blue) !important;
}

/* Logo + fiore + testo */
.apsp-brand-lockup {
  gap: 0.75rem;
  align-items: center !important;
}
.apsp-brand-logo,
.apsp-brand-logo.custom-logo {
  display: block !important;
  width: auto !important;
  max-width: 110px;
  height: 88px !important;
  object-fit: contain;
  flex-shrink: 0;
}
.apsp-brand-flower {
  width: 56px !important;
  height: 56px !important;
  object-fit: contain;
  flex-shrink: 0;
  display: block !important;
}
.apsp-brand-copy .it-brand-title {
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.2;
  color: var(--apsp-blue-dark) !important;
}
.apsp-brand-copy .it-brand-tagline {
  color: var(--apsp-blue-dark) !important;
}
body.wp-custom-logo .apsp-brand-copy .it-brand-title {
  max-width: 22rem;
}

/* Alberi di sfondo dietro titolo + claim (fascia brand) */
.it-header-center-wrapper.apsp-brand-trees {
  position: relative;
  min-height: 110px;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 0 !important;
  background-color: #f7f8f4 !important;
  background-image: var(--apsp-trees-texture) !important;
  background-size: cover !important;
  /* Un filo più in basso del 62% */
  background-position: center 48% !important;
  background-repeat: no-repeat !important;
}
.it-header-center-wrapper.apsp-brand-trees .it-header-center-content-wrapper {
  position: relative;
  z-index: 1;
}
.it-header-center-wrapper.apsp-brand-trees .apsp-header-secondary a,
.it-header-center-wrapper.apsp-brand-trees .it-search-wrapper > span {
  color: var(--apsp-blue-dark) !important;
}
.it-header-center-wrapper.apsp-brand-trees .search-link {
  background: rgba(255, 255, 255, 0.75) !important;
}

/* Slim header contacts */
.apsp-slimheader {
  background: var(--apsp-blue-dark) !important;
}
.apsp-slimheader .it-header-slim-wrapper-content {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
}
.apsp-slimheader .it-header-slim-wrapper-content,
.apsp-slimheader .apsp-slim-contacts {
  overflow: visible;
  text-overflow: unset;
  white-space: normal;
}
.apsp-slimheader .apsp-slim-contacts {
  font-size: 0.85rem;
  line-height: 1.45;
  color: #fff;
  flex: 1 1 auto;
  min-width: 0;
}
.apsp-slimheader .apsp-slim-contacts a {
  color: #fff !important;
  text-decoration: underline;
  word-break: break-word;
}
.apsp-slimheader .it-header-slim-right-zone:empty {
  display: none;
}

.it-brand-title {
  color: var(--apsp-blue-dark) !important;
  font-weight: 700;
}
.it-brand-tagline {
  color: var(--apsp-blue-dark) !important;
}
.apsp-logo,
.it-brand-wrapper .icon.apsp-logo,
.it-brand-wrapper img.apsp-logo {
  width: auto !important;
  height: 52px;
  max-width: 200px;
  max-height: 58px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}
.it-brand-wrapper .it-brand-text {
  gap: 0.75rem !important;
}
.apsp-brand-copy {
  min-width: 0;
}
.apsp-brand-copy .it-brand-title {
  font-size: 1.05rem !important;
  line-height: 1.15 !important;
  white-space: nowrap;
}
.apsp-brand-copy .it-brand-tagline {
  font-size: 0.8rem !important;
  white-space: nowrap;
}
.logo-hamburger img.apsp-logo {
  height: 44px;
  max-width: 160px;
}

/* Mobile: il logo grafico include già il nome — evita overflow del titolo testuale */
@media (max-width: 991.98px) {
  .it-header-center-content-wrapper {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-width: 0;
  }
  .it-header-center-content-wrapper .it-brand-wrapper {
    flex: 1 1 auto;
    min-width: 0;
    max-width: calc(100% - 3.25rem);
  }
  .it-header-center-content-wrapper .it-brand-wrapper > a {
    display: block;
    min-width: 0;
    max-width: 100%;
  }
  .it-header-center-content-wrapper .it-brand-wrapper .it-brand-text {
    display: flex !important;
    align-items: center;
    gap: 0.5rem !important;
    min-width: 0;
    max-width: 100%;
  }
  .apsp-brand-copy {
    display: none !important;
  }
  .apsp-logo,
  .it-brand-wrapper .icon.apsp-logo,
  .it-brand-wrapper img.apsp-logo {
    height: 40px !important;
    max-width: min(210px, 62vw) !important;
    max-height: 44px !important;
  }
  .logo-hamburger .it-brand-text .it-brand-title {
    font-size: 0.95rem !important;
    line-height: 1.2 !important;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

@media (min-width: 992px) {
  .apsp-logo,
  .it-brand-wrapper .icon.apsp-logo,
  .it-brand-wrapper img.apsp-logo {
    height: 64px;
    max-width: 240px;
    max-height: 72px;
  }
  .it-header-center-content-wrapper {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }
  .it-header-center-content-wrapper .it-brand-wrapper {
    flex: 0 1 auto;
    max-width: 46%;
  }
  .it-header-center-content-wrapper .it-brand-wrapper .it-brand-text {
    display: flex !important;
    align-items: center;
    justify-content: flex-start !important;
    flex-wrap: nowrap;
    gap: 0.85rem !important;
  }
  .it-header-center-content-wrapper .it-right-zone {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.4rem 0.85rem;
    flex: 1 1 auto;
    max-width: 54%;
    min-width: 280px;
  }
}

/* Secondary links (Albo / Trasparenza) accanto alla lente — layout orizzontale */
.apsp-header-secondary {
  display: none;
}
@media (min-width: 992px) {
  .apsp-header-secondary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.15rem 0.75rem;
  }
  .apsp-header-secondary a {
    color: var(--apsp-blue-dark) !important;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none !important;
    white-space: nowrap;
  }
  .apsp-header-secondary a:hover {
    color: var(--apsp-blue) !important;
    text-decoration: underline !important;
  }
}

/* Blue bar = PRIMARY menu (come piccolospedale.it) */
.it-header-navbar-wrapper,
.it-header-navbar-wrapper .navbar,
.it-header-navbar-wrapper .navbar-collapsable,
.it-header-navbar-wrapper .menu-wrapper {
  background: var(--apsp-blue) !important;
  background-color: var(--apsp-blue) !important;
}
.it-header-navbar-wrapper .nav-link {
  color: #fff !important;
  font-weight: 500;
  font-size: 1.05rem;
}
/* Breadcrumb Design Comuni: no green */
.breadcrumb-container .breadcrumb-item a,
.breadcrumb a {
  color: var(--apsp-blue) !important;
}
.breadcrumb-item.active,
.breadcrumb-item .separator {
  color: #5c6f82 !important;
}
.it-header-navbar-wrapper .nav-link:hover {
  background: var(--apsp-blue-active) !important;
  color: #fff !important;
}
.it-header-navbar-wrapper .nav-link.active,
.it-header-navbar-wrapper .nav-item.current-menu-item > .nav-link,
.it-header-navbar-wrapper .nav-item.current_page_item > .nav-link,
.it-header-navbar-wrapper .nav-item.current-menu-ancestor > .nav-link {
  background: var(--apsp-blue-active) !important;
  color: #fff !important;
  border-bottom: none !important;
}
.it-header-navbar-wrapper .nav-link::after,
.it-header-navbar-wrapper .nav-link.active::after {
  display: none !important;
}

@media (min-width: 992px) {
  .it-header-navbar-wrapper .custom-navbar-toggler {
    display: none !important;
  }
  .it-header-navbar-wrapper .navbar-collapsable {
    display: block !important;
    position: static !important;
    width: 100%;
    background: transparent;
  }
  .it-header-navbar-wrapper .navbar-collapsable .overlay,
  .it-header-navbar-wrapper .navbar-collapsable .close-div,
  .it-header-navbar-wrapper .logo-hamburger,
  .it-header-navbar-wrapper nav[aria-label="Secondaria"],
  .it-header-navbar-wrapper .it-socials {
    display: none !important;
  }
  .it-header-navbar-wrapper .menu-wrapper {
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    background: transparent;
    padding: 0;
  }
  .it-header-navbar-wrapper nav[aria-label="Principale"] {
    width: 100%;
  }
  .it-header-navbar-wrapper nav[aria-label="Principale"] .navbar-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
    margin: 0;
    gap: 0;
  }
  .it-header-navbar-wrapper nav[aria-label="Principale"] .nav-item {
    margin: 0;
  }
  .it-header-navbar-wrapper nav[aria-label="Principale"] .nav-link {
    padding: 0.85rem 0.85rem !important;
    white-space: nowrap;
    border-radius: 0;
    font-size: 1rem;
  }
}
@media (min-width: 1200px) {
  .it-header-navbar-wrapper nav[aria-label="Principale"] .nav-link {
    padding: 0.85rem 1.05rem !important;
    font-size: 1.05rem;
  }
}

/* Residuo fascia alberi: non deve occupare altezza */
/* Banner alberi legacy: non usare (gli alberi stanno nella brand bar) */
.apsp-top-banner {
  display: none !important;
}

/* Navbar verde piena (senza fascia alberi separata) */
.it-header-navbar-wrapper {
  background-color: var(--apsp-blue) !important;
}

/* Page hero (RSA, Casa Soggiorno, …) */
.apsp-page-hero {
  position: relative;
  min-height: 140px;
  max-height: 220px;
  height: clamp(140px, 18vw, 200px);
  background: var(--apsp-blue-dark);
  overflow: hidden;
  border-bottom: 4px solid var(--apsp-blue);
}
.apsp-page-hero__slides {
  position: absolute;
  inset: 0;
}
.apsp-page-hero__slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.apsp-page-hero__slide.is-active,
.apsp-page-hero:not(.apsp-page-hero--slider) .apsp-page-hero__slide {
  opacity: 1;
}
.apsp-page-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 77, 51, 0.15) 0%, rgba(0, 77, 51, 0.55) 100%);
  pointer-events: none;
}
.apsp-page-hero__caption {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem 0 1.75rem;
  color: #fff;
}
.apsp-page-hero__caption-title {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.apsp-page-hero__caption-subtitle,
.apsp-page-hero__caption-line {
  margin: 0.15rem 0 0;
  font-size: clamp(1rem, 2vw, 1.25rem);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
.apsp-page-hero__dots {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 0.85rem;
  transform: translateX(-50%);
  display: flex;
  gap: 0.45rem;
}
.apsp-page-hero__dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}
.apsp-page-hero__dot.is-active {
  background: #fff;
}
.apsp-page--has-hero .container {
  padding-top: 1.25rem;
}

/* Home hero full con foto di sfondo + overlay Acceder */
.apsp-hero {
  position: relative;
  min-height: 560px;
  background-color: var(--apsp-blue-dark);
  background-size: cover;
  background-position: 68% 62%;
  display: flex;
  align-items: flex-end;
  border-bottom: 4px solid var(--apsp-blue);
}
.apsp-hero--below-nav {
  /* Legacy: non usare — hero classico con background-image */
  min-height: 560px;
  align-items: flex-end;
}
.apsp-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 77, 51, 0.2) 0%, rgba(0, 52, 35, 0.78) 100%);
}
.apsp-hero__content {
  position: relative;
  z-index: 1;
  padding: 3rem 0 2.5rem;
  color: #fff;
}
.apsp-hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
  opacity: 0.9;
}
.apsp-hero__title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.apsp-hero__subtitle {
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
  color: #fff;
}
.apsp-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.apsp-hero__actions .btn-white,
.apsp-hero__actions .btn-outline-primary,
.apsp-hero__actions .btn-outline-primary.btn-white {
  color: #fff !important;
  border: none !important;
  background: transparent !important;
  box-shadow: inset 0 0 0 2px #fff !important;
  --bs-btn-color: #fff;
  --bs-btn-border-color: #fff;
  --bs-btn-hover-bg: #fff;
  --bs-btn-hover-border-color: #fff;
  --bs-btn-hover-color: #004d33;
}
.apsp-hero__actions .btn-white:hover,
.apsp-hero__actions .btn-outline-primary:hover {
  background: #fff !important;
  color: var(--apsp-blue-dark) !important;
  border: none !important;
  box-shadow: inset 0 0 0 2px #fff !important;
}
.apsp-hero__actions .btn-outline-primary:focus:not(.focus--mouse),
.apsp-hero__actions .btn-outline-primary:focus-visible {
  color: #fff !important;
  border-color: var(--apsp-focus) !important;
  box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px var(--apsp-focus) !important;
  outline: 0 !important;
}

.apsp-section-title {
  color: var(--apsp-blue-dark);
  font-weight: 700;
}

.apsp-card {
  display: block;
  height: 100%;
  padding: 1.25rem 1.35rem;
  border: 2px solid #e9e9e9;
  border-radius: 0.4rem;
  background: #fff;
  text-decoration: none !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  overflow: visible;
}
.apsp-card--media {
  padding: 0;
  overflow: hidden; /* clip solo l’immagine */
}
.apsp-card__media {
  display: block;
  height: 150px;
  background-size: cover;
  background-position: center;
  background-color: var(--apsp-blue-soft);
  border-radius: 0.3rem 0.3rem 0 0;
}
.apsp-card__body {
  display: block;
  padding: 1.1rem 1.25rem 1.25rem;
}
.apsp-card:hover {
  border-color: var(--apsp-focus) !important;
  box-shadow: 0 0 0 2px var(--apsp-focus) !important;
  transform: translateY(-2px);
}
.apsp-card__title {
  display: block;
  font-weight: 700;
  color: var(--apsp-blue-dark);
  margin-bottom: 0.35rem;
}
.apsp-card__desc {
  display: block;
  color: #556;
  font-size: 0.95rem;
}

.apsp-gallery__item {
  display: block;
  margin: 0;
  border-radius: 0.4rem;
  overflow: hidden;
  background: #eef2f6;
  text-decoration: none !important;
  border: 2px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.apsp-gallery__item:hover {
  border-color: var(--apsp-focus) !important;
  box-shadow: 0 0 0 2px var(--apsp-focus) !important;
  transform: translateY(-2px);
}
.apsp-gallery__item img {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.apsp-gallery__caption,
.apsp-gallery__item figcaption {
  display: block;
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--apsp-blue-dark);
}

/* Pagina Foto Gallery — griglia AGID */
.apsp-gallery-intro {
  margin-bottom: 1.5rem;
  max-width: 48rem;
}
.apsp-page-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 0 0 2rem;
}
@media (min-width: 768px) {
  .apsp-page-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
  }
}
.apsp-page-gallery__item {
  margin: 0;
  border-radius: 0.4rem;
  overflow: hidden;
  background: #fff;
  border: 2px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
}
.apsp-page-gallery__item:hover,
.apsp-page-gallery__item:focus-within {
  border-color: var(--apsp-focus) !important;
  box-shadow: 0 0 0 2px var(--apsp-focus) !important;
  transform: translateY(-2px);
}
.apsp-page-gallery__link {
  display: block;
  text-decoration: none !important;
  color: inherit;
}
.apsp-page-gallery__link:focus-visible {
  outline: 3px solid var(--apsp-focus);
  outline-offset: 2px;
}
.apsp-page-gallery__item img {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: cover;
}
@media (min-width: 992px) {
  .apsp-page-gallery__item img {
    height: 220px;
  }
}
.apsp-page-gallery__item figcaption,
.apsp-page-gallery__caption {
  display: block;
  padding: 0.65rem 0.8rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--apsp-blue-dark, #003824);
  background: #fff;
  border-top: 1px solid #e6ebe8;
}

/* Text logo */
.apsp-text-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.75rem;
  padding: 0.35rem 0.55rem;
  border: 2px solid var(--apsp-blue);
  border-radius: 0.25rem;
  color: var(--apsp-blue);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
}
.apsp-text-logo--mobile {
  margin-right: 0.5rem;
}
.it-footer .apsp-text-logo {
  border-color: #fff;
  color: #fff;
}

/* Inner page typography */
.apsp-page-header {
  margin: 0.5rem 0 1.25rem;
}
.apsp-page-title {
  color: var(--apsp-blue-dark) !important;
  font-size: clamp(1.6rem, 3vw, 2.25rem) !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  margin: 0 0 0.5rem !important;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.apsp-page-lead {
  color: #4b5c6b;
  font-size: 1.05rem;
  margin: 0;
}
.apsp-article {
  font-size: 1.05rem;
  line-height: 1.7;
}
.apsp-article h1 {
  /* evita doppio h1 enorme da contenuti legacy */
  font-size: 1.35rem !important;
  color: var(--apsp-blue-dark);
}
.apsp-article h2 {
  font-size: 1.35rem;
  margin-top: 1.5rem;
  color: var(--apsp-blue-dark);
}
.apsp-article h3 {
  font-size: 1.15rem;
  color: var(--apsp-blue-dark);
}

/* Corpo pagina: testo leggibile AGID + media ordinati */
.apsp-article > p,
.apsp-article > ul,
.apsp-article > ol,
.apsp-article > h2,
.apsp-article > h3,
.apsp-article > .apsp-logo-figure {
  max-width: 48rem;
}
.apsp-article > *:last-child {
  margin-bottom: 0;
}
.apsp-article ul {
  margin: 0.75rem 0 1.5rem;
  padding-left: 1.25rem;
}
.apsp-article li {
  margin-bottom: 0.35rem;
}
.apsp-article p {
  margin-bottom: 1rem;
}
.apsp-article h2 {
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid #dfe5ec;
}

/* Immagini singole nel testo: blocco, non full-bleed casuale */
.apsp-article > .apsp-content-figure,
.apsp-article > .wp-block-image,
.apsp-article > figure:not(.apsp-page-gallery__item):not(.apsp-logo-figure) {
  display: block;
  margin: 1.5rem 0;
  float: none !important;
  clear: both;
  max-width: 100%;
}
.apsp-article > .apsp-content-figure img,
.apsp-article > .wp-block-image img,
.apsp-article > figure:not(.apsp-page-gallery__item):not(.apsp-logo-figure) img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: cover;
  margin: 0;
  border-radius: 0.35rem;
}
.apsp-article .alignleft,
.apsp-article .alignright,
.apsp-article .alignnone,
.apsp-article .aligncenter {
  float: none !important;
  display: block;
  margin: 1.25rem 0;
}

/* Logo certificazioni (Family Audit, ecc.) */
.apsp-logo-figure {
  margin: 0 0 1.5rem !important;
  float: none !important;
  max-width: 280px;
}
.apsp-logo-figure__img,
.apsp-article .apsp-logo-figure img {
  display: block !important;
  width: auto !important;
  max-width: 280px !important;
  max-height: 140px !important;
  height: auto !important;
  object-fit: contain !important;
  margin: 0 !important;
  border-radius: 0 !important;
}

/* Gallery foto a fine pagina (griglia AGID) */
.apsp-content-gallery {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #dfe5ec;
  max-width: none;
  width: 100%;
  clear: both;
}
.apsp-content-gallery__title {
  margin: 0 0 1rem !important;
  padding-bottom: 0 !important;
  border-bottom: 0 !important;
  font-size: 1.25rem !important;
  color: var(--apsp-blue-dark);
}
.apsp-article .apsp-page-gallery,
.apsp-content-gallery .apsp-page-gallery {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 1rem !important;
  margin: 0 !important;
}
@media (min-width: 768px) {
  .apsp-article .apsp-page-gallery,
  .apsp-content-gallery .apsp-page-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 1.25rem !important;
  }
}
.apsp-article .apsp-page-gallery__item,
.apsp-content-gallery .apsp-page-gallery__item {
  margin: 0 !important;
  float: none !important;
  width: auto !important;
  max-width: none !important;
}
.apsp-article .apsp-page-gallery__item img,
.apsp-content-gallery .apsp-page-gallery__item img,
.apsp-article .apsp-page-gallery__item a img {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  max-height: none !important;
  height: 180px !important;
  object-fit: cover !important;
  margin: 0 !important;
  border-radius: 0 !important;
}
@media (min-width: 992px) {
  .apsp-article .apsp-page-gallery__item img,
  .apsp-content-gallery .apsp-page-gallery__item img,
  .apsp-article .apsp-page-gallery__item a img {
    height: 200px !important;
  }
}
.apsp-doc-list,
.apsp-child-pages {
  list-style: none;
  margin: 0;
  padding: 0;
}
.apsp-doc-list li,
.apsp-child-pages li {
  border-bottom: 1px solid #e6eaf0;
}
.apsp-doc-list a,
.apsp-child-pages a {
  display: block;
  padding: 0.85rem 0.15rem;
  font-weight: 600;
  text-decoration: none !important;
  color: var(--apsp-blue-dark) !important;
}
.apsp-doc-list a:hover,
.apsp-child-pages a:hover {
  color: var(--apsp-blue) !important;
}

/* Nascondi chrome legacy Astra/VC se ancora presente */
.hero-container,
.template__hero-header-wrapper,
#Hero_Header_HTML_Row,
.template__beside-page-title-wrapper,
.template__page-title-wrapper,
.template__page-title-container,
.template__breadcrumbnavxt-container,
.template__left-column-wrapper,
.template__sticky-column-heading,
.side-button-outer,
.template__empty-space-wrapper,
.vc_empty_space.template__empty-space-wrapper,
.sticky-column-heading,
img[alt="sottosezioni"],
img[alt="Cursor Icon"],
img[alt="Folder Icon"],
img[alt="Bank Icon"],
img[alt="Ban Icon"],
img[src*="BRANCH.png"],
img[src*="MANINA.svg"],
img[src*="FOLDER.svg"] {
  display: none !important;
}
.template__central-column-wrapper {
  width: 100% !important;
  max-width: 100% !important;
  flex: 0 0 100% !important;
}
.title-xxxlarge {
  font-size: clamp(1.6rem, 3vw, 2.25rem) !important;
  line-height: 1.25 !important;
}

.apsp-intro {
  background: var(--apsp-blue-soft);
}
.apsp-intro .apsp-section-title,
.apsp-intro h1,
.apsp-intro h2,
.apsp-intro h3,
.apsp-intro .wp-block-heading {
  color: var(--apsp-blue-dark);
  font-weight: 700;
  margin-bottom: 1rem;
  text-align: center;
}
.apsp-intro p,
.apsp-intro .wp-block-paragraph {
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 52rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.apsp-intro .btn {
  margin-right: 0.35rem;
  margin-bottom: 0.35rem;
}

/* Pulsanti Gutenberg nella sezione intro home */
.apsp-intro .wp-block-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.apsp-intro .wp-block-button__link,
.apsp-intro .wp-block-button__link:visited {
  background-color: var(--apsp-blue) !important;
  border: 2px solid var(--apsp-blue) !important;
  color: #fff !important;
  font-weight: 600;
  text-decoration: none !important;
  box-shadow: none !important;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}
.apsp-intro .wp-block-button__link:hover,
.apsp-intro .wp-block-button__link:focus {
  background-color: var(--apsp-blue-dark) !important;
  border-color: var(--apsp-focus) !important;
  color: #fff !important;
  box-shadow: 0 0 0 2px var(--apsp-focus) !important;
  outline: 0 !important;
}
.apsp-intro .wp-block-button.is-style-outline .wp-block-button__link,
.apsp-intro .wp-block-button.is-style-outline .wp-block-button__link:visited {
  background-color: transparent !important;
  border: 2px solid var(--apsp-blue) !important;
  color: var(--apsp-blue) !important;
  box-shadow: none !important;
}
.apsp-intro .wp-block-button.is-style-outline .wp-block-button__link:hover,
.apsp-intro .wp-block-button.is-style-outline .wp-block-button__link:focus {
  background-color: var(--apsp-blue) !important;
  border-color: var(--apsp-focus) !important;
  color: #fff !important;
  box-shadow: 0 0 0 2px var(--apsp-focus) !important;
}

/* Intro: due foto struttura (da produzione) */
.apsp-intro .wp-block-columns {
  margin-top: 1.75rem;
  gap: 1rem;
}
.apsp-intro .wp-block-image img {
  width: 100%;
  height: auto;
  border-radius: 0.25rem;
  display: block;
}

/* Posti letto + Facebook / Family Audit / Bilancio (da produzione) */
.apsp-home-resources {
  background: #fff;
}
.apsp-vacancies {
  background: var(--apsp-blue-soft);
  border: 1px solid rgba(48, 107, 172, 0.18);
  border-radius: 0.35rem;
  padding: 1.5rem 1.35rem;
  height: 100%;
}
.apsp-vacancies__title {
  color: var(--apsp-blue-dark);
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}
.apsp-vacancies__subtitle {
  margin: 0 0 1rem;
  color: #404040;
}
.apsp-vacancies__value {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  color: var(--apsp-blue);
  margin: 0 0 1.25rem;
}
.apsp-home-links__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 9.5rem;
  padding: 1rem 0.75rem;
  text-align: center;
  text-decoration: none !important;
  color: var(--apsp-blue-dark) !important;
  border: 1px solid rgba(48, 107, 172, 0.16);
  border-radius: 0.35rem;
  background: #f7fafc;
  height: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.apsp-home-links__card:hover,
.apsp-home-links__card:focus {
  border-color: var(--apsp-blue);
  box-shadow: 0 0 0 2px var(--apsp-focus);
  outline: 0;
}
.apsp-home-links__card img {
  max-width: 96px;
  max-height: 72px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.apsp-home-ext-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}
.apsp-home-ext-links a {
  color: var(--apsp-blue-dark);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.apsp-home-ext-links a:hover,
.apsp-home-ext-links a:focus {
  color: var(--apsp-blue-active);
}

.apsp-home-links__card span {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
}
.apsp-home-links__doc-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 0.35rem;
  background: var(--apsp-blue);
  color: #fff !important;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* Inner pages */
.article-wrapper .vc_row {
  margin-left: 0 !important;
  margin-right: 0 !important;
}
.article-wrapper .wpb_content_element {
  margin-bottom: 1.25rem;
}
.article-wrapper img {
  max-width: 100%;
  height: auto;
}
.article-wrapper .vc_btn3-container,
.article-wrapper .btn,
.article-wrapper a.button {
  margin-bottom: 0.5rem;
}
.cmp-hero .it-hero-wrapper {
  min-height: 0;
}
/* Albo Online — layout AGID leggibile */
.container--albo {
  max-width: 1400px;
}
.apsp-article--albo {
  max-width: none;
}
.albo-pretorio-container,
.albo-online-container {
  margin-top: 0.25rem;
  --albo-primary: var(--apsp-blue);
  --albo-primary-hover: var(--apsp-blue-dark);
  --albo-primary-light: var(--apsp-blue-soft);
  --albo-primary-dark: var(--apsp-blue-dark);
}
.albo-agid-intro {
  clear: both;
  margin-bottom: 1.25rem !important;
}
.albo-pretorio-container > .albo-agid-intro + .albo-section-header {
  margin-top: 0 !important;
}
.albo-table .albo-col-oggetto {
  width: 26% !important;
}
.albo-table .albo-col-allegati {
  width: 16% !important;
}
.albo-table .albo-allegato-item,
.albo-table .albo-allegato-link,
.albo-table .albo-allegato-name,
.albo-table .albo-allegato-disabled-text {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  word-break: break-word;
}
.albo-table .albo-allegato-size {
  white-space: nowrap !important;
  text-decoration: none !important;
}
.albo-table td,
.albo-table th {
  vertical-align: middle;
}

/* Footer AGID / Designers Italia */
.it-footer-main {
  background: var(--apsp-blue-dark);
  padding: 1.75rem 0 1.5rem;
}
.it-footer .logo-wrapper {
  gap: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 1rem !important;
}
.it-footer-main .it-brand-wrapper {
  padding: 0 !important;
}
.it-footer .footer-heading-title {
  color: #fff;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.85rem;
}
.it-footer .footer-info,
.it-footer .footer-list a,
.it-footer .footer-info a {
  color: #fff;
}
.it-footer .footer-info {
  margin-bottom: 0;
}
.it-footer .footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.it-footer .footer-list li {
  margin-bottom: 0.35rem;
}
.it-footer .footer-list li:last-child {
  margin-bottom: 0;
}
.it-footer .footer-list a {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.it-footer .ue-logo {
  display: none !important;
}
.it-footer-small-prints,
.apsp-footer-bottom {
  background: var(--apsp-blue-active) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.85rem 0;
  margin: 0;
}
.apsp-footer-bottom .it-footer-small-prints-list,
.apsp-footer-bottom ul.it-footer-small-prints-list {
  gap: 0.35rem 1.25rem;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
}
.apsp-footer-bottom .it-footer-small-prints-list li,
.apsp-footer-bottom ul.it-footer-small-prints-list li {
  padding: 0 !important;
  margin: 0;
}
.apsp-footer-bottom .it-footer-small-prints-list a {
  color: #fff !important;
  font-size: 0.95rem;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.apsp-footer-bottom .it-footer-small-prints-list a:hover {
  opacity: 0.9;
}

/* Hide Design Comuni leftovers */
.cmp-rating,
.assistenza-contatti:empty,
.ast-above-header-bar,
.ast-desktop-header-content:empty {
  display: none !important;
}

@media (max-width: 767px) {
  .apsp-hero {
    min-height: 380px;
    background-position: 60% 65%;
  }
  .apsp-slimheader .it-header-slim-wrapper-content {
    overflow: hidden;
  }
  .apsp-slimheader .apsp-slim-contacts {
    font-size: 0.72rem;
    line-height: 1.35;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }
}

/* —— AT: riquadro AGID date pubblicazione / aggiornamento —— */
.apsp-page-dates {
  --apsp-dates-border: #d9dadb;
  --apsp-dates-bg: #f5f6f7;
  --apsp-dates-label: #5c6f82;
  --apsp-dates-value: #17334f;
  box-sizing: border-box;
  margin: 1.75rem 0 0;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--apsp-dates-border);
  border-radius: 4px;
  background: var(--apsp-dates-bg);
  color: var(--apsp-dates-value);
  line-height: 1.3;
}
.apsp-page-dates__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: clamp(1.25rem, 4vw, 2.75rem);
  row-gap: 0.3rem;
  margin: 0;
  padding: 0;
}
.apsp-page-dates__field {
  margin: 0;
  padding: 0;
}
.apsp-page-dates__line {
  margin: 0;
  padding: 0;
  font-size: 0.875rem;
  line-height: 1.3;
}
.apsp-page-dates__label {
  color: var(--apsp-dates-label);
  font-weight: 600;
  font-size: 0.8125rem;
}
.apsp-page-dates__value,
.apsp-page-dates__value time {
  color: var(--apsp-dates-value);
  font-weight: 600;
  font-size: 0.875rem;
}
@media (max-width: 575.98px) {
  .apsp-page-dates__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* —— Amministrazione Trasparente: hub + icone cartella/file —— */
.apsp-at-page .at-dynamic-menu-widget {
  /* shortcode albero completo: non usare in pagina (rompe layout BI .nav) */
  display: none !important;
}
.apsp-at-sections {
  margin-top: 1.75rem;
}
.apsp-at-sections__title,
.apsp-at-page .apsp-article h2 {
  font-size: 1.35rem;
  color: var(--apsp-blue-dark);
  margin: 0 0 0.75rem;
}
.apsp-at-sections__list,
.apsp-at-page .apsp-child-pages {
  list-style: none;
  margin: 0;
  padding: 0;
  display: block;
  columns: 1;
}
.apsp-at-sections__list li,
.apsp-at-page .apsp-child-pages li {
  border-bottom: 1px solid #e6eaf0;
  break-inside: avoid;
}
.apsp-at-link,
.apsp-at-page .apsp-child-pages a,
.apsp-at-page .apsp-doc-list a,
.apsp-at-page .apsp-article a[href] {
  display: inline-block;
  padding: 0.7rem 0.25rem 0.7rem 2.1rem;
  font-weight: 600;
  text-decoration: none !important;
  color: var(--apsp-blue-dark) !important;
  background-repeat: no-repeat !important;
  background-position: 0.15rem 0.65rem !important;
  background-size: 1.35rem auto !important;
  line-height: 1.35;
}
.apsp-at-page .apsp-child-pages a,
.apsp-at-sections__list a,
.apsp-at-link--folder {
  background-image: url("/wp-content/uploads/2024/03/FOLDER.svg") !important;
}
.apsp-at-link--pdf,
.apsp-at-page .apsp-article a[href$=".pdf"],
.apsp-at-page .apsp-article a[href*=".pdf?"] {
  background-image: url("/wp-content/uploads/2024/03/PDF.png") !important;
}
/* Evita doppia icona se resta un <img> legacy accanto al link */
.apsp-at-page .apsp-article li img[src*="pdf-icon"],
.apsp-at-page .apsp-article li img[src*="PDF.png"],
.apsp-at-page .apsp-article li img[src*="FOLDER.svg"],
.apsp-at-page .apsp-article li img[src*="xls_3921802"],
.apsp-at-page .apsp-article p img[src*="pdf-icon"],
.apsp-at-page .apsp-article p img[src*="PDF.png"] {
  display: none !important;
}
.apsp-at-link--xls,
.apsp-at-page .apsp-article a[href$=".xls"],
.apsp-at-page .apsp-article a[href$=".xlsx"],
.apsp-at-page .apsp-article a[href$=".csv"] {
  background-image: url("/wp-content/uploads/2024/04/xls_3921802.png") !important;
}
.apsp-at-link--doc,
.apsp-at-page .apsp-article a[href$=".doc"],
.apsp-at-page .apsp-article a[href$=".docx"],
.apsp-at-page .apsp-article a[href$=".odt"] {
  background-image: url("/wp-content/uploads/2024/04/xls_3921802.png") !important;
}
.apsp-at-link--external {
  background-image: url("/wp-content/uploads/2024/04/external_4460295.png") !important;
}
.apsp-at-link:hover,
.apsp-at-page .apsp-child-pages a:hover,
.apsp-at-sections__list a:hover {
  color: var(--apsp-blue) !important;
}
/* Non applicare icone a link utility nel testo introduttivo senza path AT/file */
.apsp-at-page .apsp-article > p a:not(.apsp-at-link):not([href*="/amministrazione-trasparente/"]):not([href*=".pdf"]):not([href*=".xls"]):not([href*=".doc"]) {
  padding-left: 0;
  background-image: none !important;
  font-weight: inherit;
}

/*
 * Focus AGID / Bootstrap Italia — contorno ambra #995c00
 * (WCAG 2.4.7 Focus Visible; stato focus tastiera, non mouse via .focus--mouse)
 */
a:focus:not(.focus--mouse),
a:focus-visible,
button:focus:not(.focus--mouse),
button:focus-visible,
.btn:focus:not(.focus--mouse),
.btn:focus-visible,
.nav-link:focus:not(.focus--mouse),
.nav-link:focus-visible,
.apsp-card:focus:not(.focus--mouse),
.apsp-card:focus-visible,
.apsp-gallery__item a:focus:not(.focus--mouse),
.apsp-gallery__item a:focus-visible,
.apsp-at-link:focus:not(.focus--mouse),
.apsp-at-link:focus-visible,
.apsp-doc-list a:focus:not(.focus--mouse),
.apsp-doc-list a:focus-visible,
.apsp-child-pages a:focus:not(.focus--mouse),
.apsp-child-pages a:focus-visible,
.footer-list a:focus:not(.focus--mouse),
.footer-list a:focus-visible,
.it-footer-small-prints-list a:focus:not(.focus--mouse),
.it-footer-small-prints-list a:focus-visible,
.form-control:focus:not(.focus--mouse),
.form-control:focus-visible,
.form-select:focus:not(.focus--mouse),
.form-select:focus-visible,
input:focus:not(.focus--mouse),
input:focus-visible,
select:focus:not(.focus--mouse),
select:focus-visible,
textarea:focus:not(.focus--mouse),
textarea:focus-visible,
summary:focus:not(.focus--mouse),
summary:focus-visible,
[tabindex]:not([tabindex="-1"]):focus:not(.focus--mouse),
[tabindex]:not([tabindex="-1"]):focus-visible {
  border-color: var(--apsp-focus) !important;
  box-shadow: 0 0 0 2px var(--apsp-focus) !important;
  outline: 0 !important;
}

/* Pulsanti: mantieni bordo brand + anello ambra AGID */
.btn-primary:focus:not(.focus--mouse),
.btn-primary:focus-visible {
  background-color: var(--apsp-blue-dark) !important;
  border-color: var(--apsp-focus) !important;
  color: #fff !important;
  box-shadow: 0 0 0 2px var(--apsp-focus) !important;
}
.btn-outline-primary:focus:not(.focus--mouse),
.btn-outline-primary:focus-visible {
  color: var(--apsp-blue) !important;
  background-color: transparent !important;
  border-color: var(--apsp-focus) !important;
  box-shadow: inset 0 0 0 2px var(--apsp-blue), 0 0 0 2px var(--apsp-focus) !important;
}

/*
 * Hover AGID — contorno ambra #995c00
 * (BI azzera outline: usiamo box-shadow con !important)
 */
button:hover,
.btn:hover,
.nav-link:hover,
.apsp-card:hover,
.apsp-gallery__item:hover,
.apsp-at-link:hover,
.apsp-doc-list a:hover,
.apsp-child-pages a:hover,
.apsp-at-sections__list a:hover,
.footer-list a:hover,
.it-footer-small-prints-list a:hover,
.it-header-navbar-wrapper .nav-link:hover,
.apsp-header-secondary a:hover,
.apsp-hero__actions .btn:hover,
main a.btn:hover {
  outline: 0 !important;
  box-shadow: 0 0 0 2px var(--apsp-focus) !important;
}

/* Pulsanti: anello esterno ambra senza perdere lo stile brand */
.btn-primary:hover {
  background-color: var(--apsp-blue-dark) !important;
  border-color: var(--apsp-focus) !important;
  box-shadow: 0 0 0 2px var(--apsp-focus) !important;
}
.btn-outline-primary:hover {
  box-shadow: inset 0 0 0 2px var(--apsp-blue), 0 0 0 2px var(--apsp-focus) !important;
}
.apsp-hero__actions .btn-primary:hover,
.apsp-hero__actions .btn-outline-primary:hover,
.apsp-hero__actions .btn-white:hover {
  box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px var(--apsp-focus) !important;
}

/* TablePress → Bootstrap Italia / AGID (mu-plugin apsp-tablepress-agid) */
.table-responsive > table.tablepress.table {
  margin-bottom: 0;
  width: 100%;
}
.tablepress.table > :not(caption) > * > * {
  background: inherit;
}
