/**
 * Header nero stile “Seasons” + form MPHB in barra dedicata.
 *
 * @package Albatross_Child
 */

/* -------------------------------------------------------------------------
   Struttura header
   ------------------------------------------------------------------------- */

.site-header.ipp-header-seasons--dark {
	background: #0a0a0a !important;
	color: #f5f5f5 !important;
	border-bottom: none !important;
	box-shadow: none;
	flex-direction: column;
	align-items: stretch;
	padding: 0 0.85rem !important;
}

@media (min-width: 768px) {
	.site-header.ipp-header-seasons--dark {
		padding: 0 1.25rem !important;
	}
}

@media (min-width: 992px) {
	.site-header.ipp-header-seasons--dark {
		padding: 0 1.5rem !important;
	}
}

.site-header.ipp-header-seasons--dark.site-header--child-sticky.is-scrolled {
	background: #050505 !important;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

.ipp-header-seasons__top {
	border-bottom: none;
	box-shadow: none;
	min-height: 55px;
	height: 55px;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	width: 100%;
	position: relative;
	z-index: 2;
}

.ipp-header-seasons__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	column-gap: 0.75rem;
	row-gap: 0;
	padding-top: 0;
	padding-bottom: 0;
	max-width: 1340px;
	margin-left: auto;
	margin-right: auto;
	width: 100%;
	min-height: 0;
}

.ipp-header-seasons__brand {
	grid-column: 1;
	justify-self: start;
	min-width: 0;
}

.ipp-header-seasons__brand .site-branding {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex: 0 1 auto;
	max-width: 100%;
}

.ipp-header-seasons__brand .custom-logo-link {
	position: relative;
	z-index: 2;
}

.ipp-header-seasons__brand .custom-logo-link img {
	max-height: 34px;
	width: auto;
	height: auto;
	display: block;
}

/*
 * Albatross su home con classe .absolute nasconde il logo standard e mostra solo .light;
 * il child rimuove il logo light → nessuna immagine. Forziamo il logo principale.
 */
body:not(.menu-opened) .site-header.ipp-header-seasons--dark.absolute .custom-logo-link:not(.light) {
	display: inline-block !important;
}

/* Nessun secondo logo “light” dal tema padre */
.ipp-header-seasons--dark .custom-logo-link.light {
	display: none !important;
}

.ipp-header-seasons__nav {
	grid-column: 2;
	justify-self: center;
	display: flex;
	justify-content: center;
	min-width: 0;
	max-width: 100%;
}

/* Pulsante hamburger (solo mobile, vedi sotto) */
.ipp-nav-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 4px;
	background: transparent;
	color: #f5f5f5;
	cursor: pointer;
	flex-shrink: 0;
	transition: border-color 0.2s ease, background 0.2s ease;
}

.ipp-nav-toggle:hover,
.ipp-nav-toggle:focus-visible {
	border-color: #c9a962;
	background: rgba(201, 169, 98, 0.12);
	outline: none;
}

.ipp-nav-toggle__bars {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 20px;
	height: 16px;
}

.ipp-nav-toggle__bar {
	display: block;
	height: 2px;
	width: 100%;
	background: currentColor;
	border-radius: 1px;
	transition: transform 0.25s ease, opacity 0.2s ease;
}

body.ipp-menu-open .ipp-nav-toggle__bar:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

body.ipp-menu-open .ipp-nav-toggle__bar:nth-child(2) {
	opacity: 0;
}

body.ipp-menu-open .ipp-nav-toggle__bar:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

.ipp-nav-backdrop {
	display: none;
	position: fixed;
	inset: 0;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 1;
}

body.ipp-menu-open .ipp-nav-backdrop {
	display: block;
}

/* Tablet: menu orizzontale scrollabile sotto il brand */
@media (max-width: 1023px) and (min-width: 768px) {
	.ipp-header-seasons__top {
		height: auto;
		min-height: 55px;
		padding-top: 0.35rem;
		padding-bottom: 0.35rem;
	}

	.ipp-header-seasons__inner {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 0.35rem;
	}

	.ipp-header-seasons__brand {
		grid-column: auto;
		justify-self: stretch;
	}

	.ipp-header-seasons__brand .site-branding {
		justify-content: space-between;
	}

	.ipp-header-seasons__nav {
		grid-column: auto;
		justify-self: stretch;
		justify-content: flex-start;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		padding-bottom: 0.15rem;
		margin-left: -0.25rem;
		margin-right: -0.25rem;
		padding-left: 0.25rem;
		padding-right: 0.25rem;
	}

	.ipp-header-seasons__menu {
		flex-wrap: nowrap;
		justify-content: flex-start;
		gap: 0.25rem 1.1rem;
	}
}

/* Mobile: burger + pannello a tutta larghezza */
@media (max-width: 767px) {
	.ipp-header-seasons__top {
		height: auto;
		min-height: 52px;
		padding-top: 0.4rem;
		padding-bottom: 0.4rem;
	}

	.ipp-header-seasons__inner {
		display: flex;
		flex-direction: row;
		flex-wrap: nowrap;
		align-items: center;
		justify-content: space-between;
		gap: 0.65rem;
		column-gap: 0.65rem;
		row-gap: 0;
	}

	.ipp-header-seasons__brand {
		flex: 1 1 auto;
		min-width: 0;
	}

	.ipp-header-seasons__brand .site-branding {
		justify-content: flex-start;
	}

	.ipp-nav-toggle {
		display: inline-flex;
		grid-column: auto;
	}

	.ipp-header-seasons__nav {
		position: fixed;
		top: 0;
		right: 0;
		left: auto;
		width: min(20rem, 88vw);
		height: 100vh;
		height: 100dvh;
		max-height: none;
		margin: 0;
		padding: 4.25rem 1.15rem 1.5rem;
		box-sizing: border-box;
		background: #0a0a0a;
		border-left: 1px solid rgba(255, 255, 255, 0.08);
		box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45);
		z-index: 3;
		justify-content: flex-start;
		align-items: stretch;
		overflow-x: hidden;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		transform: translateX(100%);
		visibility: hidden;
		transition: transform 0.28s ease, visibility 0.28s;
	}

	body.ipp-menu-open .ipp-header-seasons__nav {
		transform: translateX(0);
		visibility: visible;
	}

	.ipp-header-seasons__menu {
		flex-direction: column;
		flex-wrap: nowrap;
		align-items: stretch;
		justify-content: flex-start;
		gap: 0;
		width: 100%;
	}

	.ipp-header-seasons__menu > li {
		width: 100%;
		border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	}

	.ipp-header-seasons__menu > li > a {
		display: block;
		padding: 0.9rem 0;
		font-size: 0.875rem;
		border-bottom: none;
	}
}

@media (min-width: 768px) {
	.ipp-nav-toggle {
		display: none !important;
	}

	.ipp-nav-backdrop {
		display: none !important;
	}
}

.ipp-header-seasons__menu {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.25rem 1.75rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.ipp-header-seasons__menu > li {
	display: flex;
	align-items: center;
	margin: 0;
	padding: 0;
}

.ipp-header-seasons__menu > li > a {
	color: #f0f0f0 !important;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none;
	padding: 0.15rem 0;
	line-height: 1.25;
	border-bottom: 2px solid transparent;
	transition: color 0.2s ease, border-color 0.2s ease;
}

.ipp-header-seasons__menu > li > a:hover,
.ipp-header-seasons__menu > li.current-menu-item > a,
.ipp-header-seasons__menu > li.current-menu-ancestor > a {
	color: #fff !important;
	border-bottom-color: #c9a962;
}

/* -------------------------------------------------------------------------
   Barra prenotazione MPHB
   ------------------------------------------------------------------------- */

.ipp-header-seasons__booking {
	background: #000;
	border-top: 1px solid rgba(255, 255, 255, 0.06);
	padding: 0.45rem 0 0.65rem;
}

/* Sotto lo slider home: attaccata all’hero, niente ombra che “stacca” */
.ipp-header-seasons__booking--below-hero {
	border-top: none;
	padding: 0.85rem 0 1.1rem;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
	position: relative;
	z-index: 25;
}

/*
 * Page Wide / page default: .site-main > .hentry ha padding laterale (tema padre).
 * L’hero (.page-header-wrapper) usa margini negativi per il full-bleed; senza questo
 * la barra MPHB resta rientrata rispetto alle pagine “Full Width” (padding .hentry = 0).
 * Stessi valori di style.css per body.page-has-thumbnail .page-header-wrapper.
 */
.site-main:not(.full-width-page):not(.front-page) > .hentry > .ipp-header-seasons__booking--below-hero {
	margin-left: -10px;
	margin-right: -10px;
}

@media (min-width: 768px) {
	.site-main:not(.full-width-page):not(.front-page) > .hentry > .ipp-header-seasons__booking--below-hero {
		margin-left: -25px;
		margin-right: -25px;
	}
}

@media (min-width: 992px) {
	.site-main:not(.full-width-page):not(.front-page) > .hentry > .ipp-header-seasons__booking--below-hero {
		margin-left: -50px;
		margin-right: -50px;
	}
}

/* Home: barra prenotazione subito sotto lo slider, full width, niente ombra */
.site-main.front-page > .hentry > .ipp-header-seasons__booking--below-hero {
	box-shadow: none;
	margin-top: 0;
	margin-left: 0 !important;
	margin-right: 0 !important;
	width: 100%;
	max-width: none;
	box-sizing: border-box;
}

.ipp-header-seasons__booking-inner {
	max-width: 1340px;
	margin-left: auto;
	margin-right: auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	box-sizing: border-box;
	padding-left: 0.85rem;
	padding-right: 0.85rem;
}

@media (min-width: 768px) {
	.ipp-header-seasons__booking-inner {
		padding-left: 1.25rem;
		padding-right: 1.25rem;
	}
}

.ipp-header-seasons__booking .mphb_sc_search-wrapper,
.ipp-header-seasons__booking .mphb_sc_search-wrapper.ipp-mphb-header-search {
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	padding: 0 !important;
	margin: 0 !important;
	width: 100%;
	max-width: 56rem;
	display: flex;
	justify-content: center;
}

.ipp-header-seasons__booking form.mphb_sc_search-form {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: center;
	gap: 0.75rem 1.25rem;
	margin: 0 auto;
	width: 100%;
}

.ipp-header-seasons__booking .mphb_sc_search-form > p {
	margin: 0 !important;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	flex: 0 1 auto;
	min-width: 8rem;
	max-width: 14rem;
}

.ipp-header-seasons__booking .mphb_sc_search-form > p br {
	display: none;
}

.ipp-header-seasons__booking .mphb_sc_search-form label {
	color: rgba(255, 255, 255, 0.72) !important;
	font-size: 0.75rem !important;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	margin: 0 !important;
}

.ipp-header-seasons__booking .mphb_sc_search-form abbr {
	text-decoration: none;
	border: none;
	color: #c9a962;
}

.ipp-header-seasons__booking .mphb_sc_search-form input.mphb-datepick,
.ipp-header-seasons__booking .mphb_sc_search-form select {
	width: 100% !important;
	max-width: 100%;
	background: #1a1a1a !important;
	border: 1px solid rgba(255, 255, 255, 0.2) !important;
	color: #fff !important;
	border-radius: 2px;
	padding: 0.6rem 0.75rem !important;
	font-size: 1rem;
	min-height: 2.75rem;
	box-sizing: border-box;
}

.ipp-header-seasons__booking .mphb_sc_search-form input.mphb-datepick:focus,
.ipp-header-seasons__booking .mphb_sc_search-form select:focus {
	border-color: #c9a962 !important;
	outline: none;
	box-shadow: 0 0 0 1px rgba(201, 169, 98, 0.35);
}

.ipp-header-seasons__booking .mphb_sc_search-submit-button-wrapper {
	flex: 0 0 auto;
	min-width: auto;
	align-self: flex-end;
}

/* Barre compatte: nasconde il messaggio EN con title="required" hardcoded nel plugin */
.ipp-header-seasons__booking .mphb-required-fields-tip,
.ipp-mphb-header-search .mphb-required-fields-tip {
	display: none !important;
}

.ipp-header-seasons__booking .mphb_sc_search-submit-button-wrapper input[type="submit"],
.ipp-header-seasons__booking .mphb_sc_search-submit-button-wrapper .button {
	background: #c9a962 !important;
	color: #0a0a0a !important;
	border: none !important;
	font-weight: 700;
	font-size: 0.8125rem !important;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	padding: 0.75rem 1.5rem !important;
	min-height: 2.75rem;
	border-radius: 2px;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.15s ease;
}

.ipp-header-seasons__booking .mphb_sc_search-submit-button-wrapper input[type="submit"]:hover {
	background: #dfc07a !important;
}

@media (max-width: 767px) {
	.ipp-header-seasons__booking form.mphb_sc_search-form {
		flex-direction: column;
		align-items: stretch;
	}

	.ipp-header-seasons__booking .mphb_sc_search-submit-button-wrapper {
		align-self: stretch;
	}

	.ipp-header-seasons__booking .mphb_sc_search-submit-button-wrapper input[type="submit"] {
		width: 100%;
	}
}

/* Datepicker popup sopra il resto */
.ipp-header-seasons--dark {
	z-index: 300;
}

/* Contrasto titolo sito se visibile */
.ipp-header-seasons--dark .site-title a {
	color: #fff !important;
}

.ipp-header-seasons--dark .site-description {
	color: rgba(255, 255, 255, 0.55) !important;
}

/* Nascondi titolo duplicato se c’è logo (come nel child) */
.ipp-header-seasons--dark .custom-logo-link ~ .title-wrapper .site-title,
.ipp-header-seasons--dark .custom-logo-link ~ .title-wrapper .site-description {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}
