/* AI-WIN global styles for Service Lux child theme: header, menu, shared layout */

:root {
	--width: 1400px;
	--aiwin-global-red: #cc292b;
	--aiwin-global-dark: #111111;
	--aiwin-global-light: #f5f5f5;
	--aiwin-global-paper: #f7f2e8;
	--aiwin-global-tape: rgba(226, 219, 185, 0.9);
}

/* Общая ширина темы */
.container {
	width: min(var(--width), 100% - calc(var(--spacing) * 2));
}

/* Верхняя часть шапки */
.aiwin-site-wrapper {
	background:
		radial-gradient(#d4d4d4 1px, transparent 1px),
		#f5f5f5;
	background-size: 20px 20px;
}

.aiwin-site-header {
	margin: 0;
	padding: 1.2rem 0 0.95rem;
	background: #f5f5f5;
	border-top: 7px solid #111;
	border-bottom: 0;
}

.aiwin-header-wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
	padding-bottom: 0.95rem;
	border-bottom: 2px solid #111;
}

.aiwin-brand {
	display: inline-flex;
	align-items: center;
	gap: 0.85rem;
	flex-shrink: 0;
	color: #111;
	text-decoration: none;
}

.aiwin-brand:hover {
	color: #111;
	text-decoration: none;
}

.aiwin-brand__mark {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 58px;
	height: 58px;
	background: #111;
	color: #fff;
	border: 4px solid #111;
	box-shadow: 6px 6px 0 var(--aiwin-global-red);
	font-weight: 950;
	font-size: 1.25rem;
	letter-spacing: -0.08em;
	transform: rotate(-4deg);
	transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.aiwin-brand:hover .aiwin-brand__mark {
	transform: translate(-3px, -3px) rotate(-4deg);
	box-shadow: 9px 9px 0 var(--aiwin-global-red);
}

.aiwin-brand__text {
	display: grid;
	gap: 0.15rem;
	line-height: 1;
}

.aiwin-brand__name {
	color: #111;
	font-size: 2rem;
	font-weight: 950;
	letter-spacing: -0.08em;
	text-transform: uppercase;
}

.aiwin-brand__tag {
	color: var(--aiwin-global-red);
	font-family: "Segoe Print", cursive;
	font-size: 1rem;
	font-weight: 800;
	font-style: italic;
	transform: rotate(-3deg);
	transform-origin: left center;
}

/* Блок контактов и поиска справа */
.aiwin-header-tools {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 1.4rem;
	margin-inline-start: auto;
}

.aiwin-header-tools .header-contacts {
	margin-inline-start: 0;
	gap: 1.2rem;
}

.aiwin-header-tools .header-contacts__item {
	font-weight: 800;
	color: #111;
}

.aiwin-header-tools .header-contacts__link,
.aiwin-header-tools .header-contacts__text {
	color: #111;
	text-decoration: none;
}

.aiwin-header-tools .header-contacts__link:hover,
.aiwin-header-tools .header-search:hover .header-search__text {
	color: var(--aiwin-global-red);
	text-decoration: underline;
}

.aiwin-header-tools .header-contacts__icon,
.aiwin-header-tools .header-search__icon {
	fill: var(--aiwin-global-red);
}

.aiwin-header-tools .header-search__text {
	color: #111;
	font-weight: 800;
	opacity: 1;
}

/* Главное меню */
.aiwin-main-nav {
	position: sticky;
	top: 0;
	z-index: 99997;
	margin-block-end: 0;
	background: #111;
	border-top: 4px solid #000;
	border-bottom: 6px solid var(--aiwin-global-red);
	box-shadow: 0 12px 0 rgba(0,0,0,0.08);
	margin-bottom: 46px;
}

.aiwin-main-nav__wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1.6rem;
	padding-block: 0.85rem;
	border: 0;
}

/* Если кнопка "Все услуги" не нужна для AI-WIN, скрываем */
.aiwin-main-nav .header-terms {
	display: none;
}

/* Чаты в навигации можно оставить, но делаем менее сервисными */
.aiwin-main-nav .site-header__chats {
	color: #fff;
}

.aiwin-main-nav .site-header__chats:hover {
	color: var(--aiwin-global-red);
}

/* Меню */
.aiwin-main-nav .main-menu {
	justify-content: center;
	column-gap: 0;
	row-gap: 0.7rem;
	padding-block: 0;
}

.aiwin-main-nav .main-menu > .menu-item {
	margin: 0;
	font-size: 0.98rem;
	font-weight: 950;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.aiwin-main-nav .main-menu > .menu-item:not(:last-child) {
	margin-inline-end: 0.45rem;
}

.aiwin-main-nav .main-menu > .menu-item > .menu-item__link {
	display: inline-flex;
	align-items: center;
	min-height: 42px;
	padding: 0.65rem 0.95rem;
	color: #fff;
	text-decoration: none;
	border: 2px solid transparent;
	transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.aiwin-main-nav .main-menu > .menu-item > .menu-item__link:hover,
.aiwin-main-nav .main-menu > .current-menu-item > .menu-item__link {
	background: #fff;
	color: #111;
	border-color: #fff;
	text-decoration: none;
	transform: rotate(-2deg);
}

.aiwin-main-nav .main-menu .menu-item-has-children::before {
	filter: brightness(0) invert(1);
}

.aiwin-main-nav .main-menu .sub-menu {
	background: #fff;
	border: 4px solid #111;
	border-radius: 0;
	box-shadow: 8px 8px 0 var(--aiwin-global-red);
}

.aiwin-main-nav .main-menu .sub-menu .menu-item__link {
	color: #111;
	font-weight: 850;
	text-decoration: none;
}

.aiwin-main-nav .main-menu .sub-menu .menu-item__link:hover {
	color: var(--aiwin-global-red);
	text-decoration: underline;
}

/* Мобильная кнопка */
.aiwin-main-nav .site-header__mob--btn {
	color: #fff;
}

.aiwin-main-nav .site-header__mob--btn svg {
	stroke: #fff;
}

/* Панель мобильного меню */
.nav-panel {
	background:
		radial-gradient(#d4d4d4 1px, transparent 1px),
		#f5f5f5;
	background-size: 20px 20px;
	border-right: 5px solid #111;
}

.nav-panel__title {
	color: #111;
	font-weight: 900;
	border-bottom: 3px solid #111;
}

.nav-panel__list li a {
	color: #111;
	font-weight: 850;
}

.nav-panel__list li a:hover {
	color: var(--aiwin-global-red);
}

.nav-panel__list .sub-menu {
	background: #fff;
	border: 3px solid #111;
	border-radius: 0;
	box-shadow: 5px 5px 0 var(--aiwin-global-red);
}

.nav-panel__close svg {
	stroke: #111;
}

/* Поиск */
.search-panel {
	border: 4px solid #111;
	border-radius: 0;
	box-shadow: 10px 10px 0 var(--aiwin-global-red);
}

.search-panel input[type="search"] {
	border: 3px solid #111;
	border-radius: 0;
	font-weight: 800;
}

.search-panel__close {
	border-radius: 0;
	border: 3px solid #111;
}

/* Для главной убираем лишний верхний отступ темы перед первым блоком */
.home .site-main.aiwin-home,
.home .site-main > .aiwin-home:first-child {
	margin-top: 0;
}

/* Адаптация */
@media (max-width: 1200px) {
	.aiwin-header-wrap {
		display: grid;
		grid-template-columns: 1fr auto;
		gap: 1rem;
	}

	.aiwin-header-tools {
		grid-column: 1 / 3;
		justify-content: space-between;
		width: 100%;
	}
}

@media (max-width: 1130px) {
	.aiwin-main-nav__wrap {
		justify-content: space-between;
	}

	.aiwin-main-nav .main-menu {
		display: none;
	}
}

@media (max-width: 700px) {
	.container {
		width: min(var(--width-small), 100% - var(--spacing));
	}

	.aiwin-site-header {
		padding-top: 0.9rem;
	}

	.aiwin-header-wrap {
		display: flex;
		align-items: center;
		gap: 1rem;
	}

	.aiwin-brand__mark {
		width: 48px;
		height: 48px;
		font-size: 1rem;
		box-shadow: 5px 5px 0 var(--aiwin-global-red);
	}

	.aiwin-brand__name {
		font-size: 1.5rem;
	}

	.aiwin-brand__tag {
		font-size: 0.82rem;
	}

	.aiwin-header-tools {
		display: flex;
		width: auto;
		margin-left: auto;
		gap: 0.7rem;
	}

	.aiwin-header-tools .header-contacts {
		display: none;
	}

	.aiwin-header-tools .header-search__text {
		display: none;
	}

	.aiwin-main-nav__wrap {
		padding-block: 0.65rem;
	}

	.aiwin-main-nav .site-header__chats {
		display: none;
	}
}

@media (max-width: 420px) {
	.aiwin-brand__tag {
		display: none;
	}
}

/* Таблицы ai-win.ru — специфичные селекторы */
.entry-content > .wp-block-table table,
.entry-content table,
article table {
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  width: 100%;
  font-size: 15px;
  background: #fff;
  border: 1px solid #e8e4dc !important;
  border-radius: 12px;
  overflow: hidden;
  margin: 1.5rem 0;
}

.entry-content > .wp-block-table,
.entry-content .wp-block-table {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid #e8e4dc;
  margin: 1.5rem 0;
}

.entry-content table thead tr,
article table thead tr {
  background: #f9f8f6 !important;
  border-bottom: 2px solid #cc292b !important;
}

.entry-content table th,
article table th {
  padding: 11px 16px !important;
  text-align: left !important;
  font-weight: 600 !important;
  color: #1a1a1a !important;
  font-size: 13px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  border: none !important;
}

.entry-content table td,
article table td {
  padding: 11px 16px !important;
  color: #333 !important;
  border: none !important;
  border-bottom: 1px solid #f0ece4 !important;
  line-height: 1.6 !important;
  vertical-align: top !important;
}

.entry-content table tbody tr:nth-child(even),
article table tbody tr:nth-child(even) {
  background: #fdfcfb !important;
}

.entry-content table tbody tr:last-child td,
article table tbody tr:last-child td {
  border-bottom: none !important;
}

.entry-content table tbody tr:hover,
article table tbody tr:hover {
  background: #f5f3ef !important;
}

.entry-content > .wp-block-table,
.entry-content .wp-block-table {
  border: 2px solid #cc292b !important;
  border-radius: 12px;
  overflow: hidden;
}

.entry-content table,
article table {
  outline: 2px solid #cc292b !important;
  outline-offset: 0px;
}

.entry-content blockquote,
article blockquote,
.post-content blockquote {
  outline: 2px solid #cc292b !important;
  outline-offset: 0px;
  border-left: none !important;
  border: none !important;
  border-radius: 8px;
  padding: 20px 24px !important;
  background: #ffffff !important;
  margin: 1.5rem 0 !important;
}

.entry-content blockquote p,
article blockquote p {
  color: #1a1a1a !important;
  font-size: 1rem !important;
  font-style: normal !important;
}