/* Каркас: шапка, меню, подвал, шапка внутренних страниц. */

/* Шапка */
.gs-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--gs-color-primary);
	color: var(--gs-color-white);
}

.gs-header__inner {
	display: flex;
	align-items: center;
	gap: 24px;
	min-height: var(--gs-header-height);
}

.gs-header__brand {
	display: flex;
	align-items: center;
	flex: 0 0 auto;
}

.gs-header__brand img {
	width: auto;
	max-height: 40px;
}

.gs-header__brand .custom-logo-link {
	display: flex;
	align-items: center;
}

.gs-header__title {
	font-family: var(--gs-font-heading);
	font-size: 21px;
	font-weight: 700;
	letter-spacing: -.01em;
	color: var(--gs-color-white);
}

.gs-header__title span {
	color: var(--gs-color-accent);
}

.gs-header__title:hover {
	color: var(--gs-color-white);
}

.gs-header__toggle {
	display: none;
	width: 44px;
	height: 44px;
	margin-inline-start: auto;
	padding: 0;
	border: 0;
	background: none;
	color: var(--gs-color-white);
}

.gs-header__toggle-bar,
.gs-header__toggle-bar::before,
.gs-header__toggle-bar::after {
	display: block;
	width: 24px;
	height: 2px;
	background: currentColor;
	transition: transform var(--gs-transition-fast) ease, opacity var(--gs-transition-fast) ease;
}

.gs-header__toggle-bar {
	position: relative;
	margin-inline: auto;
}

.gs-header__toggle-bar::before,
.gs-header__toggle-bar::after {
	content: "";
	position: absolute;
	inset-inline-start: 0;
}

.gs-header__toggle-bar::before {
	top: -7px;
}

.gs-header__toggle-bar::after {
	top: 7px;
}

.gs-header__toggle[aria-expanded="true"] .gs-header__toggle-bar {
	background: transparent;
}

.gs-header__toggle[aria-expanded="true"] .gs-header__toggle-bar::before {
	top: 0;
	transform: rotate(45deg);
}

.gs-header__toggle[aria-expanded="true"] .gs-header__toggle-bar::after {
	top: 0;
	transform: rotate(-45deg);
}

.gs-header__nav {
	margin-inline-start: auto;
}

.gs-header__actions {
	display: flex;
	align-items: center;
	gap: 16px;
	flex: 0 0 auto;
}

.gs-header__docs {
	font-size: 13px;
	font-weight: 600;
	color: #cfd8e0;
}

.gs-header__docs:hover,
.gs-header__docs:focus-visible {
	color: var(--gs-color-white);
}

.gs-header__cta {
	padding: 10px 18px;
	font-size: 13px;
}

/* Меню */
.gs-menu {
	display: flex;
	align-items: center;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.gs-menu li {
	position: relative;
}

.gs-menu > li > a {
	position: relative;
	display: flex;
	align-items: center;
	padding: 0 14px;
	height: var(--gs-header-height);
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.2;
	color: #cfd8e0;
	transition: color var(--gs-transition-fast) ease;
}

.gs-menu > li > a::after {
	content: "";
	position: absolute;
	inset-inline: 14px;
	bottom: 0;
	height: 2px;
	background: var(--gs-color-accent);
	opacity: 0;
	transition: opacity var(--gs-transition-fast) ease;
}

.gs-menu > li:hover > a,
.gs-menu > li:focus-within > a,
.gs-menu > li.current-menu-item > a,
.gs-menu > li.current-menu-ancestor > a {
	color: var(--gs-color-white);
}

.gs-menu > li:hover > a::after,
.gs-menu > li:focus-within > a::after,
.gs-menu > li.current-menu-item > a::after,
.gs-menu > li.current-menu-ancestor > a::after {
	opacity: 1;
}

.gs-menu > li.menu-item-has-children > a::before {
	content: "";
	order: 2;
	width: 0;
	height: 0;
	margin-inline-start: 7px;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid currentColor;
	opacity: .6;
}

.gs-menu .sub-menu {
	position: absolute;
	top: 100%;
	inset-inline-start: 0;
	z-index: 20;
	min-width: 280px;
	margin: 0;
	padding: 8px;
	list-style: none;
	background: var(--gs-color-primary-soft);
	border: 1px solid rgba(255, 255, 255, .09);
	border-radius: var(--gs-radius-field);
	box-shadow: 0 18px 40px rgba(0, 0, 0, .28);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity var(--gs-transition-fast) ease, transform var(--gs-transition-fast) ease, visibility var(--gs-transition-fast) ease;
}

.gs-menu li:hover > .sub-menu,
.gs-menu li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.gs-menu .sub-menu a {
	display: block;
	padding: 9px 12px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.35;
	color: #d8e0e7;
}

.gs-menu .sub-menu a:hover,
.gs-menu .sub-menu a:focus-visible {
	background: rgba(255, 255, 255, .07);
	color: var(--gs-color-white);
}

.gs-menu .sub-menu .gs-menu__all a {
	margin-bottom: 4px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--gs-color-muted-light);
}

/* Подвал */
.gs-footer {
	background: var(--gs-color-primary);
	color: #c9d3dd;
}

.gs-footer__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
	gap: 32px;
	padding-block: 56px 40px;
}

.gs-footer__column {
	min-width: 0;
}

.gs-footer__brand {
	display: inline-block;
	margin-bottom: 14px;
	font-family: var(--gs-font-heading);
	font-size: 24px;
	font-weight: 700;
	letter-spacing: -.01em;
	color: var(--gs-color-white);
}

.gs-footer__brand span {
	color: var(--gs-color-accent);
}

.gs-footer__text {
	max-width: 300px;
	margin: 0;
	font-size: 13px;
	line-height: 1.7;
	color: #9fb0bf;
}

.gs-footer__heading {
	margin: 0 0 16px;
	font-family: var(--gs-font-text);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--gs-color-muted-light);
}

.gs-footer__menu {
	margin: 0;
	padding: 0;
	list-style: none;
}

.gs-footer__menu li + li {
	margin-top: 8px;
}

.gs-footer__menu a {
	font-size: 13px;
	color: #c9d3dd;
}

.gs-footer__menu a:hover,
.gs-footer__menu a:focus-visible {
	color: var(--gs-color-accent-light);
}

.gs-footer__bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-block: 18px;
	border-top: 1px solid rgba(255, 255, 255, .12);
}

.gs-footer__copyright,
.gs-footer__note {
	margin: 0;
	font-size: 12px;
	line-height: 1.5;
	color: #8fa1b1;
}

/* Шапка внутренней страницы */
.gs-page-head {
	padding-block: 48px 44px;
	background: var(--gs-color-surface);
	border-bottom: 1px solid var(--gs-color-border);
}

.gs-page-head__title {
	max-width: 900px;
	margin: 0 0 14px;
	font-size: clamp(32px, 4.4vw, 52px);
	line-height: 1.08;
	letter-spacing: -.015em;
	color: var(--gs-color-primary);
}

.gs-page-head__description {
	max-width: 760px;
	margin: 0;
	font-size: 16px;
	line-height: 1.7;
	color: var(--gs-color-muted);
}

.gs-page-head__meta {
	margin: 16px 0 0;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--gs-color-muted);
}

.gs-page-head--article {
	padding-block: 44px 40px;
}

/* Крошки */
.gs-breadcrumbs {
	margin-bottom: 20px;
	font-size: 12px;
	line-height: 1.5;
	color: var(--gs-color-muted);
}

.gs-breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.gs-breadcrumbs li {
	display: flex;
	align-items: center;
	gap: 6px;
}

.gs-breadcrumbs li + li::before {
	content: "/";
	color: var(--gs-color-border);
}

.gs-breadcrumbs a {
	color: var(--gs-color-muted);
}

.gs-breadcrumbs a:hover {
	color: var(--gs-color-accent);
}

.gs-breadcrumbs [aria-current="page"] {
	color: var(--gs-color-primary);
}

@media (max-width: 1024px) {
	.gs-header__inner {
		min-height: var(--gs-header-height-mobile);
		gap: 12px;
	}

	.gs-header__title {
		font-size: 18px;
	}

	.gs-header__toggle {
		display: block;
		order: 3;
	}

	.gs-header__nav {
		position: absolute;
		top: 100%;
		inset-inline: 0;
		display: none;
		max-height: calc(100vh - var(--gs-header-height-mobile));
		overflow-y: auto;
		margin: 0;
		padding: 8px 0 16px;
		background: var(--gs-color-primary);
		border-top: 1px solid rgba(255, 255, 255, .12);
		box-shadow: 0 18px 40px rgba(0, 0, 0, .3);
	}

	.gs-header__nav.is-open {
		display: block;
	}

	.gs-menu {
		display: block;
	}

	.gs-menu > li {
		border-bottom: 1px solid rgba(255, 255, 255, .08);
	}

	.gs-menu > li > a {
		height: auto;
		padding: 14px 20px;
		font-size: 14px;
	}

	.gs-menu > li > a::after {
		display: none;
	}

	.gs-menu > li.menu-item-has-children > a::before {
		margin-inline-start: auto;
		transition: transform var(--gs-transition-fast) ease;
	}

	.gs-menu > li.menu-item--open > a::before {
		transform: rotate(180deg);
	}

	.gs-menu .sub-menu {
		position: static;
		display: none;
		min-width: 0;
		padding: 0 12px 10px;
		border: 0;
		border-radius: 0;
		box-shadow: none;
		opacity: 1;
		visibility: visible;
		transform: none;
		background: transparent;
	}

	.gs-menu li.menu-item--open > .sub-menu {
		display: block;
	}

	.gs-menu .sub-menu a {
		padding: 10px 20px;
		font-size: 13px;
		color: #b9c6d1;
	}

	.gs-header__docs {
		display: none;
	}

	.gs-header__actions {
		gap: 0;
	}

	.gs-header__cta {
		padding: 9px 12px;
		font-size: 12px;
	}

	.gs-footer__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.gs-page-head {
		padding-block: 40px 36px;
	}
}

@media (max-width: 767px) {
	.gs-header__cta {
		display: none;
	}

	.gs-footer__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 28px;
		padding-block: 40px 32px;
	}

	.gs-footer__bottom {
		flex-direction: column;
		align-items: flex-start;
		gap: 6px;
	}

	.gs-page-head {
		padding-block: 32px 28px;
	}

	.gs-breadcrumbs {
		margin-bottom: 16px;
	}
}
