/* =========================================================
   Longside – Image with Boxes Right
   ========================================================= */

.ls-image-with-boxes-right {
    padding-block: var(--wp--preset--spacing--70);
    background: var(--wp--preset--color--custom-longside-bg-light);
}

/* Intro: gleiche Struktur wie Content Media */
.ls-image-with-boxes-right-header {
    max-width: 900px;
    margin-inline: auto;
    text-align: center;
}

.ls-image-with-boxes-right-header .ls-eyebrow {
    width: fit-content;
    margin-inline: auto;
}

.ls-image-with-boxes-right-header h2,
.ls-image-with-boxes-right-header > p:last-child {
    max-width: 800px;
    margin-inline: auto;
}

/* Diagramm links, Erläuterungen rechts */
.ls-image-with-boxes-right-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    align-items: stretch;
    gap: clamp(20px, 3vw, 40px);
    width: 100%;
    margin-top: var(--wp--preset--spacing--60);
}

.ls-image-with-boxes-right-media,
.ls-image-with-boxes-right-boxes {
    min-width: 0;
    margin: 0;
}

/* Bild und Bildunterschrift bilden eine gemeinsame Karte. */
.ls-image-with-boxes-right-media {
    box-sizing: border-box;
    align-self: start;
    padding: 20px;
    background: #fff;
    border: 1px solid rgba(7, 17, 27, .12);
    border-radius: 12px;
    overflow: hidden;
}

.ls-image-with-boxes-right-image {
    margin: 0;
}

.ls-image-with-boxes-right-image img {
    display: block;
    width: 100%;
    height: auto;
}

.ls-image-with-boxes-right-image figcaption {
    margin-top: 12px;
    text-align: center;
    font-size: .875rem;
    color: var(--wp--preset--color--custom-longside-text-muted, #7c8794);
}

/* Kompakte Karten: wiederverwendete Intro-Listing-Struktur */
.ls-image-with-boxes-right-boxes {
    display: grid;
    grid-template-rows: repeat(3, minmax(min-content, 1fr));
    gap: 14px;
}

.ls-image-with-boxes-right-box {
    box-sizing: border-box;
    min-width: 0;
    margin: 0;
    padding: 20px;
    background: rgba(255, 255, 255, .46);
    border: 1px solid rgba(7, 17, 27, .12);
    border-radius: 12px;
}

.ls-image-with-boxes-right-box .ls-intro-listing-item-header {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 12px;
    margin: 0 0 10px;
}

.ls-image-with-boxes-right-box .ls-intro-listing-item-icon {
    flex: 0 0 40px;
    width: 40px;
    margin: 0 !important;
}

.ls-image-with-boxes-right-box .ls-intro-listing-item-icon img {
    display: block;
    width: 100%;
    height: auto;
}

.ls-image-with-boxes-right-box .ls-intro-listing-item-header h3 {
    margin: 0;
    color: #07111b;
    font-size: 1rem;
    line-height: 1.3;
    font-weight: 600;
}

.ls-image-with-boxes-right-box > p {
    margin: 0;
    color: rgba(7, 17, 27, .68);
    font-size: .95rem;
    line-height: 1.45;
}

/* Dark Mode – Diagramm selbst wird nicht eingefärbt */
.ls-image-with-boxes-right.ls-section--dark {
    background: var(--wp--preset--color--custom-longside-dark);
}

.ls-image-with-boxes-right.ls-section--dark .ls-image-with-boxes-right-box {
    background: rgba(4, 13, 22, .65);
    border-color: rgba(255, 255, 255, .12);
}

.ls-image-with-boxes-right.ls-section--dark .ls-image-with-boxes-right-box h3 {
    color: #fff;
}

.ls-image-with-boxes-right.ls-section--dark .ls-image-with-boxes-right-box > p {
    color: rgba(255, 255, 255, .68);
}

/* Die Diagrammkarte bleibt auch im Dark Mode weiß und lesbar. */
.ls-image-with-boxes-right.ls-section--dark .ls-image-with-boxes-right-media {
    background: #fff;
    border-color: rgba(255, 255, 255, .12);
}

.ls-image-with-boxes-right.ls-section--dark .ls-image-with-boxes-right-image figcaption {
    color: var(--wp--preset--color--custom-longside-text-muted, #7c8794);
}

@media (max-width: 900px) {
    .ls-image-with-boxes-right-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .ls-image-with-boxes-right-boxes {
        grid-template-rows: none;
        gap: 12px;
    }
}

@media (max-width: 600px) {
    .ls-image-with-boxes-right-box {
        padding: 16px;
    }
}