/*
 * [ayh_instructors] box.
 *
 * Neutral on purpose: it inherits the theme's text colour and font and uses
 * logical properties, so it fits any theme and both text directions.
 */

.ayh-instructors {
	--ayh-instructor-size: 72px;
}

.ayh-instructors .ayh-instructors-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ayh-instructors .ayh-instructor {
	margin: 0;
	padding: 0;
}

.ayh-instructors .ayh-instructor-link {
	color: inherit;
	text-decoration: none;
}

.ayh-instructors a.ayh-instructor-link:hover .ayh-instructor-name {
	text-decoration: underline;
}

.ayh-instructors a.ayh-instructor-link:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 4px;
	border-radius: 6px;
}

.ayh-instructors .ayh-instructor-photo {
	display: grid;
	flex: 0 0 auto;
	place-items: center;
	inline-size: var(--ayh-instructor-size);
	block-size: var(--ayh-instructor-size);
	overflow: hidden;
	border-radius: 50%;
	background: color-mix(in srgb, currentColor 10%, transparent);
}

.ayh-instructors .ayh-instructor-img {
	display: block;
	inline-size: 100%;
	block-size: 100%;
	max-inline-size: none;
	object-fit: cover;
}

.ayh-instructors .ayh-instructor-photo--empty {
	font-size: calc(var(--ayh-instructor-size) * 0.42);
	font-weight: 700;
	line-height: 1;
}

.ayh-instructors .ayh-instructor-name {
	font-weight: 600;
	line-height: 1.5;
}

/* Grid: photo above the name, one card per instructor. */
.ayh-instructors--grid .ayh-instructors-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(calc(var(--ayh-instructor-size) + 3rem), 1fr));
	gap: 1.25rem 1rem;
}

.ayh-instructors--grid .ayh-instructor-link {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
	text-align: center;
}

/* List: photo beside the name, instructors wrap on one flow. */
.ayh-instructors--list .ayh-instructors-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1.5rem;
}

.ayh-instructors--list .ayh-instructor-link {
	display: inline-flex;
	align-items: center;
	gap: 0.65rem;
}
