/*
Block Name: Volunteers
Description: Displays a grid of volunteer cards with a circular photo overlapping the left edge of a boxed name and role card.
*/

/* ============================================================
   GRID
   Two equal columns on desktop. When the total number of
   volunteers is odd, PHP adds volunteer-card--centered to the
   last card and CSS uses grid-column to place it centrally.
   ============================================================ */
.block-volunteers .volunteers-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 3rem 4rem;
}

/* ============================================================
   LONE LAST CARD — CENTRED
   grid-column: 1 / -1 makes the card span the full grid width,
   then max-width + margin: auto centres its content within that.
   We limit the width to half the grid (50%) so it looks like
   a single centred column rather than stretching full width.
   ============================================================ */
.block-volunteers .volunteer-card--centered {
	grid-column: 1 / -1;
	max-width: 50%;
	margin-left: auto;
	margin-right: auto;
	width: 100%;
}

/* ============================================================
   CARD WRAPPER
   Uses a 1fr 2fr grid — image column : text card column.
   align-items: center vertically centres the image alongside
   the card.
   ============================================================ */
.block-volunteers .volunteer-card {
	display: grid;
	grid-template-columns: 1fr 2fr;
	align-items: center;
	gap: 0;
}

/* ============================================================
   CIRCULAR IMAGE
   Sits in the first grid column. z-index: 1 keeps it above
   the card so the card tucks behind it, not the other way.
   ============================================================ */
.block-volunteers .volunteer-image-wrap {
	width: 100%;
	aspect-ratio: 1;
	border-radius: 50%;
	overflow: hidden;
	z-index: 1;
	position: relative;
	background-color: var(--brand-8, #e8e8e8);
}

.block-volunteers .volunteer-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border-radius: 50%;
}

/* ============================================================
   TEXT CARD
   margin-left: -2rem pulls the card leftward so it tucks
   slightly behind the image circle. The matching padding-left
   ensures the text itself stays clear of the image.
   ============================================================ */
.block-volunteers .volunteer-text-card {
	background-color: #fff;
	border-radius: var(--border-radius, 1rem);
	box-shadow: var(--shadow, rgba(0,0,0,0.08)) 0px 20px 25px -5px, rgba(0, 0, 0, 0.04) 0px 10px 10px -5px;
	padding: 2rem 2rem 2rem 4rem;
	margin-left: -2rem;
	min-height: 7rem;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

/* ============================================================
   TYPOGRAPHY
   Name is bold. Role is smaller and muted.
   ============================================================ */
.block-volunteers .volunteer-name {
	font-weight: 700;
	font-size: 2.5rem;
	margin: 0 0 0.3rem;
	color: var(--brand-2);
}

.block-volunteers .volunteer-role {
	margin: 0;
	font-size: 2rem;
	color: var(--brand-2);
}

/* ============================================================
   EDITOR NOTICE
   Only visible in the WordPress block editor when the repeater
   is empty. Never shown on the front end.
   ============================================================ */
.block-volunteers .volunteers-empty-notice {
	color: #e88b39;
	font-weight: 600;
	padding: 2rem 0;
}

/* ============================================================
   RESPONSIVE
   Single column on mobile. Centred card resets to full width.
   ============================================================ */
@media screen and (max-width: 576px) {
	.block-volunteers .volunteers-grid {
		grid-template-columns: 1fr;
		gap: 6rem 0;
	}

	.block-volunteers .volunteer-card--centered {
		max-width: 100%;
	}
}