/* Navbar CTA para Elementor — estructura base.
   Los colores/tamaños se controlan desde el panel de Elementor. */

.anb {
	position: relative;
	width: 100%;
	z-index: 99;
	box-sizing: border-box;
}
.anb *,
.anb *::before,
.anb *::after { box-sizing: border-box; }

.anb--sticky {
	position: sticky;
	top: 16px;
	z-index: 999;
}

/* Blindaje contra estilos del tema / Elementor Kit */
.anb ul,
.anb li { list-style: none; margin: 0; padding: 0; }
.anb a,
.anb a:hover,
.anb a:focus { text-decoration: none !important; box-shadow: none; }
.anb .anb__toggle,
.anb .anb__sub-toggle {
	-webkit-appearance: none;
	appearance: none;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	text-transform: none;
	letter-spacing: normal;
	font: inherit;
	margin: 0;
}

.anb__inner {
	position: relative;
	display: flex;
	align-items: center;
	gap: 32px;
	background: #fff;
	border-radius: 16px;
	padding: 12px 24px;
	box-shadow: 0 8px 30px rgba(20, 30, 70, .10);
}

/* Logo */
.anb__logo {
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
	line-height: 0;
}
.anb__logo img {
	display: block;
	max-width: 100%;
	height: auto;
}

/* Panel (menú + acciones) */
.anb__panel {
	display: flex;
	align-items: center;
	flex: 1 1 auto;
	min-width: 0;
	gap: 24px;
}

/* Menú */
.anb__menu {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
}
.anb--menu-center .anb__menu { margin-left: auto; margin-right: auto; }

.anb__item { position: relative; margin: 0; padding: 0; }

.anb__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.2;
	color: #2b2d42;
	white-space: nowrap;
	border-radius: 10px;
	transition: color .2s ease, background-color .2s ease;
}
.anb__link-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	font-size: 18px;
}
.anb__link-icon svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

.anb__badge {
	display: inline-block;
	padding: 3px 8px;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.3;
	border-radius: 6px;
	white-space: nowrap;
}

/* Acciones */
.anb__actions {
	display: flex;
	align-items: center;
	gap: 20px;
	margin-left: auto;
	flex-shrink: 0;
}
.anb--menu-center .anb__actions { margin-left: 0; }

.anb__login {
	font-size: 15px;
	font-weight: 600;
	white-space: nowrap;
	transition: color .2s ease;
}

.anb__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 13px 26px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	border-radius: 10px;
	transition: transform .2s ease, box-shadow .2s ease, color .2s ease, filter .2s ease;
}
.anb__cta:hover,
.anb__cta:focus-visible { transform: translateY(-1px); }

.anb__cta-icon {
	display: inline-flex;
	align-items: center;
	line-height: 1;
	font-size: 16px;
}
.anb__cta-icon svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
}

.anb__link:focus-visible,
.anb__sublink:focus-visible,
.anb__login:focus-visible,
.anb__cta:focus-visible,
.anb__toggle:focus-visible,
.anb__sub-toggle:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* Botón hamburguesa (oculto en escritorio) */
.anb__toggle {
	display: none;
	margin-left: auto;
	width: 44px;
	height: 44px;
	padding: 0;
	cursor: pointer;
	position: relative;
	border-radius: 10px;
	-webkit-tap-highlight-color: transparent;
}
.anb__toggle-bar {
	position: absolute;
	left: 11px;
	right: 11px;
	height: 2px;
	border-radius: 2px;
	background: #2b2d42;
	transition: transform .25s ease, opacity .2s ease, top .25s ease;
}
.anb__toggle-bar:nth-child(1) { top: 14px; }
.anb__toggle-bar:nth-child(2) { top: 21px; }
.anb__toggle-bar:nth-child(3) { top: 28px; }
.anb__toggle[aria-expanded="true"] .anb__toggle-bar:nth-child(1) { top: 21px; transform: rotate(45deg); }
.anb__toggle[aria-expanded="true"] .anb__toggle-bar:nth-child(2) { opacity: 0; }
.anb__toggle[aria-expanded="true"] .anb__toggle-bar:nth-child(3) { top: 21px; transform: rotate(-45deg); }

.anb__sr {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ------------------------------------------------------------------
   Submenú desplegable (escritorio)
   ------------------------------------------------------------------ */
.anb__item.has-children > .anb__link { padding-right: 36px; }

.anb .anb__sub-toggle {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	padding: 0;
	border-radius: 50%;
	color: #5b5f77;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: color .2s ease;
}
.anb .anb__sub-toggle svg {
	display: block;
	pointer-events: none;
	transition: transform .3s cubic-bezier(.2, .9, .25, 1.1);
}
.anb__item.has-children:hover > .anb__sub-toggle svg,
.anb__item.has-children.is-open > .anb__sub-toggle svg { transform: rotate(180deg); }

/* Panel: cerrado = oculto, con un pequeño retraso al cerrar (evita parpadeos) */
.anb .anb__submenu {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 30;
	min-width: 230px;
	margin: 14px 0 0;
	padding: 8px;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 18px 50px rgba(20, 30, 70, .16);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(10px) scale(.96);
	transform-origin: 28px 0;
	transition: opacity .18s ease .1s, transform .22s ease .1s, visibility 0s linear .32s;
}
/* Puente invisible: el cursor puede cruzar el hueco sin cerrar el panel */
.anb .anb__submenu::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -18px;
	height: 18px;
}
/* Flechita superior */
.anb .anb__submenu::after {
	content: "";
	position: absolute;
	top: -6px;
	left: 24px;
	width: 12px;
	height: 12px;
	background: inherit;
	border-radius: 3px 0 0 0;
	transform: rotate(45deg);
	pointer-events: none;
}

/* Abierto */
.anb__item.has-children:hover > .anb__submenu,
.anb__item.has-children.is-open > .anb__submenu {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: none;
	transition: opacity .2s ease, transform .35s cubic-bezier(.2, .9, .25, 1.12), visibility 0s;
}

/* Elementos: entran en cascada */
.anb__subitem {
	opacity: 0;
	transform: translateY(8px);
	transition: opacity .15s ease, transform .15s ease;
}
.anb__item.has-children:hover > .anb__submenu > .anb__subitem,
.anb__item.has-children.is-open > .anb__submenu > .anb__subitem {
	opacity: 1;
	transform: none;
	transition: opacity .3s ease, transform .4s cubic-bezier(.2, .9, .25, 1.12);
}
.anb__item.has-children:hover > .anb__submenu > .anb__subitem:nth-child(1),
.anb__item.has-children.is-open > .anb__submenu > .anb__subitem:nth-child(1) { transition-delay: .05s; }
.anb__item.has-children:hover > .anb__submenu > .anb__subitem:nth-child(2),
.anb__item.has-children.is-open > .anb__submenu > .anb__subitem:nth-child(2) { transition-delay: .10s; }
.anb__item.has-children:hover > .anb__submenu > .anb__subitem:nth-child(3),
.anb__item.has-children.is-open > .anb__submenu > .anb__subitem:nth-child(3) { transition-delay: .15s; }
.anb__item.has-children:hover > .anb__submenu > .anb__subitem:nth-child(4),
.anb__item.has-children.is-open > .anb__submenu > .anb__subitem:nth-child(4) { transition-delay: .20s; }
.anb__item.has-children:hover > .anb__submenu > .anb__subitem:nth-child(5),
.anb__item.has-children.is-open > .anb__submenu > .anb__subitem:nth-child(5) { transition-delay: .25s; }
.anb__item.has-children:hover > .anb__submenu > .anb__subitem:nth-child(n+6),
.anb__item.has-children.is-open > .anb__submenu > .anb__subitem:nth-child(n+6) { transition-delay: .30s; }

.anb__sublink {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.3;
	white-space: nowrap;
	color: #2b2d42;
	border-radius: 8px;
	transition: color .2s ease, background-color .2s ease;
}
.anb__sublink .anb__link-text { transition: transform .25s cubic-bezier(.2, .9, .25, 1.1); }
.anb__sublink:hover .anb__link-text { transform: translateX(4px); }

/* Header superpuesto sobre el hero: añade la clase "anb-header-overlay"
   al contenedor del encabezado (Avanzado → Clases CSS). */
.anb-header-overlay {
	position: absolute !important;
	top: 0;
	left: 0;
	right: 0;
	width: 100%;
	z-index: 999;
	background: transparent !important;
}
.admin-bar .anb-header-overlay { top: 32px; }
@media (max-width: 782px) {
	.admin-bar .anb-header-overlay { top: 46px; }
}

/* Versión móvil / tablet: mismas reglas para ambos puntos de corte */
@media (max-width: 1024px) {
	.anb--bp-tablet .anb__toggle { display: block; }
	.anb--bp-tablet .anb__inner { justify-content: space-between; }

	.anb--bp-tablet .anb__panel {
		display: none;
		position: absolute;
		top: calc(100% + 8px);
		left: 0;
		right: 0;
		flex-direction: column;
		align-items: stretch;
		gap: 16px;
		padding: 16px;
		max-height: calc(100vh - 120px);
		overflow-y: auto;
		background: var(--anb-panel-bg, #fff);
		border-radius: 16px;
		box-shadow: 0 16px 40px rgba(20, 30, 70, .14);
	}
	.anb--bp-tablet .anb__panel.is-open {
		display: flex;
		animation: anb-panel-in .28s cubic-bezier(.2, .9, .25, 1.05);
	}

	.anb--bp-tablet .anb__menu,
	.anb--bp-tablet.anb--menu-center .anb__menu { flex-direction: column; align-items: stretch; flex-wrap: nowrap; margin: 0; gap: 2px; }
	.anb--bp-tablet .anb__item { width: 100%; }
	.anb--bp-tablet .anb__link { width: 100%; }
	.anb--bp-tablet .anb__actions,
	.anb--bp-tablet.anb--menu-center .anb__actions {
		flex-direction: column;
		align-items: stretch;
		margin: 0;
		gap: 12px;
		text-align: center;
	}

	/* Submenú: acordeón animado */
	.anb--bp-tablet .anb__sub-toggle { top: 5px; right: 8px; transform: none; }
	.anb--bp-tablet .anb__item.has-children:hover > .anb__sub-toggle svg { transform: none; }
	.anb--bp-tablet .anb__item.has-children.is-open > .anb__sub-toggle svg { transform: rotate(180deg); }

	.anb--bp-tablet .anb__item.has-children > .anb__submenu,
	.anb--bp-tablet .anb__item.has-children:hover > .anb__submenu {
		position: static;
		min-width: 0 !important;
		margin: 0;
		padding: 0 0 0 14px;
		max-height: 0;
		overflow: hidden;
		background: transparent !important;
		border: 0 !important;
		box-shadow: none !important;
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		transform: none;
		transition: max-height .35s ease;
	}
	.anb--bp-tablet .anb__item.has-children.is-open > .anb__submenu {
		max-height: 600px;
		padding: 2px 0 6px 14px;
	}
	.anb--bp-tablet .anb__submenu::before,
	.anb--bp-tablet .anb__submenu::after { display: none; }
	.anb--bp-tablet .anb__subitem,
	.anb--bp-tablet .anb__item.has-children:hover > .anb__submenu > .anb__subitem,
	.anb--bp-tablet .anb__item.has-children.is-open > .anb__submenu > .anb__subitem {
		opacity: 1;
		transform: none;
		transition: none;
	}
	.anb--bp-tablet .anb__sublink { white-space: normal; }
}

@media (max-width: 767px) {
	.anb--bp-mobile .anb__toggle { display: block; }
	.anb--bp-mobile .anb__inner { justify-content: space-between; }

	.anb--bp-mobile .anb__panel {
		display: none;
		position: absolute;
		top: calc(100% + 8px);
		left: 0;
		right: 0;
		flex-direction: column;
		align-items: stretch;
		gap: 16px;
		padding: 16px;
		max-height: calc(100vh - 120px);
		overflow-y: auto;
		background: var(--anb-panel-bg, #fff);
		border-radius: 16px;
		box-shadow: 0 16px 40px rgba(20, 30, 70, .14);
	}
	.anb--bp-mobile .anb__panel.is-open {
		display: flex;
		animation: anb-panel-in .28s cubic-bezier(.2, .9, .25, 1.05);
	}

	.anb--bp-mobile .anb__menu,
	.anb--bp-mobile.anb--menu-center .anb__menu { flex-direction: column; align-items: stretch; flex-wrap: nowrap; margin: 0; gap: 2px; }
	.anb--bp-mobile .anb__item { width: 100%; }
	.anb--bp-mobile .anb__link { width: 100%; }
	.anb--bp-mobile .anb__actions,
	.anb--bp-mobile.anb--menu-center .anb__actions {
		flex-direction: column;
		align-items: stretch;
		margin: 0;
		gap: 12px;
		text-align: center;
	}

	/* Submenú: acordeón animado */
	.anb--bp-mobile .anb__sub-toggle { top: 5px; right: 8px; transform: none; }
	.anb--bp-mobile .anb__item.has-children:hover > .anb__sub-toggle svg { transform: none; }
	.anb--bp-mobile .anb__item.has-children.is-open > .anb__sub-toggle svg { transform: rotate(180deg); }

	.anb--bp-mobile .anb__item.has-children > .anb__submenu,
	.anb--bp-mobile .anb__item.has-children:hover > .anb__submenu {
		position: static;
		min-width: 0 !important;
		margin: 0;
		padding: 0 0 0 14px;
		max-height: 0;
		overflow: hidden;
		background: transparent !important;
		border: 0 !important;
		box-shadow: none !important;
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		transform: none;
		transition: max-height .35s ease;
	}
	.anb--bp-mobile .anb__item.has-children.is-open > .anb__submenu {
		max-height: 600px;
		padding: 2px 0 6px 14px;
	}
	.anb--bp-mobile .anb__submenu::before,
	.anb--bp-mobile .anb__submenu::after { display: none; }
	.anb--bp-mobile .anb__subitem,
	.anb--bp-mobile .anb__item.has-children:hover > .anb__submenu > .anb__subitem,
	.anb--bp-mobile .anb__item.has-children.is-open > .anb__submenu > .anb__subitem {
		opacity: 1;
		transform: none;
		transition: none;
	}
	.anb--bp-mobile .anb__sublink { white-space: normal; }
}

@keyframes anb-panel-in {
	from { opacity: 0; transform: translateY(-8px) scale(.98); }
	to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.anb *, .anb *::before, .anb *::after { transition: none !important; animation: none !important; }
}
