/**
 * ATB Global: Header / Footer
 *
 * Назначение:
 * - глобальный header и footer сайта;
 * - ширина задаётся только через .atb-container из layout.css;
 * - этот файл отвечает за визуал, сетку, цвета и адаптив header/footer;
 * - без page-id/body-костылей, без !important, без своих container width.
 */

/* Header */
.atb-site-header {
	position: relative;
	z-index: 50;
	background: #05080d;
	color: #ffffff;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.atb-site-header__inner {
	display: grid;
	grid-template-columns: minmax(220px, auto) minmax(0, 1fr) auto;
	gap: 28px;
	align-items: center;
	min-height: 82px;
}

.atb-site-header__brand {
	min-width: 0;
}

.atb-site-header__logo,
.atb-site-header__logo:visited {
	display: inline-flex;
	flex-direction: column;
	gap: 2px;
	color: #ffffff;
	text-decoration: none;
}

.atb-site-header__name {
	color: #ffffff;
	font-size: 18px;
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.025em;
}

.atb-site-header__tagline {
	color: rgba(255, 255, 255, 0.58);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.25;
}

.atb-site-header__nav {
	justify-self: center;
	min-width: 0;
}

.atb-site-header__menu {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.atb-site-header__menu a,
.atb-site-header__menu a:visited {
	display: inline-flex;
	align-items: center;
	min-height: 38px;
	padding: 0 12px;
	border-radius: 999px;
	color: rgba(255, 255, 255, 0.78);
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
}

.atb-site-header__menu a:hover,
.atb-site-header__menu a:focus {
	background: rgba(255, 255, 255, 0.08);
	color: #ffffff;
	text-decoration: none;
}

.atb-site-header__actions {
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	gap: 12px;
}

.atb-site-header__phone,
.atb-site-header__phone:visited {
	color: rgba(255, 255, 255, 0.82);
	font-size: 14px;
	font-weight: 800;
	text-decoration: none;
	white-space: nowrap;
}

.atb-site-header__phone:hover,
.atb-site-header__phone:focus {
	color: #ffffff;
	text-decoration: none;
}

.atb-site-header__button,
.atb-site-header__button:visited {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 0 18px;
	border-radius: 8px;
	background: #2563eb;
	color: #ffffff;
	font-size: 14px;
	font-weight: 800;
	text-decoration: none;
	white-space: nowrap;
	box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

.atb-site-header__button:hover,
.atb-site-header__button:focus {
	background: #1d4ed8;
	color: #ffffff;
	text-decoration: none;
}

/* Footer */
.atb-site-footer {
	background: #05080d;
	color: rgba(255, 255, 255, 0.72);
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.atb-site-footer__inner {
	display: grid;
	grid-template-columns: minmax(220px, 0.9fr) minmax(0, 2fr);
	gap: 54px;
	padding: 68px 0 52px;
}

.atb-site-footer__brand {
	min-width: 0;
}

.atb-site-footer__logo,
.atb-site-footer__logo:visited {
	display: inline-flex;
	color: #ffffff;
	font-size: 20px;
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.03em;
	text-decoration: none;
}

.atb-site-footer__logo:hover,
.atb-site-footer__logo:focus {
	color: #ffffff;
	text-decoration: none;
}

.atb-site-footer__text {
	margin: 16px 0 0;
	color: rgba(255, 255, 255, 0.68);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.55;
}

.atb-site-footer__contact {
	margin: 18px 0 0;
	color: #ffffff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.55;
}

.atb-site-footer__contact a,
.atb-site-footer__contact a:visited {
	color: #ffffff;
	text-decoration: none;
}

.atb-site-footer__contact a:hover,
.atb-site-footer__contact a:focus {
	color: #60a5fa;
	text-decoration: none;
}

.atb-site-footer__columns {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 28px;
}

.atb-site-footer__column {
	min-width: 0;
}

.atb-site-footer__title {
	margin: 0 0 14px;
	color: #ffffff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.01em;
}

.atb-site-footer__menu {
	display: grid;
	gap: 9px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.atb-site-footer__menu a,
.atb-site-footer__menu a:visited {
	display: inline-flex;
	color: rgba(255, 255, 255, 0.72);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.45;
	text-decoration: none;
}

.atb-site-footer__menu a:hover,
.atb-site-footer__menu a:focus {
	color: #60a5fa;
	text-decoration: none;
}

.atb-site-footer__bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	padding: 20px 0;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	color: rgba(255, 255, 255, 0.55);
}

.atb-site-footer__copy {
	margin: 0;
	color: rgba(255, 255, 255, 0.55);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.45;
}

/* Responsive */
@media (max-width: 1100px) {
	.atb-site-header__inner {
		grid-template-columns: 1fr;
		gap: 14px;
		padding: 16px 0;
	}

	.atb-site-header__nav {
		justify-self: start;
	}

	.atb-site-header__menu {
		justify-content: flex-start;
	}

	.atb-site-header__actions {
		justify-content: flex-start;
	}

	.atb-site-footer__inner {
		grid-template-columns: 1fr;
		gap: 36px;
	}

	.atb-site-footer__columns {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.atb-site-header__phone {
		display: none;
	}

	.atb-site-header__button {
		width: 100%;
	}

	.atb-site-header__actions {
		width: 100%;
	}

	.atb-site-footer__inner {
		padding: 48px 0 38px;
	}

	.atb-site-footer__columns {
		grid-template-columns: 1fr;
		gap: 28px;
	}

	.atb-site-footer__bottom {
		align-items: flex-start;
		flex-direction: column;
	}
}

/* === ATB accessibility skip link: start === */
/*
 * Назначение:
 * - скрывает ссылку перехода к контенту;
 * - оставляет её доступной для клавиатуры;
 * - показывает только при фокусе.
 */
.atb-skip-link,
.skip-link,
.screen-reader-text {
	position: absolute;
	top: 0;
	left: 0;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.atb-skip-link:focus,
.skip-link:focus,
.screen-reader-text:focus {
	position: fixed;
	top: 12px;
	left: 12px;
	z-index: 100000;
	width: auto;
	height: auto;
	margin: 0;
	padding: 10px 14px;
	overflow: visible;
	clip-path: none;
	border-radius: 8px;
	background: #ffffff;
	color: #0f172a;
	font-size: 14px;
	font-weight: 800;
	line-height: 1.2;
	text-decoration: none;
	box-shadow: 0 12px 30px rgba(15, 23, 42, 0.22);
}
/* === ATB accessibility skip link: end === */

/* === ATB Mobile Header: start === */
/*
 * Назначение:
 * - мобильная шапка с нативным burger/details меню;
 * - без JavaScript;
 * - desktop header не меняется;
 * - на телефоне меню и телефон из desktop скрываются.
 */

.atb-site-header__mobile {
	display: none;
}

@media (max-width: 768px) {
	.atb-site-header {
		position: relative;
		z-index: 80;
		overflow: visible;
	}

	.atb-site-header__inner {
		position: relative;
		min-height: 58px;
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 14px;
		padding-top: 10px;
		padding-bottom: 10px;
	}

	.atb-site-header__brand {
		flex: 1 1 auto;
		min-width: 0;
	}

	.atb-site-header__logo {
		display: flex;
		flex-direction: column;
		min-width: 0;
		text-decoration: none;
	}

	.atb-site-header__name {
		max-width: 210px;
		overflow: hidden;
		font-size: 14px;
		line-height: 1.1;
		letter-spacing: -0.02em;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.atb-site-header__tagline {
		max-width: 210px;
		overflow: hidden;
		font-size: 10px;
		line-height: 1.2;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.atb-site-header__nav,
	.atb-site-header__actions {
		display: none;
	}

	.atb-site-header__mobile {
		position: relative;
		flex: 0 0 auto;
		display: block;
	}

	.atb-site-header__mobile-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 9px;
		min-height: 36px;
		padding: 0 13px;
		border: 1px solid rgba(255, 255, 255, .16);
		border-radius: 10px;
		color: #fff;
		background: rgba(255, 255, 255, .06);
		cursor: pointer;
		font-size: 12px;
		font-weight: 800;
		line-height: 36px;
		list-style: none;
	}

	.atb-site-header__mobile-toggle::-webkit-details-marker {
		display: none;
	}

	.atb-site-header__mobile-toggle-icon {
		position: relative;
		display: block;
		width: 16px;
		height: 2px;
		border-radius: 999px;
		background: #fff;
		box-shadow: 0 -5px 0 #fff, 0 5px 0 #fff;
	}

	.atb-site-header__mobile-panel {
		position: absolute;
		top: calc(100% + 10px);
		right: 0;
		z-index: 90;
		width: min(300px, calc(100vw - 32px));
		padding: 14px;
		border: 1px solid rgba(255, 255, 255, .12);
		border-radius: 16px;
		background: #070b12;
		box-shadow: 0 24px 70px rgba(0, 0, 0, .42);
	}

	.atb-site-header__mobile-menu {
		display: grid;
		gap: 4px;
		margin: 0;
		padding: 0;
		list-style: none;
	}

	.atb-site-header__mobile-menu a {
		display: block;
		padding: 11px 12px;
		border-radius: 10px;
		color: rgba(255, 255, 255, .9);
		font-size: 14px;
		font-weight: 750;
		line-height: 1.25;
		text-decoration: none;
	}

	.atb-site-header__mobile-menu a:hover,
	.atb-site-header__mobile-menu .current-menu-item > a {
		color: #fff;
		background: rgba(37, 99, 235, .22);
	}

	.atb-site-header__mobile-actions {
		display: grid;
		gap: 10px;
		margin-top: 12px;
		padding-top: 12px;
		border-top: 1px solid rgba(255, 255, 255, .1);
	}

	.atb-site-header__mobile-phone {
		color: rgba(255, 255, 255, .86);
		font-size: 13px;
		font-weight: 800;
		text-decoration: none;
	}

	.atb-site-header__mobile-button {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-height: 40px;
		padding: 0 16px;
		border-radius: 10px;
		color: #fff;
		background: #2563eb;
		font-size: 13px;
		font-weight: 850;
		text-decoration: none;
	}

	.atb-site-header__mobile-button:hover {
		background: #1d4ed8;
	}
}

@media (max-width: 380px) {
	.atb-site-header__name {
		max-width: 170px;
		font-size: 13px;
	}

	.atb-site-header__tagline {
		max-width: 170px;
	}

	.atb-site-header__mobile-toggle {
		padding: 0 11px;
		font-size: 11px;
	}
}
/* === ATB Mobile Header: end === */
