/**
 * core/columns — równa wysokość + rozciąganie Grupy z tłem.
 * Klasy: .is-keep-same-height, .is-stretch-group
 */

.wp-block-columns.is-keep-same-height {
	align-items: stretch !important;
}

.wp-block-columns.is-keep-same-height > .wp-block-column {
	align-self: stretch !important;
	display: flex;
	flex-direction: column;
}

/* Grupa (z tłem) wypełnia wysokość kolumny. */
.wp-block-columns.is-stretch-group > .wp-block-column {
	display: flex;
	flex-direction: column;
}

.wp-block-columns.is-stretch-group > .wp-block-column > .wp-block-group {
	flex: 1 1 auto;
	align-self: stretch;
	width: 100%;
	min-height: 100%;
	box-sizing: border-box;
}

/* Po złożeniu w stos (domyślne zachowanie WP poniżej 782px) nie wymuszamy stretch. */
@media (max-width: 781px) {
	.wp-block-columns.is-keep-same-height:not(.is-not-stacked-on-mobile) {
		align-items: normal;
	}

	.wp-block-columns.is-keep-same-height:not(.is-not-stacked-on-mobile) > .wp-block-column {
		align-self: auto !important;
	}

	.wp-block-columns.is-stretch-group:not(.is-not-stacked-on-mobile) > .wp-block-column > .wp-block-group {
		flex: none;
		min-height: 0;
	}
}
