/**
 * ISCO · поздний слой: отдаёт фон и текст страницы дизайн-токенам.
 * Подключается после стилей темы и Elementor, иначе Hello Elementor
 * перебивает фон и в тёмной теме светлыми остаются только шапка и подвал.
 */

body,
.site,
.site-main,
.page-content,
.entry-content,
main {
	background-color: var(--isco-bg-page);
	color: var(--isco-text-primary);
}

/* Заголовки и текст страниц */
body h1,
body h2,
body h3,
body h4,
body h5,
body h6,
.page-header .entry-title,
.entry-content p,
.entry-content li,
.entry-content td {
	color: var(--isco-text-primary);
}

.entry-content a:not(.elementor-button) {
	color: var(--isco-text-brand);
}

/* Карточки и формы WordPress по умолчанию */
.wp-block-group,
.wp-block-quote,
input[type="text"],
input[type="email"],
input[type="search"],
input[type="tel"],
input[type="password"],
input[type="number"],
select,
textarea {
	background-color: var(--isco-bg-surface);
	color: var(--isco-text-primary);
	border-color: var(--isco-border-default);
}

input::placeholder,
textarea::placeholder {
	color: var(--isco-text-secondary);
}

/* Elementor: контейнеры без собственного фона не должны светиться белым */
.elementor-widget-theme-post-content,
.elementor-widget-text-editor,
.elementor-widget-heading {
	color: var(--isco-text-primary);
}

/* Таблицы и разделители */
hr,
.wp-block-separator {
	border-color: var(--isco-border-default);
}

table th,
table td {
	border-color: var(--isco-border-default);
}

/* Служебные блоки темы */
.site-header,
.site-footer {
	background-color: var(--isco-bg-surface);
	color: var(--isco-text-primary);
}

/* Логотип в шапке: фиксируем размер, не полагаясь на сгенерированный CSS Elementor */
#isco-logo-block img {
	inline-size: 52px;
	block-size: 52px;
	object-fit: contain;
}

@media (max-width: 767px) {
	#isco-logo-block img {
		inline-size: 40px;
		block-size: 40px;
	}
}

/* Шапка на средних экранах (768–1399): меню в одну строку, компактнее */
@media (min-width: 768px) and (max-width: 1399px) {
	#isco-header .e-con-inner {
		flex-wrap: nowrap;
		gap: 12px;
	}

	#isco-header .elementor-nav-menu--layout-horizontal {
		flex-wrap: nowrap;
	}

	#isco-header .elementor-nav-menu--main .elementor-item {
		font-size: 15px;
		padding-inline: 0;
	}

	#isco-header .elementor-nav-menu--layout-horizontal > li {
		margin-inline: 9px;
	}

}

/* 1025–1099 px: кнопка «הצטרפות לארגון» не помещается рядом с развёрнутым меню.
   До 1024 px меню свёрнуто в бургер, и кнопке места хватает. */
@media (min-width: 1025px) and (max-width: 1099px) {
	#isco-header-actions .elementor-widget-button {
		display: none;
	}
}

/* ---------- Плавающие кнопки ---------- */

.isco-fabs {
	position: fixed;
	inset-block-end: 16px;
	inset-inline: 16px;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	flex-direction: row-reverse;
	pointer-events: none;
	z-index: 998;
}

.isco-fab {
	pointer-events: auto;
}

.isco-fab--chat {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-direction: row-reverse;
}

.isco-fab__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	inline-size: 64px;
	block-size: 64px;
	border: 0;
	border-radius: 999px;
	cursor: pointer;
	box-shadow: var(--isco-shadow-float);
}

.isco-fab__btn--chat {
	background: var(--isco-action-secondary);
	color: #fff;
}

.isco-fab__btn--a11y {
	inline-size: 56px;
	block-size: 56px;
	background: var(--isco-sky-500);
	color: #fff;
}

.isco-fab__teaser {
	max-inline-size: 196px;
	padding: 12px 14px;
	border-radius: 16px;
	background: var(--isco-bg-surface);
	box-shadow: var(--isco-shadow-card);
	font-family: Rubik, sans-serif;
}

.isco-fab__teaser strong {
	display: block;
	font-size: 14px;
	line-height: 1.3;
	color: var(--isco-text-primary);
}

.isco-fab__teaser span {
	font-size: 12px;
	color: var(--isco-text-secondary);
}

@media (max-width: 767px) {
	.isco-fab__btn {
		inline-size: 56px;
		block-size: 56px;
	}

	.isco-fab__teaser {
		display: none;
	}
}

/* Тема Hello красит любую кнопку при наведении в #c36 — отключаем и задаём свои состояния */
.isco-home button:hover,
.isco-home button:focus,
.isco-fabs button:hover,
.isco-fabs button:focus,
#isco-header button:hover,
#isco-header button:focus {
	background-color: inherit;
	color: inherit;
	text-decoration: none;
}

.isco-btn--primary:hover { background-color: var(--isco-action-primary-hover) !important; color: var(--isco-text-on-cta) !important; }
.isco-btn--secondary:hover { background-color: var(--isco-action-secondary-hover) !important; color: #fff !important; }
.isco-btn--outline:hover { background-color: var(--isco-bg-brand-soft) !important; color: var(--isco-text-brand) !important; }
.isco-btn--whatsapp:hover { background-color: var(--isco-action-whatsapp-hover) !important; color: #fff !important; }

.isco-search__season:hover { background-color: var(--isco-bg-surface) !important; color: var(--isco-text-primary) !important; }
.isco-search__season--active:hover { background-color: var(--isco-action-secondary-hover) !important; color: #fff !important; }
.isco-search__mode:hover { background: none !important; color: var(--isco-text-brand) !important; }
.isco-region:hover { background-color: var(--isco-bg-brand-soft) !important; color: var(--isco-text-primary) !important; }
.isco-camp__save:hover { background-color: #fff !important; color: var(--isco-action-secondary) !important; }
.isco-fab__btn--chat:hover { background-color: var(--isco-action-secondary-hover) !important; color: #fff !important; }
.isco-fab__btn--a11y:hover { background-color: var(--isco-sky-700) !important; color: #fff !important; }
#isco-header .elementor-menu-toggle:hover { background-color: var(--isco-green-100) !important; color: var(--isco-icon-primary) !important; }

/* Шапка: «כניסה» и переключатель темы лежат в одном HTML-виджете вплотную.
   Elementor 4 выводит виджет без обёртки .elementor-widget-container, поэтому
   раскладку задаём самому виджету (старая обёртка — на случай отката Elementor). */
#isco-header .elementor-widget-html:has(> .isco-theme-toggle),
#isco-header .elementor-widget-html .elementor-widget-container:has(> .isco-theme-toggle) {
	display: flex;
	align-items: center;
	gap: 10px;
	inline-size: auto;
	flex-shrink: 0;
}

.isco-theme-toggle svg {
	transition: transform 0.25s ease;
}

.isco-theme-toggle:active svg {
	transform: rotate(-30deg) scale(0.9);
}

/* Шапка 1400–1599 px: меню (7 пунктов по 40 px полей) упиралось в ширину и переносило
   последний пункт на вторую строку. Поля чуть уже, строка одна, кнопка «לעסקים» на месте. */
@media (min-width: 1400px) and (max-width: 1599px) {
	#isco-header .elementor-nav-menu--layout-horizontal {
		flex-wrap: nowrap;
	}

	#isco-header .elementor-nav-menu--main .elementor-item {
		padding-inline: 14px;
	}
}

/* Шапка — свой слой поверх содержимого страницы. Без него выпадающие списки (у списка меню
   Elementor z-index: 2) уходили под плашку героя «100% קייטנות מורשות» (z-index: 3).
   999 — выше плавающих кнопок (998), чтобы открытое мобильное меню их перекрывало. */
#isco-header {
	position: relative;
	z-index: 999;
}

/* ---------- Шапка: выпадающие списки разделов (меню WP «Main menu», виджет nav-menu) ---------- */

#isco-header .elementor-nav-menu--main .sub-menu {
	min-inline-size: 220px !important;
	padding: 8px !important;
	border: 1px solid var(--isco-border-default);
	border-radius: 16px;
	background: var(--isco-bg-surface) !important;
	box-shadow: var(--isco-shadow-card);
}

#isco-header .elementor-nav-menu--main .sub-menu .elementor-sub-item {
	padding: 10px 14px !important;
	border: 0 !important;
	border-radius: 10px;
	background: transparent !important;
	color: var(--isco-text-primary) !important;
	font: 400 15px/1.35 Rubik, sans-serif;
	white-space: nowrap;
}

#isco-header .elementor-nav-menu--main .sub-menu .elementor-sub-item:hover,
#isco-header .elementor-nav-menu--main .sub-menu .elementor-sub-item:focus-visible,
#isco-header .elementor-nav-menu--main .sub-menu .elementor-sub-item.elementor-item-active {
	background: var(--isco-bg-brand-soft) !important;
	color: var(--isco-text-brand) !important;
}

/* Стрелка у раздела с подменю */
#isco-header .elementor-nav-menu--main .has-submenu .sub-arrow {
	padding-inline-start: 4px;
	font-size: 11px;
	opacity: 0.6;
}

/* Мобильное меню (бургер): подпункты с отступом и мягким фоном */
#isco-header nav.elementor-nav-menu--dropdown .sub-menu {
	background: var(--isco-bg-subtle, #eef3ef) !important;
}

#isco-header nav.elementor-nav-menu--dropdown .sub-menu .elementor-sub-item {
	padding-block: 12px !important;
	padding-inline: 36px 20px !important;
	font-size: 15px;
	border-inline-start: 0 !important;
}

#isco-header nav.elementor-nav-menu--dropdown .elementor-item.has-submenu {
	font-weight: 500;
}

/* Подвал: заголовки колонок — цвета текста подвала. Общее правило «body h4» выше красило их в цвет текста
   страницы, и в светлой теме они были тёмными на тёмно-зелёном (контраст ≈ 1,4:1). */
#isco-footer .isco-foot-col h4 {
	color: inherit;
}

/* Подвал: колонки ссылок на планшете и телефоне — с отступами между рядами */
@media (max-width: 1024px) {
	#isco-footer .isco-foot-col ul {
		gap: 8px;
	}
}

/* ---------- Старые лендинги в HTML-блоках (ISCO_Html_Scope) ----------
   transform делает обёртку контейнером для position: fixed — «прилипшее» меню лендинга
   крепится к нему, а не к окну, и его z-index не выходит за обёртку (не перекрывает шапку и окно входа).
   overflow-x: clip — блоки шириной 100vw не растягивают страницу вбок. */
.isco-hw {
	position: relative;
	transform: translateZ(0);
	overflow-x: clip;
}

/* ---------- Комментарии темы Hello (статьи, собранные в Elementor) ----------
   Без стилей форма растягивалась на всю ширину, текст — 13–14 px. */
.comments-area,
#comments {
	box-sizing: border-box;
	max-inline-size: 860px;
	margin: 56px auto 72px;
	padding: 0 24px;
	font: 400 17px/1.6 Rubik, sans-serif;
	color: var(--isco-text-primary);
}

.comments-area .comment-reply-title,
.comments-area .title-comments,
#comments h2,
#comments h3 {
	margin: 0 0 8px;
	font-size: 28px;
	font-weight: 600;
	line-height: 1.25;
}

.comment-respond {
	padding: 28px 32px;
	border: 1px solid var(--isco-border-default);
	border-radius: 24px;
	background: var(--isco-bg-surface);
}

.comment-form {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

.comment-form > p {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
}

.comment-form .comment-notes,
.comment-form .comment-form-comment,
.comment-form .comment-form-cookies-consent,
.comment-form .form-submit,
.comment-form .logged-in-as {
	grid-column: 1 / -1;
}

.comment-form .comment-notes,
.comment-form .logged-in-as {
	font-size: 16px;
	color: var(--isco-text-secondary);
}

.comment-form label {
	font-size: 16px;
	font-weight: 500;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
	box-sizing: border-box;
	inline-size: 100%;
	min-block-size: 54px;
	padding: 12px 16px;
	border: 1px solid var(--isco-border-default);
	border-radius: 14px;
	background: var(--isco-bg-surface);
	color: var(--isco-text-primary);
	font: 400 17px/1.5 Rubik, sans-serif;
}

.comment-form textarea {
	min-block-size: 150px;
	resize: vertical;
}

.comment-form input:focus,
.comment-form textarea:focus {
	border-color: var(--isco-border-focus);
	outline: 3px solid color-mix(in srgb, var(--isco-border-focus) 30%, transparent);
	outline-offset: 0;
}

.comment-form .comment-form-cookies-consent {
	flex-direction: row;
	align-items: flex-start;
	gap: 10px;
}

.comment-form .comment-form-cookies-consent input {
	flex: none;
	inline-size: 18px;
	block-size: 18px;
	margin-block-start: 4px;
	accent-color: var(--isco-action-secondary);
}

.comment-form .comment-form-cookies-consent label {
	font-weight: 400;
	color: var(--isco-text-secondary);
}

.comment-form .form-submit input[type="submit"] {
	min-block-size: 54px;
	padding: 0 32px;
	border: 0;
	border-radius: 14px;
	background: var(--isco-action-primary);
	color: var(--isco-text-on-cta);
	font: 600 18px/1 Rubik, sans-serif;
	cursor: pointer;
}

.comment-form .form-submit input[type="submit"]:hover {
	background: var(--isco-action-primary-hover);
}

.comment-list {
	margin: 0 0 32px;
	padding: 0;
	list-style: none;
}

.comment-list .comment-body {
	margin-block-end: 16px;
	padding: 20px 24px;
	border: 1px solid var(--isco-border-default);
	border-radius: 18px;
	background: var(--isco-bg-surface);
	font-size: 17px;
}

@media (max-width: 767px) {
	.comments-area,
	#comments {
		padding: 0 16px;
	}

	.comment-respond {
		padding: 22px 18px;
	}

	.comment-form {
		grid-template-columns: minmax(0, 1fr);
	}

	.comment-form .form-submit input[type="submit"] {
		inline-size: 100%;
	}
}

/* Своя шапка лендинга (прямой потомок блока) — скрыта под шапкой сайта,
   если у страницы включено мета isco_hide_landing_header. */
.isco-hw--no-header > header {
	display: none !important;
}

/* Своя плавающая кнопка WhatsApp лендинга — скрыта, если у страницы включено мета isco_hide_landing_float. */
.isco-hw--no-float > [class*="wa-float"],
.isco-hw--no-float > [class*="whatsapp"][class*="float"] {
	display: none !important;
}

/* Статьи из Elementor на телефоне: flex-контейнеры Elementor по умолчанию не сжимаются уже
   самого широкого содержимого (min-width: auto) — блок лендинга с жёсткими колонками
   распирал статью и давал горизонтальную прокрутку. */
.isco-post__content .e-con,
.isco-post__content .e-con-inner,
.isco-post__content .elementor-element,
.isco-post__content .elementor-widget-container,
.isco-hw {
	min-width: 0;
	max-width: 100%;
}

.isco-hw img,
.isco-hw video,
.isco-hw iframe {
	max-width: 100%;
}

/* <small> в лендингах: сброс темы Hello даёт 80% — 12–13.6 px. Не меньше 15 px, как остальной текст лендингов. */
.isco-hw small {
	font-size: max(80%, 15px);
}

/* Ячейки таблиц в лендингах: размер наследуется от таблицы (у некоторых — 0.9em ≈ 14 px) — не меньше 15 px. */
.isco-hw td,
.isco-hw th {
	font-size: max(1em, 15px);
}

/* ---------- Мобильное меню (бургер): положение и цвета ----------
   1) Панель — position: fixed, а её верхний край в старом коде был зашит как 112 px: на телефоне шапка
      65 px — между шапкой и меню оставалась щель. Теперь высота берётся из header-menu.js.
   2) Фон и текст панели у Elementor по умолчанию белые/серые и не следуют теме — в ночном режиме
      получалось светлое меню, а подпункты — серым на тёмном. Берём токены темы.
   Селекторы с html body — чтобы перебить !important во встроенных стилях шапки. */
html body #isco-header nav.elementor-nav-menu--dropdown {
	top: var(--isco-header-bottom, 65px) !important;
	margin-top: 0 !important;
	max-height: calc(100vh - var(--isco-header-bottom, 65px)) !important;
	background-color: var(--isco-bg-surface) !important;
	border-block-start: 1px solid var(--isco-border-default);
}

@supports (height: 100dvh) {
	html body #isco-header nav.elementor-nav-menu--dropdown {
		max-height: calc(100dvh - var(--isco-header-bottom, 65px)) !important;
	}
}

html body #isco-header nav.elementor-nav-menu--dropdown a.elementor-item,
html body #isco-header nav.elementor-nav-menu--dropdown a.elementor-sub-item {
	background-color: transparent !important;
	color: var(--isco-text-primary) !important;
}

html body #isco-header nav.elementor-nav-menu--dropdown a.elementor-item:hover,
html body #isco-header nav.elementor-nav-menu--dropdown a.elementor-item:focus-visible,
html body #isco-header nav.elementor-nav-menu--dropdown a.elementor-item.highlighted,
html body #isco-header nav.elementor-nav-menu--dropdown a.elementor-item.elementor-item-active,
html body #isco-header nav.elementor-nav-menu--dropdown a.elementor-sub-item:hover,
html body #isco-header nav.elementor-nav-menu--dropdown a.elementor-sub-item:focus-visible {
	background-color: var(--isco-bg-brand-soft) !important;
	color: var(--isco-text-brand) !important;
}

html body #isco-header nav.elementor-nav-menu--dropdown .sub-menu {
	background-color: var(--isco-bg-subtle) !important;
}

html body #isco-header nav.elementor-nav-menu--dropdown .sub-arrow {
	color: var(--isco-icon-secondary);
}

/* Особые пункты меню (кнопка «הצטרפות לארגון», переключатель темы) — свои цвета, а не цвет обычных пунктов. */
html body #isco-header nav.elementor-nav-menu--dropdown .isco-btn-outline a.elementor-item {
	background-color: transparent !important;
	color: var(--isco-text-brand) !important;
}

html body #isco-header nav.elementor-nav-menu--dropdown .isco-btn-solid a.elementor-item {
	background-color: var(--isco-action-secondary) !important;
	color: #fff !important;
}

html body #isco-header nav.elementor-nav-menu--dropdown .isco-theme-toggle a.elementor-item {
	background-color: var(--isco-bg-subtle) !important;
}

/* ---------- Цвет ссылки при наведении (04.10.2026) ----------
   Тема Hello Elementor (reset.css) красит любую ссылку при наведении в тёмно-фиолетовый #336. На светлом фоне это
   терпимо, в тёмной теме текст исчезал («האזור האישי» в шапке и все ссылки без собственного правила :hover).
   Базовое правило ниже ровно той же специфичности, что у темы, но грузится позже; у компонентов со своим
   .класс:hover специфичность выше — их цвета не меняются. */
:where(html) a:hover,
:where(html) a:active {
	color: var(--isco-text-brand);
}

#isco-header .isco-header-login:hover,
#isco-header .isco-header-login:focus-visible {
	color: var(--isco-text-primary);
}

/* ---------- Подпись автора под подвалом (ISCO_Credit, 15.10.2026) ----------
   Полоса цвета подвала. Цвет текста — белый 72 %: контраст 7,4:1 на зелёном подвале и 10:1 в тёмной теме (норма — 4,5:1).
   Прозрачность задана цветом, а не opacity, иначе просвечивал бы и фон полосы. */
.isco-credit {
	padding: 10px 16px 12px;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	background: var(--isco-bg-brand-deep);
	color: rgba(255, 255, 255, 0.72);
	font-size: 12px;
	line-height: 1.5;
	text-align: center;
}

.isco-credit a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.isco-credit a:hover,
.isco-credit a:focus-visible {
	color: #fff;
}

.isco-credit a:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

/* ---------- Размер текста кнопок Elementor (16.10.2026) ----------
   По UI-киту текст кнопок не мельче 16 px. Elementor по умолчанию даёт размерам sm/xs 15 и 13 px
   (кнопки и формы старых страниц), а кнопке «הצטרפות לארגון» в шапке шаблон задаёт 15 px и высоту 45.
   Шапка: Outline M из UI-кита — 16 px, высота 48. Правила виджетов со своим размером (селектор выше) не трогаются. */
.elementor-button.elementor-size-xs,
.elementor-button.elementor-size-sm {
	font-size: 16px;
}

html body #isco-header .elementor-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-block-size: 48px;
	font-size: 16px;
}
