/* ==========================================================================
   HERO SECONDARY BLOCK - FRONTEND
   Layout 50/50: contenuto sinistra, immagine destra (full bleed)
   ========================================================================== */

.s4w-hero-secondary {
    width: 100%;
    overflow: hidden;
}

.s4w-hero-secondary__wrapper {
    display: flex;
    max-height: 85vh;
}

/* Contenuto sinistra - 50% */
.s4w-hero-secondary__content {
    width: 50%;
    display: flex;
    align-items: stretch;
    padding-top: 80px;
    padding-bottom: 80px;
}

.s4w-hero-secondary__content-inner {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    height: 100%;
}

/* Titolo in cima */
.s4w-hero-secondary__title {
    margin-bottom: 40px;
}

/* Testo e bottone in fondo */
.s4w-hero-secondary__bottom {
    margin-top: auto;
}

.s4w-hero-secondary__title {
    max-width: 70%;
}
.s4w-hero-secondary__text {
    margin-bottom: 24px;
    max-width: 70%;
}

/* Immagine destra - 50% quadrata, perde proporzioni solo se il wrapper è limitato da max-height */
.s4w-hero-secondary__media {
    width: 50%;
    position: relative;
    aspect-ratio: 1 / 1;
    max-height: 100%;
}

.s4w-hero-secondary__image,
.s4w-hero-secondary__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ==========================================================================
   TABLET (<=1024px)
   ========================================================================== */
@media (max-width: 1024px) {
    .s4w-hero-secondary__content-inner .s4w-title {
        font-size: var(--title-xlarge);
        line-height: var(--title-xlarge-lh);
        letter-spacing: var(--title-xlarge-ls);
    }
}

/* ==========================================================================
   MOBILE (<=768px)
   ========================================================================== */
@media (max-width: 768px) {
    .s4w-hero-secondary__wrapper {
        flex-direction: column;
        min-height: auto;
        max-height: none;
    }

    .s4w-hero-secondary__content {
        width: 100%;
        order: 1;
    }

    .s4w-hero-secondary__title {
        max-width: 100%;
        margin-bottom: 20px;
    }

    .s4w-hero-secondary__text {
        max-width: 100%;
    }

    .s4w-hero-secondary__content-inner {
        padding-right: 12px;
    }

    .s4w-hero-secondary__media {
        width: 100%;
        aspect-ratio: 1 / 1;
        position: relative;
        order: 2;
    }

    .s4w-hero-secondary__image,
    .s4w-hero-secondary__video {
        position: absolute;
    }
}
