/* ==========================================================================
   Team Members by Division
   Companion stylesheet for [team_divisions]
   Default location: /wp-content/themes/<child-theme>/assets/css/team-divisions.css
   ========================================================================== */

.td {
	/* Brand + layout tokens — change these, not the rules below. */
	--td-green: #0e5c3d;
	--td-rule: #cfe1d8;
	--td-name: #17181a;
	--td-role: #6a7278;
	--td-photo-bg: #eceff0;

	--td-radius-photo: 10px;
	--td-radius-tab: 6px;

	--td-col-gap: 26px;
	--td-row-gap: 42px;
	--td-block-gap: 64px;

	--td-photo-ratio: 5 / 6;

	box-sizing: border-box;
}

.td *,
.td *::before,
.td *::after {
	box-sizing: inherit;
}

/* --------------------------------------------------------------------------
   Division block
   -------------------------------------------------------------------------- */

.td__division + .td__division {
	margin-top: 100px;
}

/* Green tab sitting on a full-width rule. */
.td__head {
	display: flex;
	align-items: flex-end;
	margin-bottom: 45px;
    font-size:20px;
}

.td__head::after {
	content: "";
	flex: 1 1 auto;
	height: 1px;
	background: rgba(0, 98, 64, 0.9);
}

.td__heading {
	flex: 0 0 auto;
	margin: 0;
	padding: 2px 62px;
	background: #006240;
	color: #fff;
	font-size: 18px !important;
	font-weight: 600 !important;
	line-height: 1.2;
	letter-spacing: 0.01em;
	border-radius: 20px 20px 0px 0px;
}

/* --------------------------------------------------------------------------
   Card grid
   -------------------------------------------------------------------------- */

.td__grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	column-gap: 19px;
	row-gap: var(--td-row-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.td--cols-1 .td__grid { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.td--cols-2 .td__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.td--cols-3 .td__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.td--cols-4 .td__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.td--cols-5 .td__grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.td--cols-6 .td__grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.td__card {
	margin: 0;
	padding: 0;
}

.td__link {
	display: block;
	color: inherit;
	text-decoration: none;
}

/* Photo */
.td__photo {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: var(--td-photo-ratio);
	overflow: hidden;
	background: var(--td-photo-bg);
	border-radius: 20px;
}

.td__photo .td__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	display: block;
	transition: transform 0.45s ease;
}

.td__link:hover .td__img,
.td__link:focus-visible .td__img {
	transform: scale(1.03);
}

/* Fallback when no featured image is set */
.td__initials {
	font-size: 30px;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: var(--td-green);
	opacity: 0.55;
}

/* Text */
.td__name {
	margin: 0;
	line-height: 1.35;
	color: #000;
	margin-top: 20px;
}
.td__card p {
	font-size: 17px;
	font-style: italic;
	color: #000000;
	font-weight: 100;
	margin-bottom: 0px;
}
h3.td__name {
	font-size: 18px;
	font-weight: 600;
	line-height: 31px;
}

.td__role {
	margin: 0;
	font-size: 14px;
	font-style: italic;
	line-height: 1.4;
	color: var(--td-role);
}

/* Keyboard focus */
.td__link:focus-visible {
	outline: 2px solid var(--td-green);
	outline-offset: 4px;
	border-radius: var(--td-radius-photo);
}

/* --------------------------------------------------------------------------
   Responsive — caps the column count as the screen narrows.
   Rules are listed narrowest-last so later rules win.
   -------------------------------------------------------------------------- */

@media (max-width: 1180px) {

	.td--cols-5 .td__grid,
	.td--cols-6 .td__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (max-width: 960px) {

	.td--cols-4 .td__grid,
	.td--cols-5 .td__grid,
	.td--cols-6 .td__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
.td__division + .td__division {
	margin-top: 30px;
}
.td__head {
	margin-bottom: 24px;
}
}

@media (max-width: 720px) {

	.td {
		--td-col-gap: 18px;
		--td-row-gap: 32px;
		--td-block-gap: 48px;
	}

	.td .td__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.td--cols-1 .td__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.td__heading {
		padding: 10px 18px;
		font-size: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {

	.td__photo .td__img {
		transition: none;
	}

	.td__link:hover .td__img,
	.td__link:focus-visible .td__img {
		transform: none;
	}
}