/* =========================================================
   HOME ACTIVITY TILES (water toys)

   Impreza Grid, post type Water toys (bm_toy)
   Grid Layout : "Activity tile"
   Grid class  : home-activity-tiles

   Image  : featured image, 1280 x 853 crop (3:2)
   Tiles  : 3 / 2 on all screen sizes
   Text   : title + price (toy_price) at the bottom

   Fixed Aspect Ratio must be off in the Grid Layout;
   the tile shape is set here.
   No font sizes set here: theme sizes apply.
========================================================= */


/* =========================================================
   TILE
   Text sits at the bottom; the image fills the tile.
========================================================= */

.home-activity-tiles .w-grid-item-h {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 4px;
	aspect-ratio: 3 / 2;
	min-height: 0;
	padding: 24px;
	box-sizing: border-box;
	border-radius: 16px;
	overflow: hidden;
	background-color: var(--color-primary, #1b4f9b);
}


/* =========================================================
   IMAGE
   Stretched over the whole tile, with the scrim on top.
========================================================= */

.home-activity-tiles .post_image {
	position: absolute !important;
	inset: 0;
	z-index: 0;
	margin: 0;
}

.home-activity-tiles .post_image a {
	display: block;
	width: 100%;
	height: 100%;
}

.home-activity-tiles .post_image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
	transition: transform 0.6s ease;
}

.home-activity-tiles .post_image::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: linear-gradient(
		180deg,
		rgba(0, 0, 0, 0) 35%,
		rgba(0, 0, 0, 0.35) 65%,
		rgba(0, 0, 0, 0.72) 100%
	);
}

.home-activity-tiles .w-grid-item:hover .post_image img {
	transform: scale(1.04);
}


/* =========================================================
   TITLE
========================================================= */

.home-activity-tiles .post_title {
	position: relative;
	z-index: 1;
	margin: 0;
	color: #ffffff !important;
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.home-activity-tiles .post_title a {
	color: inherit !important;
	text-decoration: none;
}


/* =========================================================
   PRICE (toy_price)
========================================================= */

.home-activity-tiles .post_custom_field {
	position: relative;
	z-index: 1;
	margin: 0;
	line-height: 1.4;
	color: rgba(255, 255, 255, 0.92) !important;
}


/* =========================================================
   KEYBOARD FOCUS
========================================================= */

.home-activity-tiles a:focus-visible {
	outline: 2px solid var(--color-secondary, #35b0ed);
	outline-offset: 3px;
}


/* =========================================================
   PHONES (one column)
========================================================= */

@media (max-width: 600px) {
	.home-activity-tiles .w-grid-item-h {
		padding: 16px;
	}
}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {
	.home-activity-tiles .post_image img {
		transition: none;
	}

	.home-activity-tiles .w-grid-item:hover .post_image img {
		transform: none;
	}
}