/**
 * PSAS: Landing-page layout helpers (Foster / Volunteer and future pages).
 *
 * Loaded ONLY on singular pages whose content contains `psas-lp-split`
 * (see includes/assets.php). Every rule is scoped to `.psas-lp-split`, so it
 * cannot affect any other Media & Text block on the site.
 *
 * `.psas-lp-split` = full-bleed Media & Text row (image fill + text).
 */

/* Stack the image/text checkerboard at 960px (the theme's tablet breakpoint) instead of core's 600px, so square
   1080px photos never get squeezed into a narrow half-column on tablets. */
@media (max-width: 960px) {
	.wp-block-media-text.psas-lp-split.is-stacked-on-mobile {
		grid-template-columns: 100% !important;
	}

	.wp-block-media-text.psas-lp-split.is-stacked-on-mobile > .wp-block-media-text__media {
		grid-column: 1;
		grid-row: 1;
		/* Core fixes stacked image-fill photos at 250px tall, which crops faces.
		   Give them a near-square frame instead (capped for tablets). */
		min-height: min(85vw, 600px);
	}

	.wp-block-media-text.psas-lp-split.is-stacked-on-mobile > .wp-block-media-text__content {
		grid-column: 1;
		grid-row: 2;
	}

	/* The desktop min-height (keeps photos uncropped beside short text) isn't
	   needed once the row is stacked. */
	.wp-block-media-text.psas-lp-split > .wp-block-media-text__content > .wp-block-group {
		min-height: 0 !important;
	}
}

/* Featured video group (YouTube embed + "Watch on YouTube" button, e.g. Foster > Paws Out):
   breathing room before the photo grid that follows it on tablets/phones, where the
   stacked layout otherwise butts the button against the first photo.
   Matched by class, or by its YouTube embed for content pasted before the class existed. */
@media (max-width: 960px) {
	.psas-video-feature,
	.wp-block-group:has(> .wp-block-embed-youtube) {
		margin-bottom: 2.5rem;
	}
}
