/**
 * עמוד "צוות הישיבה" (page-2523.php).
 *
 * הכותרת, הרקע והמשתנים (--navy, --gold, --display, --shadow-*) מ-content-page.css,
 * ההזמנה בסוף והכפתורים מ-components.css. כאן רק כרטיסי הצוות:
 * - שניים בגדול (נשיא הישיבה וראש הישיבה): תמונה מלאה, השם והתפקיד עליה,
 *   כמו כרטיסי הרבנים בבית המדרש.
 * - השאר קטנים מתחתם: כרטיס לבן עם קו זהב, תמונה, תפקיד, שם וקישור לשיעורים.
 *   שלושה בשורה, ממורכזים (שורה אחרונה חלקית נשארת באמצע).
 * בטלפון: הגדולים זה מתחת לזה, והקטנים בשורה עם תמונה קטנה בצד.
 */

.ov-team__leaders,
.ov-team__list {
	max-width: 880px;
	margin: 0 auto;
	padding: 0;
	list-style: none;
}

.ov-team__leaders {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 26px;
}

.ov-team__leader,
.ov-team__item {
	margin: 0;
}

/* ---------- הכרטיסים הגדולים ---------- */

.ov-leader {
	position: relative;
	z-index: 0;
	display: flex;
	align-items: flex-end;
	height: 100%;
	aspect-ratio: 4 / 5;
	box-sizing: border-box;
	padding: 30px;
	overflow: hidden;
	color: #ffffff;
	text-decoration: none;
	background:
		radial-gradient(420px 300px at 100% 0%, rgba(213, 155, 42, 0.3), transparent 68%),
		linear-gradient(160deg, var(--ov-navy-soft, #1c3a5e) 0%, var(--navy) 72%);
	border-radius: 22px;
	box-shadow: var(--shadow-lg);
	transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.ov-leader__img {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 22%;
	transition: transform 0.7s ease;
}

.ov-leader::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(to top, rgba(0, 20, 45, 0.96) 0%, rgba(0, 27, 56, 0.72) 30%, rgba(0, 35, 71, 0.08) 60%, rgba(0, 35, 71, 0) 100%);
}

a.ov-leader:hover,
a.ov-leader:focus-visible {
	color: #ffffff;
	transform: translateY(-5px);
}

a.ov-leader:hover .ov-leader__img,
a.ov-leader:focus-visible .ov-leader__img {
	transform: scale(1.04);
}

a.ov-leader:focus-visible {
	outline: 3px solid var(--gold-bright);
	outline-offset: 3px;
}

.ov-leader__initial {
	position: absolute;
	inset: 0 0 30%;
	display: grid;
	place-items: center;
	font-family: var(--display);
	font-size: 130px;
	font-weight: 700;
	color: rgba(240, 182, 65, 0.4);
}

.ov-leader__body {
	display: block;
	width: 100%;
}

.ov-leader__role {
	display: block;
	margin-bottom: 6px;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.4;
	color: var(--gold-bright);
}

.ov-leader__name {
	display: block;
	font-family: var(--display);
	font-size: clamp(28px, 3vw, 34px);
	font-weight: 700;
	line-height: 1.15;
	color: #ffffff;
}

.ov-leader__seam {
	display: block;
	width: 40px;
	height: 3px;
	margin: 16px 0 14px;
	background: var(--gold);
	border-radius: 100px;
	transition: width 0.4s ease;
}

a.ov-leader:hover .ov-leader__seam,
a.ov-leader:focus-visible .ov-leader__seam {
	width: 90px;
}

.ov-leader__more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 15px;
	font-weight: 700;
	color: rgba(255, 255, 255, 0.85);
}

.ov-leader__more svg,
.ov-member__link svg {
	width: 17px;
	height: 17px;
	fill: none;
	stroke: var(--gold-bright);
	stroke-width: 2.4;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* ---------- הכרטיסים הקטנים ---------- */

.ov-team__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 22px;
	margin-top: 26px;
}

.ov-team__item {
	flex: 0 1 calc((100% - 2 * 22px) / 3);
}

.ov-member {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	background: #ffffff;
	border-top: 3px solid var(--gold);
	border-radius: var(--ov-radius-lg, 18px);
	box-shadow: var(--shadow-sm);
}

.ov-member__photo {
	position: relative;
	flex: none;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	background:
		radial-gradient(260px 200px at 100% 0%, rgba(213, 155, 42, 0.28), transparent 70%),
		linear-gradient(160deg, var(--ov-navy-soft, #1c3a5e) 0%, var(--navy) 75%);
}

.ov-member__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 20%;
}

.ov-member__initial {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	font-family: var(--display);
	font-size: 80px;
	font-weight: 700;
	color: rgba(240, 182, 65, 0.45);
}

.ov-member__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: flex-start;
	padding: 18px 20px 20px;
}

.ov-member__role {
	margin: 0 0 4px;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.45;
	color: var(--gold-deep);
}

.ov-member__name {
	margin: 0;
	font-family: var(--display);
	font-size: 21px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--navy);
}

.ov-member__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: auto;
	padding-top: 14px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--navy);
	text-decoration: none;
}

.ov-member__link svg {
	stroke: var(--gold);
	transition: transform 0.25s ease;
}

.ov-member__link:hover,
.ov-member__link:focus-visible {
	color: var(--gold-deep);
}

.ov-member__link:hover svg,
.ov-member__link:focus-visible svg {
	transform: translateX(-4px);
}

.ov-member__link:focus-visible {
	outline: 3px solid var(--gold-bright);
	outline-offset: 2px;
	border-radius: 4px;
}

/* ---------- ההזמנה בסוף ---------- */

.ov-team__invite {
	margin-top: clamp(48px, 7vh, 80px);
}

/* ---------- רוחבים ---------- */

@media (max-width: 820px) {
	.ov-team__item {
		flex-basis: calc((100% - 22px) / 2);
	}
}

@media (max-width: 680px) {
	.ov-team__leaders {
		grid-template-columns: minmax(0, 1fr);
		gap: 18px;
	}

	.ov-leader {
		aspect-ratio: 1 / 1;
		padding: 24px;
	}

	.ov-team__list {
		gap: 14px;
		margin-top: 18px;
	}

	.ov-team__item {
		flex-basis: 100%;
	}

	/* תמונה קטנה בצד, והשם והתפקיד לידה */
	.ov-member {
		flex-direction: row;
		align-items: stretch;
	}

	.ov-member__photo {
		width: 92px;
	}

	.ov-member__body {
		justify-content: center;
		padding: 14px 16px;
	}

	.ov-member__link {
		margin-top: 8px;
		padding-top: 0;
	}
}
