/**
 * Widget: index|hsemanager — card indice con link interni.
 */

/* La section contenitore non occupa spazio nel flusso */
.section-index-hsemanager {
    position: absolute;
    width: 0;
    height: 0;
    overflow: visible;
}

/* Il wrapper rever (.__DeversoWidget) non deve creare un containing block:
   altrimenti il position:fixed del nav si ancora al wrapper (0×0) e sparisce. */
.index-hsemanager.__DeversoWidget {
    transform: none !important;
    will-change: auto !important;
}

.index-hsemanager.idxhm {
    display: flex;
    flex-direction: column;
    gap: 8px;
    /* 3/10 del container principale */
    width: calc(var(--icotea-container-max, 1380px) * 0.27);
    max-width: 40vw;
    padding: 24px 16px;
    background-color: var(--icotea-bkg-uni);
    border-radius: 16px;
    outline: 1px solid #E2E8F0;
    outline-offset: -1px;
    box-sizing: border-box;

    /* Fluttuante a destra, allineato al bordo destro del container.
       Il valore di top è gestito dal JS (parte all'altezza di hsemanager-v2). */
    position: fixed;
    z-index: 20;
    top: 110px;
    right: max(24px, calc((100vw - var(--icotea-container-max, 1380px)) / 2));
    /* Nascosto finché il JS non entra nella "zona" indice */
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
}
.index-hsemanager.idxhm.is-visible {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .25s ease, transform .25s ease;
}

/* Non visibile in tablet e mobile */
@media (max-width: 1199px) {
    .index-hsemanager.idxhm { display: none !important; }
}

.index-hsemanager .idxhm-title {
    margin: 0 0 8px;
    color: #3D3D6B;
    font-family: var(--icotea-font-heading);
    font-size: 1.5rem;     /* 24px */
    line-height: 1.25;     /* 30px */
    font-weight: 700;
}

.index-hsemanager .idxhm-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.index-hsemanager .idxhm-item + .idxhm-item {
    border-top: 1px solid #E2E8F0;
}

.index-hsemanager .idxhm-link {
    display: block;
    padding: 10px 0;
    color: rgba(0, 69, 138, .46);   /* #00458A al 46% */
    font-family: var(--icotea-font-body);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    transition: color .2s ease;
}
.index-hsemanager .idxhm-link:hover,
.index-hsemanager .idxhm-link:focus-visible {
    color: #00458A;
}

/* Voce corrente (scrollspy) */
.index-hsemanager .idxhm-link.is-active {
    color: #696996;
    font-weight: 700;
}

/* Destinazione non presente in pagina */
.index-hsemanager .idxhm-link.is-missing {
    opacity: .4;
    pointer-events: none;
}
