/* Pressmare - carosello Highlights. Importare DOPO home-responsive.css. */
body.pm-page-home .pm-home-highlights[data-pm-carousel] .pm-carousel-stage {
    position: relative;
    display: grid;
    min-width: 0;
    align-content: start;
}

/* Le slide partecipano tutte al calcolo dell'altezza, ma solo una e' visibile.
   Non usare display:none sulle slide: riporterebbe il CLS durante la rotazione. */
body.pm-page-home .pm-home-highlights[data-pm-carousel] .pm-carousel-slide {
    grid-area: 1 / 1;
    min-width: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .42s ease, visibility 0s linear .42s;
}
body.pm-page-home .pm-home-highlights[data-pm-carousel] .pm-carousel-slide.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity .42s ease;
}

/* Il riquadro di una eventuale copertina mancante mantiene la dimensione. */
body.pm-page-home .pm-home-highlights[data-pm-carousel] .pm-home-list-placeholder.pm-carousel-cover-image {
    background: #e5e8ec;
}

/* Highlight senza aggiunta di bordi/padding che cambierebbero le misure. */
body.pm-page-home .pm-home-highlights[data-pm-carousel] .pm-carousel-list-row.is-active {
    background: #f4f7fa;
}
body.pm-page-home .pm-home-highlights[data-pm-carousel] .pm-carousel-select {
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    text-align: left;
    justify-self: start;
    line-height: .9;
}
body.pm-page-home .pm-home-highlights[data-pm-carousel] .pm-carousel-select:focus-visible {
    outline: 2px solid #28215a;
    outline-offset: 3px;
    border-radius: 2px;
}
body.pm-page-home .pm-home-highlights[data-pm-carousel] .pm-carousel-select[hidden],
body.pm-page-home .pm-home-highlights[data-pm-carousel] [data-pm-number][hidden],
body.pm-page-home .pm-home-highlights[data-pm-carousel] .pm-carousel-controls[hidden],
body.pm-page-home .pm-home-highlights[data-pm-carousel] .pm-carousel-pause[hidden] {
    display: none !important;
}

/* Comandi sulla fotografia: non alterano la griglia né la posizione dei testi. */
body.pm-page-home .pm-home-highlights[data-pm-carousel] .pm-carousel-controls {
    position: absolute;
    z-index: 3;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border-radius: 8px;
    color: #fff;
    background: rgb(20 20 30 / .82);
}
body.pm-page-home .pm-home-highlights[data-pm-carousel] .pm-carousel-control {
    box-sizing: border-box;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    background: transparent;
    border: 1px solid rgb(255 255 255 / .4);
    border-radius: 5px;
    color: #fff;
    font: 600 14px/1 'Atkinson Hyperlegible Next', system-ui, sans-serif;
    cursor: pointer;
}
body.pm-page-home .pm-home-highlights[data-pm-carousel] .pm-carousel-control:hover,
body.pm-page-home .pm-home-highlights[data-pm-carousel] .pm-carousel-control:focus-visible {
    background: #3496e3;
    outline-offset: 2px;
}
body.pm-page-home .pm-home-highlights[data-pm-carousel] .pm-carousel-counter {
    min-width: 38px;
    text-align: center;
    white-space: nowrap;
    font-size: 13px;
}
body.pm-page-home .pm-home-highlights[data-pm-carousel] .pm-carousel-screenreader-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}
@media (max-width: 767px) {
    body.pm-page-home .pm-home-highlights[data-pm-carousel] .pm-carousel-controls {
        top: 8px;
        right: 8px;
        gap: 3px;
        padding: 4px;
    }
    body.pm-page-home .pm-home-highlights[data-pm-carousel] .pm-carousel-control {
        min-width: 32px;
        height: 32px;
        padding: 0 6px;
    }
}
@media (prefers-reduced-motion: reduce) {
    body.pm-page-home .pm-home-highlights[data-pm-carousel] .pm-carousel-slide,
    body.pm-page-home .pm-home-highlights[data-pm-carousel] .pm-carousel-slide.is-active {
        transition: none;
    }
}
