/**
 * mod_hero_slideshow - CSS
 * Ken Burns, overlay gradiente, video box a destra, responsive
 */

/* ============================================================
   WRAPPER
   ============================================================ */
.hero-slideshow-wrapper {
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    position: relative;
}

.hero-swiper {
    width: 100%;
    height: 400px;
    overflow: hidden;
}

/* ============================================================
   SLIDE BASE
   ============================================================ */
.hero-swiper .swiper-slide {
    position: relative;
    overflow: hidden;
}

/* ============================================================
   IMMAGINE CON KEN BURNS (sempre presente)
   ============================================================ */
.slide-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1);
    transition: none;
    will-change: transform;
}

/* Ken Burns attivo: zoom graduale */
.slide-image.kb-active {
    transition: transform var(--kb-duration) ease-out;
    transform: scale(var(--kb-scale));
}

/* Direzioni Ken Burns */
.slide-image.kb-topleft {
    transform-origin: top left;
}
.slide-image.kb-topleft.kb-active {
    transform: scale(var(--kb-scale)) translate(-2%, -2%);
}

.slide-image.kb-topright {
    transform-origin: top right;
}
.slide-image.kb-topright.kb-active {
    transform: scale(var(--kb-scale)) translate(2%, -2%);
}

.slide-image.kb-bottomleft {
    transform-origin: bottom left;
}
.slide-image.kb-bottomleft.kb-active {
    transform: scale(var(--kb-scale)) translate(-2%, 2%);
}

.slide-image.kb-bottomright {
    transform-origin: bottom right;
}
.slide-image.kb-bottomright.kb-active {
    transform: scale(var(--kb-scale)) translate(2%, 2%);
}

.slide-image.kb-center {
    transform-origin: center center;
}
.slide-image.kb-center.kb-active {
    transform: scale(var(--kb-scale));
}

/* ============================================================
   VIDEO BOX (overlay a destra sopra l'immagine)
   ============================================================ */
.slide-video-box {
    position: absolute;
    top: 50%;
    right: 30px;
    transform: translateY(-50%);
    width: 40%;
    max-width: 420px;
    aspect-ratio: 16 / 9;
    z-index: 3;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    background: #000;
}

.slide-video-inner {
    width: 100%;
    height: 100%;
}

.slide-video-inner iframe,
.slide-video-inner video {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Quando c'è video, il testo occupa solo la parte sinistra */
.slide-has-video .slide-content {
    max-width: 50%;
}

/* ============================================================
   OVERLAY GRADIENTE + TESTO
   ============================================================ */
.slide-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    text-decoration: none;
    color: #fff;
    z-index: 2;
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.75) 0%,
        rgba(0, 0, 0, 0.5) 40%,
        rgba(0, 0, 0, 0.1) 70%,
        transparent 100%
    );
    transition: background 0.3s ease;
}

.slide-overlay:hover {
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.6) 40%,
        rgba(0, 0, 0, 0.15) 70%,
        transparent 100%
    );
}

.slide-content {
    padding: 30px 40px;
    max-width: 60%;
}

.slide-date {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 6px;
}

.slide-title {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 8px;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.slide-subtitle {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* ============================================================
   NAVIGAZIONE SWIPER
   ============================================================ */
.hero-swiper .swiper-button-prev,
.hero-swiper .swiper-button-next {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.2s, opacity 0.2s;
    opacity: 0;
}

.hero-slideshow-wrapper:hover .swiper-button-prev,
.hero-slideshow-wrapper:hover .swiper-button-next {
    opacity: 1;
}

.hero-swiper .swiper-button-prev:hover,
.hero-swiper .swiper-button-next:hover {
    color: #fff;
}

.hero-swiper .swiper-button-prev::after,
.hero-swiper .swiper-button-next::after {
    font-size: 24px;
}

/* ============================================================
   PAGINAZIONE
   ============================================================ */
.hero-swiper .swiper-pagination {
    bottom: 12px;
}

.hero-swiper .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
    transition: background 0.2s, transform 0.2s;
}

.hero-swiper .swiper-pagination-bullet-active {
    background: #fff;
    transform: scale(1.2);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .hero-swiper {
        height: 320px;
    }

    .slide-content {
        padding: 24px 30px;
        max-width: 70%;
    }

    .slide-has-video .slide-content {
        max-width: 55%;
    }

    .slide-title {
        font-size: 1.4rem;
    }

    .slide-video-box {
        width: 35%;
        right: 20px;
    }
}

@media (max-width: 768px) {
    .hero-swiper {
        height: 260px;
    }

    .slide-content {
        padding: 16px 20px;
        max-width: 80%;
    }

    .slide-has-video .slide-content {
        max-width: 60%;
    }

    .slide-title {
        font-size: 1.1rem;
    }

    .slide-subtitle {
        font-size: 0.85rem;
    }

    .slide-video-box {
        width: 35%;
        right: 14px;
    }

    .hero-swiper .swiper-button-prev::after,
    .hero-swiper .swiper-button-next::after {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .hero-swiper {
        height: 200px;
    }

    .slide-content {
        padding: 12px 16px;
        max-width: 90%;
    }

    .slide-title {
        font-size: 0.95rem;
    }

    .slide-date {
        font-size: 0.7rem;
    }

    .slide-video-box {
        width: 40%;
        right: 10px;
        max-width: 180px;
    }
}
