/* ═══════════════════════════════════════════════════════════════════════ */
/* SALOS "Hanging badge" header                                             */
/* Desktop: navy bar, menu split around a round logo that hangs below it.   */
/* Phones/tablets (< 1100px): MENU · logo · What's On + full-screen menu.   */
/* ═══════════════════════════════════════════════════════════════════════ */

:root {
	--salos-hdr-navy: #0a1432;
	--salos-hdr-red: #c0392b;
	--salos-hdr-coral: #ff6b4a;
	--salos-hdr-bar: 64px;          /* bar height on desktop */
	--salos-hdr-badge: 132px;       /* logo size at the top of the page */
	--salos-hdr-badge-small: 48px;  /* logo size once scrolled */
	--salos-hdr-badge-m: 84px;      /* logo size on phones */
	--salos-hdr-text: #ffffff;      /* link colour */
	--salos-hdr-logo-bg: #ffffff;   /* shows through the logo's cut-out lettering */
	/* Colours and sizes above are overridden from Appearance → SALOS Header. */
	--salos-hdr-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Neve sets `body > .wrapper { overflow: hidden }`, which stops anything inside
   it from sticking. `clip` still hides sideways overflow but lets the header
   stick. (Browsers without `clip` keep `hidden`: the header then just scrolls
   away as before — nothing breaks.) */
body.salos-has-header > .wrapper:not(.et-fb-iframe-ancestor) {
	overflow: clip;
}

/* Neve's <header class="header"> wrapper: make the whole thing stick */
body.salos-header-static header.header.salos-header-wrap { position: relative; }

/* Sit below the WordPress toolbar only when it's actually showing (body has
   .admin-bar). Its stylesheet can load even with the toolbar switched off,
   so don't rely on its height variable alone. On phones the toolbar scrolls
   away, so stick to the very top there. */
body.admin-bar header.header.salos-header-wrap { top: var(--wp-admin--admin-bar--height, 32px); }
body.admin-bar .salos-menu-panel { top: var(--wp-admin--admin-bar--height, 32px); }
@media (max-width: 600px) {
	body.admin-bar header.header.salos-header-wrap { top: 0; }
}
header.header.salos-header-wrap {
	position: sticky;
	top: 0;
	z-index: 1000;
	background: transparent;
}

.salos-header {
	font-family: Poppins, system-ui, sans-serif;
}

.salos-header-bar {
	position: relative;
	height: var(--salos-hdr-bar);
	box-sizing: border-box;
	padding: 0 40px;
	background: var(--salos-hdr-navy);
	border-bottom: 3px solid var(--salos-hdr-red);
	display: grid;
	grid-template-columns: minmax(0, 1fr) calc(var(--salos-hdr-badge) + 56px) minmax(0, 1fr);
	grid-template-rows: calc(var(--salos-hdr-bar) - 3px); /* keeps the links on the bar however big the logo is */
	align-items: center;
	transition: box-shadow 0.3s ease;
}

.salos-header.is-scrolled .salos-header-bar {
	box-shadow: 0 8px 24px rgba(10, 20, 50, 0.25);
}

/* ── Desktop menu ───────────────────────────────────────────────────── */
.salos-nav { min-width: 0; }
.salos-nav--left  { grid-column: 1; }
.salos-nav--right { grid-column: 3; }

.salos-nav-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	gap: 30px;
}
.salos-nav-list--left  { justify-content: flex-end; }
.salos-nav-list--right { justify-content: flex-start; }

.salos-nav-item { position: relative; margin: 0; }

.salos-header .salos-nav-item > a {
	display: flex;
	align-items: center;
	gap: 5px;
	padding: 8px 0;
	color: var(--salos-hdr-text);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
	text-decoration: none;
	position: relative;
	transition: color 0.2s ease;
}
.salos-header .salos-nav-item > a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 2px;
	height: 2px;
	background: var(--salos-hdr-coral);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.3s var(--salos-hdr-ease);
}
.salos-header .salos-nav-item > a:hover,
.salos-header .salos-nav-item > a:focus-visible { color: #ffd3c9; }
.salos-header .salos-nav-item > a:hover::after,
.salos-header .salos-nav-item.is-current > a::after { transform: scaleX(1); }
.salos-caret { transition: transform 0.25s ease; }
.salos-nav-item:hover .salos-caret,
.salos-nav-item:focus-within .salos-caret { transform: rotate(180deg); }

/* Dropdown */
.salos-sub {
	list-style: none;
	margin: 0;
	padding: 8px;
	position: absolute;
	top: calc(100% + 10px);
	left: -16px;
	min-width: 220px;
	background: var(--salos-hdr-navy);
	border-top: 3px solid var(--salos-hdr-red);
	border-radius: 0 0 10px 10px;
	box-shadow: 0 16px 36px rgba(10, 20, 50, 0.35);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity 0.2s ease, transform 0.25s var(--salos-hdr-ease), visibility 0.2s;
}
.salos-sub::before { /* hover bridge across the gap */
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -16px;
	height: 16px;
}
.salos-nav-item:hover > .salos-sub,
.salos-nav-item:focus-within > .salos-sub {
	opacity: 1;
	visibility: visible;
	transform: none;
}
.salos-header .salos-sub a {
	display: block;
	padding: 10px 12px;
	border-radius: 6px;
	color: #dfe3ee;
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
}
.salos-header .salos-sub a:hover,
.salos-header .salos-sub a:focus-visible { background: rgba(255, 255, 255, 0.08); color: #ffffff; }

/* Deeper levels inside the dropdown are indented */
.salos-sub--nested {
	position: static;
	opacity: 1;
	visibility: inherit;
	transform: none;
	min-width: 0;
	padding: 0 0 0 12px;
	background: none;
	border: 0;
	box-shadow: none;
}
.salos-sub--nested::before { display: none; }
.salos-header .salos-sub--nested a { font-size: 13px; padding: 7px 12px; color: #b9c0d6; }

/* ── The hanging badge ─────────────────────────────────────────────── */
.salos-badge {
	grid-column: 2;
	grid-row: 1;
	justify-self: center;
	align-self: start;
	margin-top: 8px;
	width: var(--salos-hdr-badge);
	height: var(--salos-hdr-badge);
	border-radius: 50%;
	display: block;
	position: relative;
	z-index: 2;
	/* The logo's lettering and notes are see-through cut-outs, so they need
	   white behind them (on the old white header they picked up the page). */
	background: var(--salos-hdr-logo-bg);
	box-shadow: 0 0 0 4px #ffffff, 0 16px 34px rgba(0, 0, 0, 0.45);
	transition: width 0.45s var(--salos-hdr-ease), height 0.45s var(--salos-hdr-ease),
	            margin-top 0.45s var(--salos-hdr-ease), box-shadow 0.45s var(--salos-hdr-ease),
	            transform 0.3s var(--salos-hdr-ease);
}
.salos-badge:hover { transform: scale(1.03); }
.salos-badge:focus-visible { outline: 3px solid var(--salos-hdr-coral); outline-offset: 6px; }
.salos-badge img,
.salos-menu-panel-logo img {
	width: 100%;
	height: 100%;
	display: block;
	border-radius: 50%;
	object-fit: cover;
}
.salos-badge-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background: #2d2d2d;
	color: #fff;
	font-weight: 600;
}

/* Scrolled: the badge tucks up into the bar */
.salos-header.is-scrolled .salos-badge {
	width: var(--salos-hdr-badge-small);
	height: var(--salos-hdr-badge-small);
	margin-top: calc((var(--salos-hdr-bar) - 3px - var(--salos-hdr-badge-small)) / 2);
	box-shadow: 0 0 0 2px #ffffff;
}

/* Phone-only controls are hidden on desktop */
.salos-menu-toggle,
.salos-header-bar > .salos-header-cta { display: none; }

/* Optional: also show the red button on desktop, at the right-hand end */
@media (min-width: 1100px) {
	.salos-header.has-desktop-cta:not(.is-compact) .salos-header-bar { grid-template-columns: minmax(0, 1fr) calc(var(--salos-hdr-badge) + 56px) minmax(0, 1fr) auto; }
	.salos-header.has-desktop-cta:not(.is-compact) .salos-header-bar > .salos-header-cta { display: inline-flex; grid-column: 4; grid-row: 1; margin-left: 24px; }
}

/* ── Shared buttons ────────────────────────────────────────────────── */
.salos-header .salos-header-cta {
	align-items: center;
	padding: 9px 15px;
	border-radius: 999px;
	background: var(--salos-hdr-red);
	color: #ffffff;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.2s ease;
}
.salos-header .salos-header-cta:hover { filter: brightness(0.9); color: #ffffff; }

.salos-menu-toggle,
.salos-menu-close {
	height: 44px;
	padding: 0 8px;
	border: 0;
	background: transparent;
	color: #ffffff;
	align-items: center;
	gap: 8px;
	font: 600 11px/1 Poppins, system-ui, sans-serif;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	cursor: pointer;
}
/* Neve styles every <button> (blue fill, padding, shadow): undo that here */
.salos-header button.salos-menu-toggle,
.salos-header button.salos-menu-close,
.salos-header button.salos-sub-toggle,
.salos-header button.salos-menu-toggle:hover,
.salos-header button.salos-menu-close:hover,
.salos-header button.salos-sub-toggle:hover,
.salos-header button.salos-menu-toggle:focus,
.salos-header button.salos-menu-close:focus,
.salos-header button.salos-sub-toggle:focus {
	background: transparent;
	color: #ffffff;
	border: 0;
	box-shadow: none;
	border-radius: 4px;
	min-height: 0;
	text-decoration: none;
}
.salos-header button.salos-menu-toggle:hover,
.salos-header button.salos-menu-close:hover,
.salos-header button.salos-sub-toggle:hover { background: rgba(255, 255, 255, 0.08); }

.salos-menu-toggle:focus-visible,
.salos-menu-close:focus-visible,
.salos-sub-toggle:focus-visible { outline: 2px solid var(--salos-hdr-coral); outline-offset: 2px; border-radius: 4px; }

/* Tighter spacing on smaller laptops */
@media (max-width: 1320px) {
	.salos-nav-list { gap: 22px; }
	.salos-header-bar { padding: 0 24px; }
}
@media (max-width: 1200px) {
	.salos-nav-list { gap: 18px; }
	.salos-header-bar { padding: 0 20px; }
}

/* ═══ Phone layout ═══════════════════════════════════════════════════
   Used below 1100px wide, AND on wider screens whenever the menu links
   no longer fit either side of the logo (salos-header.js adds .is-compact).
   The two blocks below are deliberately identical — keep them in step. */
@media (max-width: 1099px) {
	.salos-header-bar { padding: 0 10px; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); height: 60px; grid-template-rows: 57px; }
	.salos-nav { display: none; }
	.salos-menu-toggle { display: flex; grid-column: 1; grid-row: 1; justify-self: start; }
	.salos-header-bar > .salos-header-cta { display: inline-flex; grid-column: 3; grid-row: 1; justify-self: end; }
	.salos-badge { width: var(--salos-hdr-badge-m); height: var(--salos-hdr-badge-m); box-shadow: 0 0 0 3px #ffffff, 0 10px 22px rgba(0, 0, 0, 0.5); }
	.salos-header.is-scrolled .salos-badge { width: 40px; height: 40px; margin-top: 8.5px; box-shadow: 0 0 0 2px #ffffff; }
}
.salos-header.is-compact .salos-header-bar { padding: 0 10px; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); height: 60px; grid-template-rows: 57px; }
.salos-header.is-compact .salos-nav { display: none; }
.salos-header.is-compact .salos-menu-toggle { display: flex; grid-column: 1; grid-row: 1; justify-self: start; }
.salos-header.is-compact .salos-header-bar > .salos-header-cta { display: inline-flex; grid-column: 3; grid-row: 1; justify-self: end; }
.salos-header.is-compact .salos-badge { width: var(--salos-hdr-badge-m); height: var(--salos-hdr-badge-m); box-shadow: 0 0 0 3px #ffffff, 0 10px 22px rgba(0, 0, 0, 0.5); }
.salos-header.is-compact.is-scrolled .salos-badge { width: 40px; height: 40px; margin-top: 8.5px; box-shadow: 0 0 0 2px #ffffff; }

/* Full-screen menu */
.salos-menu-panel {
	position: fixed;
	inset: 0;
	z-index: 1001;
	background: var(--salos-hdr-navy);
	color: #ffffff;
	display: flex;
	flex-direction: column;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding-bottom: 32px;
	opacity: 0;
	transform: translateY(-12px);
	transition: opacity 0.3s ease, transform 0.35s var(--salos-hdr-ease);
}
.salos-menu-panel[hidden] { display: none; }
.salos-menu-panel.is-open { opacity: 1; transform: none; }

.salos-menu-close { display: flex; }
.salos-menu-panel-top .salos-header-cta { display: inline-flex; }

.salos-menu-panel-top {
	height: 60px;
	flex: none;
	padding: 0 12px 0 6px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.salos-menu-panel-logo {
	display: block;
	background: var(--salos-hdr-logo-bg);
	width: 96px;
	height: 96px;
	margin: 4px auto 18px;
	border-radius: 50%;
	box-shadow: 0 0 0 3px #ffffff;
	flex: none;
}
.salos-menu-list,
.salos-menu-sub { list-style: none; margin: 0; padding: 0; }
.salos-menu-list { padding: 0 26px; }
.salos-menu-list > li { border-bottom: 1px solid rgba(255, 255, 255, 0.12); margin: 0; }
.salos-menu-list > li:last-child { border-bottom: 0; }
.salos-menu-row { display: flex; align-items: center; justify-content: space-between; }
.salos-header .salos-menu-row > a {
	flex: 1;
	padding: 13px 0;
	color: #ffffff;
	font-size: 21px;
	font-weight: 700;
	line-height: 1.25;
	text-decoration: none;
}
.salos-header .salos-menu-list > li.is-current .salos-menu-row > a { color: var(--salos-hdr-coral); }
.salos-sub-toggle {
	width: 44px;
	height: 44px;
	border: 0;
	background: transparent;
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}
.salos-sub-toggle svg { transition: transform 0.25s ease; }
.salos-sub-toggle[aria-expanded="false"] svg { transform: rotate(180deg); }
.salos-menu-sub { padding: 0 0 10px 14px; }
.salos-menu-sub .salos-menu-row > a { padding: 0; }
.salos-menu-sub .salos-menu-sub { padding-bottom: 4px; }
.salos-menu-sub[hidden] { display: none; }
.salos-header .salos-menu-sub a {
	display: block;
	padding: 7px 0;
	color: #c9cee0;
	font-size: 15px;
	font-weight: 500;
	text-decoration: none;
}
.salos-header .salos-menu-sub a:hover { color: #ffffff; }

body.salos-menu-open { overflow: hidden; }

@media (min-width: 1100px) {
	.salos-header:not(.is-compact) .salos-menu-panel { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
	.salos-badge,
	.salos-sub,
	.salos-menu-panel,
	.salos-header .salos-nav-item > a::after { transition: none; }
}
