/*
 * Правки вида сайта (подключается после стилей темы, inc/elk-ui.php).
 */

/* ---------- Шапка ----------
 * Правка 2021 г. в style.css (#site-navigation { margin-top: -70px } и #mega-menu-wrap-primary { margin-top: -60px })
 * подтягивала меню на строку логотипа: на компьютере блок меню лежал поверх логотипа (логотип не нажимался, пункты
 * меню «наезжали» на него), на телефоне шапка схлопывалась — логотип ложился на заголовок и хлебные крошки,
 * а открытое меню уходило за верх экрана. */

/* Компьютер: строка «логотип — телефон», под ней отдельной строкой меню на всю ширину. */
@media only screen and (min-width: 1201px) {
	/* щелчки ловят только ссылки, а не пустые части блоков меню и телефона над логотипом */
	#site-navigation, #site-navigation .header-controls, #mega-menu-wrap-primary { pointer-events: none; }
	#site-navigation .header-controls a.mgo-number, #mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item { pointer-events: auto; }
	.headercontent #navbar { width: 100%; }
	#navbar #site-navigation .header-controls { height: 78px; }
	#navbar #site-navigation #mega-menu-wrap-primary { float: none; width: 100%; margin-top: 78px; border-top: 1px solid #e9eef2; }
	#navbar #site-navigation #mega-menu-wrap-primary #mega-menu-primary { display: flex; justify-content: space-between; }
	#navbar #site-navigation #mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item,
	.is-sticky #navbar #site-navigation div.mega-menu-wrap ul.mega-menu.mega-menu-horizontal > li.mega-menu-item { flex: 0 0 auto; white-space: nowrap; height: 61px !important; line-height: 60px !important; }
	#navbar #site-navigation #mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item > a.mega-menu-link,
	.is-sticky #navbar #site-navigation div.mega-menu-wrap ul.mega-menu.mega-menu-horizontal > li.mega-menu-item > a { height: 60px !important; line-height: 60px !important; margin-left: 0 !important; }
}

/* Телефон и планшет: шапка — белая полоса (гамбургер, логотип, поиск), меню открывается под ней. */
@media only screen and (max-width: 1200px) {
	#site-navigation, #mega-menu-wrap-primary { margin-top: 0 !important; }
	#stickable-header .headercontent { display: flow-root; }
	#mega-menu-wrap-primary .mega-menu-toggle { top: 7px !important; }
	#navbar #site-navigation .header-controls { height: 55px; }
	#navbar #site-navigation .header-controls .search_box { height: 55px !important; line-height: 55px !important; }
	#mega-menu-wrap-primary #mega-menu-primary { position: absolute; top: 100%; left: -15px; right: -15px; width: auto; max-height: calc(100vh - 70px); overflow-y: auto; box-shadow: 0 10px 20px rgba(0, 0, 0, .15); z-index: 1000; }
}

/* ---------- Статьи и врачи (inc/elk-doctors.php) ---------- */
.elk-article-meta { margin: 0 0 22px; font-size: 14px; line-height: 1.6; color: #7a8590; }
.elk-article-meta a { color: #0088cf; }
.elk-article-meta .elk-sep { margin: 0 6px; color: #b8c2cc; }
.elk-sources { margin: 30px 0 0; }
.elk-sources h2 { font-size: 20px; margin: 0 0 10px; }
.elk-sources ol { margin: 0; padding-left: 22px; font-size: 14px; line-height: 1.6; color: #555; }
.elk-sources a { word-break: break-word; }
/* Карточка врача — голубая плашка (вариант 2): фото | подпись, ФИО, специальность | телефон и запись */
.elk-doc-card { display: grid; grid-template-columns: 96px 1fr auto; gap: 22px; align-items: center; margin: 28px 0 0; padding: 24px 28px; border-radius: 14px; background: #eef6fc; }
.elk-doc-card.elk-doc-nophoto { grid-template-columns: 1fr auto; }
.elk-doc-pic { display: block; line-height: 0; }
.elk-doc-card .elk-doc-photo { display: block; width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; }
.elk-doc-body { min-width: 0; }
.elk-doc-label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: #5f7d93; line-height: 1.4; }
.elk-doc-card a.elk-doc-name, .elk-doc-card a.elk-doc-name:visited { display: block; margin-top: 2px; font: 600 19px/1.3 Ubuntu, sans-serif; color: #1c1c1c; text-decoration: none; }
.elk-doc-card a.elk-doc-name:hover { color: #0088cf; }
.elk-doc-sub { margin-top: 3px; font-size: 15px; line-height: 1.45; color: #4a5560; }
.elk-doc-cta { text-align: right; }
.elk-doc-card .elk-doc-tel a { display: block; margin-bottom: 8px; font: 600 22px/1.2 Ubuntu, sans-serif; color: #0088cf; white-space: nowrap; text-decoration: none; }
a.elk-doc-book, a.elk-doc-book:hover, a.elk-doc-book:focus { display: inline-block; padding: 11px 20px; border-radius: 7px; background: #0088cf; color: #fff; font-size: 14px; font-weight: 600; line-height: 1.3; text-decoration: none; }
a.elk-doc-book:hover { background: #0077b5; }
.elk-doc-info { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0 0 24px; padding: 16px 18px; border: 1px solid #dfeaf3; border-radius: 8px; background: #f8fbfd; }
.elk-doc-info dt { font-weight: 600; color: #333; }
.elk-doc-info dd { margin: 0; color: #555; }
.elk-service-doctors { margin: 40px 0 0; }
.elk-service-doctors .elk-doc-card + .elk-doc-card { margin-top: 14px; }
/* «Ещё в разделе» (страницы услуг) и «Услуги раздела» (разделы): ссылки в две колонки */
.elk-more { margin: 44px 0 0; }
.elk-more-h { margin: 0 0 14px; font: 600 22px/1.3 Ubuntu, sans-serif; color: #1c1c1c; text-transform: none; letter-spacing: 0; }
ul.elk-more-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 36px; margin: 0; padding: 0; list-style: none; }
ul.elk-more-list li { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid #e3ebf1; }
ul.elk-more-list li::before { display: none; }
ul.elk-more-list a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 2px; font-size: 16px; line-height: 1.4; color: #1c1c1c; text-decoration: none; }
ul.elk-more-list a:hover { color: #0088cf; }
ul.elk-more-list b { flex: none; font-size: 22px; font-weight: 400; line-height: 1; color: #0088cf; }
a.elk-more-all { display: inline-block; margin-top: 16px; font-weight: 600; color: #0088cf; text-decoration: none; }
a.elk-more-all:hover { text-decoration: underline; }
.elk-more-section { margin: 30px 0 10px; }
.elk-disclaimer { margin: 28px 0 0; padding-top: 12px; border-top: 1px solid #e8eef3; font-size: 13px; line-height: 1.5; color: #8a949e; }
@media (max-width: 600px) {
	.elk-doc-info { grid-template-columns: 1fr; gap: 2px; }
	.elk-doc-info dd { margin-bottom: 8px; }
	.elk-doc-card { grid-template-columns: 72px 1fr; gap: 14px 16px; padding: 18px; }
	.elk-doc-card .elk-doc-photo { width: 72px; height: 72px; }
	.elk-doc-card a.elk-doc-name { font-size: 17px; }
	.elk-doc-card.elk-doc-nophoto { grid-template-columns: 1fr; }
	.elk-doc-cta { grid-column: 1 / -1; text-align: left; }
	ul.elk-more-list { grid-template-columns: 1fr; }
}

/* ===== Заголовок страницы =====
   У темы высота области с H1 и хлебными крошками фиксирована (145 px — настройка темы, css/dynamic-style-adv.min.css):
   длинный заголовок на телефоне вылезал и прятался под содержимым (например, отчество в ФИО врача). Теперь 145 px —
   минимальная высота: короткие заголовки стоят по центру как раньше, длинные — область растёт. */
.site-header .tm-titlebar-wrapper .tm-titlebar-inner-wrapper { height: auto; min-height: 145px; display: flex; flex-direction: column; justify-content: center; }

/* ===== Таблицы цен — вариант 4 «Фирменная шапка» (разметка — inc/elk-prices.php) ===== */
.elk-price-wrap { margin: 8px 0 24px; border-radius: 10px; overflow-x: auto; box-shadow: 0 2px 12px rgba(0, 60, 100, .10); }
table.elk-price { width: 100%; border: 0; border-collapse: separate; border-spacing: 0; font-size: 15px; line-height: 1.45; margin: 0; color: #333; }
.elk-price td, .elk-price th { border: 0 !important; padding: 12px 16px; vertical-align: middle; text-align: left; background: #fff; }
.elk-price tr > :last-child, .elk-price td.elk-num { text-align: right; font-weight: 600; color: #0b5f96; }
.elk-price tr > :last-child { padding-left: 24px; }
.elk-price td.elk-num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.elk-price td.elk-num::after { content: "\00a0₽"; font-weight: 400; }
.elk-price tr.elk-head > *, .elk-price tr.elk-head > * strong { background: #0088cf; color: #fff; font-size: 14px; font-weight: 600; }
.elk-price tr:not(.elk-head):not(.elk-group):nth-child(odd) > * { background: #f6fafd; }
.elk-price tr:not(.elk-head) > * { border-bottom: 1px solid #e5edf3 !important; }
.elk-price tr:last-child > * { border-bottom: 0 !important; }
.elk-price tr.elk-group > * { background: #e6f2fb; color: #0b5f96; font-size: 13px; letter-spacing: .04em; }
.elk-price tr:not(.elk-head):not(.elk-group):hover > * { background: #eaf4fb; }
@media (max-width: 600px) {
	table.elk-price { font-size: 14px; }
	.elk-price td, .elk-price th { padding: 10px 12px; }
	.elk-price tr > :last-child { padding-left: 12px; }
}

/* Картинка в начале текста услуги (справа, 300 px): на телефоне — во всю ширину над текстом, иначе тексту рядом
   оставалась полоска в два слога */
@media (max-width: 600px) {
	.single-portfolio .wpb_text_column img.alignright,
	.single-portfolio .wpb_text_column img.alignleft { float: none; display: block; width: 100%; height: auto; margin: 0 0 16px; }
}
