/* FV Mega menú — estilos del panel. Clases .fv-mega*, variables --fvmm-*. */
/* Valores por defecto: el plugin los sobrescribe con los de Ajustes. */
:root{
	--fvmm-accent:#1f5f8b;
	--fvmm-accent-dark:#164766;
	--fvmm-soft:#eef4f9;
	--fvmm-icon-bg:#e1ecf5;
	--fvmm-line:#dbe4ec;
	--fvmm-text:#22303a;
	--fvmm-muted:#63707a;
	--fvmm-bg:#fff;
	--fvmm-on-accent:#fff;
	--fvmm-shadow:rgba(20,40,60,.28);
	--fvmm-width:880px;
	--fvmm-agenda-w:210px;
}

/* ================= Base común / reset frente a Hello y Elementor ========= */
li.megamenu .fv-mega{
	text-transform:none;
	letter-spacing:normal;
	font-family:inherit;
	font-size:14px;
	font-weight:400;
	line-height:1.4;
	text-align:left;
	color:var(--fvmm-text);
}
li.megamenu .fv-mega ul{
	display:block !important;
	position:static !important;
	visibility:visible !important;
	opacity:1 !important;
	transform:none !important;
	width:auto !important;
	min-width:0 !important;
	max-width:none !important;
	margin:0 !important;
	padding:0 !important;
	list-style:none !important;
	background:none !important;
	box-shadow:none !important;
	border:0 !important;
}
li.megamenu .fv-mega li{
	display:block !important;
	position:static !important;
	margin:0 !important;
	padding:0 !important;
	border:0 !important;
	background:none !important;
}
li.megamenu .fv-mega a{
	display:inline !important;
	padding:0 !important;
	margin:0 !important;
	border:0 !important;
	background:none !important;
	color:inherit !important;
	text-decoration:none !important;
	text-transform:none !important;
	line-height:inherit !important;
	white-space:normal !important;
	font-size:inherit;
	font-weight:inherit;
}
li.megamenu .fv-mega li::before,
li.megamenu .fv-mega li::after,
li.megamenu .fv-mega a::before,
li.megamenu .fv-mega a::after{ content:none !important; }
li.megamenu .fv-mega a:focus-visible{
	outline:2px solid var(--fvmm-accent) !important;
	outline-offset:2px;
	border-radius:4px;
}
li.megamenu .fv-ico{ display:block; flex:none; }

/* Botón de despliegue: solo en móvil */
li.megamenu > .fv-mega__toggle{ display:none !important; }

/* ================= Escritorio ============================================ */
.site-navigation li.megamenu > ul.sub-menu,
.elementor-nav-menu--main li.megamenu > ul.sub-menu{ display:none !important; }

li.megamenu > .fv-mega{
	position:fixed;
	top:var(--fvmm-top, 80px);
	left:var(--fvmm-left, 50%);
	width:min(var(--fvmm-width), calc(100vw - 32px));
	padding-top:12px;
	z-index:9999;
	visibility:hidden;
	opacity:0;
	transition:opacity .16s ease .12s, visibility 0s linear .28s;
}
li.megamenu:hover > .fv-mega,
li.megamenu:focus-within > .fv-mega{
	visibility:visible;
	opacity:1;
	transition-delay:0s;
}
li.megamenu > .fv-mega::before{
	content:"";
	position:absolute;
	top:6px;
	left:var(--fvmm-arrow, 50%);
	width:13px; height:13px;
	margin-left:-6px;
	background:var(--fvmm-bg);
	border-left:1px solid var(--fvmm-line);
	border-top:1px solid var(--fvmm-line);
	transform:rotate(45deg);
	z-index:2;
}

li.megamenu .fv-mega__inner{
	background:var(--fvmm-bg);
	border:1px solid var(--fvmm-line);
	border-radius:12px;
	box-shadow:0 22px 44px -18px var(--fvmm-shadow);
	overflow:hidden;
	transform:translateY(6px);
	transition:transform .18s ease;
}
li.megamenu:hover > .fv-mega .fv-mega__inner,
li.megamenu:focus-within > .fv-mega .fv-mega__inner{ transform:none; }

li.megamenu .fv-mega__body{ display:block; }
li.megamenu .fv-mega__body--agenda{
	display:grid;
	grid-template-columns:minmax(0,1fr) var(--fvmm-agenda-w);
}

/* ---- Rejilla de tarjetas ---- */
li.megamenu .fv-mega div.fv-mega__grid{
	display:grid !important;
	grid-template-columns:repeat(2, minmax(0,1fr));
	grid-auto-flow:row dense;
	gap:4px 12px;
	padding:18px !important;
	align-content:start;
}
li.megamenu .fv-mega div.fv-mega__card{
	position:relative !important;
	display:flex !important;
	gap:12px;
	align-items:flex-start;
	padding:10px !important;
	border-radius:10px;
	transition:background-color .12s ease;
}
li.megamenu .fv-mega div.fv-mega__card:hover{ background:var(--fvmm-soft) !important; }
li.megamenu .fv-mega div.fv-mega__card--wide{ grid-column:1 / -1; }

li.megamenu .fv-mega .fv-mega__icon{
	flex:0 0 38px;
	width:38px; height:38px;
	border-radius:50%;
	background:var(--fvmm-icon-bg);
	color:var(--fvmm-accent);
	display:flex;
	align-items:center;
	justify-content:center;
	transition:background-color .12s ease, color .12s ease;
}
li.megamenu .fv-mega div.fv-mega__card:hover .fv-mega__icon{
	background:var(--fvmm-accent);
	color:var(--fvmm-on-accent);
}
li.megamenu .fv-mega .fv-mega__text{
	display:flex;
	flex-direction:column;
	min-width:0;
	padding-top:1px;
}
li.megamenu .fv-mega .fv-mega__name{
	font-size:15px;
	font-weight:600;
	line-height:1.3;
	color:var(--fvmm-text);
}
/* Toda la tarjeta es clicable */
li.megamenu .fv-mega a.fv-mega__name--link::after{
	content:"" !important;
	position:absolute;
	inset:0;
	border-radius:10px;
}
li.megamenu .fv-mega div.fv-mega__card:hover a.fv-mega__name--link{ color:var(--fvmm-accent-dark) !important; }
li.megamenu .fv-mega .fv-mega__desc{
	margin-top:3px;
	font-size:13px;
	line-height:1.4;
	color:var(--fvmm-muted);
}

/* ---- Etiquetas (subítems) ---- */
li.megamenu .fv-mega span.fv-mega__chips{
	display:flex !important;
	flex-wrap:wrap;
	gap:6px;
	margin-top:8px !important;
}
li.megamenu .fv-mega .fv-mega__chip{
	position:relative;
	z-index:1;
	display:inline-block !important;
	padding:4px 11px !important;
	font-size:12.5px;
	line-height:1.3 !important;
	border:1px solid var(--fvmm-line) !important;
	border-radius:999px;
	background:var(--fvmm-bg) !important;
	color:var(--fvmm-text) !important;
	transition:border-color .12s ease, color .12s ease;
}
li.megamenu .fv-mega .fv-mega__chip--text{
	border-style:dashed !important;
	color:var(--fvmm-muted) !important;
	cursor:default;
}
li.megamenu .fv-mega a.fv-mega__chip:hover,
li.megamenu .fv-mega a.fv-mega__chip[aria-current="page"]{
	border-color:var(--fvmm-accent) !important;
	color:var(--fvmm-accent-dark) !important;
}

/* ---- Columna agenda ---- */
li.megamenu .fv-mega .fv-mega__agenda{
	background:var(--fvmm-soft);
	border-left:1px solid var(--fvmm-line);
	padding:22px 18px;
	display:flex;
	flex-direction:column;
	gap:10px;
}
li.megamenu .fv-mega .fv-mega__agenda-title{
	display:flex;
	align-items:center;
	gap:8px;
	margin:0 0 2px;
	font-size:14px;
	font-weight:600;
	color:var(--fvmm-accent-dark);
}
li.megamenu .fv-mega div.fv-mega__days{
	display:flex !important;
	flex-direction:column;
	gap:8px;
}
li.megamenu .fv-mega .fv-mega__day{
	display:flex !important;
	align-items:center;
	gap:12px;
	padding:9px 12px !important;
	background:var(--fvmm-bg) !important;
	border:1px solid var(--fvmm-line) !important;
	border-radius:8px;
	color:var(--fvmm-text) !important;
	transition:border-color .12s ease, transform .12s ease;
}
li.megamenu .fv-mega a.fv-mega__day:hover,
li.megamenu .fv-mega a.fv-mega__day[aria-current="page"]{
	border-color:var(--fvmm-accent) !important;
	transform:translateX(2px);
}
li.megamenu .fv-mega .fv-mega__day-num{
	flex:0 0 auto;
	min-width:1.3em;
	font-size:26px;
	font-weight:600;
	line-height:1;
	color:var(--fvmm-accent);
	font-variant-numeric:tabular-nums;
}
li.megamenu .fv-mega .fv-mega__day-txt{
	font-size:12px;
	line-height:1.3;
	color:var(--fvmm-muted);
	text-transform:lowercase;
}
li.megamenu .fv-mega a.fv-mega__agenda-link{
	margin-top:auto !important;
	padding-top:6px !important;
	font-size:13px;
	font-weight:600;
	color:var(--fvmm-accent-dark) !important;
	text-decoration:underline !important;
	text-decoration-thickness:1px !important;
	text-underline-offset:3px;
}

li.megamenu .fv-mega .fv-mega__day{ position:relative; }
li.megamenu .fv-mega .fv-mega__day.is-today{
	border-color:var(--fvmm-accent) !important;
	box-shadow:inset 3px 0 0 var(--fvmm-accent);
}
li.megamenu .fv-mega .fv-mega__today{
	margin-left:auto;
	padding:2px 7px;
	font-size:11px;
	font-weight:600;
	line-height:1.3;
	border-radius:999px;
	background:var(--fvmm-accent);
	color:var(--fvmm-on-accent);
}

/* Indicador de submenú de respaldo (si no hay otro que clonar) */
li.megamenu > a .fv-caret{
	display:inline-block;
	width:.42em; height:.42em;
	margin-left:.5em;
	border-right:1.5px solid currentColor;
	border-bottom:1.5px solid currentColor;
	transform:translateY(-.2em) rotate(45deg);
}

@media (max-width:1100px){
	li.megamenu > .fv-mega{ width:min(calc(var(--fvmm-width) * .86), calc(100vw - 32px)); }
	li.megamenu .fv-mega__body--agenda{ grid-template-columns:minmax(0,1fr) calc(var(--fvmm-agenda-w) * .9); }
}

@media (prefers-reduced-motion: reduce){
	li.megamenu > .fv-mega,
	li.megamenu .fv-mega__inner,
	li.megamenu .fv-mega .fv-mega__day{ transition:none !important; transform:none !important; }
}

/* ================= Móvil (desplegables de Hello y Elementor) ============= */
.site-navigation-dropdown li.megamenu,
.elementor-nav-menu--dropdown li.megamenu{ position:relative; }

.site-navigation-dropdown li.megamenu > .fv-mega__toggle,
.elementor-nav-menu--dropdown li.megamenu > .fv-mega__toggle{
	display:flex !important;
	position:absolute;
	top:0; right:0;
	width:48px; height:44px;
	align-items:center;
	justify-content:center;
	padding:0 !important;
	margin:0 !important;
	border:0 !important;
	background:none !important;
	color:inherit !important;
	cursor:pointer;
	z-index:2;
}
.site-navigation-dropdown li.megamenu > .fv-mega__toggle span,
.elementor-nav-menu--dropdown li.megamenu > .fv-mega__toggle span{
	width:8px; height:8px;
	border-right:2px solid currentColor;
	border-bottom:2px solid currentColor;
	transform:translateY(-2px) rotate(45deg);
	transition:transform .15s ease;
}
.site-navigation-dropdown li.megamenu.fv-open > .fv-mega__toggle span,
.elementor-nav-menu--dropdown li.megamenu.fv-open > .fv-mega__toggle span{
	transform:translateY(2px) rotate(-135deg);
}

.site-navigation-dropdown li.megamenu > .fv-mega,
.elementor-nav-menu--dropdown li.megamenu > .fv-mega{
	display:none;
	position:static;
	width:auto;
	padding:0 12px 14px;
	visibility:visible;
	opacity:1;
	transition:none;
}
.site-navigation-dropdown li.megamenu.fv-open > .fv-mega,
.elementor-nav-menu--dropdown li.megamenu.fv-open > .fv-mega{ display:block; }
.site-navigation-dropdown li.megamenu > .fv-mega::before,
.elementor-nav-menu--dropdown li.megamenu > .fv-mega::before{ content:none; }

.site-navigation-dropdown li.megamenu .fv-mega__inner,
.elementor-nav-menu--dropdown li.megamenu .fv-mega__inner{
	box-shadow:none;
	transform:none;
	border-radius:10px;
}
.site-navigation-dropdown li.megamenu .fv-mega__body--agenda,
.elementor-nav-menu--dropdown li.megamenu .fv-mega__body--agenda{ display:block; }
.site-navigation-dropdown li.megamenu .fv-mega div.fv-mega__grid,
.elementor-nav-menu--dropdown li.megamenu .fv-mega div.fv-mega__grid{
	grid-template-columns:minmax(0,1fr);
	padding:8px !important;
	gap:0;
}
.site-navigation-dropdown li.megamenu .fv-mega .fv-mega__desc,
.elementor-nav-menu--dropdown li.megamenu .fv-mega .fv-mega__desc{ display:none; }
.site-navigation-dropdown li.megamenu .fv-mega .fv-mega__agenda,
.elementor-nav-menu--dropdown li.megamenu .fv-mega .fv-mega__agenda{
	border-left:0;
	border-top:1px solid var(--fvmm-line);
	padding:14px;
}
.site-navigation-dropdown li.megamenu .fv-mega div.fv-mega__days,
.elementor-nav-menu--dropdown li.megamenu .fv-mega div.fv-mega__days{
	display:grid !important;
	grid-template-columns:repeat(3, minmax(0,1fr));
}
.site-navigation-dropdown li.megamenu .fv-mega .fv-mega__day,
.elementor-nav-menu--dropdown li.megamenu .fv-mega .fv-mega__day{
	flex-direction:column;
	gap:4px;
	text-align:center;
	padding:8px 4px !important;
}
.site-navigation-dropdown li.megamenu .fv-mega .fv-mega__today,
.elementor-nav-menu--dropdown li.megamenu .fv-mega .fv-mega__today{ margin:2px auto 0; }
