/*
 * Страница врача по макету Figma.
 *
 * Классы uc-doc__*, исходные person__* из style.css не применяются.
 */

.uc-doc {
	overflow: visible;
	padding-bottom: 60px;
}

/* --------------------------------------------------------------- крошки -- */

.uc-doc__crumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	padding: 21px 0 28px;
}

.uc-doc__crumb {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 16px;
	line-height: 22px;
	color: #8C8F97;
}

.uc-doc__crumb:not(:last-child)::after {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #B0B0B0;
}

.uc-doc__crumb a {
	transition: color .2s ease;
}

.uc-doc__crumb a:hover {
	color: #030815;
}

.uc-doc__crumb--current {
	color: #030815;
}

/* ------------------------------------------------------- плавающее меню -- */

/* Прокрутка вниз — меню уезжает, вверх — возвращается.
   Отступ сверху считает скрипт: над ним стоит липкая шапка сайта. */
.uc-doc__nav {
	position: sticky;
	top: var(--uc-doc-nav-top, 16px);
	z-index: 20;
	transition: transform .25s ease, opacity .25s ease;
	display: flex;
	align-items: center;
	gap: 20px;
	min-height: 60px;
	padding: 10px 20px;
	border-radius: 16px;
	background: #F4F4F5;
}

.uc-doc__nav--hidden {
	transform: translateY(calc(-100% - var(--uc-doc-nav-top, 16px) - 12px));
	opacity: 0;
	pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
	.uc-doc__nav {
		transition: none;
	}
}

.uc-doc__nav-name {
	position: relative;
	padding-right: 20px;
	font-size: 15px;
	font-weight: 600;
	line-height: 21px;
	color: #212121;
	white-space: nowrap;
}

.uc-doc__nav-name::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 0;
	width: 1px;
	height: 18px;
	margin-top: -9px;
	background: #3A3F49;
}

.uc-doc__nav-list {
	display: flex;
	align-items: center;
	gap: 16px;
	overflow-x: auto;
	scrollbar-width: none;
}

.uc-doc__nav-list::-webkit-scrollbar {
	display: none;
}

.uc-doc__nav-link {
	font-size: 15px;
	line-height: 21px;
	color: #9398A1;
	white-space: nowrap;
	transition: color .2s ease;
}

.uc-doc__nav-link:hover,
.uc-doc__nav-link--active {
	font-weight: 600;
	color: #212121;
}

.uc-doc__nav-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-left: auto;
}

.uc-doc__nav-max,
.uc-doc__nav-book {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 40px;
	padding: 0 16px;
	border: none;
	border-radius: 12px;
	font-family: inherit;
	font-size: 15px;
	line-height: 21px;
	white-space: nowrap;
	cursor: pointer;
}

.uc-doc__nav-max {
	background: #363C4A;
	color: #fff;
}

.uc-doc__nav-book {
	background: #fff;
	font-weight: 500;
	color: #16181D;
}

/* ---------------------------------------------------------- первый блок -- */

.uc-doc__hero {
	display: grid;
	grid-template-columns: 504px minmax(0, 1fr);
	column-gap: 53px;
	align-items: start;
	padding-top: 56px;
}

.uc-doc__photo {
	border-radius: 20px;
	overflow: hidden;
	background: #E4E4E7;
}

.uc-doc__photo-img {
	display: block;
	width: 100%;
	height: auto;
}

.uc-doc__intro-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 24px;
}

.uc-doc__name {
	font-size: 32px;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: -0.64px;
	color: #212121;
}

.uc-doc__position {
	margin-top: 5px;
	font-size: 16px;
	line-height: 22px;
	color: #575C68;
}

.uc-doc__fact {
	margin-top: 9px;
	font-size: 16px;
	font-weight: 500;
	line-height: 22px;
	color: #030815;
}

.uc-doc__book {
	flex-shrink: 0;
	height: 60px;
	padding: 0 32px;
	border: none;
	border-radius: 16px;
	background: #363C4A;
	font-family: inherit;
	font-size: 16px;
	font-weight: 500;
	letter-spacing: -0.48px;
	color: #fff;
	cursor: pointer;
	transition: background .2s ease;
}

.uc-doc__book:hover {
	background: #16181D;
}

.uc-doc__badges {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
	margin-top: 16px;
}

.uc-doc__badge {
	padding: 16px;
	border-radius: 16px;
	background: #F4F4F5;
}

.uc-doc__badge-label {
	font-size: 14px;
	line-height: 19px;
	color: #666B73;
}

.uc-doc__badge-value {
	margin-top: 5px;
	font-size: 19px;
	font-weight: 600;
	line-height: 26px;
	color: #16181D;
}

.uc-doc__lead {
	margin-top: 16px;
	padding: 20px;
	border-radius: 16px;
	background: #F4F4F5;
	font-size: 15px;
	line-height: 1.6;
	color: #3D424B;
}

.uc-doc__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 42px;
}

.uc-doc__action {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 52px;
	padding: 0 22px;
	border: none;
	border-radius: 14px;
	background: #F4F4F5;
	font-family: inherit;
	font-size: 15px;
	line-height: 21px;
	color: #16181D;
	cursor: pointer;
	transition: background .2s ease;
}

.uc-doc__action--main {
	background: #2B303C;
	font-weight: 500;
	color: #fff;
}

.uc-doc__action--main:hover {
	background: #16181D;
}

.uc-doc__action--price {
	background: #E1F0FB;
}

/* ----------------------------------------------------------- информация -- */

.uc-doc__info {
	max-width: 832px;
	margin-top: 24px;
}

.uc-doc__info-title {
	padding-bottom: 15px;
	border-bottom: 1px solid #E7E7E7;
	font-size: 16px;
	line-height: 22px;
	color: #8C8F97;
}

.uc-doc__info-block {
	margin-top: 36px;
}

.uc-doc__info-title + .uc-doc__info-block {
	margin-top: 51px;
}

.uc-doc__info-heading {
	font-size: 24px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: -0.48px;
	color: #212121;
}

.uc-doc__info-list {
	margin-top: 16px;
}

.uc-doc__info-item {
	position: relative;
	padding-left: 16px;
	font-size: 16px;
	line-height: 22px;
	color: #3D424B;
}

.uc-doc__info-item + .uc-doc__info-item {
	margin-top: 10px;
}

.uc-doc__info-item::before {
	content: "";
	position: absolute;
	top: 9px;
	left: 0;
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: #3D424B;
}

.uc-doc__info-text {
	margin-top: 16px;
	font-size: 16px;
	line-height: 1.55;
	color: #3D424B;
}

.uc-doc__info-text p + p {
	margin-top: 14px;
}

/* --------------------------------------------------------------- блоки -- */

.uc-doc__section-title {
	font-size: 32px;
	font-weight: 700;
	line-height: 1.2;
	color: #212121;
}

.uc-doc__services {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 563px;
	gap: 32px;
	margin-top: 80px;
	padding: 44px 28px;
	border-radius: 20px;
	background: #F4F4F5;
}

.uc-doc__services-desc {
	margin-top: 24px;
	font-size: 16px;
	line-height: 22px;
	color: #575C68;
}

.uc-doc__services-list {
	display: flex;
	flex-wrap: wrap;
	align-content: flex-start;
	gap: 10px;
}

.uc-doc__service {
	display: block;
	padding: 8px 16px;
	border-radius: 999px;
	background: #fff;
	font-size: 15px;
	line-height: 22px;
	color: #16181D;
	transition: background .2s ease;
}

.uc-doc__service:hover {
	background: #E1F0FB;
}

.uc-doc__block {
	margin-top: 40px;
	padding: 44px 26px 28px;
	border-radius: 20px;
	background: #F4F4F5;
}

.uc-doc__block-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
}

.uc-doc__block-actions {
	display: flex;
	gap: 8px;
}

.uc-doc__ghost,
.uc-doc__solid {
	display: flex;
	align-items: center;
	height: 44px;
	padding: 0 18px;
	border-radius: 12px;
	font-size: 15px;
	line-height: 21px;
	white-space: nowrap;
}

.uc-doc__ghost {
	background: #fff;
	color: #16181D;
}

.uc-doc__solid {
	background: #16181D;
	color: #fff;
}

/* ------------------------------------------------------------- дипломы -- */

.uc-doc__diplomas {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 12px;
	margin-top: 28px;
}

.uc-doc__diploma-image {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 257 / 150;
	border-radius: 12px;
	background: #fff;
	overflow: hidden;
}

.uc-doc__diploma-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.uc-doc__diploma-caption {
	margin-top: 10px;
	font-size: 14px;
	line-height: 19px;
	color: #5C616B;
}

/* ----------------------------------------------------------------- цены -- */

.uc-doc__prices {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	margin-top: 28px;
}

.uc-doc__price {
	display: flex;
	align-items: center;
	gap: 16px;
	min-height: 55px;
	padding: 10px 13px 10px 16px;
	border-radius: 12px;
	background: #fff;
}

.uc-doc__price-name {
	flex: 1 1 auto;
	font-size: 15px;
	line-height: 21px;
	color: #16181D;
}

.uc-doc__price-value {
	font-size: 15px;
	font-weight: 600;
	line-height: 21px;
	color: #16181D;
	white-space: nowrap;
}

.uc-doc__price-book {
	flex-shrink: 0;
	height: 29px;
	padding: 0 14px;
	border: none;
	border-radius: 999px;
	background: #E1F0FB;
	font-family: inherit;
	font-size: 14px;
	color: #16181D;
	cursor: pointer;
	transition: background .2s ease;
}

.uc-doc__price-book:hover {
	background: #CFE7F8;
}

/* --------------------------------------------------------------- отзывы -- */

.uc-doc__reviews-wrap {
	margin-top: 48px;
}

/* Кнопка «Показать все …» нужна только на узком экране. */
.uc-doc__price-more {
	display: none;
}

/* Форма записи идёт следом за отзывами: в макете между ними 84 px. */
.uc-doc .person__register-card {
	margin-top: 84px;
}

.uc-doc__reviews-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.uc-doc__reviews-arrows {
	display: flex;
	gap: 8px;
}

.uc-doc__reviews-arrow {
	width: 44px;
	height: 44px;
	border: 1px solid #E3E4E8;
	border-radius: 50%;
	background: #fff;
	color: #16181D;
	cursor: pointer;
	transition: background .2s ease, opacity .2s ease;
}

.uc-doc__reviews-arrow:disabled {
	opacity: .35;
	cursor: default;
}

.uc-doc__reviews-arrow:not(:disabled):hover {
	background: #F4F4F5;
}

.uc-doc__reviews-arrow svg {
	display: block;
	margin: auto;
}

.uc-doc__reviews-arrow--prev svg {
	transform: rotate(180deg);
}

/* Отзывы идут лентой: в макете видно четыре карточки, остальные листаются. */
.uc-doc__reviews {
	display: flex;
	gap: 12px;
	margin-top: 28px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.uc-doc__reviews::-webkit-scrollbar {
	display: none;
}

.uc-doc__review {
	flex: 0 0 calc((100% - 36px) / 4);
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	padding: 20px;
	border-radius: 20px;
	background: #F4F4F5;
}

.uc-doc__review-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
}

.uc-doc__review-name {
	font-size: 17px;
	font-weight: 600;
	line-height: 23px;
	color: #16181D;
}

.uc-doc__review-date {
	font-size: 14px;
	line-height: 19px;
	color: #666B73;
	white-space: nowrap;
}

.uc-doc__review-stars {
	margin-top: 12px;
	font-size: 14px;
	line-height: 19px;
	letter-spacing: 1px;
	color: #F5A623;
}

.uc-doc__review-text {
	margin-top: 12px;
	font-size: 15px;
	line-height: 1.5;
	color: #3D424B;
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.uc-doc__review--open .uc-doc__review-text {
	display: block;
	overflow: visible;
}

.uc-doc__review-more {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: auto;
	padding-top: 14px;
	border: none;
	background: none;
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 19px;
	color: #16181D;
	cursor: pointer;
}

.uc-doc__review-caret {
	width: 0;
	height: 0;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 6px solid #9DA2AA;
	transition: transform .2s ease;
}

.uc-doc__review-more[aria-expanded="true"] .uc-doc__review-caret {
	transform: rotate(180deg);
}

/* ------------------------------------------------- кнопка вверх и панель -- */

.uc-doc__top[hidden] {
	display: none;
}

.uc-doc__top {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 30;
	width: 48px;
	height: 48px;
	border: none;
	border-radius: 50%;
	background: #363C4A;
	font-size: 20px;
	color: #fff;
	cursor: pointer;
	box-shadow: 0 8px 24px rgba(22, 24, 29, .2);
}

.uc-doc__bar {
	display: none;
}

/* -------------------------------------------------------------- экраны -- */

@media (max-width: 1440px) {
	.uc-doc__hero {
		grid-template-columns: 380px minmax(0, 1fr);
		column-gap: 32px;
	}

	.uc-doc__services {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	}

	.uc-doc__diplomas {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.uc-doc__review {
		flex-basis: calc((100% - 12px) / 2);
	}
}

@media (max-width: 1024px) {
	.uc-doc__hero {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 24px;
	}

	.uc-doc__photo {
		max-width: 420px;
	}

	.uc-doc__services {
		grid-template-columns: minmax(0, 1fr);
	}

	.uc-doc__prices {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 768px) {
	.uc-doc {
		padding-bottom: 96px;
	}

	.uc-doc__crumbs {
		padding: 12px 0 8px;
		font-size: 14px;
	}

	.uc-doc__crumb {
		font-size: 14px;
	}

	/* Липкое меню разделов — как в макете: прокручивается вбок. */
	.uc-doc__nav {
		top: 126px;
		gap: 12px;
		min-height: 56px;
		padding: 8px 12px;
		border-radius: 14px;
	}

	.uc-doc__nav-name,
	.uc-doc__nav-actions {
		display: none;
	}

	.uc-doc__nav-list {
		width: 100%;
		gap: 14px;
	}

	.uc-doc__hero {
		padding-top: 20px;
	}

	.uc-doc__photo {
		max-width: none;
	}

	.uc-doc__intro-top {
		flex-direction: column;
		gap: 16px;
	}

	.uc-doc__book {
		width: 100%;
		height: 54px;
	}

	.uc-doc__name {
		font-size: 24px;
		letter-spacing: -0.4px;
	}

	.uc-doc__badges {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		margin-top: 20px;
	}

	.uc-doc__badge:last-child:nth-child(odd) {
		grid-column: 1 / -1;
	}

	.uc-doc__actions {
		flex-direction: column;
	}

	.uc-doc__action {
		width: 100%;
	}

	.uc-doc__info {
		margin-top: 40px;
	}

	.uc-doc__info-block {
		margin-top: 28px;
	}

	.uc-doc__info-heading,
	.uc-doc__section-title {
		font-size: 22px;
	}

	.uc-doc__services,
	.uc-doc__block {
		margin-top: 24px;
		padding: 24px 16px;
	}

	/* Текст в кнопках не переносится, а «Все услуги по направлению» шире
	   половины экрана: вдвоём в строку они не влезали и вторая уезжала за
	   край карточки. Разрешаем перенос — когда места мало, кнопки встают
	   одна под другой и каждая занимает всю ширину. */
	.uc-doc__block-actions {
		width: 100%;
		flex-wrap: wrap;
	}

	.uc-doc__ghost,
	.uc-doc__solid {
		flex: 1 1 auto;
		justify-content: center;
	}

	.uc-doc .person__register-card {
		margin-top: 48px;
	}

	/* Видны четыре позиции, остальные открывает кнопка — как в мобильном макете. */
	.uc-doc__prices:not(.uc-doc__prices--all) .uc-doc__price:nth-child(n+5) {
		display: none;
	}

	.uc-doc__price-more {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 100%;
		height: 50px;
		margin-top: 12px;
		border: 1px solid #E3E4E8;
		border-radius: 15px;
		background: #fff;
		font-family: inherit;
		font-size: 15px;
		line-height: 21px;
		color: #16181D;
		cursor: pointer;
	}

	.uc-doc__price-more[hidden] {
		display: none;
	}

	/* Дипломы и отзывы уезжают в горизонтальную прокрутку. */
	.uc-doc__diplomas,
	.uc-doc__reviews {
		display: flex;
		gap: 12px;
		margin-right: -16px;
		padding-right: 16px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
	}

	.uc-doc__diplomas::-webkit-scrollbar,
	.uc-doc__reviews::-webkit-scrollbar {
		display: none;
	}

	.uc-doc__diploma {
		flex: 0 0 200px;
		scroll-snap-align: start;
	}

	.uc-doc__review {
		flex: 0 0 300px;
		scroll-snap-align: start;
	}

	.uc-doc__top {
		right: 16px;
		bottom: 88px;
	}

	/* Липкая панель записи — пункт 7 из блока форм макета. */
	.uc-doc__bar {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 30;
		display: flex;
		gap: 10px;
		padding: 12px 16px;
		border-top: 1px solid #EDEDEF;
		background: #fff;
	}

	/* Кнопка несёт класс .modal__btn, а ему в style.css задан text-align: left —
	   без этого «Записаться» прижимается к левому краю плашки. */
	.uc-doc__bar-book {
		display: flex;
		align-items: center;
		justify-content: center;
		flex: 1 1 auto;
		height: 50px;
		border: none;
		border-radius: 14px;
		background: #2B303C;
		font-family: inherit;
		font-size: 15px;
		font-weight: 500;
		color: #fff;
		cursor: pointer;
	}

	.uc-doc__bar-max {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 84px;
		border-radius: 14px;
		background: #F4F4F5;
		font-size: 15px;
		color: #16181D;
	}
}

/*
 * Блок «Цены по направлению» на телефоне.
 *
 * Строка прайса — название, цена и кнопка в один ряд. Кнопка не сжимается,
 * цена тоже (nowrap), поэтому на узком экране всё место отбирали они, а
 * название сжималось до лесенки из отдельных слов; кнопке и этого не
 * хватало, и она уезжала за край карточки. Раскладываем в две строки:
 * сверху название целиком, снизу цена слева и кнопка справа.
 */
@media (max-width: 768px) {
	.uc-doc__price {
		flex-wrap: wrap;
		gap: 6px 12px;
	}

	.uc-doc__price-name {
		flex: 1 1 100%;
	}

	.uc-doc__price-value {
		margin-right: auto;
	}

	/*
	 * Круглая кнопка «Запись» из исходных стилей лежит у нижнего края с
	 * z-index: 2, а закреплённая панель — с 30, и полностью её накрывала.
	 * Поднимаем над панелью (её высота 75 px) и выводим на передний план.
	 */
	body:has(.uc-doc__bar) .zapic_btn {
		bottom: 87px;
		z-index: 31;
	}
}
