/* =============================================================
   Раздел «Лица театра» — inner-faces (не Elementor).
   Токены: tokens.css / inner.css
   ============================================================= */
@import url("tokens.css");

body.muzteatr-faces {
	background: var(--c-cream);
	color: var(--c-text);
}

.inner-page--faces .inner-page__wrap.container {
	max-width: 1410px;
}

.inner-page--faces {
	padding-top: 36px;
}

/* Горизонтальное меню + контент (без боковой колонки) */
.faces-layout {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.faces-layout__main {
	min-width: 0;
}

.inner-text--faces {
	display: block;
	margin-bottom: var(--space-12);
}

/* --- Горизонтальное меню разделов --- */
.faces-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	padding: 0;
	border-radius: var(--radius-card);
	background: var(--c-text-heading);
	color: var(--c-text-invert);
	overflow: hidden;
}

.faces-nav__label {
	display: flex;
	align-items: center;
	flex: 0 0 auto;
	margin: 0;
	padding: 12px 20px;
	border-right: 1px solid rgba(255, 255, 255, 0.12);
	font: 600 clamp(1.05rem, 2vw, 1.25rem)/1.2 var(--font-display);
	color: var(--c-logo-accent);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.faces-nav__list {
	display: flex;
	flex: 1 1 auto;
	flex-wrap: wrap;
	list-style: none;
	margin: 0;
	padding: 0;
}

.faces-nav__item {
	margin: 0;
}

.faces-nav__link {
	display: block;
	padding: 12px 16px;
	border-right: 1px solid rgba(255, 255, 255, 0.12);
	color: var(--c-text-invert);
	font: 500 14px/1.35 var(--font-body);
	text-decoration: none;
	white-space: nowrap;
	transition: color var(--t) var(--ease), background var(--t) var(--ease);
}

.faces-nav__item:last-child .faces-nav__link {
	border-right: none;
}

body.muzteatr-faces .faces-nav a.faces-nav__link {
	color: rgba(255, 255, 255, 0.92) !important;
	text-decoration: none !important;
}

.faces-nav__item.is-current .faces-nav__link,
.faces-nav__link:hover,
.faces-nav__link:focus-visible {
	color: var(--c-menu-active) !important;
	background: rgba(255, 255, 255, 0.06);
}

/* --- Сетка персон --- */
.people-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--card-gap, 30px);
}

.people-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-radius: var(--radius-card);
	background: var(--c-card);
	box-shadow: var(--shadow-card);
	transition: box-shadow var(--t) var(--ease);
}

.people-card:hover {
	box-shadow: var(--shadow-card-hover);
}

.people-card__media {
	overflow: hidden;
	aspect-ratio: 3 / 4;
	margin: 0;
}

.people-card__photo-link {
	display: block;
	height: 100%;
	color: inherit;
	border-color: transparent;
	text-decoration: none;
}

.people-card__photo-link:hover,
.people-card__photo-link:focus-visible {
	color: inherit;
}

.people-card__photo {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
}

.people-card__body {
	flex: 1;
	padding: var(--card-body-pad, 15px);
	text-align: center;
}

.people-card__role {
	margin: 0 0 8px;
	font: 500 13px/1.4 var(--font-body);
	color: var(--c-text-heading);
}

.people-card__name {
	margin: 0 0 8px;
	font: 600 var(--fs-card-title, 22px)/1.2 var(--font-display);
	color: var(--c-text-heading);
}

.face-name__surname,
.face-name__given {
	display: block;
}

.face-name__surname {
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.face-name__given {
	font-weight: 600;
	margin-top: 2px;
}

.people-card__name a {
	color: inherit;
	text-decoration: none;
	border: 0;
	box-shadow: none;
	transition: opacity var(--t) var(--ease);
}

.people-card__name a:hover,
.people-card__name a:focus-visible {
	color: inherit;
	opacity: 0.72;
	text-decoration: none;
}

.people-card__honor {
	margin: 0;
	font: 500 14px/1.45 var(--font-body);
	color: var(--c-text-muted);
}

/* Карточки персон: чёрный текст без подчёркивания (перебивает Astra/Elementor link styles) */
body.muzteatr-faces .people-grid a,
body.muzteatr-faces .people-card a,
body.muzteatr-faces .people-card__photo-link,
body.muzteatr-faces .people-card__name a {
	color: var(--c-text-heading) !important;
	text-decoration: none !important;
	border: 0 !important;
	box-shadow: none !important;
}

body.muzteatr-faces .people-card a:hover,
body.muzteatr-faces .people-card a:focus-visible,
body.muzteatr-faces .people-card__photo-link:hover,
body.muzteatr-faces .people-card__photo-link:focus-visible,
body.muzteatr-faces .people-card__name a:hover,
body.muzteatr-faces .people-card__name a:focus-visible {
	color: var(--c-text-heading) !important;
	text-decoration: none !important;
}

body.muzteatr-faces .entry-content .people-grid a {
	color: var(--c-text-heading) !important;
}

/* Б12: ссылки на страницах раздела «Лица» — чёрные, без подчёркивания */
body.muzteatr-faces .inner-text--faces a,
body.muzteatr-faces .faces-layout__main a:not(.btn):not(.faces-nav__link) {
	color: var(--c-text-heading) !important;
	text-decoration: none !important;
	border: 0 !important;
	box-shadow: none !important;
}
body.muzteatr-faces .inner-text--faces a:hover,
body.muzteatr-faces .faces-layout__main a:not(.btn):not(.faces-nav__link):hover {
	color: var(--c-primary) !important;
	text-decoration: none !important;
}

/* Текст и групповые фото (страница «Симфонический оркестр») */
.inner-text--faces .inner-block {
	margin-bottom: 32px;
}

.inner-text--faces .inner-block__p {
	margin: 0 0 1rem;
	font: 400 15px/1.65 var(--font-body);
	color: var(--c-text);
	text-align: justify;
}

.inner-text--faces .inner-block__h4--center {
	margin: 0 0 20px;
	font: 600 clamp(1.1rem, 2vw, 1.35rem)/1.3 var(--font-display);
	color: var(--c-text-heading);
	text-align: center;
}

.inner-text--faces .inner-block__figure {
	margin: 0;
}

.inner-text--faces .inner-block__img--wide {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--radius-card);
	box-shadow: var(--shadow-card);
}

@media (max-width: 1199px) {
	.people-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 991px) {
	.faces-nav {
		flex-direction: column;
	}

	.faces-nav__label {
		border-right: none;
		border-bottom: 1px solid rgba(255, 255, 255, 0.12);
	}

	.faces-nav__list {
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: thin;
	}

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

@media (max-width: 575px) {
	.people-grid {
		grid-template-columns: 1fr;
	}
}

/* --- Страница персоны (single-face) --- */
.inner-page--face-single {
	padding-top: 36px;
}

.person-profile {
	display: grid;
	grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
	gap: 30px;
	align-items: start;
}

.person-profile__media {
	overflow: hidden;
	border-radius: var(--radius-card);
	background: var(--c-card);
	box-shadow: var(--shadow-card);
}

.person-profile__media .person-bio__gallery {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	margin: 0;
	padding: 12px;
	border-top: 1px solid var(--c-divider-light, rgba(36, 27, 24, 0.08));
	background: var(--c-cream);
}

.person-profile__media .person-bio__gallery-item {
	border-radius: 10px;
	box-shadow: none;
}

.person-profile__media .person-bio__gallery-img {
	aspect-ratio: 1;
}

.person-profile__photo-btn {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: none;
	cursor: zoom-in;
}

.person-profile__photo-btn:focus-visible {
	outline: 3px solid var(--c-menu-active);
	outline-offset: 2px;
}

.person-profile__photo {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	object-position: top center;
}

.person-profile__photo--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 360px;
	background: linear-gradient(160deg, #ece6df 0%, #d8d0c6 100%);
}

.person-profile__photo-icon {
	display: block;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.55);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.person-profile__name {
	margin: 0 0 12px;
	font: 600 clamp(1.75rem, 3vw, 2.25rem)/1.2 var(--font-display);
	color: var(--c-text-heading);
}

.person-profile__name .face-name__surname {
	text-transform: uppercase;
}

.person-profile__name .face-name__given {
	font-weight: 600;
	text-transform: none;
}

.person-profile__role {
	margin: 0 0 8px;
	font: 600 16px/1.4 var(--font-body);
	color: var(--c-primary);
}

.person-profile__honor {
	margin: 0 0 24px;
	font: 500 15px/1.45 var(--font-body);
	color: var(--c-text-muted);
}

.person-profile__bio {
	margin: 0;
}

.person-profile__bio p:first-child {
	margin-top: 0;
}

/* Ссылки в биографии и текстовых блоках раздела «Лица» */
body.muzteatr-faces .person-profile__bio a,
body.muzteatr-faces .person-bio a,
body.muzteatr-faces .inner-text--faces .inner-block a:not(.people-card__photo-link) {
	color: var(--c-primary);
	border-color: transparent;
	text-decoration: underline;
	text-decoration-color: rgba(166, 119, 55, 0.35);
	text-underline-offset: 0.15em;
	transition: color var(--t) var(--ease), text-decoration-color var(--t) var(--ease);
}

body.muzteatr-faces .person-profile__bio a:hover,
body.muzteatr-faces .person-profile__bio a:focus-visible,
body.muzteatr-faces .person-bio a:hover,
body.muzteatr-faces .person-bio a:focus-visible,
body.muzteatr-faces .inner-text--faces .inner-block a:not(.people-card__photo-link):hover,
body.muzteatr-faces .inner-text--faces .inner-block a:not(.people-card__photo-link):focus-visible {
	color: var(--c-primary-hover);
	text-decoration-color: currentColor;
}

.person-profile__bio table {
	width: 100%;
	margin: 1em 0;
	border-collapse: collapse;
}

.person-profile__bio td,
.person-profile__bio th {
	padding: 8px 10px;
	border: 1px solid var(--c-divider-light);
	vertical-align: top;
}

.person-bio__table-wrap {
	display: block;
	width: 100%;
	max-width: 100%;
	overflow-x: auto;
	margin: 1.25em 0 1.75em;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior-x: contain;
}

.person-bio__table {
	width: 100%;
	min-width: 560px;
	border-collapse: collapse;
	font: 500 15px/1.45 var(--font-body);
	color: var(--c-text);
}

.person-bio__table td,
.person-bio__table th {
	padding: 12px 14px;
	border-bottom: 1px solid var(--c-badge-light);
	vertical-align: top;
}

.person-bio__table tr:last-child td {
	border-bottom: 0;
}

.person-bio__table td:first-child {
	width: 38%;
	font-weight: 600;
	color: var(--c-text-heading);
}

.person-bio__table td:nth-child(2) {
	width: 36%;
	color: var(--c-text-muted);
}

.person-bio__table td:nth-child(3) {
	width: 26%;
}

.person-bio__table p {
	margin: 0 0 4px;
}

.person-bio__table p:last-child {
	margin-bottom: 0;
}

.person-bio__gallery {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	margin: 2em 0 0;
}

.person-bio__gallery-item {
	margin: 0;
	overflow: hidden;
	border-radius: 12px;
	background: var(--c-badge-light);
	box-shadow: var(--shadow-card);
}

.person-bio__gallery-btn {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: none;
	cursor: zoom-in;
}

.person-bio__gallery-btn:focus-visible {
	outline: 3px solid var(--c-menu-active);
	outline-offset: 2px;
}

.person-bio__gallery-img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

@media (max-width: 991px) {
	.person-profile {
		grid-template-columns: 1fr;
	}

	.person-profile__media {
		max-width: 360px;
	}
}

@media (max-width: 767px) {
	body.muzteatr-faces .site-content,
	body.muzteatr-faces .ast-container,
	body.muzteatr-faces .inner-page,
	body.muzteatr-faces .inner-page__wrap.container,
	body.muzteatr-faces .faces-layout,
	body.muzteatr-faces .faces-layout__main,
	body.muzteatr-faces .person-profile,
	body.muzteatr-faces .person-profile__body,
	body.muzteatr-faces .person-profile__bio,
	body.muzteatr-faces .person-bio {
		min-width: 0;
		max-width: 100%;
		box-sizing: border-box;
	}

	body.muzteatr-faces .inner-page__wrap.container {
		width: 100%;
		padding-inline: var(--container-pad, 20px);
		overflow-x: clip;
	}

	body.muzteatr-faces .breadcrumbs {
		max-width: 100%;
		font-size: 13px;
	}

	body.muzteatr-faces .breadcrumbs__list {
		flex-wrap: wrap;
		row-gap: 0.2em;
	}

	body.muzteatr-faces .breadcrumbs__item {
		min-width: 0;
		max-width: 100%;
	}

	body.muzteatr-faces .breadcrumbs__link,
	body.muzteatr-faces .breadcrumbs__current {
		overflow-wrap: anywhere;
		word-break: break-word;
	}

	body.muzteatr-faces .faces-nav {
		max-width: 100%;
	}

	body.muzteatr-faces .faces-layout,
	body.muzteatr-faces .faces-layout__main,
	body.muzteatr-faces .person-profile,
	body.muzteatr-faces .person-profile__body,
	body.muzteatr-faces .person-profile__bio {
		min-width: 0;
		max-width: 100%;
	}

	body.muzteatr-faces .person-profile__media {
		max-width: none;
		width: 100%;
	}

	body.muzteatr-faces .person-profile__photo {
		aspect-ratio: auto;
		height: auto;
		max-height: none;
		object-fit: contain;
		object-position: center top;
	}

	body.muzteatr-faces .person-profile__name {
		word-break: break-word;
		overflow-wrap: break-word;
		hyphens: auto;
		-webkit-hyphens: auto;
	}

	body.muzteatr-faces .person-profile__role,
	body.muzteatr-faces .person-profile__honor,
	body.muzteatr-faces .person-bio,
	body.muzteatr-faces .person-bio__section-title,
	body.muzteatr-faces .person-bio__timeline-role,
	body.muzteatr-faces .person-bio__press-item {
		word-break: break-word;
		overflow-wrap: break-word;
	}

	body.muzteatr-faces .person-bio {
		max-width: 100%;
		font-size: 15px;
	}

	body.muzteatr-faces .person-bio__table-wrap {
		margin-inline: 0;
	}

	body.muzteatr-faces .person-bio__table {
		min-width: 0;
		table-layout: fixed;
	}

	body.muzteatr-faces .person-bio__table td,
	body.muzteatr-faces .person-bio__table th,
	body.muzteatr-faces .person-profile__bio table td,
	body.muzteatr-faces .person-profile__bio table th {
		width: auto !important;
		word-break: break-word;
		overflow-wrap: anywhere;
		padding: 8px 6px;
		font-size: 13px;
	}

	body.muzteatr-faces .person-bio__table td:first-child {
		width: 34% !important;
	}

	body.muzteatr-faces .person-bio__table td:nth-child(2) {
		width: 33% !important;
	}

	body.muzteatr-faces .person-bio__table td:nth-child(3) {
		width: 33% !important;
	}
}

/* ================================================================
   .person-bio — форматированная биография персоны
   ================================================================ */
.person-bio {
	max-width: 820px;
	font: 400 17px/1.6 var(--font-body);
	color: var(--c-text);
}

.person-bio p {
	margin: 0 0 1em;
}

.person-bio p:last-child {
	margin-bottom: 0;
}

/* Хронология */
.person-bio__timeline {
	list-style: none;
	padding: 0;
	margin: 1.25em 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.person-bio__timeline-item {
	display: flex;
	gap: 16px;
	align-items: baseline;
	padding: 5px 0;
	border-bottom: 1px solid var(--c-divider-light, rgba(36, 27, 24, 0.07));
}

.person-bio__timeline-item:last-child {
	border-bottom: none;
}

.person-bio__timeline-year {
	font: 600 15px/1 var(--font-body);
	color: var(--c-primary);
	min-width: 90px;
	flex-shrink: 0;
}

.person-bio__timeline-role {
	font: 400 15px/1.5 var(--font-body);
	color: var(--c-text);
}

/* Подзаголовки разделов */
.person-bio__section-title {
	font: 700 1rem/1.3 var(--font-display);
	color: var(--c-text-heading);
	margin: 2em 0 0.7em;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	padding-bottom: 0.4em;
	border-bottom: 1px solid var(--c-primary);
}

/* Список работ */
.person-bio__works {
	list-style: none;
	padding: 0;
	margin: 0 0 1.5em;
}

.person-bio__works--cols {
	columns: 2;
	column-gap: 28px;
}

.person-bio__works li {
	break-inside: avoid;
	padding: 4px 0 4px 18px;
	position: relative;
	font-size: 15px;
	line-height: 1.5;
}

.person-bio__works li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 10px;
	width: 6px;
	height: 6px;
	background: var(--c-primary);
	border-radius: 50%;
}

/* Нумерованный подсписок */
.person-bio__sublist {
	padding-left: 1.5em;
	margin: 0 0 1.5em;
}

.person-bio__sublist li {
	padding: 3px 0;
	font-size: 15px;
	line-height: 1.5;
}

.person-bio__sublist li::marker {
	color: var(--c-primary);
	font-weight: 600;
}

/* Кнопка «Показать все» */
.person-bio__show-more {
	display: inline-block;
	background: none;
	border: 1px solid var(--c-primary);
	color: var(--c-primary);
	font: 500 13px/1 var(--font-body);
	padding: 7px 18px;
	border-radius: 20px;
	cursor: pointer;
	margin: 0.5em 0 1.5em;
	transition: background var(--t, 0.2s), color var(--t, 0.2s);
}

.person-bio__show-more:hover {
	background: var(--c-primary);
	color: #fff;
}

/* Список постановок (формат «Название»жанр + кредиты) */
.person-bio__prod-list {
	margin: 0.5em 0 1.5em;
}

.person-bio__prod {
	padding: 10px 0;
	border-bottom: 1px solid var(--c-divider-light, rgba(36, 27, 24, 0.07));
}

.person-bio__prod:last-child {
	border-bottom: none;
}

.person-bio__prod-title {
	margin: 0 0 3px;
	font: 600 15px/1.4 var(--font-body);
	color: var(--c-text-heading);
}

.person-bio__prod-title::before {
	content: '';
	display: inline-block;
	width: 6px;
	height: 6px;
	background: var(--c-primary);
	border-radius: 50%;
	margin-right: 8px;
	vertical-align: middle;
	flex-shrink: 0;
}

.person-bio__prod-credit {
	margin: 1px 0 0 14px;
	font: 400 13px/1.45 var(--font-body);
	color: var(--c-text-muted);
}

.person-bio__awards {
	list-style: none;
	padding: 0;
	margin: 0 0 1.5em;
}

.person-bio__awards li {
	padding: 4px 0 4px 18px;
	position: relative;
	font-size: 15px;
	line-height: 1.5;
}

.person-bio__awards li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 10px;
	width: 6px;
	height: 6px;
	background: var(--c-primary);
	border-radius: 50%;
}

.person-bio__press {
	list-style: none;
	padding: 0;
	margin: 0 0 1.5em;
}

.person-bio__press-item {
	padding: 8px 0;
	border-bottom: 1px solid var(--c-divider-light, rgba(36, 27, 24, 0.07));
	font: 400 15px/1.5 var(--font-body);
}

.person-bio__press-item:last-child {
	border-bottom: none;
}

body.muzteatr-faces .person-bio__press-item a {
	color: var(--c-primary) !important;
	text-decoration: underline !important;
	text-decoration-color: rgba(166, 119, 55, 0.35) !important;
	text-underline-offset: 0.15em;
}

body.muzteatr-faces .person-bio__press-item a:hover,
body.muzteatr-faces .person-bio__press-item a:focus-visible {
	color: var(--c-primary-hover) !important;
	text-decoration-color: currentColor !important;
}

@media (max-width: 767px) {
	.person-bio {
		font-size: 16px;
	}

	.person-bio__works--cols {
		columns: 1;
	}

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

@media (max-width: 479px) {
	.person-bio__gallery {
		grid-template-columns: 1fr;
	}
}

/* Lightbox — полноэкранный просмотр фото персоны */
.person-gallery__lightbox {
	position: fixed;
	inset: 0;
	width: min(1200px, calc(100vw - 48px));
	max-width: none;
	max-height: calc(100vh - 48px);
	margin: auto;
	padding: 56px 72px;
	border: 0;
	background: transparent;
	overflow: visible;
}

.person-gallery__lightbox::backdrop {
	background: rgba(0, 0, 0, .88);
}

.person-gallery__lightbox-figure {
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	min-height: min(70vh, 560px);
}

.person-gallery__lightbox-img {
	display: block;
	max-width: 100%;
	max-height: calc(100vh - 120px);
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 12px;
}

.person-gallery__lightbox-close {
	position: fixed;
	top: 20px;
	right: 20px;
	z-index: 2;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .16);
	color: #fff;
	cursor: pointer;
}

.person-gallery__lightbox-close::before,
.person-gallery__lightbox-close::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 18px;
	height: 2px;
	background: currentColor;
}

.person-gallery__lightbox-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.person-gallery__lightbox-close::after { transform: translate(-50%, -50%) rotate(-45deg); }

.person-gallery__lightbox-nav {
	position: fixed;
	top: 50%;
	z-index: 2;
	width: 55px;
	height: 55px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .16);
	color: #fff;
	cursor: pointer;
	transform: translateY(-50%);
	transition: background .2s ease;
}

.person-gallery__lightbox-nav:hover,
.person-gallery__lightbox-nav:focus-visible {
	background: rgba(255, 255, 255, .28);
}

.person-gallery__lightbox-nav--prev {
	left: max(12px, calc(50% - 620px));
}

.person-gallery__lightbox-nav--next {
	right: max(12px, calc(50% - 620px));
}

.person-gallery__lightbox-nav--prev::after,
.person-gallery__lightbox-nav--next::after {
	content: "‹";
	font: 700 28px/1 var(--font-body);
	color: #fff;
}

.person-gallery__lightbox-nav--next::after {
	content: "›";
}

.person-gallery__lightbox-nav[hidden] {
	display: none;
}
