/* Top Criterio - Menú Hamburguesa. Los selectores llevan #tcmh-root para no chocar con el tema ni con Elementor. */

#tcmh-root{
	--tcmh-adminbar:0px;
	font-family:inherit;
	line-height:1.3;
}
body.admin-bar #tcmh-root{--tcmh-adminbar:32px}
@media (max-width:782px){
	body.admin-bar #tcmh-root{--tcmh-adminbar:46px}
}

/* ---------- Botón ---------- */
#tcmh-root .tcmh__btn{
	all:unset;
	box-sizing:border-box;
	position:fixed;
	z-index:999991;
	display:grid;
	place-items:center;
	width:var(--tcmh-size);
	height:var(--tcmh-size);
	border-radius:var(--tcmh-radius);
	background:var(--tcmh-btn);
	color:var(--tcmh-icon);
	cursor:pointer;
	box-shadow:0 8px 22px rgba(10,22,64,.28);
	-webkit-tap-highlight-color:transparent;
	touch-action:manipulation;
	transition:transform .2s ease,box-shadow .2s ease,filter .2s ease;
}
#tcmh-root .tcmh__btn:hover{filter:brightness(1.08);transform:translateY(-1px)}
#tcmh-root .tcmh__btn:active{transform:translateY(0) scale(.97)}
#tcmh-root .tcmh__btn:focus-visible{outline:3px solid var(--tcmh-icon);outline-offset:3px;box-shadow:0 0 0 6px var(--tcmh-btn)}

#tcmh-root.tcmh--pos-top-right .tcmh__btn{
	top:calc(var(--tcmh-y) + var(--tcmh-adminbar) + env(safe-area-inset-top,0px));
	right:calc(var(--tcmh-x) + env(safe-area-inset-right,0px));
}
#tcmh-root.tcmh--pos-top-left .tcmh__btn{
	top:calc(var(--tcmh-y) + var(--tcmh-adminbar) + env(safe-area-inset-top,0px));
	left:calc(var(--tcmh-x) + env(safe-area-inset-left,0px));
}
#tcmh-root.tcmh--pos-bottom-right .tcmh__btn{
	bottom:calc(var(--tcmh-y) + env(safe-area-inset-bottom,0px));
	right:calc(var(--tcmh-x) + env(safe-area-inset-right,0px));
}
#tcmh-root.tcmh--pos-bottom-left .tcmh__btn{
	bottom:calc(var(--tcmh-y) + env(safe-area-inset-bottom,0px));
	left:calc(var(--tcmh-x) + env(safe-area-inset-left,0px));
}

/* Rayas que se convierten en una X */
#tcmh-root .tcmh__bars{
	position:relative;
	display:block;
	width:calc(var(--tcmh-size) * .46);
	height:calc(var(--tcmh-size) * .32);
}
#tcmh-root .tcmh__bars i{
	position:absolute;
	left:0;
	right:0;
	height:2.5px;
	margin-top:-1.25px;
	border-radius:3px;
	background:currentColor;
	transition:transform .3s cubic-bezier(.2,.8,.2,1),opacity .2s ease,top .3s cubic-bezier(.2,.8,.2,1);
}
#tcmh-root .tcmh__bars i:nth-child(1){top:0}
#tcmh-root .tcmh__bars i:nth-child(2){top:50%}
#tcmh-root .tcmh__bars i:nth-child(3){top:100%}
#tcmh-root.is-open .tcmh__bars i:nth-child(1){top:50%;transform:rotate(45deg)}
#tcmh-root.is-open .tcmh__bars i:nth-child(2){opacity:0;transform:scaleX(.2)}
#tcmh-root.is-open .tcmh__bars i:nth-child(3){top:50%;transform:rotate(-45deg)}

/* ---------- Fondo oscuro ---------- */
#tcmh-root .tcmh__overlay{
	position:fixed;
	inset:0;
	z-index:999989;
	background:rgba(5,10,30,.58);
	opacity:0;
	visibility:hidden;
	transition:opacity .3s ease,visibility 0s linear .3s;
}
#tcmh-root.is-open .tcmh__overlay{opacity:1;visibility:visible;transition-delay:0s}
html.tcmh-lock{overflow:hidden}

/* ---------- Panel ---------- */
#tcmh-root .tcmh__panel{
	position:fixed;
	top:0;
	bottom:0;
	z-index:999990;
	box-sizing:border-box;
	width:min(var(--tcmh-panel-w),100vw);
	padding:calc(var(--tcmh-size) + var(--tcmh-y) + var(--tcmh-adminbar) + env(safe-area-inset-top,0px) + 22px) 28px calc(32px + env(safe-area-inset-bottom,0px));
	background:var(--tcmh-bg);
	color:var(--tcmh-text);
	overflow-y:auto;
	overscroll-behavior:contain;
	visibility:hidden;
	box-shadow:0 0 60px rgba(0,0,0,.35);
	transition:transform .38s cubic-bezier(.22,.9,.3,1),opacity .3s ease,visibility 0s linear .38s;
}
#tcmh-root.is-open .tcmh__panel{visibility:visible;transform:none;opacity:1;transition-delay:0s}

#tcmh-root.tcmh--pos-bottom-right .tcmh__panel,
#tcmh-root.tcmh--pos-bottom-left .tcmh__panel{
	padding-top:calc(32px + var(--tcmh-adminbar) + env(safe-area-inset-top,0px));
	padding-bottom:calc(var(--tcmh-size) + var(--tcmh-y) + env(safe-area-inset-bottom,0px) + 22px);
}

#tcmh-root.tcmh--layout-drawer-right .tcmh__panel{right:0;transform:translateX(100%)}
#tcmh-root.tcmh--layout-drawer-left .tcmh__panel{left:0;transform:translateX(-100%)}
#tcmh-root.tcmh--layout-fullscreen .tcmh__panel{left:0;right:0;width:100%;opacity:0;transform:translateY(14px)}

/* Corrección: el estado abierto debe prevalecer sobre la transformación inicial del panel. */
#tcmh-root.is-open.tcmh--layout-drawer-right .tcmh__panel,
#tcmh-root.is-open.tcmh--layout-drawer-left .tcmh__panel,
#tcmh-root.is-open.tcmh--layout-fullscreen .tcmh__panel{
    visibility:visible;
    transform:translate(0,0);
    opacity:1;
    transition-delay:0s;
}
#tcmh-root.tcmh--layout-fullscreen .tcmh__inner{max-width:720px;margin:0 auto}
#tcmh-root.tcmh--layout-fullscreen .tcmh__overlay{display:none}

/* ---------- Enlaces ---------- */
#tcmh-root .tcmh__list{list-style:none;margin:0;padding:0}
#tcmh-root .tcmh__item{list-style:none;margin:0;padding:0}
#tcmh-root .tcmh__row{
	display:flex;
	align-items:center;
	justify-content:space-between;
	gap:8px;
	border-bottom:1px solid rgba(255,255,255,.14);
	border-bottom-color:color-mix(in srgb,var(--tcmh-text) 16%,transparent);
}
#tcmh-root .tcmh__link{
	flex:1;
	display:block;
	padding:15px 0;
	color:var(--tcmh-text);
	font-size:clamp(20px,3.4vw,26px);
	font-weight:600;
	letter-spacing:-.01em;
	line-height:1.25;
	text-decoration:none;
	transition:padding-left .2s ease,opacity .2s ease;
}
#tcmh-root .tcmh__link:hover{padding-left:8px}
#tcmh-root .tcmh__link:focus-visible{outline:2px solid var(--tcmh-btn);outline-offset:2px;border-radius:4px}
#tcmh-root .tcmh__item.is-current > .tcmh__row{border-bottom-color:var(--tcmh-btn)}

#tcmh-root .tcmh__sub-toggle{
	all:unset;
	box-sizing:border-box;
	display:grid;
	place-items:center;
	flex:none;
	width:44px;
	height:44px;
	border-radius:10px;
	color:var(--tcmh-text);
	cursor:pointer;
	-webkit-tap-highlight-color:transparent;
}
#tcmh-root .tcmh__sub-toggle svg{transition:transform .25s ease}
#tcmh-root .tcmh__item.is-open > .tcmh__row .tcmh__sub-toggle svg{transform:rotate(180deg)}
#tcmh-root .tcmh__sub-toggle:hover{background:rgba(255,255,255,.1)}
#tcmh-root .tcmh__sub-toggle:focus-visible{outline:2px solid var(--tcmh-btn);outline-offset:1px}

/* Submenú plegable */
#tcmh-root .tcmh__sub{
	display:grid;
	grid-template-rows:0fr;
	visibility:hidden;
	transition:grid-template-rows .3s ease,visibility 0s linear .3s;
}
#tcmh-root .tcmh__item.is-open > .tcmh__sub{grid-template-rows:1fr;visibility:visible;transition-delay:0s}
#tcmh-root .tcmh__sub > .tcmh__list{overflow:hidden;min-height:0;margin:0 0 8px 4px;padding-left:16px;border-left:2px solid var(--tcmh-btn)}
#tcmh-root .tcmh__sub .tcmh__row{border-bottom:0}
#tcmh-root .tcmh__sub .tcmh__link{padding:11px 0;font-size:clamp(16px,2.8vw,19px);font-weight:500;opacity:.92}
#tcmh-root .tcmh__sub .tcmh__link:hover{opacity:1}

/* Botón de contacto */
#tcmh-root .tcmh__cta{
	box-sizing:border-box;
	display:flex;
	align-items:center;
	justify-content:center;
	min-height:52px;
	margin-top:30px;
	padding:0 24px;
	border-radius:calc(var(--tcmh-radius) + 2px);
	background:var(--tcmh-btn);
	color:var(--tcmh-icon);
	font-size:16px;
	font-weight:700;
	text-decoration:none;
	transition:filter .2s ease,transform .2s ease;
}
#tcmh-root .tcmh__cta:hover{filter:brightness(1.08);transform:translateY(-1px)}
#tcmh-root .tcmh__cta:focus-visible{outline:3px solid var(--tcmh-text);outline-offset:3px}
#tcmh-root .tcmh__empty{margin:0;font-size:16px;opacity:.8}

@media (prefers-reduced-motion:reduce){
	#tcmh-root *,#tcmh-root *::before,#tcmh-root *::after{transition-duration:.01ms!important;transition-delay:0s!important}
}
@media print{
	#tcmh-root{display:none!important}
}
