/**
 * Cards Image + Text (Rectangle) (inc/blocks-layout/cards-image-text-rectangle.php)
 * — a repeater of Image + Title + Text cards laid out as one fixed 3-up
 * CSS Grid. Per chat correction, this is a straight, repeating grid, NOT
 * a balanced/redistributed layout: cards auto-place left-to-right,
 * top-to-bottom, 3 per row, in entry order. An incomplete final row (1 or
 * 2 cards) just leaves its remaining grid cell(s) empty — CSS Grid's
 * default auto-placement already does this with no extra markup — so
 * those cards sit flush left and are NOT stretched to fill the row.
 * Left-aligned throughout. Stacks to one card per line below 900px.
 *
 * Image is a fixed 160px-tall rectangle (object-fit: cover) at whatever
 * width the card ends up being, so every card in the grid looks the same
 * height as well as the same width.
 *
 * No adjustable padding this time (unlike Cards X-Up's Padding Top/Bottom
 * radios) — fixed 4rem top/bottom, 2rem sides, 75rem max-width, matching
 * Cards Image + Text.
 */

.cards-image-text-rectangle-block {
	max-width: 75rem;
	margin: 0 auto;
	padding: 4rem 2rem;
}

.cir-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2.5rem 2rem;
}

@media (max-width: 899.98px) {
	.cir-grid {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}
}

.cir-card {
	display: flex;
	flex-direction: column;
	text-align: left;
}

.cir-card-link {
	display: flex;
	flex-direction: column;
	color: inherit;
	text-decoration: none;
}

.cir-card-image {
	display: block;
	width: 100%;
	height: 160px;
	object-fit: cover;
	margin-bottom: 1rem;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cir-card-content {
  padding: 0 1.25rem;
}

.cir-card-title {
	margin: 0 0 0.5rem;
	font-family: var(--font-primary);
	font-weight: var(--font-weight-regular);
	font-style: normal;
	font-size: 1.1rem;
	color: var(--room-ink);
}

/* Standardized card/image hover across the theme: lift 3px + a shadow. */
.cir-card-link:hover {
  & .cir-card-title {
	  text-decoration: underline;
  }

  & .cir-card-image {
    transform: translateY(-3px);
    box-shadow: 0px 4px 10px rgba(0,0,0,0.25);
  }
}

.cir-card-text {
	margin: 0;
	font-size: 1rem;
  font-weight: var(--font-weight-light);
	line-height: 1.5;
	color: #333333;
}