/*
 * 03-sections.css — Секции страницы: две колонки, «О процедуре» и зоны, «Преимущества», вкладки и этапы, «Оборудование», «Мнение врача», «Стоимость».
 * Порядок подключения файлов важен: см. MLD_Plugin::STYLES.
 */

/* ---------- Две колонки: плашка + фото ---------- */

.mld-duo {
	display: grid;
	grid-template-columns: 1fr 1fr;
	margin: 0;
}

.mld-duo--single { grid-template-columns: 1fr; }
.mld-duo--single .mld-panel { padding-right: max(var(--mld-pad), calc(50% + var(--mld-pad))); }

.mld-panel {
	padding: 63px var(--mld-pad) 63px;
	min-width: 0;
}

.mld-panel--grey { background: var(--mld-grey); }
.mld-panel--warm { background: var(--mld-warm); }

.mld-about .mld-panel { min-height: 720px; }

/* «О процедуре» уходит в правый край экрана, «Оборудование» в левый.
   Сторона у поля скруглена, как кнопки и чипы. */
.mld-about .mld-duo { margin-right: calc(var(--mld-gutter) * -1); }
.mld-about .mld-panel { border-radius: var(--mld-radius) 0 0 var(--mld-radius); }
.mld-about .mld-duo--single .mld-panel { border-radius: var(--mld-radius) 0 0 var(--mld-radius); }

.mld-device .mld-duo { margin-left: calc(var(--mld-gutter) * -1); }
.mld-device .mld-panel { border-radius: 0 var(--mld-radius) var(--mld-radius) 0; }
.mld-device .mld-panel { min-height: 660px; }

.mld-duo__media {
	position: relative;
	min-height: 100%;
	overflow: hidden;
	background: var(--mld-grey);
}

.mld-duo__media--warm {
	background: linear-gradient(180deg, color-mix(in srgb, var(--mld-accent) 55%, #fff) 0%, color-mix(in srgb, var(--mld-accent) 100%, #b98e64 25%) 100%);
}

.mld-cover {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100% !important;
	object-fit: cover;
}


.mld-panel .mld-h2 { margin-bottom: 35px; }

.mld-rich { max-width: 552px; }
.mld-rich > * + * { margin-top: 1.45em !important; }
.mld-rich ul,
.mld-rich ol { margin: 0; padding-left: 1.2em; }
.mld-rich strong,
.mld-rich b { font-weight: 500; }

.mld-panel .mld-btn { margin-top: 36px; }

/* Зоны */
.mld-zones { margin-top: 36px; max-width: 552px; }

.mld-zones__label {
	display: block;
	margin-bottom: 14px;
	font-size: 12px;
	line-height: 1.3;
	opacity: .6;
}

.mld-zones__list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 8px;
}

/* Зоны: при наведении под курсором переливается мягкий градиент,
   после ухода мыши он гаснет с задержкой, поэтому за курсором остаётся след. */
.mld-zone {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	cursor: default;
	transition: color .5s ease .2s, border-color .5s ease .2s;
}

.mld-zone::before,
.mld-zone::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	border-radius: inherit;
	opacity: 0;
	pointer-events: none;
	transition: opacity 1s ease .25s;
}

.mld-zone::before {
	background: radial-gradient(90px circle at var(--mx, 50%) var(--my, 50%), var(--mld-accent) 0%, color-mix(in srgb, var(--mld-accent) 35%, transparent) 55%, transparent 100%);
}

.mld-zone::after {
	background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .7) 50%, transparent 70%);
	background-size: 250% 100%;
	background-position: 120% 0;
}

.mld-zone:hover,
.mld-zone.is-hot { color: var(--mld-heading); border-color: var(--mld-accent); transition-delay: 0s; }

.mld-zone:hover::before,
.mld-zone.is-hot::before { opacity: 1; transition: opacity .25s ease; }

.mld-zone:hover::after { opacity: 1; transition: opacity .25s ease; animation: mld-sheen 1.6s ease-in-out infinite; }

@keyframes mld-sheen { from { background-position: 120% 0; } to { background-position: -120% 0; } }

/* Большой номер этапа: еле заметный градиентный перелив, который рассеивается */
.mld-steps__item::after {
	color: transparent;
	background: linear-gradient(120deg, var(--mld-heading) 0%, var(--mld-heading) 30%, var(--mld-accent) 45%, #fff 50%, var(--mld-accent) 55%, var(--mld-heading) 70%, var(--mld-heading) 100%);
	background-size: 300% 100%;
	background-position: 100% 0;
	-webkit-background-clip: text;
	background-clip: text;
	filter: blur(0);
}

.mld-steps__item:hover::after { animation: mld-ghost 2.2s ease-out both; }

@keyframes mld-ghost {
	0%   { background-position: 100% 0; filter: blur(3px); opacity: .04; }
	35%  { opacity: .2; filter: blur(0); }
	100% { background-position: 0 0; opacity: .09; filter: blur(0); }
}

@media (prefers-reduced-motion: reduce) {
	.mld-zone:hover::after,
	.mld-steps__item:hover::after { animation: none; }
}

/* ---------- 3. Преимущества ---------- */

.mld-adv__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
}

.mld-card {
	min-height: 217px;
	padding: 25px;
	border: 1px solid var(--mld-line);
	border-radius: 24px;
	background: var(--mld-bg);
	transition: border-color .25s ease, background-color .25s ease;
}

.mld-card:hover { border-color: var(--mld-dark); }

.mld .mld-card__title {
	font-size: 20px;
	line-height: 1.3;
	font-weight: var(--mld-head-weight);
	letter-spacing: 1px;
	text-transform: uppercase;
	overflow-wrap: anywhere;
	hyphens: auto;
}

.mld-card__text {
	margin-top: 18px !important;
	font-size: 14px;
	line-height: 1.45;
}

/* ---------- 4. Вкладки ---------- */

.mld-tabs__bar {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 30px;
}

.mld .mld-tabs__btn {
	padding: 11px 20px;
	font-size: 14px;
}

.mld-tabs__acc { display: none; }

.mld-tabs__panel { display: none; }
.mld-tabs__panel.is-open { display: block; }

.mld-tabs__panel.is-open .mld-tabs__inner { animation: mld-fade .35s ease both; }

/* Список: строки с тонкой линией, как в прайсе */
.mld-list {
	margin: 0;
	padding: 0;
	list-style: none;
	columns: 2;
	column-gap: 48px;
	border-top: 1px solid var(--mld-line);
}

.mld-list li {
	break-inside: avoid;
	padding: 15px 0 15px 26px;
	border-bottom: 1px solid var(--mld-line);
	position: relative;
	font-size: var(--mld-row);
	line-height: 1.3;
	margin: 0;
}

.mld-list li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: 1.35em;
	width: 12px;
	height: 1px;
	background: var(--mld-dark);
}

/* Этапы: номер-пилюля, при наведении из неё выезжает флажок «этап»,
   карточка приподнимается, а большой номер на фоне проявляется. */
.mld-steps {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: none;
}

.mld-steps__item {
	position: relative;
	display: block;
	margin: 0;
	padding: 28px 28px 32px;
	border: 1px solid var(--mld-line);
	border-radius: 24px;
	background: var(--mld-bg);
	overflow: hidden;
	transition: transform .35s cubic-bezier(.2, .7, .3, 1), border-color .35s ease, box-shadow .35s ease;
}

/* большой номер на фоне */
.mld-steps__item::after {
	content: attr(data-n);
	position: absolute;
	right: 18px;
	bottom: -22px;
	font-size: 120px;
	line-height: 1;
	font-weight: 300;
	letter-spacing: -4px;
	color: var(--mld-heading);
	opacity: .04;
	pointer-events: none;
	transform: translateY(14px);
	transition: opacity .45s ease, transform .45s cubic-bezier(.2, .7, .3, 1);
}

.mld-steps__head {
	position: relative;
	display: flex;
	align-items: center;
	margin-bottom: 22px;
	height: 40px;
}

.mld-steps__num {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 56px;
	height: 40px;
	padding: 0 14px;
	border-radius: 30px;
	background: var(--mld-dark);
	color: #fff;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 1px;
	transition: background-color .35s ease, color .35s ease;
}

/* флажок выезжает из-под номера */
.mld-steps__flag {
	position: relative;
	display: inline-flex;
	align-items: center;
	height: 40px;
	margin-left: -24px;
	padding: 0 18px 0 34px;
	border-radius: 0 30px 30px 0;
	background: var(--mld-accent);
	color: var(--mld-heading);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	white-space: nowrap;
	clip-path: inset(0 100% 0 0 round 0 30px 30px 0);
	transition: clip-path .45s cubic-bezier(.2, .7, .3, 1);
}

.mld-steps__item:hover,
.mld-steps__item:focus-within {
	transform: translateY(-6px);
	border-color: var(--mld-dark);
	box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .35);
}

.mld-steps__item:hover::after { opacity: .09; transform: none; }
.mld-steps__item:hover .mld-steps__flag { clip-path: inset(0 0 0 0 round 0 30px 30px 0); }

.mld .mld-steps__title {
	margin: 0 0 12px;
	font-family: var(--mld-head-font);
	font-size: 18px;
	line-height: 1.3;
	font-weight: var(--mld-head-weight);
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--mld-heading);
}

.mld-steps__text { position: relative; font-size: 14px; line-height: 1.45; }

/* на телефоне наведения нет: флажок показан сразу, выезжает при появлении карточки */
@media (hover: none) {
	.mld-steps__flag { clip-path: inset(0 0 0 0 round 0 30px 30px 0); }
	.mld-js .mld-reveal:not(.is-in) .mld-steps__flag { clip-path: inset(0 100% 0 0 round 0 30px 30px 0); }
	.mld-steps__flag { transition-delay: .4s; }
}

@media (prefers-reduced-motion: reduce) {
	.mld-steps__item,
	.mld-steps__item::after,
	.mld-steps__flag { transition: none; }
}

.mld-note {
	margin-top: 20px !important;
	padding: 18px 24px;
	background: var(--mld-grey);
	font-size: var(--mld-small);
	line-height: 1.45;
	max-width: 900px;
}

/* ---------- 5. Оборудование ---------- */

.mld-specs {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 10px;
	margin: 36px 0 0;
	max-width: 620px;
}

.mld-specs__row {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 18px 20px 20px;
	border: 1px solid color-mix(in srgb, var(--mld-dark) 14%, transparent);
	border-radius: 20px;
	background: color-mix(in srgb, var(--mld-bg) 65%, transparent);
	transition: background-color .25s ease, border-color .25s ease;
}

.mld-specs__row:hover { background: var(--mld-bg); border-color: var(--mld-dark); }

.mld-specs dt {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 12px;
	line-height: 1.35;
	font-weight: 500;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--mld-heading);
}

.mld-specs dt::before {
	content: "";
	flex: 0 0 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--mld-accent);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--mld-accent) 35%, transparent);
}

.mld-specs dd { margin: 0; font-size: 13px; line-height: 1.45; }

/* ---------- 6. Мнение врача ---------- */

.mld-doc {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: 48px;
	align-items: center;
	margin: 0;
	padding: 24px 64px 24px 24px;
	border-radius: var(--mld-radius);
	background: var(--mld-grey);
	overflow: hidden;
	isolation: isolate;
}

/* мягкое пятно акцентного цвета, плывёт за курсором при наведении */
.mld-doc::before {
	content: "";
	position: absolute;
	z-index: -1;
	left: var(--mx, 30%);
	top: var(--my, 40%);
	width: 520px;
	height: 520px;
	border-radius: 50%;
	background: radial-gradient(circle, color-mix(in srgb, var(--mld-accent) 45%, transparent) 0%, transparent 65%);
	transform: translate(-50%, -50%);
	opacity: .5;
	transition: opacity .6s ease, left .9s cubic-bezier(.2, .7, .3, 1), top .9s cubic-bezier(.2, .7, .3, 1);
	pointer-events: none;
}

.mld-doc:hover::before { opacity: 1; }

.mld-doc--single { grid-template-columns: 1fr; padding: 24px; }

.mld-doc__photo {
	position: relative;
	aspect-ratio: 4 / 5;
	max-height: 640px;
	border-radius: calc(var(--mld-radius) - 12px);
	overflow: hidden;
	background: var(--mld-bg);
}

.mld .mld-doc__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 15%;
	transition: transform 1.2s cubic-bezier(.2, .7, .3, 1);
}

.mld-doc:hover .mld-doc__img { transform: scale(1.04); }

.mld-doc__body { min-width: 0; }

/* цитата в облачке: острый угол смотрит на фото */
.mld-doc__quote {
	position: relative;
	margin: 0;
	padding: 56px 48px 44px;
	border: 0;
	border-radius: 32px 32px 32px 6px;
	background: var(--mld-bg);
	font-size: 20px;
	line-height: 1.45;
	font-weight: 300;
	color: var(--mld-heading);
	quotes: none;
	box-shadow: 0 24px 50px -36px rgba(0, 0, 0, .35);
	transition: transform .5s cubic-bezier(.2, .7, .3, 1), box-shadow .5s ease;
}

.mld-doc__quote::before { content: none; }
.mld-doc__quote p { margin: 0; }
.mld-doc__quote p + p { margin-top: 1em; }

.mld-doc__mark {
	position: absolute;
	top: -26px;
	left: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	padding-top: 22px;
	border-radius: 50%;
	background: var(--mld-dark);
	color: #fff;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 60px;
	line-height: 1;
	transition: transform .6s cubic-bezier(.3, 1.6, .5, 1), background-color .4s ease;
}

.mld-doc:hover .mld-doc__quote { transform: translateY(-6px); box-shadow: 0 34px 60px -36px rgba(0, 0, 0, .45); }
.mld-doc:hover .mld-doc__mark { transform: rotate(-12deg) scale(1.08); background: var(--mld-accent); color: var(--mld-heading); }

.mld-doc .mld-who { margin-top: 28px; padding-left: 48px; }

.mld-who { display: flex; flex-direction: column; gap: 6px; }

.mld-who__name {
	font-size: 18px;
	line-height: 1.3;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--mld-heading);
	text-decoration: none;
}

a.mld-who__name:hover { text-decoration: underline; text-underline-offset: 4px; }
.mld-who__pos { font-size: 14px; color: var(--mld-muted); }

@media (prefers-reduced-motion: reduce) {
	.mld-doc::before,
	.mld-doc__img,
	.mld-doc__quote,
	.mld-doc__mark { transition: none; }
}

/* ---------- 7. Стоимость ---------- */

.mld-price .mld-head { margin-bottom: 48px; }
.mld-price__groups { display: flex; flex-wrap: wrap; gap: 8px; margin: -18px 0 24px; }
.mld .mld-chip { padding: 9px 16px; font-size: 14px; }

.mld-price__group { border-top: 1px solid var(--mld-line); }
.mld-price__group[hidden] { display: none; }

.mld .mld-price__gtitle {
	display: none;
	margin: 0;
	padding: 34px 0 12px;
	border-bottom: 1px solid var(--mld-line);
	font-family: var(--mld-font);
	font-size: 14px;
	line-height: 1.3;
	font-weight: 500;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: var(--mld-heading);
}

.mld-price.is-all .mld-price__group { border-top: 0; }
.mld-price.is-all .mld-price__gtitle { display: block; }
.mld-price.is-all .mld-price__group:first-of-type .mld-price__gtitle { padding-top: 6px; }

.mld-row {
	display: grid;
	grid-template-columns: 1fr minmax(120px, 18%) auto;
	align-items: center;
	min-height: 62px;
	border-bottom: 1px solid var(--mld-line);
	font-size: var(--mld-row);
	line-height: 1.3;
}

.mld-row__name { padding: 15px 20px 15px 0; }
.mld-row__note { margin-left: 0; }

.mld-row__price {
	padding: 15px 20px;
	text-align: right;
	white-space: nowrap;
}

.mld-row__price s { margin-right: 10px; opacity: .45; font-size: .85em; }

.mld .mld-row__add {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-width: 112px;
	height: auto;
	margin: 0;
	padding: 8px 16px;
	border: 1px solid var(--mld-line);
	border-radius: 30px;
	background: transparent;
	color: var(--mld-heading);
	font-family: var(--mld-font);
	font-size: 12px;
	line-height: 1.3;
	font-weight: 500;
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.mld .mld-row__add::before {
	content: "+";
	font-size: 15px;
	line-height: 1;
	font-weight: 300;
}

.mld .mld-row__add:hover { border-color: var(--mld-dark); background: var(--mld-dark); color: #fff; }

/* milfey-booking ставит is-added / aria-pressed, когда позиция в заявке */
.mld .mld-row__add.is-added,
.mld .mld-row__add[aria-pressed="true"] { background: var(--mld-dark); border-color: var(--mld-dark); color: #fff; }
.mld .mld-row__add.is-added::before,
.mld .mld-row__add[aria-pressed="true"]::before { content: "✓"; font-size: 12px; }

.mld .mld-row__add:focus-visible { outline: 2px solid var(--mld-heading); outline-offset: 2px; }

/* Двойная кнопка: «Добавить» (в заявку) + «Оформить» (в заявку и сразу открыть окно).
   «Оформить» — тёмный градиент с акцентным цветом, который медленно перетекает, и блик раз в несколько секунд. */
.mld-row__actions {
	display: inline-flex;
	align-items: stretch;
	justify-self: end;
	border-radius: 30px;
}
.mld .mld-row__actions .mld-row__add {
	min-width: 104px;
	border-right: 0;
	border-radius: 30px 0 0 30px;
}
.mld .mld-row__buy {
	position: relative;
	display: inline-flex;
	height: auto;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 8px 18px 8px 16px;
	border: 0;
	border-radius: 0 30px 30px 0;
	overflow: hidden;
	isolation: isolate;
	background: linear-gradient(110deg,
		var(--mld-dark) 0%,
		color-mix(in srgb, var(--mld-accent) 45%, var(--mld-dark)) 35%,
		var(--mld-dark) 60%,
		color-mix(in srgb, var(--mld-accent) 30%, var(--mld-dark)) 85%,
		var(--mld-dark) 100%);
	background-size: 300% 100%;
	color: #fff;
	font-family: var(--mld-font);
	font-size: 12px;
	line-height: 1.3;
	font-weight: 500;
	cursor: pointer;
	animation: mld-flow 7s ease-in-out infinite alternate;
	transition: box-shadow .3s ease, transform .15s ease;
}
/* блик */
.mld .mld-row__buy::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .38) 50%, transparent 65%);
	transform: translateX(-120%);
	animation: mld-sheen 4.5s ease-in-out infinite;
}
.mld .mld-row__buy .mlb-buy__label::after {
	content: "→";
	display: inline-block;
	margin-left: 6px;
	transition: transform .3s ease;
}
.mld .mld-row__buy:hover {
	box-shadow: 0 8px 22px -8px color-mix(in srgb, var(--mld-accent) 70%, transparent);
	animation-duration: 2.5s;
}
.mld .mld-row__buy:hover .mlb-buy__label::after { transform: translateX(3px); }
.mld .mld-row__buy:active { transform: scale(.97); }
.mld .mld-row__buy:focus-visible { outline: 2px solid var(--mld-heading); outline-offset: 2px; }

@keyframes mld-flow { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
@keyframes mld-sheen { 0%, 55% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }

@media (prefers-reduced-motion: reduce) {
	.mld .mld-row__buy, .mld .mld-row__buy::after { animation: none; }
}

.mld-price__note { margin-top: 20px !important; font-size: var(--mld-small); color: var(--mld-muted); }
