/* ==========================================================================
   HERO PRIMARY BLOCK - FRONTEND
   ========================================================================== */

.s4w-hero-primary {
    display: grid;
    grid-template-rows: auto 1fr;
    width: 100%;
    height: 100vh;
    padding-bottom: 80px;
}

.s4w-hero-primary > .s4w-container:first-child {
    align-self: start;
}

/* Content row: text left, button right aligned bottom */
.s4w-hero-primary__content {
    display: flex;
    flex-flow: column;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    padding-bottom: 40px;
    padding-top: 80px;
    width: 100%;
    position: relative;
}

/* Grid due colonne: titolo sinistra, testo+cta destra */
.s4w-hero-primary__wrapper {
    display: flex;
    flex-flow: row wrap;
    align-items: flex-end;
    justify-content: space-between;
    flex: 1;
    width: 100%;
}

.s4w-hero-primary__left-col {
    display: flex;
    flex-direction: column;
    width: 45%;
}

.s4w-hero-primary__right-col {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    width: 45%;
}

.s4w-hero-primary__title {
    margin: 0;
}

.s4w-hero-primary__text {
    margin: 0;
}

.s4w-hero-primary__text p {
    margin: 0;
}

.s4w-hero-primary__cta {
    margin-top: var(--spacing-xl);
    align-self: flex-start;
}

/* Image */
.s4w-hero-primary > .s4w-container:last-child {
    min-height: 0;
}

.s4w-hero-primary__media {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.s4w-hero-primary__image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* ==========================================================================
   MOBILE (<=768px)
   ========================================================================== */
@media (max-width: 768px) {

    .s4w-hero-primary {
        height: auto;
        grid-template-rows: auto auto;
        padding-bottom: 0;
    }

    .s4w-hero-primary__wrapper {
        flex-direction: column;
        gap: 24px;
    }

    .s4w-hero-primary__left-col,
    .s4w-hero-primary__right-col {
        width: 100%;
    }

    .s4w-hero-primary > .s4w-container:last-child {
        padding-left: 0;
        padding-right: 0;
    }

    .s4w-hero-primary__image {
        aspect-ratio: 1 / 1;
    }
}
