/* PM2 Hero Slider (isolato) */
:root{
    --altezza-top: 144px;
}
.pm2-hero { position: relative; overflow: hidden; --pm2-gap: 0; --pm2-caption-maxw: 100%; --pm2-caption-pad: 1.2rem; --pm2-color:#fff; --pm2-shadow:0 2px 14px rgba(0,0,0,.25); }

.pm2-hero-track { display: flex; transition: transform .6s ease; will-change: transform; height: 100%; }
.pm2-hero-item  { flex: 0 0 100%; position: relative; height: 100%; }
.pm2-hero-media, .pm2-hero-media > img, .pm2-hero-media > video, .pm2-hero-yt { width: 100%; height: 100%; object-fit: cover; display:block; }
.pm2-hero-yt { border: 0; }

.pm2-hero-caption { position: absolute; max-width: var(--pm2-caption-maxw); color: var(--pm2-color); text-shadow: 0 1px 2px rgba(0,0,0,.35); padding: var(--pm2-caption-pad);
display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.pm2-hero .pm2-hero-title { font-size: clamp(80px, 2.5vw, 2.4rem); margin: .25rem 0;  color: #fff; font-weight: 700; line-height: 1;}
.pm2-hero .pm2-hero-subtitle { opacity:.9; font-size: clamp(24px, 1.5vw, 1.1rem); position: relative;padding: 0 20px;display: inline-block;text-transform: none;
    font-weight: 600;color: #fff;line-height: 1.6;letter-spacing: normal; max-width: 800px; margin: 8px auto 28px}
.pm2-hero .pm2-hero-subtitle:before {
    content: "";
    width: 38px;
    height: 2px;
    background-color: #fff;
    position: absolute;
    top: 50%;
    right: 100%;
}
.pm2-hero .pm2-hero-subtitle:after {
    content: "";
    width: 38px;
    height: 2px;
    background-color: #fff;
    position: absolute;
    top: 50%;left: 100%;
}

.pm2-hero .pm2-hero-desc { font-size: clamp(.9rem, 1.3vw, 1.1rem); margin: .5rem 0 0; }

.pm2-hero-indicators { position:absolute; left:50%; bottom:1rem; transform:translateX(-50%); display:flex; gap:.5rem; list-style:none; margin:0; padding:0; z-index:5; }
.pm2-hero-indicators li { width:.75rem; height:.75rem; border-radius:50%; background:rgba(255,255,255,.6); cursor:pointer; }
.pm2-hero-indicators li[aria-current="true"] { background:#fff; box-shadow: var(--pm2-shadow); }

.pm2-hero-prev, .pm2-hero-next {
    height: 100vh;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 5%;
    border: none;
    background: rgba(0,0,0,.1);
    color: #ffffff4f;
    cursor: pointer;
    font-size: 75px;
}

.pm2-hero-prev { left: 0; } .pm2-hero-next { right:0; }
.pm2-hero-prev:hover, .pm2-hero-next:hover { background:rgba(0,0,0,.3); }

/* Caption position */
.pm2-hero[data-caption-pos="bottom"] .pm2-hero-caption { left: 50%; bottom: 6%; transform: translateX(-50%); text-align:center; width: 90%; }
.pm2-hero[data-caption-pos="top"]    .pm2-hero-caption { left: 50%; top:   6%; transform: translateX(-50%); text-align:center; }
.pm2-hero[data-caption-pos="left"]   .pm2-hero-caption { left: 3%;  top: 50%; transform: translateY(-50%); text-align:left; }
.pm2-hero[data-caption-pos="right"]  .pm2-hero-caption { right:3%;  top: 50%; transform: translateY(-50%); text-align:right; }
.pm2-hero[data-caption-pos="center"] .pm2-hero-caption { left: 50%; top: 50%; transform: translate(-50%, -50%); text-align:center; }

/* Assicura che picture/img riempiano il frame dello slide */
.pm2-hero-media { position: relative; width:100%; height:100%; }

.pm2-hero-picture,
.pm2-hero-picture * { display:block; }

.pm2-hero-picture,
.pm2-hero-img {
  width:100%;
  height:100%;
}

.pm2-hero-img {
  object-fit: cover;          /* riempi */
  object-position: center;    /* centrato */
}

/* Ridondanza per compat vecchi WebKit: anche il tag <picture> copre */
.pm2-hero-picture {
  overflow:hidden;
}


/* Altezza responsiva: full viewport ≥ 992px, 16:9 sotto */
.pm2-hero { height: 56.25vw; max-height: 75vh; }             /* ~16:9 (mobile/tablet) */
@media (min-width: 992px) { .pm2-hero { height: calc(100vh - var(--altezza-top)); max-height: 100vh;  } }

/* Riduci CLS: imposta altezza subito, immagini/video 100% cover. */


@media screen and (max-width: 767px) {
    .pm2-hero .pm2-hero-title {font-size: 30px !important;line-height: 1.2;}
    .pm2-hero .pm2-hero-subtitle {font-size: 18px !important;line-height: 1.2;}
    .pm2-hero-prev, .pm2-hero-next{display: none;}
    .pm2-hero{max-height: 100vh;height: 100vh;background: #70c367;}
    .pm2-hero-caption {position: relative !important;}
    .pm2-hero-indicators {top: 53%;} 
    .pm2-hero[data-caption-pos="bottom"] .pm2-hero-caption {display: flex;flex-direction: column;align-items: center;justify-content: center;}
    .pm2-hero-media, .pm2-hero-media > img, .pm2-hero-media > video, .pm2-hero-yt{
        height: 59vh;
    }
    .pm2-hero-item {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
}
