/**
 * Widget: offer|view
 */

/* -----------------------------------------------------------------------
   Sezione principale (sfondo primario)
----------------------------------------------------------------------- */
.offer-view {
    background-color: var(--website-primary);
    position: relative;
    overflow: hidden;
    padding: var(--website-padding-top-bottom) 0;
}

.offer-view > .container {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
}

/* -----------------------------------------------------------------------
   Box bianco a 2 colonne
----------------------------------------------------------------------- */
.offer-view .pageblock-box {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: 4fr 6fr;
}

/* -----------------------------------------------------------------------
   Colonna testo
----------------------------------------------------------------------- */
.offer-view .pageblock-text {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
}

.offer-view .pageblock-title-emphasis {
    color: var(--website-accent);
    font-style: italic;
    font-weight: 500;
}

.offer-view .pageblock-content {
    font-weight: 500;
    line-height: 1.5;
    color: var(--website-secondary);
}

.offer-view .pageblock-content p {
    margin: 0;
}

.offer-view .pageblock-content p + p {
    margin-top: 1rem;
}

/* -----------------------------------------------------------------------
   Colonna media (slider o immagine singola)
----------------------------------------------------------------------- */
.offer-view .pageblock-media {
    position: relative;
    overflow: hidden;
    min-height: 600px;
}

.offer-view .pageblock-media > picture,
.offer-view .pageblock-media > picture img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.offer-view .pageblock-slider {
    position: absolute;
    inset: 0;
}

.offer-view .pageblock-slider .slider-track {
    height: 100%;
}

.offer-view .pageblock-slider .slider-list {
    height: 100%;
}

.offer-view .pageblock-slider .slider-slide {
    height: 100%;
}

.offer-view .pageblock-slider .slider-slide picture,
.offer-view .pageblock-slider .slider-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* -----------------------------------------------------------------------
   Responsive
----------------------------------------------------------------------- */
@media (max-width: 830px) {
    .offer-view {
        padding: var(--website-padding-top-bottom-mobile) 0;
    }

    .offer-view .pageblock-box {
        grid-template-columns: 1fr;
        border-radius: 8px;
    }

    .offer-view .pageblock-media {
        order: -1;
        min-height: 280px;
    }

    .offer-view .pageblock-text {
        padding: 1.5rem;
        gap: 1.5rem;
    }
}
