/**
 * Widget: block-html|alternate
 */

.block-html-alternate {
    background-color: var(--website-bkg-white);
    padding: var(--website-padding-top-bottom) 0;
}

.block-html-alternate > .container {
    max-width: var(--website-container-max-width);
}

.block-html-alternate .block-html-alternate-title-emphasis {
    color: var(--website-accent);
    font-style: italic;
    font-weight: 500;
}

/* -----------------------------------------------------------------------
   Titolo sezione
----------------------------------------------------------------------- */
.block-html-alternate .alternate-section-title {
    font-size: 2.625rem;
    font-weight: 500;
    line-height: 1.1;
    color: #3D3D3D;
    margin: 0;
    padding: 0 0 2rem;
    position: sticky;
    top: 100px;
    background: var(--website-bkg-white);
    z-index: 1;
}

/* -----------------------------------------------------------------------
   Lista blocchi (stacking cards)
----------------------------------------------------------------------- */
.block-html-alternate .alternate-list {
    display: block;
}

/* -----------------------------------------------------------------------
   Singola riga — sticky stack
----------------------------------------------------------------------- */
.block-html-alternate .alternate-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--website-white);
    overflow: hidden;
    position: sticky;
    top: 180px;
    z-index: 2;
    margin-bottom: 280px;
}

.block-html-alternate .alternate-row:nth-child(even) .alternate-image {
    order: 2;
}

.block-html-alternate .alternate-row:nth-child(even) .alternate-text {
    order: 1;
}

/* -----------------------------------------------------------------------
   Colonna immagine
----------------------------------------------------------------------- */
.block-html-alternate .alternate-image {
    position: relative;
    aspect-ratio: 720 / 590;
    overflow: hidden;
}

.block-html-alternate .alternate-image picture,
.block-html-alternate .alternate-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.block-html-alternate .alternate-placeholder {
    position: absolute;
    inset: 0;
    background: #ACACAC;
}

/* -----------------------------------------------------------------------
   Colonna testo
----------------------------------------------------------------------- */
.block-html-alternate .alternate-text {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.5rem;
}

.block-html-alternate .alternate-title {
    font-size: 2.625rem;
    font-weight: 500;
    line-height: 1.1;
    color: #3D3D3D;
    margin: 0;
}

.block-html-alternate .alternate-content {
    color: var(--website-secondary);
    font-weight: 500;
    line-height: 1.5;
}

.block-html-alternate .alternate-content p {
    margin: 0;
}

.block-html-alternate .alternate-content p + p {
    margin-top: 1rem;
}

/* -----------------------------------------------------------------------
   Responsive
----------------------------------------------------------------------- */
@media (max-width: 768px) {
    .block-html-alternate {
        padding: var(--website-padding-top-bottom-mobile) 0;
    }

    .block-html-alternate .alternate-section-title {
        font-size: 2rem;
        padding: 0 0 1.5rem;
        position: static;
    }

    .block-html-alternate .alternate-row {
        grid-template-columns: 1fr;
        position: static;
    }

    .block-html-alternate .alternate-image {
        order: 1;
        aspect-ratio: 16 / 10;
    }

    .block-html-alternate .alternate-text {
        order: 2;
        padding: 1.5rem;
        gap: 1.5rem;
    }

    .block-html-alternate .alternate-row:nth-child(even) .alternate-image {
        order: 1;
    }

    .block-html-alternate .alternate-row:nth-child(even) .alternate-text {
        order: 2;
    }

    .block-html-alternate .alternate-title {
        font-size: 2rem;
    }
}

/* -----------------------------------------------------------------------
   Reduced motion — disabilita sticky stack
----------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .block-html-alternate .alternate-row {
        position: static;
    }
}

/*
xs      <576px      col-            smart-phone
sm      ≥576px 	    col-sm
md      ≥768px 	    col-md          ipad
lg      ≥992px 	    col-lg          ipad pro
xl      ≥1200px 	col-xl          desktop
xxl     ≥1400px     col-xxl
*/

/*============================================================
 *
 * XXL  desktop large
 *
 */
@media (min-width: 1400px) {

}

/*============================================================
 *
 * XL   desktop
 *
 */
@media (max-width: 1399px) {

}

/*============================================================
 *
 * LG   small desktop
 *
 */

@media (max-width: 1199px) {

}

/*============================================================
 *
 * LG   ipadpro
 *
 */
@media (pointer:coarse) and (max-width: 1199px) {

}


/*============================================================
 *
 *  MD  ipad
 *
 */
@media (max-width: 991px) {

}


/*============================================================
 *
 *  SM smart-phone 576-767
 *  XS 0-567
 */
@media (max-width: 767px) {
    .block-html-alternate .alternate-row {
        margin-bottom: 80px;
    }

}


