
/* Gerarchia dei livelli:
   - header e menu istituzionale sempre in primo piano;
   - pannelli delle card sopra hero e contenuti della home;
   - nessun isolamento del modulo, così i pannelli possono uscire dal suo box. */
.it-header-wrapper {
  position: relative;
  z-index: 2000 !important;
}

.it-header-wrapper .it-header-navbar-wrapper,
.it-header-wrapper #header-nav-wrapper,
.it-header-wrapper .navbar-collapsable,
.it-header-wrapper .dropdown-menu,
.it-header-wrapper .dropdown-menu.show,
.it-header-wrapper .megamenù,
.it-header-wrapper .megamenu {
  z-index: 2010 !important;
}

.accessi-home {
  --ah-primary: #0059a8;
  --ah-primary-dark: #003b73;
  --ah-text: #17324d;
  --ah-muted: #4f6578;
  --ah-surface: #ffffff;
  --ah-soft: #f1f6fb;
  --ah-border: #d7e3ef;
  --ah-focus: #ffcc00;
  --ah-shadow: 0 0.7rem 1.8rem rgba(23, 50, 77, 0.14);
  position: relative;
  z-index: auto;
  isolation: auto;
  overflow: visible;
  width: 100%;
  color: var(--ah-text);
  background: var(--ah-surface);
  font-family: "Titillium Web", Arial, sans-serif;
}

.accessi-home *,
.accessi-home *::before,
.accessi-home *::after {
  box-sizing: border-box;
}

.accessi-home__quickbar {
  padding: 0.6rem 0;
  background: var(--ah-soft);
  border-top: 1px solid var(--ah-border);
  border-bottom: 1px solid var(--ah-border);
}

.accessi-home__quicklinks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.accessi-home__quicklinks li {
  min-width: 0;
  margin: 0;
}

.accessi-home__quicklinks a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.55rem 0.75rem;
  color: var(--ah-primary-dark);
  background: var(--ah-surface);
  border: 1px solid var(--ah-border);
  border-radius: 0.6rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.accessi-home__quicklinks a:hover,
.accessi-home__quicklinks a:focus-visible {
  color: var(--ah-primary-dark);
  border-color: var(--ah-primary);
  box-shadow: 0 0.25rem 0.8rem rgba(23, 50, 77, 0.1);
  transform: translateY(-1px);
}

.accessi-home__quicklinks a:focus-visible,
.accessi-home__card:focus-visible,
.accessi-home__links a:focus-visible,
.accessi-home__all:focus-visible {
  outline: 3px solid var(--ah-focus);
  outline-offset: 2px;
}

.accessi-home__quick-icon,
.accessi-home__quick-icon svg {
  width: 1rem;
  height: 1rem;
  flex: 0 0 1rem;
  fill: currentColor;
}

.accessi-home__audiences {
  position: relative;
  z-index: 100;
  overflow: visible;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

/* Il banner viene dopo il modulo nel DOM: lo manteniamo sotto ai pannelli aperti. */
.accessi-home + .section-hero-left,
.accessi-home + #slideheader {
  position: relative;
  z-index: 0 !important;
}

.accessi-home__grid {
  position: relative;
  overflow: visible;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: stretch;
}

.accessi-home__item {
  position: relative;
  z-index: 1;
  min-width: 0;
  margin: 0;
}

.accessi-home__item.is-open {
  z-index: 150;
}

.accessi-home__card {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) 1.75rem;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  height: 100%;
  min-height: 5.9rem;
  margin: 0;
  padding: 0.85rem;
  color: var(--ah-text);
  background: var(--ah-surface);
  border: 1px solid var(--ah-border);
  border-radius: 0.8rem;
  box-shadow: 0 0.15rem 0.5rem rgba(23, 50, 77, 0.05);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.accessi-home__card:hover,
.accessi-home__card[aria-expanded="true"] {
  color: var(--ah-text);
  border-color: #87b7e2;
  box-shadow: 0 0.45rem 1.2rem rgba(23, 50, 77, 0.11);
  transform: translateY(-1px);
}

.accessi-home__area-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  color: var(--ah-primary);
  background: #e8f3fc;
  border-radius: 0.75rem;
}

.accessi-home__area-icon svg {
  width: 1.6rem;
  height: 1.6rem;
  fill: currentColor;
}

.accessi-home__copy {
  min-width: 0;
}

.accessi-home__copy strong,
.accessi-home__copy small {
  display: block;
}

.accessi-home__copy strong {
  margin-bottom: 0.15rem;
  color: var(--ah-primary-dark);
  font-size: 1.05rem;
  line-height: 1.15;
}

.accessi-home__copy small {
  color: var(--ah-muted);
  font-size: 0.82rem;
  line-height: 1.25;
}

.accessi-home__chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  color: var(--ah-primary);
  background: #edf5fd;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.accessi-home__chevron svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.accessi-home__card[aria-expanded="true"] .accessi-home__chevron {
  transform: rotate(180deg);
}

.accessi-home__panel {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  z-index: 1000;
  width: min(27rem, calc(100vw - 2rem));
}

.accessi-home__panel[hidden] {
  display: none !important;
}

.accessi-home__panel-inner {
  padding: 0.8rem;
  background: var(--ah-surface);
  border: 1px solid #b9d1e7;
  border-radius: 0.8rem;
  box-shadow: var(--ah-shadow);
}

.accessi-home__links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.accessi-home__links li {
  min-width: 0;
  margin: 0;
}

.accessi-home__links a,
.accessi-home__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 2.7rem;
  padding: 0.55rem 0.65rem;
  color: var(--ah-primary-dark);
  border-radius: 0.5rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.accessi-home__links a:hover,
.accessi-home__links a:focus-visible,
.accessi-home__links .is-active > a {
  color: var(--ah-primary-dark);
  background: #edf6ff;
}

.accessi-home__link-main {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.accessi-home__link-label {
  min-width: 0;
  overflow-wrap: anywhere;
}

.accessi-home__item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 1.15rem;
  color: var(--ah-primary);
}

.accessi-home__item-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.accessi-home__link-chevron,
.accessi-home__all svg {
  width: 1rem;
  height: 1rem;
  flex: 0 0 1rem;
  fill: currentColor;
}

.accessi-home__links--level-2 {
  display: block;
  grid-column: 1 / -1;
  margin: 0.15rem 0 0.25rem 0.8rem;
  padding-left: 0.6rem;
  border-left: 2px solid #dceaf6;
}

.accessi-home__links--level-2 a {
  min-height: 2.3rem;
  font-size: 0.95rem;
}

.accessi-home__all {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.75rem;
  padding: 0.5rem 0.65rem;
  color: var(--ah-primary);
  border-radius: 0.45rem;
  font-weight: 700;
  text-decoration: none;
}

.accessi-home__all:hover,
.accessi-home__all:focus-visible {
  color: var(--ah-primary-dark);
  background: #edf6ff;
}

@media (min-width: 768px) and (max-width: 1199.98px) {
  .accessi-home__grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .accessi-home__card {
    position: relative;
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: 7.2rem;
    padding: 0.7rem 0.4rem;
    text-align: center;
  }

  .accessi-home__area-icon {
    width: 2.5rem;
    height: 2.5rem;
  }

  .accessi-home__area-icon svg {
    width: 1.35rem;
    height: 1.35rem;
  }

  .accessi-home__copy small {
    display: none;
  }

  .accessi-home__chevron {
    position: absolute;
    right: 0.4rem;
    bottom: 0.4rem;
    width: 1.45rem;
    height: 1.45rem;
  }
}

@media (max-width: 991.98px) {
  .accessi-home__panel {
    position: static;
    width: 100%;
    padding-top: 0.45rem;
  }

  .accessi-home__panel-inner {
    box-shadow: 0 0.35rem 1rem rgba(23, 50, 77, 0.1);
  }
}

@media (max-width: 767.98px) {
  .accessi-home__quickbar .container {
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .accessi-home__quicklinks {
    display: flex;
    width: max-content;
    min-width: 100%;
  }

  .accessi-home__quicklinks li {
    min-width: 10.5rem;
  }

  .accessi-home__grid {
    grid-template-columns: 1fr;
  }

  .accessi-home__card {
    min-height: 4.8rem;
  }

  .accessi-home__links {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .accessi-home__quicklinks a,
  .accessi-home__card,
  .accessi-home__chevron {
    transition: none;
  }
}
