/* =========================================================
   Xtellaris Navbar Widget — xt-navbar.css
   ========================================================= */

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

/* ── Outer wrapper ──────────────────────────────────────── */
.xt-navbar {
	position: relative;
	width: 100%;
}

/* ── Pill container ─────────────────────────────────────── */
.xt-navbar__inner {
	display: flex;
	align-items: center;
	gap: 32px;
	background-color: #ffffff;
	border-radius: 100px;
	padding: 10px 10px 10px 24px;
	box-shadow: 0 2px 20px rgba(0, 0, 0, 0.07);
	position: relative;
	transition: all 0.3s ease;
}

/* Glassy effect */
.xt-navbar__inner.is-glassy {
	background-color: rgba(255, 255, 255, 0.45);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ── Logo ────────────────────────────────────────────────── */
.xt-navbar__logo {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	text-decoration: none;
}

.xt-navbar__logo img {
	display: block;
	height: 36px;
	width: auto;
}

.xt-navbar__logo-text {
	font-size: 1.1rem;
	font-weight: 700;
	color: #0a0a0a;
	text-decoration: none;
}

/* ── Desktop navigation ─────────────────────────────────── */
.xt-navbar__nav {
	flex: 1;
	display: flex;
	justify-content: center;
}

.xt-navbar__nav ul.xt-menu-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	gap: 8px;
}

.xt-navbar__nav .menu-item {
	position: relative;
}

.xt-navbar__nav .menu-item > a {
	display: block;
	text-decoration: none;
	font-size: 0.9rem;
	font-weight: 500;
	color: #6b7280;
	padding: 6px 12px;
	border-radius: 6px;
	position: relative;
	transition: color var(--xt-hover-speed, 250ms) ease,
	            background-color var(--xt-hover-speed, 250ms) ease;
	white-space: nowrap;
}

.xt-navbar__nav .menu-item > a:hover,
.xt-navbar__nav .menu-item.current-menu-item > a,
.xt-navbar__nav .menu-item.xt-active-item > a {
	color: #0a0a0a;
}

/* Skip default WP active classes if one-page is enabled */
.xt-navbar__inner.is-one-page .xt-navbar__nav .menu-item.current-menu-item > a,
.xt-navbar__inner.is-one-page .xt-navbar__nav .menu-item.current_page_item > a,
.xt-navbar__inner.is-one-page .xt-navbar__nav .menu-item.current-menu-ancestor > a {
	color: #6b7280; /* Reset color to normal */
	font-weight: 500; /* Reset weight to normal */
}

/* Re-apply active styles only for our custom active class or hover */
.xt-navbar__inner.is-one-page .xt-navbar__nav .menu-item.xt-active-item > a,
.xt-navbar__inner.is-one-page .xt-navbar__nav .menu-item > a:hover {
	color: #0a0a0a;
	font-weight: 700;
}

/* Active indicator underline */
.xt-navbar__nav .menu-item.current-menu-item > a::after,
.xt-navbar__nav .menu-item.xt-active-item > a::after {
	content: '';
	position: absolute;
	bottom: -4px; /* Lowered a bit for "ligero" look */
	left: 50%;
	right: 50%;
	height: var(--xt-hover-line-h, 1.5px);
	background-color: var(--xt-active-color, #0a0a0a);
	border-radius: 2px;
	transition: left 0.25s ease, right 0.25s ease;
}

.xt-navbar__nav .menu-item.current-menu-item > a::after,
.xt-navbar__nav .menu-item.xt-active-item > a::after {
	left: 14px;
	right: 14px;
}

/* Hide default indicator if one-page is active but not this item */
.xt-navbar__inner.is-one-page .xt-navbar__nav .menu-item.current-menu-item > a::after {
	display: none;
}
.xt-navbar__inner.is-one-page .xt-navbar__nav .menu-item.xt-active-item > a::after {
	display: block;
}

/* Active item bold */
.xt-navbar__nav .menu-item.current-menu-item > a,
.xt-navbar__nav .menu-item.xt-active-item > a {
	font-weight: 700;
}

/* ── Hover effects ───────────────────────────────────────── */
.xt-navbar__nav.xt-hover-underline .menu-item > a::after {
	content: '';
	position: absolute;
	bottom: -4px;
	left: 50%;
	right: 50%;
	height: var(--xt-hover-line-h, 1.5px);
	background-color: var(--xt-hover-color, #0a0a0a);
	border-radius: 2px;
	transition: left var(--xt-hover-speed, 250ms) ease,
	            right var(--xt-hover-speed, 250ms) ease;
}

.xt-navbar__nav.xt-hover-underline .menu-item > a:hover::after,
.xt-navbar__nav.xt-hover-underline .menu-item.current-menu-item > a::after,
.xt-navbar__nav.xt-hover-underline .menu-item.xt-active-item > a::after {
	left: 14px;
	right: 14px;
}

.xt-navbar__nav.xt-hover-background .menu-item > a:hover,
.xt-navbar__nav.xt-hover-background .menu-item.current-menu-item > a {
	background-color: var(--xt-hover-color, rgba(0,0,0,0.06));
	border-radius: var(--xt-hover-radius, 6px);
}

.xt-navbar__nav.xt-hover-border-box .menu-item > a {
	border: var(--xt-hover-border-w, 1.5px) solid transparent;
	border-radius: var(--xt-hover-radius, 6px);
}

.xt-navbar__nav.xt-hover-border-box .menu-item > a:hover,
.xt-navbar__nav.xt-hover-border-box .menu-item.current-menu-item > a {
	border-color: var(--xt-hover-color, currentColor);
}

/* ── Dropdown submenus ──────────────────────────────────── */
.xt-navbar__nav .sub-menu {
    display: none;
    position: absolute;
    top: calc(100% + 12px); /* Un poco más de aire */
    left: 50%;
    transform: translateX(-50%); /* Centrado respecto al parent */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    min-width: 180px;
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    padding: 8px;
    z-index: 9999;
    list-style: none;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Triangulito indicador */
.xt-navbar__nav .sub-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid rgba(255, 255, 255, 0.95);
}

/* Puente invisible para evitar que se cierre al mover el ratón por el hueco de 12px */
.xt-navbar__nav .sub-menu::after {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    right: 0;
    height: 15px;
    background: transparent;
}

.xt-navbar__nav .menu-item:hover > .sub-menu {
    display: block;
    animation: xt-dropdown-fade 0.25s ease forwards;
}

@keyframes xt-dropdown-fade {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.xt-navbar__nav .sub-menu .menu-item {
    margin: 0;
    padding: 0;
    list-style: none;
}

.xt-navbar__nav .sub-menu .menu-item > a {
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.85rem;
    color: #4b5563;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.xt-navbar__nav .sub-menu .menu-item > a:hover {
    background-color: rgba(30, 142, 255, 0.08);
    color: #1e8eff;
}

/* Quitar el underline indicator en los items del dropdown */
.xt-navbar__nav .sub-menu .menu-item > a::after {
    display: none !important;
}

/* ── CTA Button ──────────────────────────────────────────── */
.xt-navbar__cta {
	flex-shrink: 0;
}

.xt-navbar__cta-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 28px;
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1;
	color: #ffffff;
	background-color: #1e8eff;
	border-radius: 100px;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color var(--xt-hover-speed, 250ms) ease,
	            color var(--xt-hover-speed, 250ms) ease,
	            transform 0.15s ease;
}

.xt-navbar__cta-btn:hover {
	background-color: #0a7ae8;
	color: #ffffff;
	transform: translateY(-1px);
}

/* ── Mobile toggle ───────────────────────────────────────── */
.xt-navbar__toggle {
	display: none;
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 8px;
	color: #0a0a0a;
	border-radius: 8px;
	align-items: center;
	justify-content: center;
	transition: color 0.2s ease, background-color 0.2s ease;
}

.xt-navbar__toggle:hover {
	background-color: rgba(0,0,0,0.06);
}

/* ── Mobile canvas ───────────────────────────────────────── */
.xt-mobile-canvas {
	position: fixed;
	top: 0;
	bottom: 0;
	width: 320px;
	max-width: 90vw;
	background-color: #ffffff;
	z-index: 99999;
	display: flex;
	flex-direction: column;
	visibility: hidden;
	transition: transform 0.38s cubic-bezier(0.77, 0.2, 0.05, 1),
	            opacity 0.38s ease,
	            visibility 0.38s;
}

.xt-mobile-canvas__header {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	padding: 16px 20px;
	border-bottom: 1px solid #f0f0f0;
}

.xt-mobile-canvas__close {
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 6px;
	color: #0a0a0a;
	border-radius: 6px;
	display: inline-flex;
	transition: background-color 0.2s ease;
}

.xt-mobile-canvas__close:hover {
	background-color: rgba(0,0,0,0.06);
}

.xt-mobile-canvas__body {
	padding: 20px 20px 32px;
	overflow-y: auto;
	flex: 1;
}

.xt-mobile-menu-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
}

.xt-mobile-menu-list .menu-item > a {
	display: block;
	text-decoration: none;
	padding: 13px 0;
	font-size: 1rem;
	font-weight: 500;
	color: #0a0a0a;
	border-bottom: 1px solid #f0f0f0;
	transition: color 0.2s ease;
}

.xt-mobile-menu-list .menu-item > a:hover {
	color: #1e8eff;
}

.xt-mobile-menu-list .sub-menu {
	list-style: none;
	padding: 0 0 0 16px;
	margin: 0;
}

.xt-mobile-extra-btn {
	margin-top: 24px;
}

.xt-mobile-btn {
	display: block;
	text-align: center;
	padding: 14px 24px;
	font-size: 0.95rem;
	font-weight: 600;
	text-decoration: none;
	border-radius: 100px;
	background-color: #1e8eff;
	color: #ffffff;
	transition: background-color 0.2s ease;
}

.xt-mobile-btn:hover {
	background-color: #0a7ae8;
	color: #ffffff;
}

.xt-mobile-social {
	display: flex;
	justify-content: center;
	gap: 16px;
	margin-top: 24px;
}

.xt-mobile-social a {
	color: #0a0a0a;
	font-size: 20px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: color 0.2s ease;
}

.xt-mobile-social a:hover {
	color: #1e8eff;
}

.xt-mobile-social a svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

/* ── Mobile overlay ──────────────────────────────────────── */
.xt-mobile-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	z-index: 99998;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.38s ease, visibility 0.38s;
}

/* ── Canvas effect variants ──────────────────────────────── */
.xt-effect-slide-right { right: 0; transform: translateX(100%); }
.xt-nav-is-open .xt-effect-slide-right { transform: translateX(0); visibility: visible; }

.xt-effect-slide-left { left: 0; transform: translateX(-100%); }
.xt-nav-is-open .xt-effect-slide-left { transform: translateX(0); visibility: visible; }

.xt-effect-fade-in {
	left: 50%; top: 50%;
	transform: translate(-50%, -50%) scale(0.96);
	height: auto;
	max-height: 90vh;
	border-radius: 20px;
	opacity: 0;
}
.xt-nav-is-open .xt-effect-fade-in {
	transform: translate(-50%, -50%) scale(1);
	opacity: 1;
	visibility: visible;
}

.xt-effect-dropdown {
	top: 0; left: 0; right: 0;
	width: 100%; max-width: 100%; bottom: auto;
	transform: translateY(-100%);
}
.xt-nav-is-open .xt-effect-dropdown { transform: translateY(0); visibility: visible; }

.xt-nav-is-open .xt-mobile-overlay { opacity: 1; visibility: visible; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1024px) {
	.xt-navbar__nav,
	.xt-navbar__cta {
		display: none !important;
	}

	.xt-navbar__toggle {
		display: inline-flex;
	}

	.xt-navbar__inner {
		justify-content: space-between;
		padding: 10px 12px 10px 20px;
	}
}

@media (max-width: 480px) {
	.xt-navbar__inner {
		border-radius: 16px;
	}
}
