/*
 * Лендинги услуг на блоках (template-service-landing.php).
 * Внешний вид задаётся в настройках блоков: цвета, отступы, скругления, рамки, шрифты.
 * Здесь только то, чего блоки не умеют. Файл подключается и на сайте, и в редакторе,
 * поэтому в Gutenberg страница выглядит так же, как на фронте.
 */

/* Хедер темы абсолютный (height: 0), поэтому шаблон отступает от него сам —
   как .services-hero на остальных услугах */
.tv-landing-page {
	display: block;
	padding-top: 110px;
}

/* Полноширинный шаблон страниц (template-landing.php): hero сам уходит под хедер
   и задаёт верхний отступ, фоны секций — на всю ширину (alignfull) */
.tv-landing-page--full {
	padding-top: 0;
}

/* Ширина контента в шаблоне (в редакторе её задаёт alignwide = wideSize из theme.json) */
.tv-wrap {
	width: min(1280px, calc(100% - 32px));
	margin: 0 auto;
}

/* style.min.css темы задаёт *{color;font-weight:400;line-height:1.3}.
   Возвращаем наследование, чтобы работали цвет, вес и межстрочный интервал, заданные на блоках. */
.tv-landing * {
	color: inherit;
	font-weight: inherit;
	line-height: inherit;
}

/* Критический CSS темы задаёт p{font-size:18px} (≤1024px) и 15px (≤480px) —
   на лендинге размер берётся из настроек блока или группы, как в редакторе */
.tv-landing :is(p, li, a, span, strong, em, cite, td, th) {
	font-size: inherit;
}

.tv-landing strong,
.tv-landing b,
.tv-landing th {
	font-weight: 700;
}

/* Тема убирает подчёркивание у всех ссылок (a{text-decoration:none}) —
   на лендинге текстовые ссылки подчёркнуты, кнопки нет */
.tv-landing a:not(.wp-block-button__link) {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
}

.tv-landing a:not(.wp-block-button__link):hover {
	text-decoration-thickness: 2px;
}

/* Таблицы: core/table не умеет скругление обёртки и отступы ячеек */
.tv-landing .tv-table {
	overflow-x: auto;
	border: 1px solid #e5e2ef;
	border-radius: 18px;
}

.tv-landing .tv-table table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
	line-height: 1.65;
	text-align: left;
}

.tv-landing .tv-table thead {
	border: 0;
}

.tv-landing .tv-table th,
.tv-landing .tv-table td {
	padding: clamp(13px, 1.6vw, 17px) clamp(13px, 1.8vw, 22px);
	border: 0;
	border-bottom: 1px solid #e8e5f1;
	vertical-align: top;
}

.tv-landing .tv-table th {
	background: var(--wp--preset--color--pale, #efeffb);
}

.tv-landing .tv-table tr:last-child td {
	border-bottom: 0;
}

.tv-landing .tv-table td:first-child {
	width: 27%;
	min-width: 120px;
	font-weight: 500;
}

/* Форма WhatsApp (core/html): у полей формы нет блочных аналогов */
.tv-landing .tv-wa-form {
	padding: 22px clamp(18px, 2vw, 24px);
	background: #fff;
	border-radius: 20px;
}

.tv-landing .tv-wa-form h2 {
	margin: 0 0 5px;
	font-size: 24px;
	font-weight: 800;
	line-height: 1.22;
}

.tv-landing .tv-wa-form p {
	margin: 0 0 14px;
	font-size: 14px;
}

.tv-landing .tv-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.tv-landing .tv-wa-form label {
	display: block;
	font-size: 13px;
	font-weight: 500;
}

.tv-landing .tv-wa-form input,
.tv-landing .tv-wa-form select {
	display: block;
	width: 100%;
	min-width: 0;
	height: 43px;
	margin-top: 4px;
	padding: 11px 14px;
	background: #f6f5fb;
	border: 1px solid #e8e5f0;
	border-radius: 30px;
	font: inherit;
	font-size: 14px;
}

.tv-landing .tv-form-btn {
	width: 100%;
	margin-top: 12px;
	padding: 15px 26px;
	background: var(--wp--preset--color--primary, #342a72);
	color: #fff;
	border: 0;
	border-radius: 100px;
	font: inherit;
	font-size: 16px;
	font-weight: 500;
	cursor: pointer;
}

.tv-landing .tv-form-btn:hover {
	background: #51458f;
}

.tv-landing .tv-wa-form .tv-form-note {
	margin: 10px 0 0;
	font-size: 12px;
	line-height: 1.5;
	color: var(--wp--preset--color--muted, #67617d);
}

.tv-landing .tv-wa-form :focus-visible {
	outline: 3px solid var(--wp--preset--color--orange, #eb6352);
	outline-offset: 4px;
}

/* Карточка страны (core/cover): кликабельна целиком по ссылке в заголовке */
.tv-landing .tv-country {
	position: relative;
	overflow: hidden;
}

.tv-landing .tv-country a::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 2;
}

.tv-landing .tv-country a {
	text-decoration: none;
}

.tv-landing .tv-country img {
	transition: transform 0.4s;
}

.tv-landing .tv-country:hover img {
	transform: scale(1.04);
}

/* Таблица «ключевые факты»: заголовки строк (th в теле) — приглушённые, без фона */
.tv-landing .tv-table tbody th {
	width: 37%;
	background: none;
	font-weight: 500;
	color: var(--wp--preset--color--muted, #67617d);
	text-align: left;
}

.tv-landing .tv-table tr:last-child th {
	border-bottom: 0;
}

/* Таблица, которая на телефоне прокручивается по горизонтали, а не сжимается */
.tv-landing .tv-table--scroll table {
	min-width: 560px;
}

/* Карта Google Maps (core/html) */
.tv-landing .tv-map {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 300px;
	border: 0;
	border-radius: 16px;
}
