/* furnica team-grid — @rtthemes/builder üretir; elle düzenlemeyin. */
/*
 * Team grid (about-1, about-2 references): optional heading, one card per member (photo, name, role, optional
 * social links). A full-width band starts part way down the photos and runs to the bottom of the section:
 * cards — 262x300 photos, 30px apart, light band from about the middle of the photos, 91px below the text;
 * band — 285x415 photos side by side, dark band from about 169px down the photos, 83px below the text.
 * WP: everything that lays the section out is a block setting: the constrained section (content width), its gradient
 * preset (Surface from 40% / Contrast from 30%: the band), bottom padding and block gap, the cards' grid layout
 * (Columns 4; two per row on phones, wp-bridge.css) and the photos' aspect ratio. The rules below in
 * :where() draw the same for the reference.
 */
:where(.rt-team-grid) {
	box-sizing: border-box;
	padding: 0 max(var(--wp--style--root--padding-right, var(--wp--preset--spacing--40)), (100% - var(--wp--custom--team-grid--width, var(--wp--style--global--content-size))) / 2) 5.6875rem max(var(--wp--style--root--padding-left, var(--wp--preset--spacing--40)), (100% - var(--wp--custom--team-grid--width, var(--wp--style--global--content-size))) / 2);
	background: linear-gradient(180deg, transparent 40%, var(--wp--custom--team-grid--surface-light) 40%);
}

:where(.rt-team-grid > * + *) {
	margin-block-start: 3.625rem;
}

:where(.rt-team-grid--band) {
	padding-bottom: 5.1875rem;
	background: linear-gradient(180deg, transparent 30%, var(--wp--custom--team-grid--surface-dark) 30%);
}

.rt-team-grid .rt-section-heading__title {
	font-size: var(--wp--preset--font-size--x-large);
	line-height: var(--wp--custom--font--line-height--heading);
}

:where(.rt-team-grid__items) {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--wp--custom--spacing--60) 1.875rem;
}

:where(.rt-team-grid--band .rt-team-grid__items) {
	gap: var(--wp--custom--spacing--50) 0;
}

.rt-team-grid__member {
	min-width: 0;
}

:where(.rt-team-grid .rt-team-grid__photo) {
	margin: 0;
}

.rt-team-grid .rt-team-grid__photo {
	overflow: hidden;
}

/* The photo's aspect ratio and cover crop are the image block's settings (inline); the reference repeats them */
:where(.rt-team-grid .rt-team-grid__photo img) {
	aspect-ratio: 262 / 300;
	object-fit: cover;
}

:where(.rt-team-grid--band .rt-team-grid__photo img) {
	aspect-ratio: 285 / 415;
}

.rt-team-grid .rt-team-grid__photo img {
	display: block;
	width: 100%;
	max-width: none;
	transition: scale 0.5s ease;
}

.rt-team-grid__member:hover .rt-team-grid__photo img {
	scale: 1.04;
}

/* Name 18/21 bold, 30px under the photo; role 14px medium, 5px under the name */
:where(.rt-team-grid .rt-team-grid__name) {
	margin: 0;
}

.rt-team-grid .rt-team-grid__name {
	padding-top: 1.875rem;
	color: var(--rt-color-contrast, var(--wp--preset--color--contrast));
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--base-plus);
	font-weight: var(--wp--custom--font--weight--bold);
	line-height: 1.3125rem;
	overflow-wrap: break-word;
}

:where(.rt-team-grid .rt-team-grid__role) {
	margin: 0;
}

.rt-team-grid .rt-team-grid__role {
	padding-top: 0.3125rem;
	color: var(--rt-color-body, var(--wp--preset--color--body));
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: var(--wp--custom--font--weight--medium);
	line-height: 1rem;
}

.rt-team-grid--band .rt-team-grid__name {
	color: var(--rt-color-base, var(--wp--preset--color--base));
}

.rt-team-grid--band .rt-team-grid__role {
	color: var(--wp--custom--team-grid--role-dark);
}

/* Optional social links (core/social-links, logos only): small icons under the role */
/* WP: the social links' flex layout and block gap (markup) */
:where(.rt-team-grid .rt-team-grid__social) {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

:where(.rt-team-grid .rt-team-grid__social) {
	margin: 0;
}

.rt-team-grid .rt-team-grid__social {
	padding: 0.875rem 0 0;
	color: var(--rt-color-contrast, var(--wp--preset--color--contrast));
	list-style: none;
}

/* The icon size while no Icon size is chosen in the sidebar */
.rt-team-grid .rt-team-grid__social:not([class*="-icon-size"]) {
	font-size: var(--wp--preset--font-size--base-plus);
}

.rt-team-grid--band .rt-team-grid__social {
	color: var(--rt-color-base, var(--wp--preset--color--base));
}

.rt-team-grid__social a {
	display: block;
	color: inherit;
	text-decoration: none;
}

.rt-team-grid__social svg {
	display: block;
	width: 1em;
	height: 1em;
	fill: currentcolor;
}

.rt-team-grid__social a:hover {
	color: var(--rt-color-accent, var(--wp--preset--color--accent));
}

.rt-team-grid__social a:focus-visible {
	outline: 2px solid var(--rt-color-accent, var(--wp--preset--color--accent));
	outline-offset: 2px;
}

/* Tablet: the name sits closer to the photo */
@media (max-width: 64rem) {
	.rt-team-grid .rt-team-grid__name {
		padding-top: 1.25rem;
	}
}

/* Phones: two per row (WP: wp-bridge.css); the band fills the whole section (WP: the gradient presets switch off) */
@media (max-width: 37.5rem) {
	:where(.rt-team-grid__items) {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	:where(.rt-team-grid) {
		background: var(--wp--custom--team-grid--surface-light);
	}

	:where(.rt-team-grid--band) {
		background: var(--wp--custom--team-grid--surface-dark);
	}
}
