/* Разделы, перенесённые со старых страниц услуг в шаблон «Обрезание степлером» (tools/to_template.py).
   Цвета, шрифты и размеры — переменные темы сайта, как у блоков шаблона. */

/* Разделы чередуются: голубой фон секции «Стоимость» и белый */
.restore-plain.e-con {
	background-color: #fff !important;
	background-image: none !important;
}

.restore-content {
	width: 100%;
	color: var(--e-global-color-text);
	font-family: var(--e-global-typography-text-font-family), sans-serif;
	font-size: var(--e-global-typography-text-font-size);
	line-height: var(--e-global-typography-text-line-height);
}
.restore-text {
	color: var(--e-global-color-text);
	font-family: var(--e-global-typography-text-font-family), sans-serif;
}
.restore-text p,
.restore-text ul,
.restore-text ol {
	margin: 0 0 1em;
}
.restore-text ul,
.restore-text ol {
	padding-left: 1.2em;
}
.restore-text a {
	color: var(--e-global-color-4a3c8232);
}
.restore-text h3,
.restore-subtitle {
	margin: 1.5em 0 0.75em;
	color: var(--e-global-color-dfc6690);
	font-family: var(--e-global-typography-primary-font-family), sans-serif;
	font-size: 22px;
	font-weight: 600;
	line-height: 1.3;
}
.restore-content > :first-child,
.restore-media__text > :first-child {
	margin-top: 0;
}

/* Текст и одна картинка — рядом */
.restore-media {
	display: grid;
	grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
	gap: 40px;
	align-items: center;
}
.restore-media__image,
.restore-figure {
	margin: 0;
}
.restore-figure {
	max-width: 720px;
	margin-bottom: 1.5em;
}
.restore-media__image img,
.restore-figure img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 30px;
}

/* Карточки (причины, симптомы, показания) — как «Преимущества нашего медцентра» */
.restore-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 28px 40px;
	margin-bottom: 1.5em;
}
.restore-card {
	display: flex;
	gap: 16px;
	align-items: flex-start;
}
.restore-card__icon {
	flex: 0 0 40px;
	color: var(--e-global-color-dfc6690);
	font-size: 32px;
	line-height: 1;
}
.restore-card__icon img {
	width: 40px;
	height: 40px;
	object-fit: contain;
}
.restore-card__title {
	margin-bottom: 6px;
	color: var(--e-global-color-dfc6690);
	font-size: 18px;
	font-weight: 600;
	line-height: 1.3;
}
.restore-card p {
	margin: 0;
}

.restore-list {
	display: grid;
	gap: 10px;
	margin: 0 0 1.5em;
	padding: 0;
	list-style: none;
}
.restore-list li {
	position: relative;
	padding-left: 28px;
}
.restore-list li::before {
	content: "\f00c";
	position: absolute;
	left: 0;
	color: var(--e-global-color-dfc6690);
	font-family: "Font Awesome 5 Free";
	font-weight: 900;
}

.restore-steps {
	display: grid;
	gap: 18px;
	margin: 0 0 1.5em;
	padding: 0;
	list-style: none;
	counter-reset: step;
}
.restore-steps li {
	position: relative;
	padding-left: 50px;
	counter-increment: step;
}
.restore-steps li::before {
	content: counter(step);
	position: absolute;
	top: 0;
	left: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--e-global-color-dfc6690);
	color: #fff;
	font-weight: 600;
}
.restore-steps strong {
	display: block;
	margin-bottom: 4px;
	color: var(--e-global-color-text);
}
.restore-steps p {
	margin: 0;
}

.restore-content .elementor-widget-accordion {
	margin-bottom: 1.5em;
}

.restore-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 16px;
}
.restore-gallery img {
	display: block;
	width: 100%;
	height: 240px;
	object-fit: cover;
	border-radius: 20px;
}

/* Первый экран без картинки (страницы меню, статьи): высоту задавала картинка — без неё заголовок
   прижимался к шапке, а кнопка — к волне внизу */
.restore-hero-text.e-con {
	--padding-top: 60px;
	--padding-bottom: 130px;
}
@media (max-width: 767px) {
	.restore-hero-text.e-con {
		--padding-top: 32px;
		--padding-bottom: 90px;
	}
}

/* Первый экран: вступление вместо списка преимуществ */
.restore-hero-lead p {
	font-family: var(--e-global-typography-text-font-family), sans-serif;
	margin: 0;
	color: #fff;
	font-size: 18px;
	line-height: 1.5;
}

.restore-review-name {
	margin: 12px 0 0;
	color: var(--e-global-color-dfc6690);
	font-weight: 600;
}
.restore-price-note {
	margin-top: 24px;
}

@media (max-width: 767px) {
	.restore-media {
		grid-template-columns: 1fr;
		gap: 24px;
	}
	.restore-gallery img {
		height: 200px;
	}
}

/* Короткие пункты (бывшие карточки без иконок) — список в две колонки */
.restore-list--columns {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px 40px;
}
@media (max-width: 767px) {
	.restore-list--columns {
		grid-template-columns: 1fr;
	}
}

/* Описание пункта прайса («Включает: …») — под названием услуги */
.restore-price-desc {
	display: block;
	margin-top: 4px;
	font-size: 14px;
	opacity: 0.8;
}

/* Ссылки в перенесённом тексте — фирменного синего, а не малиновые из темы Hello */
[data-elementor-type="wp-page"] .elementor-widget-text-editor a,
.restore-content a:not(.elementor-button) {
	color: var(--e-global-color-4a3c8232);
}

/* Раздел слева от «Специалистов» вместо раскрывающегося списка */
.restore-left-title {
	margin-top: 0;
	font-size: 26px;
}

/* «Специалисты» без раздела рядом — во всю ширину */
.restore-doctors-wide .elementor-widget-template {
	--container-widget-width: 100%;
	width: 100% !important;
	max-width: 100%;
}
.restore-doctors-wide .elementor-14408 .e-con {
	--content-width: 100% !important;
}
.restore-doctors-fit .swiper-pagination {
	display: none;
}
.restore-included-note,
.restore-faq-note {
	margin-top: 20px;
}
.restore-content blockquote,
.restore-text blockquote {
	margin: 0 0 1em;
	padding: 4px 0 4px 20px;
	border-left: 3px solid var(--e-global-color-dfc6690);
	font-style: italic;
}
.restore-doctors-fit .swiper-wrapper {
	justify-content: center;
}
/* Elementor не показывает больше карточек, чем врачей, и растягивает одну на всю ширину */
@media (min-width: 1025px) {
	.restore-doctors-fit .swiper-slide {
		max-width: calc((100% - 40px) / 3);
	}
}

/* Страницы главного меню (tools/menu_pages.py) */

/* «Врачи»: карточки «Специалистов» шаблона сеткой */
.restore-doctor-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 30px;
}
/* фон и поля карточки — как у слайда карусели шаблона (:where(… .swiper-slide) > .e-con) */
.restore-doctor-grid__item > .e-con {
	height: 100%;
	background-image: linear-gradient(180deg, #cdeaff4d 0%, var(--e-global-color-88f6ce9) 100%);
	--border-radius: 8px;
	--padding-top: 20px;
	--padding-right: 20px;
	--padding-bottom: 20px;
	--padding-left: 20px;
}

/* «Результаты»: фото «до/после» целиком, а не обрезанные квадратом */
.restore-gallery--photos img {
	height: auto;
	aspect-ratio: 7 / 10;
}

/* «О клинике»: оборудование — снимок целиком и подпись под ним */
.restore-gallery--captions img {
	object-fit: contain;
	background: #fff;
}
.restore-gallery__caption {
	display: block;
	margin-top: 8px;
	color: var(--e-global-color-text);
	font-size: 15px;
	text-align: center;
}

/* «Статьи», «Отзывы»: карточки записей */
.restore-posts {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 30px;
}
.restore-post {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 4px 24px rgba(16, 64, 128, 0.08);
}
.restore-post__image img {
	display: block;
	width: 100%;
	height: 220px;
	object-fit: cover;
}
.restore-post__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 10px;
	padding: 24px;
}
.restore-post__date {
	font-size: 14px;
	opacity: 0.7;
}
.restore-post__title {
	margin: 0;
	font-family: var(--e-global-typography-primary-font-family), sans-serif;
	font-size: 19px;
	font-weight: 600;
	line-height: 1.3;
}
.restore-content .restore-post__title a {
	color: var(--e-global-color-dfc6690);
}
.restore-post p {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 4;
}
.restore-content .restore-post__more {
	margin-top: auto;
	font-weight: 600;
}

/* «Контакты»: адрес и связь рядом с картой */
.restore-contacts {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
	gap: 40px;
}
.restore-contacts__address {
	margin: 0;
	font-size: 18px;
}
.restore-contacts__list {
	display: grid;
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 18px;
}
.restore-content .restore-contacts__list a {
	display: flex;
	gap: 14px;
	align-items: center;
	color: var(--e-global-color-text);
}
.restore-contacts__list i {
	width: 22px;
	color: var(--e-global-color-dfc6690);
	font-size: 20px;
	text-align: center;
}
.restore-contacts__map iframe {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 420px;
	border: 0;
	border-radius: 30px;
}

/* «Запись на перевязку»: виджет онлайн-записи */
.restore-booking iframe {
	display: block;
	width: 100%;
	min-height: 640px;
	border: 0;
}

@media (max-width: 767px) {
	.restore-contacts {
		grid-template-columns: 1fr;
	}
	.restore-contacts__map iframe {
		min-height: 320px;
	}
	/* на телефоне расписание записи идёт столбиком и выше */
	.restore-booking iframe {
		min-height: 1000px;
	}
}

/* Статьи (tools/articles.py): текст слева, справа врач, проверивший статью, и оглавление — как у оригинала */
.restore-article {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	gap: 60px;
	align-items: start;
}
.restore-article__text {
	max-width: 820px;
	font-size: 18px;
	line-height: 1.65;
}
.restore-article__text p,
.restore-article__text ul,
.restore-article__text ol {
	margin: 0 0 1em;
}
.restore-article__text ul,
.restore-article__text ol {
	padding-left: 1.3em;
}
.restore-article__text li + li {
	margin-top: 0.35em;
}
.restore-article__text h2,
.restore-article__text h3 {
	margin: 1.6em 0 0.6em;
	color: var(--e-global-color-dfc6690);
	font-family: var(--e-global-typography-primary-font-family), sans-serif;
	font-weight: 600;
	line-height: 1.25;
	scroll-margin-top: 110px;
}
.restore-article__text h2 {
	font-size: 30px;
}
.restore-article__text h3 {
	font-size: 22px;
}
.restore-article__text > :first-child {
	margin-top: 0;
}
.restore-article__text blockquote {
	margin: 0 0 1em;
	padding: 16px 24px;
	border-left: 3px solid var(--e-global-color-dfc6690);
	border-radius: 0 20px 20px 0;
	background: var(--e-global-color-88f6ce9);
}
.restore-article__text blockquote p:last-child {
	margin-bottom: 0;
}
.restore-article__figure {
	margin: 0 0 1.5em;
}
.restore-article__figure img {
	display: block;
	max-width: 100%;
	height: auto;
	border-radius: 20px;
}
.restore-article__figures {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: flex-start;
	margin-bottom: 1.5em;
}
.restore-article__figures .restore-article__figure {
	flex: 0 1 auto;
	margin: 0;
}
.restore-article__video {
	margin: 0 0 1.5em;
}
.restore-article__video iframe {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	border: 0;
	border-radius: 20px;
}

/* Мнение врача (блок Expert Review) */
.restore-expert {
	margin: 0 0 1.5em;
	padding: 24px;
	border-radius: 20px;
	background-image: linear-gradient(180deg, #cdeaff4d 0%, var(--e-global-color-88f6ce9) 100%);
}
.restore-expert__head {
	display: flex;
	gap: 16px;
	align-items: center;
	margin-bottom: 12px;
}
.restore-expert__photo img {
	display: block;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	object-fit: cover;
}
.restore-expert__name {
	font-family: var(--e-global-typography-primary-font-family), sans-serif;
	font-size: 19px;
	font-weight: 600;
	line-height: 1.3;
}
.restore-content .restore-expert__name a {
	color: var(--e-global-color-text);
}
.restore-expert__role {
	font-size: 15px;
	opacity: 0.75;
}
.restore-expert p {
	margin: 0 0 16px;
}
.restore-content .restore-expert__button {
	border-radius: 8px;
	background-color: var(--e-global-color-dfc6690);
	color: #fff;
	font-size: 16px;
}

/* Правая колонка: «Проверено и опубликовано», ниже оглавление — оно едет вместе с текстом */
/* «body, html { overflow-x: hidden }» из своего CSS сайта делает body контейнером прокрутки — тогда sticky
   не работает; clip так же прячет вылезающее вбок, но прокрутку не заводит */
html:has(.restore-article),
html:has(.restore-article) body {
	overflow-x: clip;
}
.restore-article__aside {
	display: flex;
	flex-direction: column;
	gap: 30px;
	align-self: stretch;
}
.restore-toc__title {
	margin-bottom: 14px;
	color: var(--e-global-color-dfc6690);
	font-family: var(--e-global-typography-primary-font-family), sans-serif;
	font-size: 20px;
	font-weight: 600;
}
.restore-toc {
	position: sticky;
	z-index: 1;
	top: 100px;
	max-height: calc(100vh - 130px);
	overflow: auto;
	padding: 24px;
	border-radius: 20px;
	background: var(--e-global-color-88f6ce9);
}
.restore-toc ol {
	display: grid;
	gap: 10px;
	margin: 0;
	padding-left: 1.3em;
	font-size: 16px;
	line-height: 1.4;
}
.restore-content .restore-toc a {
	color: var(--e-global-color-text);
}
.restore-content .restore-toc a:hover {
	color: var(--e-global-color-dfc6690);
}
.restore-article__author .restore-doctor-grid {
	grid-template-columns: 1fr;
}

/* Телефон и планшет: оглавление над текстом, врач — под ним */
@media (max-width: 1024px) {
	.restore-article {
		display: flex;
		flex-direction: column;
		gap: 30px;
	}
	.restore-article__aside {
		display: contents;
	}
	.restore-toc {
		position: static;
		order: -1;
		max-height: none;
	}
	.restore-article__author {
		width: 100%;
		max-width: 400px;
	}
}
@media (max-width: 767px) {
	.restore-article__text {
		font-size: 16px;
	}
	.restore-article__text h2 {
		font-size: 24px;
	}
	.restore-article__text h3 {
		font-size: 20px;
	}
}
