/* Megamenú «Herramientas». Colores claros por defecto; .cclh-mega-oscuro (lo pone el JS si la web
   está en modo oscuro) los invierte. Posición: el JS lo coloca bajo el elemento en escritorio. */

.cclh-mega { position: relative; }
.cclh-mega .cclh-mega-oculto { display: none !important; }

.cclh-mega-panel {
	--cclh-acento: #d9480f;
	--m-fondo: #ffffff;
	--m-lateral: color-mix(in srgb, var(--cclh-acento) 7%, #ffffff);
	--m-texto: #1c1d21;
	--m-tenue: #6b6e76;
	--m-borde: rgba(0, 0, 0, .08);
	--m-hover: rgba(0, 0, 0, .045);
	position: fixed;
	z-index: 99999;
	top: 64px;
	left: 12px;
	width: min(1000px, calc(100vw - 24px));
	color: var(--m-texto);
	text-align: left;
	font-size: 15px;
	line-height: 1.35;
	letter-spacing: normal;
	text-transform: none;
	opacity: 0;
	transform: translateY(-6px);
	transition: opacity .16s ease, transform .16s ease;
}
.cclh-mega-panel.cclh-abierto { opacity: 1; transform: none; }
/* Puente invisible para que el ratón no "caiga" entre el enlace y el panel. */
.cclh-mega-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }

.cclh-mega-oscuro {
	--m-fondo: #1b1d22;
	--m-lateral: color-mix(in srgb, var(--cclh-acento) 14%, #1b1d22);
	--m-texto: #eceef2;
	--m-tenue: #a2a6b0;
	--m-borde: rgba(255, 255, 255, .09);
	--m-hover: rgba(255, 255, 255, .06);
}

.cclh-mega-interior {
	display: grid;
	grid-template-columns: 260px 1fr;
	background: var(--m-fondo);
	border: 1px solid var(--m-borde);
	border-radius: 18px;
	box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .35), 0 2px 6px rgba(0, 0, 0, .08);
	overflow: hidden;
}
/* Blindaje: los temas suelen dar estilos a "nav ul", "nav li", ".menu a"… que se colarían en el panel. */
.cclh-mega .cclh-mega-panel ul,
.cclh-mega .cclh-mega-panel li {
	display: block !important; position: static !important; float: none !important;
	width: auto !important; height: auto !important; min-width: 0 !important;
	margin: 0 !important; padding: 0 !important; border: 0 !important;
	background: none !important; box-shadow: none !important; list-style: none !important;
	visibility: visible !important; opacity: 1 !important; transform: none !important;
}
.cclh-mega .cclh-mega-panel li::before, .cclh-mega .cclh-mega-panel li::after,
.cclh-mega .cclh-mega-panel a::before, .cclh-mega .cclh-mega-panel a::after { display: none !important; content: none !important; }
.cclh-mega .cclh-mega-panel a {
	color: inherit !important; text-decoration: none !important; text-transform: none !important;
	letter-spacing: normal !important; font-weight: inherit; height: auto !important; line-height: 1.35 !important;
	background-color: transparent; border: 0 !important; box-shadow: none !important; white-space: normal;
}
.cclh-mega .cclh-mega-panel strong, .cclh-mega .cclh-mega-panel small, .cclh-mega .cclh-mega-panel p { text-transform: none !important; }
.cclh-mega .cclh-mega-panel .cclh-mega-rotulo { text-transform: uppercase !important; }

.cclh-mega-rotulo {
	margin: 0 0 10px; font-size: 11.5px; font-weight: 700; letter-spacing: .09em;
	text-transform: uppercase; color: var(--cclh-acento);
}

/* Columna «Hoy» */
.cclh-mega-destacados {
	display: flex; flex-direction: column; gap: 4px;
	padding: 22px 18px; background: var(--m-lateral); border-right: 1px solid var(--m-borde);
}
.cclh-mega .cclh-mega-panel a.cclh-mega-dest { display: flex !important; gap: 12px; align-items: flex-start; padding: 10px !important; border-radius: 12px; transition: background .12s; }
.cclh-mega .cclh-mega-dest:hover, .cclh-mega .cclh-mega-dest:focus-visible { background-color: var(--m-fondo); }
.cclh-mega-icono {
	flex: 0 0 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
	background: var(--m-fondo); color: var(--cclh-acento); box-shadow: 0 0 0 1px var(--m-borde);
}
.cclh-mega-dest strong { display: block; font-size: 15px; }
.cclh-mega-dest small { display: block; color: var(--m-tenue); font-size: 13px; margin-top: 2px; }
.cclh-mega-dest em { display: inline-block; margin-top: 6px; font-style: normal; font-size: 12px; font-weight: 700; color: var(--cclh-acento); }
.cclh-mega .cclh-mega-panel a.cclh-mega-todas { display: block !important; margin-top: auto; padding: 14px 10px 0 !important; font-size: 14px; font-weight: 700; color: var(--cclh-acento) !important; }

/* Columnas */
.cclh-mega-columnas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 20px; padding: 22px 24px; }
.cclh-mega .cclh-mega-col li a { display: block !important; padding: 7px 8px !important; margin: 0 -8px !important; border-radius: 9px; transition: background .12s; }
.cclh-mega .cclh-mega-col li a:hover, .cclh-mega .cclh-mega-col li a:focus-visible { background-color: var(--m-hover); }
.cclh-mega-col strong { display: block; font-size: 14.5px; font-weight: 650; }
.cclh-mega-col small { display: block; font-size: 12.5px; color: var(--m-tenue); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Móvil y tabletas: dentro del menú del tema, como acordeón. */
@media (max-width: 900px) {
	.cclh-mega-panel {
		position: static; width: auto; transform: none; opacity: 1;
		font-size: 15px; margin: 6px 0 10px;
	}
	.cclh-mega-panel::before { display: none; }
	.cclh-mega-interior { grid-template-columns: 1fr; border-radius: 14px; box-shadow: none; }
	.cclh-mega-destacados { border-right: 0; border-bottom: 1px solid var(--m-borde); padding: 14px 12px; }
	.cclh-mega-todas { padding-top: 8px; }
	.cclh-mega-columnas { grid-template-columns: 1fr 1fr; padding: 16px; gap: 14px 16px; }
	.cclh-mega-col small { white-space: normal; }
}
@media (max-width: 480px) {
	.cclh-mega-columnas { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
	.cclh-mega-panel { transition: none; }
}
