/**
 * Qivox site header.
 *
 * Reference: smartfit.com.ar header — white full-bleed bar, logo left,
 * nav + yellow pill CTA right, soft bottom shadow, not sticky.
 * Below the tablet breakpoint the nav collapses into a hamburger-triggered
 * dropdown; the CTA stays visible outside of it.
 *
 * Tokens only. See DESIGN.md.
 */

.qx-header {
	position: relative;
	width: 100%;
	background: var(--qx-white);
	box-shadow: var(--qx-shadow-header);
}

.qx-header__inner {
	display: flex;
	align-items: center;
	gap: var(--qx-space-5);
	width: 100%;
	padding: var(--qx-header-pad-y) var(--qx-header-pad-x) 14px;
}

/* --------------------------------------------------------------------------
   Brand
   -------------------------------------------------------------------------- */

.qx-header__brand {
	flex: 0 0 auto;
	width: var(--qx-header-logo-w);
}

.qx-header__brand a {
	display: block;
	line-height: 0;
}

.qx-header__brand img {
	display: block;
	width: 100%;
	height: auto;
}

/* --------------------------------------------------------------------------
   Nav — pushed right, sitting next to the CTA as in the reference
   -------------------------------------------------------------------------- */

.qx-header__nav {
	margin-left: auto;
}

.qx-header__menu {
	display: flex;
	align-items: center;
	gap: var(--qx-space-4);
	margin: 0;
	padding: 0;
	list-style: none;
}

.qx-header__menu li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.qx-header__menu a {
	position: relative;
	display: block;
	padding: var(--qx-space-3) var(--qx-space-4);
	color: var(--qx-ink);
	font-family: var(--qx-font-body);
	font-size: var(--qx-header-nav-fs);
	font-weight: var(--qx-fw-semibold);
	line-height: 1.3;
	text-decoration: none;
	white-space: nowrap;
	transition: color var(--qx-dur) var(--qx-ease);
}

/* Yellow underline on hover: keeps the label dark and readable on white,
   which yellow text would not (see the contrast note in DESIGN.md). */
.qx-header__menu a::after {
	content: '';
	position: absolute;
	inset-inline: var(--qx-space-4);
	bottom: var(--qx-space-2);
	height: 3px;
	background: var(--qx-yellow);
	border-radius: var(--qx-radius-pill);
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform var(--qx-dur) var(--qx-ease);
}

.qx-header__menu a:hover::after,
.qx-header__menu a:focus-visible::after,
.qx-header__menu .current-menu-item > a::after,
.qx-header__menu .current_page_item > a::after {
	transform: scaleX(1);
}

/* --------------------------------------------------------------------------
   CTA
   -------------------------------------------------------------------------- */

.qx-header__actions {
	flex: 0 0 auto;
}

.qx-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: var(--qx-space-3) var(--qx-space-5);
	border: 0;
	border-radius: var(--qx-radius-pill);
	font-family: var(--qx-font-body);
	font-size: var(--qx-fs-small);
	font-weight: var(--qx-fw-semibold);
	line-height: 1;
	text-align: center;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color var(--qx-dur) var(--qx-ease), transform var(--qx-dur-fast) var(--qx-ease);
}

/* Black on yellow: the only accessible way to use #FFBD00 as a surface. */
.qx-btn--primary {
	background: var(--qx-yellow);
	color: var(--qx-ink);
}

.qx-btn--primary:hover,
.qx-btn--primary:focus-visible {
	background: var(--qx-yellow-600);
	color: var(--qx-ink);
}

.qx-btn:active {
	transform: translateY(1px);
}

/* Rendered by qivox_inscripcion_cta() (inc/cta.php) instead of an <a> while the
   external signup URL is unconfirmed. Same pill on purpose — the client asked to
   keep the button visible — so this strips everything that reads as clickable:
   pointer cursor, hover shift and press transform. */
.qx-btn--static {
	cursor: default;
}

.qx-btn--static.qx-btn--primary:hover,
.qx-btn--static.qx-btn--primary:focus-visible {
	background: var(--qx-yellow);
}

.qx-btn--static:active {
	transform: none;
}

/* --------------------------------------------------------------------------
   Hamburger toggle — hidden on desktop, shown below the tablet breakpoint.
   -------------------------------------------------------------------------- */

.qx-header__toggle {
	display: none;
	flex: 0 0 auto;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	background: transparent;
	background-color: transparent;
	border: 0;
	border-radius: var(--qx-radius-sm);
	box-shadow: none;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
}

.qx-header__toggle:hover,
.qx-header__toggle:focus,
.qx-header__toggle:active {
	background: transparent;
	background-color: transparent;
	box-shadow: none;
}

.qx-header__toggle-bar {
	display: block;
	width: 22px;
	height: 2px;
	background: var(--qx-ink);
	border-radius: var(--qx-radius-pill);
	transition: transform var(--qx-dur) var(--qx-ease), opacity var(--qx-dur) var(--qx-ease);
}

.qx-header__toggle-bar + .qx-header__toggle-bar {
	margin-top: 5px;
}

/* Bars morph into an X while the dropdown is open. */
.qx-header--nav-open .qx-header__toggle-bar:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.qx-header--nav-open .qx-header__toggle-bar:nth-child(2) {
	opacity: 0;
}

.qx-header--nav-open .qx-header__toggle-bar:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   Tablet and down — nav collapses into a hamburger-triggered dropdown;
   the CTA stays visible next to the logo.
   -------------------------------------------------------------------------- */

@media (max-width: 1023.98px) {
	.qx-header__inner {
		flex-wrap: wrap;
		gap: var(--qx-space-3);
		padding-bottom: var(--qx-space-2);
	}

	.qx-header__brand {
		order: 1;
	}

	.qx-header__actions {
		order: 2;
		margin-left: auto;
	}

	.qx-header__toggle {
		display: inline-flex;
		order: 3;
	}

	.qx-header__nav {
		order: 4;
		position: absolute;
		top: 100%;
		left: 0;
		z-index: 40;
		width: 100%;
		margin-left: 0;
		max-height: 0;
		overflow: hidden;
		background: var(--qx-white);
		box-shadow: var(--qx-shadow-header);
		transition: max-height var(--qx-dur) var(--qx-ease);
	}

	.qx-header--nav-open .qx-header__nav {
		max-height: 60vh;
		overflow-y: auto;
	}

	.qx-header__menu {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		width: 100%;
		min-width: 0;
		padding: var(--qx-space-2) var(--qx-header-pad-x) var(--qx-space-4);
	}

	.qx-header__menu li {
		width: 100%;
		border-bottom: 1px solid var(--qx-border);
	}

	.qx-header__menu li:last-child {
		border-bottom: 0;
	}

	.qx-header__menu a {
		width: 100%;
		padding: var(--qx-space-3) var(--qx-space-1);
	}

	.qx-header__menu a::after {
		display: none;
	}
}

/* --------------------------------------------------------------------------
   Small mobile
   -------------------------------------------------------------------------- */

@media (max-width: 575.98px) {
	.qx-header__inner {
		padding-top: var(--qx-space-3);
	}

	.qx-header__brand {
		width: 96px;
	}

	.qx-header__menu a {
		padding: var(--qx-space-3) var(--qx-space-1);
		font-size: var(--qx-fs-eyebrow);
	}

	.qx-btn {
		min-height: 40px;
		padding: var(--qx-space-2) var(--qx-space-4);
	}
}
