/* Топ-Медикал — шапка сайта */
.tmsh, .tmsh-sticky, .tmsh-drawer {
	--h-brown: #5f2001; --h-btn: #663130; --h-text: #2b1408; --h-muted: #4f3e35; --h-soft: #5e4b40;
	--h-line: #d6c4b8; --h-cream: #fbf7f3; --h-sand: #e5ded5; --h-light: #f3ece6;
	--h-nav: "Akrobat regular", "Akrobat", "Roboto Condensed", sans-serif;
	--h-pad: clamp(16px, 2.8vw, 40px);
	--h-top: var(--wp-admin--admin-bar--height, 0px);
	font-family: Mulish, sans-serif; color: var(--h-text); box-sizing: border-box;
}
.tmsh *, .tmsh-sticky *, .tmsh-drawer * { box-sizing: border-box; }
/* Выпадающее меню должно быть поверх первого экрана страницы */
.tmsh { position: relative; z-index: 900; }
#header-wrapper:has(.tmsh), #header:has(.tmsh) { position: relative; z-index: 900; }
.elementor-section:has(> .elementor-container .tmsh), .elementor-widget-shortcode:has(.tmsh) { position: relative; z-index: 900; }
.elementor-widget-shortcode:has(.tmsh) { margin-bottom: 0; }
/* На главной первый экран идёт сразу под шапкой */
.home #header-wrapper:has(.tmsh) { margin-bottom: 0; }
.tmsh a, .tmsh-sticky a, .tmsh-drawer a { text-decoration: none; box-shadow: none; }
.tmsh ul, .tmsh-sticky ul, .tmsh-drawer ul { margin: 0; padding: 0; list-style: none; }
.tmsh li, .tmsh-sticky li, .tmsh-drawer li { margin: 0; padding: 0; }
.tmsh li::before, .tmsh-sticky li::before, .tmsh-drawer li::before { content: none; }
.tmsh button, .tmsh-sticky button, .tmsh-drawer button,
.tmsh button[type], .tmsh-sticky button[type], .tmsh-drawer button[type] {
	margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; min-height: 0;
	font: inherit; color: inherit; letter-spacing: 0; text-transform: none; line-height: 1; cursor: pointer;
}
.tmsh svg, .tmsh-sticky svg, .tmsh-drawer svg { flex: none; display: block; }
.tmsh a:focus-visible, .tmsh button:focus-visible, .tmsh-sticky a:focus-visible, .tmsh-sticky button:focus-visible,
.tmsh-drawer a:focus-visible, .tmsh-drawer button:focus-visible, .tmsh-drawer summary:focus-visible { outline: 3px solid var(--h-brown); outline-offset: 2px; }
.tmsh-logo { display: block; flex: none; line-height: 0; }
.tmsh-logo img { display: block; max-width: 100%; height: auto; }
.tmsh-logo__text { font-family: var(--h-nav); font-size: 28px; line-height: 1; color: var(--h-btn); }

/* Верхняя строка */
.tmsh-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 36px; padding: 0 var(--h-pad); background: var(--h-cream); border-bottom: 1px solid var(--h-sand); font-size: 13px; line-height: 1.3; color: var(--h-muted); }
.tmsh-top__info, .tmsh-top__acts { display: flex; align-items: center; gap: 22px; }
.tmsh-top__hours { font-weight: 800; color: var(--h-text); }
.tmsh .tmsh-top__addr { color: var(--h-muted); }
.tmsh .tmsh-top__addr:hover { color: var(--h-btn); text-decoration: underline; text-underline-offset: 3px; }
.tmsh .tmsh-top__phone { font-size: 14px; font-weight: 800; color: var(--h-text); white-space: nowrap; }
.tmsh .tmsh-top__lk { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--h-btn); white-space: nowrap; }
.tmsh .tmsh-top__phone:hover, .tmsh .tmsh-top__lk:hover { color: var(--h-brown); text-decoration: underline; text-underline-offset: 3px; }

/* Основная строка */
.tmsh-main, .tmsh-sticky__in { position: relative; display: flex; align-items: stretch; gap: clamp(20px, 3vw, 48px); padding: 0 var(--h-pad); }
.tmsh-main { height: 84px; background: var(--h-sand); border-bottom: 1px solid var(--h-line); }
.tmsh-main > .tmsh-logo, .tmsh-sticky__in > .tmsh-logo { align-self: center; width: clamp(180px, 16.4vw, 236px); }
.tmsh-sticky__in > .tmsh-logo { width: 180px; }
.tmsh-nav { display: flex; align-items: stretch; min-width: 0; }
.tmsh-nav__list { display: flex; align-items: stretch; gap: clamp(16px, 2.1vw, 30px); }
.tmsh-nav__item { position: static; display: flex; align-items: center; gap: 2px; }
.tmsh .tmsh-nav__link, .tmsh-sticky .tmsh-nav__link { position: relative; display: inline-flex; align-items: center; min-height: 44px; font-family: var(--h-nav); font-weight: 400; font-size: clamp(16px, 1.25vw, 19px); line-height: 1; letter-spacing: .04em; text-transform: uppercase; color: var(--h-text); white-space: nowrap; }
.tmsh .tmsh-nav__link::after, .tmsh-sticky .tmsh-nav__link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 2px; background: var(--h-btn); transform: scaleX(0); transform-origin: left; transition: transform .2s; }
.tmsh .tmsh-nav__link:hover, .tmsh-sticky .tmsh-nav__link:hover, .tmsh-nav__item.is-current > .tmsh-nav__link, .tmsh-nav__item.is-open > .tmsh-nav__link { color: var(--h-btn); }
.tmsh .tmsh-nav__link:hover::after, .tmsh-sticky .tmsh-nav__link:hover::after, .tmsh-nav__item.is-current > .tmsh-nav__link::after, .tmsh-nav__item.is-open > .tmsh-nav__link::after { transform: scaleX(1); }
.tmsh .tmsh-nav__toggle[type], .tmsh-sticky .tmsh-nav__toggle[type] { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 44px; color: var(--h-text); }
.tmsh-nav__toggle svg { transition: transform .2s; }
.tmsh-nav__item.is-open .tmsh-nav__toggle svg { transform: rotate(180deg); }

/* Выпадающий список услуг */
.tmsh-mega { position: absolute; left: var(--h-pad); right: var(--h-pad); top: 100%; z-index: 30; display: none; grid-template-columns: minmax(0, 9fr) minmax(0, 3fr); background: #fff; box-shadow: 0 18px 44px rgba(43, 20, 8, .18); }
.tmsh-nav__item.has-mega:hover .tmsh-mega, .tmsh-nav__item.is-open .tmsh-mega { display: grid; }
.tmsh-nav__item.is-closed .tmsh-mega { display: none; }
.tmsh-mega__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; padding: 18px; }
.tmsh .tmsh-mega__item, .tmsh-sticky .tmsh-mega__item { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; color: var(--h-text); }
.tmsh .tmsh-mega__item:hover, .tmsh-sticky .tmsh-mega__item:hover { background: var(--h-light); }
.tmsh-mega__row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.tmsh-mega__row strong { font-size: 16px; font-weight: 800; line-height: 1.3; }
.tmsh-mega__price { font-size: 13px; font-weight: 800; color: var(--h-btn); white-space: nowrap; }
.tmsh-mega__desc { font-size: 13px; line-height: 1.4; color: var(--h-soft); }
.tmsh-mega__side { display: flex; flex-direction: column; gap: 12px; padding: 26px 24px; background: var(--h-light); }
.tmsh-mega__label { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--h-btn); }
.tmsh .tmsh-mega__side > a, .tmsh-sticky .tmsh-mega__side > a { font-size: 16px; font-weight: 800; color: var(--h-btn); }
.tmsh .tmsh-mega__side > a:hover, .tmsh-sticky .tmsh-mega__side > a:hover { color: var(--h-brown); text-decoration: underline; text-underline-offset: 3px; }
.tmsh-mega__help { margin: auto 0 0; padding: 0; font-size: 14px; line-height: 1.5; color: var(--h-muted); }
.tmsh .tmsh-mega__help a, .tmsh .tmsh-mega__help button[type], .tmsh-sticky .tmsh-mega__help a, .tmsh-sticky .tmsh-mega__help button[type] { display: inline; font-size: 14px; font-weight: 800; line-height: 1.5; color: var(--h-btn); text-decoration: underline; text-underline-offset: 3px; }

/* Кнопки справа */
.tmsh-acts { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }
.tmsh .tmsh-cta, .tmsh-sticky .tmsh-cta { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; background: var(--h-btn); color: #fff; font-size: 15px; font-weight: 800; line-height: 1; white-space: nowrap; transition: background .2s; }
.tmsh .tmsh-cta:hover, .tmsh-sticky .tmsh-cta:hover { background: var(--h-brown); color: #fff; }
.tmsh .tmsh-ico, .tmsh-sticky .tmsh-ico, .tmsh-drawer .tmsh-ico, .tmsh button.tmsh-ico[type], .tmsh-sticky button.tmsh-ico[type], .tmsh-drawer button.tmsh-ico[type] { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; color: var(--h-text); }
.tmsh .tmsh-ico--tel, .tmsh-sticky .tmsh-ico--tel { color: var(--h-btn); }
.tmsh .tmsh-acts .tmsh-ico, .tmsh-sticky .tmsh-acts .tmsh-ico, .tmsh .tmsh-acts button.tmsh-ico[type], .tmsh-sticky .tmsh-acts button.tmsh-ico[type] { display: none; }

/* Компактная шапка при прокрутке */
.tmsh-sticky { position: fixed; left: 0; right: 0; top: var(--h-top); z-index: 99980; background: #fff; box-shadow: 0 4px 18px rgba(43, 20, 8, .12); transform: translateY(-110%); visibility: hidden; transition: transform .25s, visibility 0s .25s; }
.tmsh-sticky.is-on { transform: none; visibility: visible; transition: transform .25s; }
.tmsh-sticky__in { height: 64px; }
.tmsh-sticky .tmsh-nav__link { font-size: 16px; }
.tmsh-sticky .tmsh-nav__list { gap: clamp(14px, 1.8vw, 26px); }
.tmsh-sticky .tmsh-cta { min-height: 44px; padding: 0 20px; font-size: 14px; }
.tmsh-sticky .tmsh-sticky__phone { font-size: 15px; font-weight: 800; color: var(--h-text); white-space: nowrap; margin-right: 10px; }
.tmsh-sticky .tmsh-mega { left: var(--h-pad); right: var(--h-pad); }

/* Меню на телефоне */
.tmsh-drawer { position: fixed; inset: 0; z-index: 99995; }
.tmsh-drawer[hidden] { display: none; }
.tmsh-drawer__backdrop { position: absolute; inset: 0; background: rgba(43, 20, 8, .45); }
.tmsh-drawer__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 100%); display: flex; flex-direction: column; gap: 16px; padding: 12px 16px 28px; overflow-y: auto; background: var(--h-cream); box-shadow: -10px 0 30px rgba(43, 20, 8, .2); }
.tmsh-drawer__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; }
.tmsh-drawer .tmsh-ico { display: inline-flex; }
.tmsh-drawer .tmsh-drawer__cta { display: flex; align-items: center; justify-content: center; min-height: 52px; background: var(--h-btn); color: #fff; font-size: 16px; font-weight: 800; }
.tmsh-drawer__nav { border-top: 1px solid var(--h-line); }
.tmsh-drawer__nav > li { border-bottom: 1px solid var(--h-line); }
.tmsh-drawer__nav > li > a, .tmsh-drawer__nav summary { display: flex; align-items: center; justify-content: space-between; min-height: 54px; font-family: var(--h-nav); font-size: 21px; letter-spacing: .03em; text-transform: uppercase; color: var(--h-text); cursor: pointer; list-style: none; }
.tmsh-drawer__nav summary::-webkit-details-marker { display: none; }
.tmsh-drawer__nav details[open] summary svg { transform: rotate(180deg); }
.tmsh-drawer__nav > li > a[aria-current] { color: var(--h-btn); }
.tmsh-drawer__nav details ul { padding: 0 0 12px 12px; }
.tmsh-drawer__nav details a { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; font-size: 16px; font-weight: 700; color: var(--h-text); }
.tmsh-drawer__nav details a span { font-size: 13px; font-weight: 800; color: var(--h-btn); white-space: nowrap; }
.tmsh-drawer__nav details a.is-all { color: var(--h-btn); }
.tmsh-drawer__info { display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: 1.4; color: var(--h-muted); }
.tmsh-drawer__info span, .tmsh-drawer .tmsh-drawer__phone { display: flex; align-items: center; gap: 10px; }
.tmsh-drawer .tmsh-drawer__phone { font-size: 18px; font-weight: 800; color: var(--h-text); }
html.tmsh-lock, html.tmsh-lock body { overflow: hidden; }

/* Ноутбуки поменьше */
@media (max-width: 1279px) {
	.tmsh-top__addr + .tmsh-top__addr { display: none; }
	.tmsh-sticky .tmsh-sticky__phone { display: none; }
}
/* Планшеты и небольшие ноутбуки: меню прячется в бургер */
@media (max-width: 1199px) {
	.tmsh-nav { display: none; }
	.tmsh .tmsh-acts .tmsh-ico, .tmsh-sticky .tmsh-acts .tmsh-ico, .tmsh .tmsh-acts button.tmsh-ico[type], .tmsh-sticky .tmsh-acts button.tmsh-ico[type] { display: inline-flex; }
	.tmsh-sticky .tmsh-sticky__phone { display: none; }
	.tmsh-main { height: 72px; }
}
/* Телефоны */
@media (max-width: 767px) {
	.tmsh-top { display: none; }
	.tmsh-main, .tmsh-sticky__in { height: 64px; gap: 8px; padding: 0 6px 0 16px; }
	.tmsh-main > .tmsh-logo, .tmsh-sticky__in > .tmsh-logo { width: 168px; }
	.tmsh .tmsh-cta, .tmsh-sticky .tmsh-cta { min-height: 40px; padding: 0 12px; font-size: 13px; }
	.tmhb-has-bar .tmsh .tmsh-cta, .tmhb-has-bar .tmsh-sticky .tmsh-cta { display: none; }
	.tmsh-acts { gap: 0; }
}
@media (max-width: 400px) {
	.tmsh-main > .tmsh-logo, .tmsh-sticky__in > .tmsh-logo { width: 140px; }
	body:not(.tmhb-has-bar) .tmsh-main > .tmsh-logo, body:not(.tmhb-has-bar) .tmsh-sticky__in > .tmsh-logo { width: 118px; }
}
@media (prefers-reduced-motion: reduce) {
	.tmsh-sticky, .tmsh-sticky.is-on, .tmsh-nav__link::after, .tmsh-nav__toggle svg { transition: none; }
}
