/* ==========================================================================
   FH Menu Pro
   Todas las variables se inyectan desde el panel de administración.
   ========================================================================== */

.fhmp,
.fhmp *,
.fhmp *::before,
.fhmp *::after {
	box-sizing: border-box;
}

.fhmp {
	position: relative;
	z-index: 9000;
	font-family: var(--fhmp-font, inherit);
	line-height: 1.4;
}

.fhmp--sticky {
	position: sticky;
	top: 0;
}

.fhmp ul {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.fhmp li {
	list-style: none !important;
	margin: 0;
	padding: 0;
}

.fhmp a {
	text-decoration: none;
}

.fhmp .fhmp-i {
	width: 1em;
	height: 1em;
	flex: 0 0 auto;
	display: inline-block;
	vertical-align: middle;
}

.fhmp-container {
	width: 100%;
	max-width: var(--fhmp-container, 1240px);
	margin: 0 auto;
	padding: 0 20px;
}

/* --------------------------------------------------------------- Barra superior */
.fhmp-topbar {
	background: var(--fhmp-topbar-bg);
	color: var(--fhmp-topbar-text);
	font-size: 13px;
}

.fhmp-topbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px 26px;
	flex-wrap: wrap;
	min-height: 42px;
	padding-top: 7px;
	padding-bottom: 7px;
}

.fhmp-topbar__inner--right {
	justify-content: flex-end;
}

.fhmp-topbar__inner--left {
	justify-content: flex-start;
}

.fhmp-topbar__inner--center {
	justify-content: center;
}

.fhmp-contacts {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px 22px;
}

.fhmp-contacts a {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	color: var(--fhmp-topbar-text);
	transition: color .2s ease;
}

.fhmp-contacts a:hover,
.fhmp-contacts a:focus-visible {
	color: var(--fhmp-topbar-hover);
}

.fhmp-contacts .fhmp-i {
	width: 15px;
	height: 15px;
	opacity: .85;
}

.fhmp-social {
	display: flex;
	align-items: center;
	gap: 10px;
}

.fhmp-social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	color: var(--fhmp-topbar-text);
	background: rgba(255, 255, 255, .10);
	transition: background .2s ease, color .2s ease, transform .2s ease;
}

.fhmp-social a:hover,
.fhmp-social a:focus-visible {
	color: var(--fhmp-topbar-hover);
	background: rgba(255, 255, 255, .20);
	transform: translateY(-1px);
}

.fhmp-social .fhmp-i {
	width: 15px;
	height: 15px;
}

/* ------------------------------------------------------------------- Cabecera */
.fhmp-header {
	background: var(--fhmp-header-bg);
	transition: background .25s ease, box-shadow .25s ease, padding .25s ease;
}

.fhmp.is-stuck .fhmp-header {
	background: var(--fhmp-header-bg-sticky);
	box-shadow: var(--fhmp-shadow);
}

.fhmp-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0;
	min-height: 76px;
	padding-top: 8px;
	padding-bottom: 8px;
}

.fhmp-logo {
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
}

/* Espacio entre columnas (en clases propias para que el tema no lo anule) */
.fhmp .fhmp-header .fhmp-logo {
	margin-right: var(--fhmp-gap-logo, 50px) !important;
}

.fhmp .fhmp-header .fhmp-actions {
	margin-left: var(--fhmp-gap-cta, 40px) !important;
}

.fhmp-logo img {
	display: block;
	height: var(--fhmp-logo-h, 62px);
	width: auto;
	max-width: 100%;
	transition: height .25s ease;
}

.fhmp.is-stuck .fhmp-logo img {
	height: calc(var(--fhmp-logo-h, 62px) * .82);
}

/* Badge: círculo blanco detrás del logo (para fondos oscuros) */
.fhmp-logo--badge {
	width: calc(var(--fhmp-logo-h, 62px) + 22px);
	height: calc(var(--fhmp-logo-h, 62px) + 22px);
	border-radius: 50%;
	background: var(--fhmp-logo-badge-bg, #fff);
	justify-content: center;
	padding: 8px;
	transition: width .25s ease, height .25s ease;
}

.fhmp-logo--badge img {
	height: auto;
	width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.fhmp.is-stuck .fhmp-logo--badge {
	width: calc((var(--fhmp-logo-h, 62px) + 22px) * .86);
	height: calc((var(--fhmp-logo-h, 62px) + 22px) * .86);
}

.fhmp.is-stuck .fhmp-logo--badge img {
	height: auto;
}

.fhmp-logo__text {
	font-size: 20px;
	font-weight: 700;
	color: var(--fhmp-link);
}

.fhmp-actions {
	display: flex;
	align-items: center;
	gap: 14px;
	flex: 0 0 auto;
}

/* ------------------------------------------------------------------ Botón CTA */
.fhmp-cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--fhmp-cta-bg);
	color: var(--fhmp-cta-text);
	font-size: var(--fhmp-fs);
	font-weight: var(--fhmp-fw);
	letter-spacing: var(--fhmp-ls);
	text-transform: var(--fhmp-tt);
	padding: 12px 26px;
	border-radius: var(--fhmp-cta-radius, 40px);
	transition: background .2s ease, transform .2s ease;
	white-space: nowrap;
}

.fhmp-cta:hover,
.fhmp-cta:focus-visible {
	background: var(--fhmp-cta-bg-hover);
	color: var(--fhmp-cta-text);
	transform: translateY(-1px);
}

.fhmp-cta .fhmp-i {
	width: 18px;
	height: 18px;
}

.fhmp-cta--block {
	display: flex;
	justify-content: center;
	margin: 20px 0;
}

/* ---------------------------------------------------------------- Navegación */
.fhmp-nav {
	flex: 1 1 auto;
	display: flex;
	justify-content: flex-end;
}

/* Distribución del menú */
.fhmp-nav--start {
	justify-content: flex-start;
}

.fhmp-nav--center {
	justify-content: center;
}

.fhmp-nav--end {
	justify-content: flex-end;
}

.fhmp-nav--between,
.fhmp-nav--evenly,
.fhmp-nav--around {
	justify-content: stretch;
}

.fhmp-nav--between .fhmp-menu,
.fhmp-nav--evenly .fhmp-menu,
.fhmp-nav--around .fhmp-menu {
	width: 100%;
}

.fhmp-nav--between .fhmp-menu {
	justify-content: space-between;
}

.fhmp-nav--evenly .fhmp-menu {
	justify-content: space-evenly;
}

.fhmp-nav--around .fhmp-menu {
	justify-content: space-around;
}

.fhmp-menu {
	display: flex;
	align-items: center;
	gap: var(--fhmp-gap);
}

.fhmp-menu > .fhmp-item {
	position: relative;
}

.fhmp-link {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	color: var(--fhmp-link);
	font-size: var(--fhmp-fs);
	font-weight: var(--fhmp-fw);
	letter-spacing: var(--fhmp-ls);
	text-transform: var(--fhmp-tt);
	padding: 12px 0;
	transition: color .2s ease;
}

.fhmp-menu > .fhmp-item > .fhmp-link::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 4px;
	width: 0;
	height: 2px;
	background: var(--fhmp-link-hover);
	transition: width .25s ease;
}

.fhmp-menu > .fhmp-item:hover > .fhmp-link::after,
.fhmp-menu > .fhmp-item.fhmp-current > .fhmp-link::after,
.fhmp-menu > .fhmp-item.is-open > .fhmp-link::after {
	width: 100%;
}

.fhmp-link:hover,
.fhmp-link:focus-visible {
	color: var(--fhmp-link-hover);
}

.fhmp-item.fhmp-current > .fhmp-link {
	color: var(--fhmp-link-active);
}

.fhmp-arrow {
	display: inline-flex;
	transition: transform .25s ease;
}

.fhmp-arrow .fhmp-i {
	width: 14px;
	height: 14px;
}

.fhmp-item:hover > .fhmp-link .fhmp-arrow,
.fhmp-item.is-open > .fhmp-link .fhmp-arrow {
	transform: rotate(180deg);
}

/* El botón de despliegue sólo se usa en móvil */
.fhmp-subtoggle {
	display: none;
}

/* ------------------------------------------------------------------ Submenús */
.fhmp-sub {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 250px;
	background: var(--fhmp-sub-bg);
	border-radius: var(--fhmp-radius);
	box-shadow: 0 10px 34px rgba(0, 0, 0, .14);
	padding: 8px 0 !important;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: opacity .2s ease, transform .2s ease, visibility .2s;
	z-index: 20;
}

.fhmp-sub .fhmp-sub {
	top: -8px;
	left: 100%;
	margin-left: 2px;
}

/* Submenú que se abriría fuera de pantalla: se despliega hacia la izquierda */
.fhmp-sub.fhmp-sub--flip {
	left: auto;
	right: 0;
}

.fhmp-sub .fhmp-sub.fhmp-sub--flip {
	left: auto;
	right: 100%;
	margin-left: 0;
	margin-right: 2px;
}

.fhmp-item:hover > .fhmp-sub,
.fhmp-item:focus-within > .fhmp-sub,
.fhmp-item.is-open > .fhmp-sub {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.fhmp-sub .fhmp-item {
	position: relative;
}

.fhmp-sub .fhmp-link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	padding: 10px 18px;
	font-size: var(--fhmp-sub-fs);
	color: var(--fhmp-sub-text);
	text-transform: none;
	letter-spacing: 0;
	border-left: 3px solid transparent;
	transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.fhmp-sub .fhmp-item:hover > .fhmp-link,
.fhmp-sub .fhmp-link:focus-visible {
	background: var(--fhmp-sub-hover-bg);
	color: var(--fhmp-sub-hover-text);
	border-left-color: var(--fhmp-sub-hover-text);
}

.fhmp-sub .fhmp-arrow .fhmp-i {
	transform: rotate(-90deg);
}

.fhmp-sub .fhmp-item:hover > .fhmp-link .fhmp-arrow {
	transform: none;
}

.fhmp-sub.fhmp-sub--flip .fhmp-arrow .fhmp-i {
	transform: rotate(90deg);
}

/* ------------------------------------------------------------ Botón hamburguesa */
.fhmp-burger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 44px;
	height: 44px;
	padding: 0 10px;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.fhmp-burger span {
	display: block;
	height: 2px;
	width: 100%;
	background: var(--fhmp-link);
	border-radius: 2px;
	transition: transform .25s ease, opacity .2s ease;
}

.fhmp-burger[aria-expanded="true"] span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.fhmp-burger[aria-expanded="true"] span:nth-child(2) {
	opacity: 0;
}

.fhmp-burger[aria-expanded="true"] span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* ---------------------------------------------------------------- Panel móvil */
.fhmp-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, .5);
	opacity: 0;
	transition: opacity .3s ease;
	z-index: 99998;
}

.fhmp-overlay.is-visible {
	opacity: 1;
}

.fhmp-panel {
	position: fixed;
	top: 0;
	right: 0;
	width: min(360px, 88vw);
	height: 100%;
	background: var(--fhmp-panel-bg);
	transform: translateX(100%);
	transition: transform .3s ease;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	z-index: 99999;
	box-shadow: -6px 0 30px rgba(0, 0, 0, .18);
}

.fhmp-panel.is-open {
	transform: translateX(0);
}

.fhmp-panel__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	background: rgba(0, 0, 0, .18);
	color: var(--fhmp-link);
	border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.fhmp-panel__title {
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
}

.fhmp-close {
	border: 0;
	background: transparent;
	color: inherit;
	font-size: 30px;
	line-height: 1;
	cursor: pointer;
	padding: 0 4px;
}

.fhmp-panel__body {
	padding: 12px 20px 40px;
}

.fhmp-panel .fhmp-menu {
	display: block;
}

.fhmp-panel .fhmp-item {
	position: relative;
	border-bottom: 1px solid rgba(255, 255, 255, .10);
}

.fhmp-panel .fhmp-link {
	display: flex;
	padding: 14px 44px 14px 0;
	color: var(--fhmp-link);
	font-size: 15px;
	background: none;
	border-left: 0;
}

.fhmp-panel .fhmp-link .fhmp-arrow {
	display: none;
}

.fhmp-panel .fhmp-subtoggle {
	display: flex;
	align-items: center;
	justify-content: center;
	position: absolute;
	top: 4px;
	right: 0;
	width: 40px;
	height: 40px;
	border: 0;
	background: transparent;
	color: var(--fhmp-link);
	cursor: pointer;
	transition: transform .25s ease;
}

.fhmp-panel .fhmp-subtoggle .fhmp-i {
	width: 20px;
	height: 20px;
}

.fhmp-panel .fhmp-subtoggle[aria-expanded="true"] {
	transform: rotate(180deg);
	color: var(--fhmp-link-hover);
}

.fhmp-panel .fhmp-sub {
	position: static;
	opacity: 1;
	visibility: visible;
	transform: none;
	box-shadow: none;
	background: transparent;
	border-radius: 0;
	padding: 0 !important;
	margin: 0 0 0 14px;
	display: none;
	min-width: 0;
}

.fhmp-panel .fhmp-item.is-open > .fhmp-sub {
	display: block;
}

.fhmp-panel .fhmp-sub .fhmp-link {
	font-size: 14px;
	padding: 12px 44px 12px 0;
	color: rgba(255, 255, 255, .82);
}

.fhmp-panel .fhmp-sub .fhmp-item:last-child {
	border-bottom: 0;
}

.fhmp-contacts--panel {
	display: block;
	margin-top: 8px !important;
	border-top: 1px solid rgba(255, 255, 255, .12);
	padding-top: 14px !important;
}

.fhmp-contacts--panel li {
	margin-bottom: 10px;
}

.fhmp-contacts--panel a {
	color: var(--fhmp-link);
	font-size: 14px;
}

.fhmp-contacts--panel a:hover {
	color: var(--fhmp-link-hover);
}

.fhmp-social--panel {
	margin-top: 16px !important;
}

.fhmp-social--panel a {
	background: var(--fhmp-topbar-bg);
	color: #fff;
	width: 34px;
	height: 34px;
}

/* --------------------------------------------------------------- Responsive */
@media (max-width: 900px) {
	.fhmp-topbar--hide-mobile {
		display: none;
	}

	.fhmp-topbar__inner {
		justify-content: center;
	}

	.fhmp-contacts {
		justify-content: center;
		gap: 6px 14px;
		font-size: 12px;
	}
}

@media (max-width: 600px) {
	.fhmp-header__inner {
		min-height: 64px;
		gap: 10px;
	}

	.fhmp-logo img {
		height: var(--fhmp-logo-h-mob, 46px);
	}

	.fhmp-cta {
		padding: 9px 14px;
		font-size: 13px;
	}

	.fhmp-cta span {
		display: none;
	}

	.fhmp-cta .fhmp-i {
		width: 20px;
		height: 20px;
	}
}

/* Accesibilidad */
.fhmp a:focus-visible,
.fhmp button:focus-visible {
	outline: 2px solid var(--fhmp-link-hover);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.fhmp *,
	.fhmp *::before,
	.fhmp *::after {
		transition-duration: .01ms !important;
		animation-duration: .01ms !important;
	}
}

/* Compatibilidad con Divi */
#et-boc .fhmp ul,
#et-boc .fhmp ol,
.et_pb_module .fhmp ul {
	list-style: none;
	padding: 0;
}

.fhmp .fhmp-menu li a,
.fhmp .fhmp-sub li a {
	text-decoration: none;
}
