/*
 * Trinity Central Content Grids — structural styles.
 * Layout matches the personnel (centered) and news (horizontal) card mockups.
 * Colors and fonts inherit from the theme; override the --tcg-* custom
 * properties (and --tcg-eyebrow-color) to match Trinity brand precisely.
 *
 *   --tcg-min             min card width before wrapping
 *   --tcg-gap             gap between cards
 *   --tcg-columns         fixed column count (set by columns="" attr)
 *   --tcg-eyebrow-color   news eyebrow color
 */

.tcg-grid {
	display: grid;
	/* min(…,100%) keeps wide cards from overflowing narrow screens. */
	grid-template-columns: repeat(var(--tcg-columns, auto-fill), minmax(min(var(--tcg-min, 260px), 100%), 1fr));
	gap: var(--tcg-gap, 1.5rem);
	margin: 1.5rem 0;
}

.tcg-grid--people { --tcg-min: 240px; }
.tcg-grid--news   { --tcg-min: 460px; }

/* Shared */
.tcg-card { display: flex; flex-direction: column; gap: 0.4rem; }
.tcg-card__media img,
.tcg-card__img { display: block; width: 100%; height: auto; }

/* Personnel — centered card, circular portrait */
.tcg-card--personnel { text-align: center; align-items: center; }
.tcg-card--personnel .tcg-card__media { width: 180px; max-width: 70%; margin: 0 auto 0.5rem; }
.tcg-card--personnel .tcg-card__img { border-radius: 50%; aspect-ratio: 1 / 1; object-fit: cover; }
.tcg-card__name { margin: 0.25rem 0 0; }
.tcg-card__role { margin: 0.1rem 0 0.35rem; font-weight: 600; }
.tcg-card__email,
.tcg-card__phone { margin: 0; }
.tcg-card__appointment { margin: 0.2rem 0 0; font-weight: 700; }

/* News — horizontal card, image left */
.tcg-card--news { flex-direction: row; align-items: flex-start; gap: 1.25rem; }
.tcg-card--news .tcg-card__media { flex: 0 0 auto; width: 120px; }
.tcg-card--news .tcg-card__img { border-radius: 10px; aspect-ratio: 1 / 1; object-fit: cover; }
.tcg-card--news .tcg-card__body { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.tcg-card__eyebrow {
	margin: 0;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--tcg-eyebrow-color, #0a7d8c);
}
.tcg-card__headline { margin: 0; }
.tcg-card__headline a { color: inherit; text-decoration: none; }
.tcg-card__headline a:hover { text-decoration: underline; }
.tcg-card__excerpt { margin: 0.2rem 0 0; }

/* Stack the news card on small screens */
@media (max-width: 480px) {
	.tcg-card--news { flex-direction: column; }
	.tcg-card--news .tcg-card__media { width: 100%; max-width: 220px; }
}

/* Collapse wrappers whose token resolved to nothing */
.tcg-card__media:empty,
.tcg-card__role:empty,
.tcg-card__office:empty,
.tcg-card__email:empty,
.tcg-card__phone:empty,
.tcg-card__appointment:empty,
.tcg-card__eyebrow:empty,
.tcg-card__excerpt:empty,
.tcg-card__date:empty { display: none; }
