/**
 * [2026-11-25, этап 23] Шапка сайта — новый дизайн по утверждённым макетам.
 * Все правила — только внутри .bukhta-header (header.php). Шрифт — прежний (Montserrat), цвета — фирменные.
 * Раскладки:
 *   ≥ 1171 px — компьютер: логотип слева на две строки; вверху название + меню, внизу кнопка и контакты в одну линию;
 *   ≤ 1170 px — планшет/телефон: логотип + название + кнопка меню; кнопки; контакты (граница 1170 px — как у прежнего меню и custom.js).
 */
.header.bukhta-header {
	--bh-gold: #c49c63;
	--bh-gold-line: rgba(196, 156, 99, .7);
	--bh-icon: 22px;
	padding: 0;
	background: linear-gradient(180deg, rgba(20, 16, 12, .84) 0%, rgba(20, 16, 12, .72) 76%, rgba(20, 16, 12, 0) 100%);
	font-family: Montserrat, "Helvetica Neue", Arial, sans-serif;
	color: #fff;
}
.bukhta-header .bukhta-header__inner {
	display: grid;
	box-sizing: border-box;
	max-width: 1440px;
	margin: 0 auto;
	padding: 14px 32px 30px;
	align-items: center;
}

/* ===== Логотип и название ===== */
.bukhta-header .bukhta-header__logo {
	grid-area: logo;
	display: block;
	line-height: 0;
	border: 0;
	outline: none;
}
.bukhta-header .bukhta-header__logo img {
	display: block;
	width: 100%;
	height: auto;
}
.bukhta-header .bukhta-header__top {
	/* Выше строки контактов — выпадающие меню перекрывают её */
	position: relative;
	z-index: 2;
	grid-area: top;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	min-width: 0;
}
.bukhta-header .bukhta-header__title {
	flex: 0 0 auto;
	margin: 0;
	padding: 0;
	border: 0;
	font-weight: 800;
	line-height: 1.1;
	color: #fff;
	white-space: nowrap;
	transition: color .2s ease;
}
.bukhta-header .bukhta-header__title:hover {
	color: var(--bh-gold);
}

/* ===== Кнопки ===== */
.bukhta-header .bukhta-header__actions {
	grid-area: actions;
}
.bukhta-header .header__booking,
.bukhta-header .header__arenda_mob {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: 44px;
	margin: 0;
	padding: 6px 18px;
	border: 2px solid var(--bh-gold);
	border-radius: 6px;
	background: rgba(20, 16, 12, .35);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: .04em;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	white-space: nowrap;
	color: #fff;
	transition: background-color .2s ease, color .2s ease;
}
.bukhta-header .header__booking:hover,
.bukhta-header .header__arenda_mob:hover {
	background: var(--bh-gold);
	color: #fff;
	text-decoration: none;
}
.bukhta-header .header__booking:focus-visible,
.bukhta-header .header__arenda_mob:focus-visible,
.bukhta-header .bukhta-header__contact a:focus-visible,
.bukhta-header .poseidon-logo__link:focus-visible {
	outline: 2px solid var(--bh-gold);
	outline-offset: 3px;
}

/* ===== Контакты: телефон, MAX, почта ===== */
.bukhta-header .bukhta-header__contacts {
	grid-area: contacts;
	display: flex;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}
.bukhta-header .bukhta-header__contact {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
}
/* Вертикальный разделитель слева от пункта */
.bukhta-header .bukhta-header__contact::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 0;
	width: 1px;
	height: 28px;
	margin-top: -14px;
	background: var(--bh-gold-line);
}
.bukhta-header .bukhta-header__contact a {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	color: #fff;
	text-decoration: none;
	text-transform: none;
	white-space: nowrap;
	transition: color .2s ease;
}
.bukhta-header .bukhta-header__contact a:hover {
	color: var(--bh-gold);
}
.bukhta-header .bukhta-header__icon {
	flex: 0 0 auto;
	display: block;
	width: var(--bh-icon);
	height: var(--bh-icon);
}
/* Иконка MAX заполняет весь квадрат — чуть меньше, чтобы визуально совпадать с трубкой и конвертом */
.bukhta-header .bukhta-header__icon--max {
	width: calc(var(--bh-icon) - 2px);
	height: calc(var(--bh-icon) - 2px);
	margin: 1px;
	transition: opacity .2s ease;
}
.bukhta-header .bukhta-header__contact a:hover .bukhta-header__icon--max {
	opacity: .8;
}

/* ===== Меню ===== */
.bukhta-header .main-menu {
	flex: 0 1 auto;
	min-width: 0;
}
.bukhta-header .main-menu__toggle {
	width: 36px;
	height: 28px;
	margin: 0;
	cursor: pointer;
}
.bukhta-header .main-menu__toggle::before {
	top: 2px;
	width: 36px;
	height: 4px;
	border-radius: 2px;
	background: #fff;
	-webkit-box-shadow: 0 10px 0 #fff, 0 20px 0 #fff;
	box-shadow: 0 10px 0 #fff, 0 20px 0 #fff;
}

/* ===================== Компьютер ===================== */
@media (min-width: 1171px) {
	.bukhta-header .bukhta-header__inner {
		grid-template-columns: 132px auto minmax(0, 1fr);
		grid-template-areas:
			"logo top top"
			"logo actions contacts";
		column-gap: 24px;
		row-gap: 14px;
	}
	.bukhta-header .bukhta-header__title {
		font-size: 34px;
	}
	.bukhta-header .header__booking {
		min-width: 230px;
	}
	.bukhta-header .header__arenda_mob {
		display: none;
	}
	/* Контакты — равные отрезки с разделителями, все на одной оси с кнопкой */
	.bukhta-header .bukhta-header__contact {
		flex: 1 1 auto;
		padding: 0 0 0 24px;
	}
	.bukhta-header .bukhta-header__contact--email {
		justify-content: flex-end;
	}

	/* Меню в рамке */
	.bukhta-header .main-menu__list {
		align-items: stretch;
		gap: 0 24px;
		margin: 0;
		padding: 0 22px;
		border: 2px solid var(--bh-gold);
		border-radius: 8px;
		background: rgba(20, 16, 12, .5);
	}
	.bukhta-header .main-menu__list > .main-menu__list-item {
		display: flex;
		align-items: center;
		margin: 0;
		border-bottom: 0;
	}
	.bukhta-header .main-menu__list > .main-menu__list-item > a {
		padding: 13px 0;
		font-size: 13px;
		font-weight: 700;
		line-height: 1.2;
		letter-spacing: .02em;
		white-space: nowrap;
	}
	.bukhta-header .main-menu__list > .current-menu-item > a,
	.bukhta-header .main-menu__list > .current-menu-ancestor > a,
	.bukhta-header .main-menu__list > .current-menu-parent > a {
		color: var(--bh-gold);
	}
	/* Выпадающие меню — плотный тёмный фон, текст читается на любой фотографии */
	.bukhta-header .main-menu__list-item:hover > .sub-menu,
	.bukhta-header .main-menu__list-item:focus-within > .sub-menu {
		display: block !important;
		top: 100%;
		left: -14px;
		width: 260px;
		margin: 0;
		padding: 8px 14px;
		border: 2px solid var(--bh-gold);
		border-radius: 0 0 8px 8px;
		background: rgba(20, 16, 12, .94);
		-webkit-box-shadow: 0 10px 24px rgba(0, 0, 0, .35);
		box-shadow: 0 10px 24px rgba(0, 0, 0, .35);
		opacity: 1;
	}
	.bukhta-header .sub-menu .main-menu__list-item {
		margin: 0;
	}
	.bukhta-header .sub-menu .main-menu__list-item a {
		padding: 7px 0;
		font-size: 12px;
		line-height: 1.35;
		white-space: normal;
	}
}
/* Компьютер, узкий экран — компактнее, чтобы меню помещалось в строку с названием */
@media (min-width: 1171px) and (max-width: 1399px) {
	.bukhta-header .bukhta-header__inner {
		grid-template-columns: 108px auto minmax(0, 1fr);
		column-gap: 18px;
		padding-right: 24px;
		padding-left: 24px;
	}
	.bukhta-header .bukhta-header__title {
		font-size: 28px;
	}
	.bukhta-header .main-menu__list {
		gap: 0 16px;
		padding: 0 16px;
	}
	.bukhta-header .main-menu__list > .main-menu__list-item > a {
		font-size: 12px;
		letter-spacing: 0;
	}
	.bukhta-header .header__booking {
		min-width: 200px;
	}
	.bukhta-header .bukhta-header__contact {
		padding-left: 18px;
	}
	.bukhta-header .bukhta-header__contact a {
		font-size: 15px;
	}
}

/* ===================== Планшет и телефон ===================== */
@media (max-width: 1170px) {
	.header.bukhta-header {
		--bh-icon: 20px;
	}
	.bukhta-header .bukhta-header__inner {
		grid-template-columns: auto minmax(0, 1fr);
		grid-template-areas:
			"logo top"
			"actions actions"
			"contacts contacts";
		column-gap: 14px;
		row-gap: 18px;
		padding: 14px 24px 30px;
	}
	.bukhta-header .bukhta-header__logo {
		width: 96px;
	}
	.bukhta-header .bukhta-header__title {
		flex: 1 1 auto;
		min-width: 0;
		font-size: 34px;
	}
	.bukhta-header .main-menu {
		flex: 0 0 auto;
	}
	/* Две кнопки одинаковой ширины и высоты */
	.bukhta-header .bukhta-header__actions {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 260px));
		justify-content: center;
		gap: 16px;
	}
	.bukhta-header .header__booking,
	.bukhta-header .header__arenda_mob {
		display: flex;
		width: 100%;
		min-height: 46px;
		padding: 6px 10px;
	}
	.bukhta-header .bukhta-header__contacts {
		flex-wrap: wrap;
		justify-content: center;
		row-gap: 14px;
	}
	.bukhta-header .bukhta-header__contact {
		padding: 0 22px;
	}
	.bukhta-header .bukhta-header__contact--phone::before {
		display: none;
	}
	/* Открытое мобильное меню — плотный фон, чтобы шапка и фото не просвечивали (механизм открытия прежний) */
	.bukhta-header .main-menu__list.main-menu__list--active {
		background: rgba(20, 16, 12, .97);
	}
}
/* Телефон: почта — отдельной строкой по центру */
@media (max-width: 767px) {
	.bukhta-header .bukhta-header__inner {
		column-gap: 12px;
		row-gap: 16px;
		padding: 12px 16px 26px;
	}
	.bukhta-header .bukhta-header__logo {
		width: clamp(62px, 19vw, 84px);
	}
	.bukhta-header .bukhta-header__title {
		font-size: clamp(21px, 6.6vw, 30px);
	}
	.bukhta-header .main-menu__toggle {
		width: 32px;
	}
	.bukhta-header .main-menu__toggle::before {
		width: 32px;
	}
	.bukhta-header .bukhta-header__actions {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}
	.bukhta-header .header__booking,
	.bukhta-header .header__arenda_mob {
		min-height: 44px;
		font-size: clamp(12px, 3.5vw, 14px);
		letter-spacing: .03em;
	}
	/* Телефон и MAX — в одну строку, разделитель посередине */
	.bukhta-header .bukhta-header__contact--phone {
		padding: 0 12px 0 0;
	}
	.bukhta-header .bukhta-header__contact--max {
		padding: 0 0 0 12px;
	}
	.bukhta-header .bukhta-header__contact a {
		gap: 8px;
		font-size: clamp(14px, 3.7vw, 15px);
	}
	.bukhta-header .bukhta-header__contact--email {
		flex: 0 0 100%;
	}
	.bukhta-header .bukhta-header__contact--email::before {
		display: none;
	}
}
/* Узкие телефоны: телефон и MAX не помещаются в строку — каждый своей строкой, без разделителя */
@media (max-width: 359px) {
	.bukhta-header .bukhta-header__contact {
		flex: 0 0 100%;
		padding: 0;
	}
	.bukhta-header .bukhta-header__contact::before {
		display: none;
	}
}
