/* =========================================================
   RoofPro Child — правки поверх родительского main.css.
   Подключается после main.css (см. inc/child-enqueue.php).
   ========================================================= */

/* ---------- Шапка ---------- */

/* Телефон в шапке — круглая иконка-трубка в одном ряду с мессенджерами
   (вместо номера и часов работы). Номер остаётся в title/aria-label
   и в мобильном меню. */
.header-phone-icon {
	display: inline-flex; align-items: center; justify-content: center;
	width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
	background: var(--color-bg); color: var(--color-accent); border: 1px solid var(--color-border);
	box-shadow: 0 3px 8px rgba(28,28,28,.14);
}
.header-phone-icon:hover { transform: translateY(-2px); box-shadow: 0 5px 12px rgba(28,28,28,.22); color: var(--color-accent-dark); }
.header-phone-icon svg { width: 17px; height: 17px; }
@media (max-width: 479px) {
	.header-phone-icon { width: 30px; height: 30px; }
	.header-phone-icon svg { width: 15px; height: 15px; }
}

/* Пункты меню: по центру между логотипом и кнопками, шрифт на 2px крупнее.
   Только для компьютера — десктопное меню показывается с 1120px. */
@media (min-width: 1120px) {
	.main-nav { flex: 1 1 auto; }
	.main-nav__list { justify-content: center; }
	.main-nav__list a { font-size: calc(.95rem + 2px); }
}

/* ---------- Текст страниц ---------- */

/* Ссылки в тексте видны сразу: цвет кнопок + подчёркивание; при наведении — темнее. */
.entry-content a:not(.btn) {
	color: var(--color-accent);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	text-decoration-color: rgba(232, 98, 44, .45);
}
.entry-content a:not(.btn):hover,
.entry-content a:not(.btn):focus-visible { color: var(--color-accent-dark); text-decoration-color: currentColor; }

/* Выравнивание картинок из редактора (слева / справа / по центру). */
.entry-content::after { content: ""; display: table; clear: both; }
.entry-content .alignright,
.entry-content .alignleft { max-width: 50%; }
.entry-content .alignright { float: right; margin: .3em 0 1em 1.5em; }
.entry-content .alignleft { float: left; margin: .3em 1.5em 1em 0; }
.entry-content .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.entry-content > .alignright,
.entry-content > .alignleft { margin-top: .3em; }
.entry-content .wp-caption { max-width: 100%; }
.entry-content .wp-caption img { display: block; }
.entry-content .wp-caption-text { font-size: .82rem; color: var(--color-muted); margin-top: 6px; text-align: center; }
@media (max-width: 575px) {
	.entry-content .alignright,
	.entry-content .alignleft { float: none; max-width: 100%; margin: 1em auto; }
}

/* ---------- Таблицы в тексте — в стиле блока «Ориентиры по стоимости» ---------- */
.content-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.4em 0; }
.entry-content table {
	width: 100% !important; height: auto !important;
	border-collapse: separate !important; border-spacing: 0;
	border: 1px solid var(--color-border); border-radius: var(--radius);
	overflow: hidden; background: #fff; margin: 1.4em 0;
}
.content-table-wrap > table { margin: 0; }
.entry-content table th,
.entry-content table td {
	padding: 14px 10px 14px 16px; border: 0; border-bottom: 1px solid var(--color-border);
	text-align: left; vertical-align: middle; background: transparent; height: auto !important;
}
.entry-content table tr:last-child > th,
.entry-content table tr:last-child > td { border-bottom: 0; }
.entry-content table thead tr:last-child > * { border-bottom: 1px solid var(--color-border); }
.entry-content table tr.is-alt > * { background: var(--color-bg-soft); }
.entry-content table thead th,
.entry-content table tr.is-head > * {
	background: var(--color-bg-soft); color: var(--color-muted); font-weight: 700; font-size: .78rem;
	text-transform: uppercase; letter-spacing: .04em;
}
.entry-content table tr.is-head strong,
.entry-content table tr.is-head b { font-weight: inherit; }
.entry-content table.content-table--priced tr:not(.is-head) > td:last-child {
	font-weight: 800; color: var(--color-dark); font-size: .86rem; white-space: nowrap; padding-right: 16px;
}

/* На телефоне таблица с заголовком превращается в карточки, как прайс на главной. */
@media (max-width: 575px) {
	.entry-content table.content-table--stack,
	.entry-content table.content-table--stack tbody,
	.entry-content table.content-table--stack tr,
	.entry-content table.content-table--stack td,
	.entry-content table.content-table--stack th { display: block; width: 100% !important; }
	.entry-content table.content-table--stack thead,
	.entry-content table.content-table--stack tr.is-head { display: none; }
	.entry-content table.content-table--stack tr { border-bottom: 8px solid var(--color-bg-soft); padding: 6px 0; }
	.entry-content table.content-table--stack tr:last-child { border-bottom: 0; }
	.entry-content table.content-table--stack tr.is-alt > * { background: transparent; }
	.entry-content table.content-table--stack td { padding: 6px 16px; border: 0; white-space: normal !important; }
	.entry-content table.content-table--stack td[data-label]::before { content: attr(data-label) ": "; font-weight: 700; }
	.entry-content table.content-table--stack td:first-child::before { display: none; }
}

/* ---------- Лайтбокс: фото на весь экран, у всех одинаковый размер ---------- */
.lightbox__image {
	width: 92vw; height: 88vh; max-width: none; max-height: none;
	object-fit: contain; border-radius: 0;
}
.lightbox__close, .lightbox__nav { text-shadow: 0 1px 6px rgba(0,0,0,.6); }

/* ---------- Карточки работ на страницах (без ссылки в заголовке) ---------- */
span.work-card__title:hover { color: inherit; }

/* Блок на страницах: подзаголовок всегда под заголовком (а не сбоку при коротком заголовке). */
.page-works .section__head { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 10px; }
.page-works .works-teaser__subtitle { max-width: 680px; }
