/* =========================================================
   HOME AREA TILES (destination areas)

   Impreza Grid, terms of the Areas taxonomy
   Grid Layout : "Area tile"
   Grid class  : home-area-tiles

   Image  : bm_area_image, us_1024_1280_crop (4:5)
   Desktop: 3 columns, 4 / 5 tiles
   Tablet : 2 columns (set by Impreza), 4 / 5 tiles
   Phones : 1 column, 16 / 10 tiles, same image,
            cropped from the centre by object-fit
========================================================= */


/* =========================================================
   TILE
   The name sits at the bottom; the image fills the tile.
========================================================= */

.home-area-tiles .w-grid-item-h {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	aspect-ratio: 4 / 5;
	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-area-tiles .w-image {
	position: absolute !important;
	inset: 0;
	z-index: 0;
	margin: 0;
}

.home-area-tiles .w-image-h {
	display: block;
	width: 100%;
	height: 100%;
}

.home-area-tiles .w-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
	transition: transform 0.6s ease;
}

.home-area-tiles .w-image::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: linear-gradient(
		180deg,
		rgba(0, 0, 0, 0) 45%,
		rgba(0, 0, 0, 0.35) 72%,
		rgba(0, 0, 0, 0.7) 100%
	);
}

.home-area-tiles .w-grid-item:hover .w-image img {
	transform: scale(1.04);
}


/* =========================================================
   AREA NAME
   No font size set here: uses the theme's h3 style.
========================================================= */

.home-area-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-area-tiles .post_title a {
	color: inherit !important;
	text-decoration: none;
}


/* =========================================================
   KEYBOARD FOCUS
========================================================= */

.home-area-tiles a:focus-visible {
	outline: 2px solid var(--color-secondary, #35b0ed);
	outline-offset: 3px;
}


/* =========================================================
   PHONES (one column)
========================================================= */

@media (max-width: 600px) {
	.home-area-tiles .w-grid-item-h {
		aspect-ratio: 16 / 10;
		padding: 16px;
	}
}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {
	.home-area-tiles .w-image img {
		transition: none;
	}

	.home-area-tiles .w-grid-item:hover .w-image img {
		transform: none;
	}
}