/**
 * Copyright © 2026 WilMa Digital GmbH. All rights reserved.
 * See COPYING.txt for license details.
 */
[data-content-type='banner-grid'] {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, 1fr);
}

/* Mobile: main banner full width, the other four as a 2x2 grid below. */
[data-content-type='banner-grid'] > :first-child {
    grid-column: 1 / -1;
}

@media (min-width: 768px) {
    [data-content-type='banner-grid'] {
        grid-template-columns: repeat(4, 1fr);
        grid-auto-rows: 1fr;
    }

    /* Desktop: main banner is the left half (2 columns), full height across both rows. */
    [data-content-type='banner-grid'] > :first-child {
        grid-column: 1 / 3;
        grid-row: 1 / 3;
    }

    /* Stretch every banner to fill its cell so both halves share one height. */
    [data-content-type='banner-grid'] > [data-content-type='banner'] {
        display: flex;
    }

    [data-content-type='banner-grid'] > [data-content-type='banner'] > * {
        display: flex;
        flex: 1;
        min-width: 0;
    }

    [data-content-type='banner-grid'] .pagebuilder-banner-wrapper {
        flex: 1;
    }
}