/* Keep the original family image and crop only its displayed frame. */
.paperetti-history-teaser .paperetti-history-teaser-row {
    grid-template-columns: minmax(0, 390px) minmax(0, 1fr) !important;
    gap: 60px !important;
}

.paperetti-history-teaser .paperetti-history-photo {
    width: 100%;
}

.paperetti-history-photo .et_pb_image_wrap img {
    aspect-ratio: 1.32 / 1;
    height: auto !important;
    object-fit: cover;
    object-position: center 22%;
}

/* A light navy tinted glass surface keeps the navigation legible over images. */
.paperetti-header > .et_pb_row:first-child {
    background: rgba(246, 248, 248, .88) !important;
    -webkit-backdrop-filter: blur(14px) saturate(115%);
    backdrop-filter: blur(14px) saturate(115%);
    box-shadow: 0 6px 24px rgba(16, 35, 49, .12);
}

.paperetti-header > .et_pb_row:first-child > .et_pb_column:nth-child(2),
.paperetti-header > .et_pb_row:first-child > .et_pb_column:nth-child(3),
.paperetti-header .et_pb_menu:not(.dfh-37) {
    background: transparent !important;
}

/* Keep Divi's offcanvas row outside the header's document flow. */
.paperetti-header .dfh-37-menu-row {
    position: fixed !important;
    inset: 0 auto auto 0;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    z-index: 9999;
    background-image: linear-gradient(rgba(16, 35, 49, .78), rgba(16, 35, 49, .6)), url('/wp-content/uploads/2026/09/paperetti-restyle/paperetti-library-hero.webp') !important;
    background-size: cover;
    background-position: center;
}

@media (max-width: 980px) {
    .paperetti-history-teaser .paperetti-history-teaser-row {
        grid-template-columns: minmax(0, 320px) minmax(0, 1fr) !important;
        gap: 36px !important;
    }
}

@media (max-width: 767px) {
    .paperetti-history-teaser .paperetti-history-teaser-row {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 28px !important;
    }

    .paperetti-history-teaser .paperetti-history-photo {
        width: calc(100% - 14px) !important;
        margin: 0 7px 10px !important;
        transform: rotate(-2deg);
    }

    .paperetti-history-teaser .paperetti-history-photo .et_pb_image_wrap {
        padding: 10px 10px 20px;
    }
}
