/* Columns style: boxes / Boxy. Keep WordPress column widths and mobile stacking. */
.wp-block-columns.is-style-boxes {
    align-items: stretch !important;
    gap: 20px;
}

.wp-block-columns.is-style-boxes > .wp-block-column {
    align-self: stretch !important;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    min-width: 0;
    padding: 30px 0 20px;
    flex-shrink: 1;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: #555;
    overflow-wrap: anywhere;
}

/* Keep horizontal padding out of flex sizing, including image-only columns. */
.wp-block-columns.is-style-boxes > .wp-block-column > :not(.block-list-appender) {
    margin-left: 15px;
    margin-right: 15px;
    max-width: calc(100% - 30px);
}

.wp-block-columns.is-style-boxes > .wp-block-column > :first-child {
    margin-top: 0;
}

.wp-block-columns.is-style-boxes > .wp-block-column > :last-child {
    margin-bottom: 0;
}

.wp-block-columns.is-style-boxes > .wp-block-column :is(h2, h3) {
    margin-bottom: 10px;
    padding-bottom: 12px;
    background: url('../images/dot.svg') no-repeat bottom center / 110px;
    color: #238351;
    font-size: 25px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-transform: none;
}

.wp-block-columns.is-style-boxes > .wp-block-column :is(h2, h3) a {
    color: inherit;
}

.wp-block-columns.is-style-boxes > .wp-block-column :is(h2, h3) a:hover {
    color: #000;
}

.wp-block-columns.is-style-boxes > .wp-block-column p {
    font-size: 16px;
    line-height: 1.6;
}

/* The editor may append its block inserter after the single image block. */
.wp-block-columns.is-style-boxes > .wp-block-column:has(> .wp-block-image):not(:has(> :not(.wp-block-image, .block-list-appender), > .wp-block-image ~ .wp-block-image, figcaption)) {
    align-self: flex-start !important;
    padding: 0;
    background: transparent;
    overflow: hidden;
}

.wp-block-columns.is-style-boxes > .wp-block-column:has(> .wp-block-image):not(:has(> :not(.wp-block-image, .block-list-appender), > .wp-block-image ~ .wp-block-image, figcaption)) > .wp-block-image {
    position: relative;
    flex: 0 0 auto;
    align-self: stretch;
    width: 100%;
    max-width: 100%;
    min-height: 0;
    margin: 0;
    aspect-ratio: auto;
    border-radius: inherit;
    overflow: hidden;
}

.wp-block-columns.is-style-boxes > .wp-block-column:has(> .wp-block-image):not(:has(> :not(.wp-block-image, .block-list-appender), > .wp-block-image ~ .wp-block-image, figcaption)) > .wp-block-image img {
    position: static;
    display: block;
    width: 100%;
    height: auto;
    max-width: none;
    object-fit: contain;
    border-radius: inherit;
}

/* Match the original site's 1100px breakpoint, including explicit column widths. */
@media (max-width: 1100px) {
    .wp-block-columns.is-style-boxes {
        flex-wrap: wrap !important;
    }

    .wp-block-columns.is-style-boxes > .wp-block-column {
        flex-basis: 100% !important;
        width: 100%;
    }
}
