/*
 * Group grid row (chenny-desk-row-3 + chenny-desk-col-*): NOT core Columns — needs its own rules.
 * Fill each 1fr track; column wrappers stretch; inner blocks (headers, gallery) use full cell width.
 */
@media (min-width: 782px) {
	.is-style-chenny-desk-row-3 {
		display: grid !important;
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
		column-gap: var(--wp--preset--spacing--40, 1.5rem);
		row-gap: var(--wp--preset--spacing--50, 2rem);
		align-items: stretch;
		justify-items: stretch;
		width: 100% !important;
		max-width: none !important;
		box-sizing: border-box;
	}

	/* Grid items: min-height 0 so row height can shrink-wrap; stretch still fills row to max track height */
	.is-style-chenny-desk-row-3 > * {
		min-width: 0;
		min-height: 0;
		align-self: stretch;
	}

	.is-style-chenny-desk-col-1,
	.is-style-chenny-desk-col-2,
	.is-style-chenny-desk-col-3 {
		grid-column: span 1;
		width: 100% !important;
		max-width: none !important;
		min-width: 0;
		min-height: 0;
		height: 100%;
		box-sizing: border-box;
		display: flex;
		flex-direction: column;
		align-items: stretch;
	}

	.is-style-chenny-desk-col-2 {
		grid-column: span 2;
	}

	.is-style-chenny-desk-col-3 {
		grid-column: 1 / -1;
	}

	.is-style-chenny-desk-col-1 > *,
	.is-style-chenny-desk-col-2 > *,
	.is-style-chenny-desk-col-3 > * {
		width: 100% !important;
		max-width: none !important;
		box-sizing: border-box;
	}

	/* Vertical fill: header fixed height; everything below grows (flex main axis = column) */
	.is-style-chenny-desk-row-3 [class*="is-style-chenny-desk-col-"] > :first-child {
		flex-shrink: 0;
	}

	.is-style-chenny-desk-row-3 [class*="is-style-chenny-desk-col-"] > :nth-child(n + 2) {
		flex: 1 1 auto;
		min-height: 0;
	}

	.is-style-chenny-desk-row-3 .camp-caw-section-card {
		display: flex;
		flex-direction: column;
	}

	.is-style-chenny-desk-row-3 .camp-caw-photos-gallery,
	.is-style-chenny-desk-row-3 figure.wp-block-image {
		width: 100% !important;
		max-width: 100% !important;
	}

	/* Gallery fills column below header; image area grows with row height */
	.is-style-chenny-desk-row-3 .camp-caw-photos-gallery {
		display: flex;
		flex-direction: column;
	}

	.is-style-chenny-desk-row-3 .camp-caw-photos-gallery__track {
		flex: 1 1 auto;
		min-height: 0;
	}

	.is-style-chenny-desk-row-3 .camp-caw-photos-gallery__image-wrap {
		height: 100%;
		min-height: 12rem;
		aspect-ratio: unset;
	}

	.is-style-chenny-desk-row-3 .camp-caw-photos-gallery__slide {
		height: 100%;
	}
}

@media (max-width: 781px) {
	.is-style-chenny-desk-row-3 {
		display: block;
	}

	.is-style-chenny-desk-col-1,
	.is-style-chenny-desk-col-2,
	.is-style-chenny-desk-col-3 {
		grid-column: auto;
		width: 100%;
	}
}
