/**
 * ACF block: Команда — grid of people cards.
 */

.team__title {
	margin-bottom: 30px;
}

.team__grid {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.team__item {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 5px;
}

/* .editor-styles-wrapper prefix beats the editor canvas's own ".editor-styles-wrapper img"
   rule (higher specificity), which otherwise overrides plain single-class rules
   like ".team__photo-img" and makes the image render at its real size. */
.team__photo-img,
.editor-styles-wrapper .team__photo-img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: var(--radius-md);
}

.team__card {
	flex: 1;
	padding: 15px 20px;
	border: 3px solid var(--color-gray-border);
	border-radius: 15px;
}

.team__name {
	font-size: 20px;
	font-weight: var(--font-weight-bold);
	line-height: 1.2;
}

.team__desc {
	margin-top: 5px;
	font-size: 16px;
	font-weight: var(--font-weight-regular);
	line-height: 1.4;
}

/* Rich-text (wysiwyg) output — reset the shared entry-content paragraph rhythm. */
.team .team__desc p {
	margin: 0;
}

.team .team__desc p + p {
	margin-top: 8px;
}

@media (min-width: 768px) {
	.team__title {
		margin-bottom: 35px;
	}

	.team__grid {
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: center;
		row-gap: 25px;
		column-gap: 25px;
	}

	.team__item {
		flex: 0 0 calc((100% - 50px) / 3);
	}

	.team__card {
		padding: 20px 15px;
	}

	.team__name {
		font-size: 25px;
	}

	.team__desc {
		font-size: 18px;
	}
}

@media (min-width: 1200px) {
	.team__grid {
		column-gap: 40px;
	}

	.team__item {
		flex: 0 0 calc((100% - 80px) / 3);
	}
}
