/**
 * Capa visual CoachingHockey — pista / noche + acento hielo
 * (no sustituye Elementor en bloques; refina contenedor, LP y botones)
 */
:root {
	--ch-base: #0a0f1a;
	--ch-elevated: #111827;
	--ch-line: rgba(255, 255, 255, 0.08);
	--ch-fg: #e8edf5;
	--ch-muted: #94a3b8;
	--ch-accent: #38d9ff;
	--ch-accent-dim: rgba(56, 217, 255, 0.12);
	--ch-radius: 12px;
	--ch-radius-sm: 8px;
	--ch-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
	--ch-font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--ch-font-display: "Outfit", var(--ch-font);
	--ch-track: 0.02em;
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

body.ch-surface {
	color: var(--ch-fg);
	/* Fondo con varias capas para que no sea "un negro plastificado" alrededor de Elementor */
	background: radial-gradient(1000px 480px at 10% 0%, rgba(56, 217, 255, 0.1), transparent 45%),
		radial-gradient(800px 400px at 90% 20%, rgba(99, 102, 241, 0.06), transparent 50%),
		radial-gradient(ellipse at 50% 100%, rgba(15, 23, 42, 0.9), var(--ch-base) 60%);
	font-family: var(--ch-font);
	font-synthesis: none;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
}

body.ch-surface a {
	color: var(--ch-accent);
	text-decoration-skip-ink: auto;
	text-underline-offset: 0.15em;
}

body.ch-surface a:hover {
	color: #7ae9ff;
}

/* Cabecera: cristal suave + borde */
body.ch-surface .ast-primary-header,
body.ch-surface .main-header-bar,
body.ch-surface .ast-mobile-header-content {
	background: rgba(12, 18, 32, 0.88) !important;
	background: color-mix(in srgb, var(--ch-elevated) 82%, transparent) !important;
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--ch-line) !important;
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
	transition: background 0.2s ease, box-shadow 0.2s ease;
}

html body.ch-surface .ast-primary-header {
	border-bottom: 1px solid var(--ch-line) !important;
}

/* Clase añadida por assets/js/header-surface.js al hacer scroll */
body.ch-surface .ch-header--state-scrolled {
	box-shadow: var(--ch-shadow);
}

body.ch-surface .site-header a,
body.ch-surface .ast-builder-menu .menu-item > a,
body.ch-surface .ast-button-wrap .menu-toggle {
	color: var(--ch-fg) !important;
}

body.ch-surface .ast-builder-menu .menu-item > a:hover {
	color: var(--ch-accent) !important;
}

/* Títulos generales (entradas, etc.) */
body.ch-surface h1,
body.ch-surface h2,
body.ch-surface h3,
body.ch-surface h4,
body.ch-surface .entry-title,
body.ch-surface .ast-archive-title,
body.ch-surface .lp-archive-courses h1 {
	font-family: var(--ch-font-display);
	letter-spacing: -0.02em;
}

/* Zona de contenido */
body.ch-surface #content,
body.ch-surface .site-content {
	color: var(--ch-fg);
}

body.ch-surface .ast-separate-container .ast-article-inner,
body.ch-surface .ast-separate-container .ast-article-single,
body.ch-surface .ast-plain-container {
	background: transparent;
}

/* Footer */
body.ch-surface .site-footer,
body.ch-surface .ast-footer-overlay {
	background: var(--ch-elevated) !important;
	border-top: 1px solid var(--ch-line) !important;
}

body.ch-surface .site-footer,
body.ch-surface .site-footer a {
	color: var(--ch-muted) !important;
}

body.ch-surface .site-footer a:hover {
	color: var(--ch-accent) !important;
}

/* Botones Astra / WP / LearnPress */
body.ch-surface .ast-button,
body.ch-surface .ast-custom-button,
body.ch-surface .wp-block-button__link,
body.ch-surface .learn-press a.button,
body.ch-surface .lp-button,
body.ch-surface .learnpress a.button {
	font-family: var(--ch-font-display) !important;
	letter-spacing: var(--ch-track) !important;
	border-radius: var(--ch-radius-sm) !important;
	background: var(--ch-accent) !important;
	color: #041018 !important;
	border: 0 !important;
	box-shadow: 0 8px 24px var(--ch-accent-dim) !important;
}

body.ch-surface .ast-button:hover,
body.ch-surface .wp-block-button__link:hover,
body.ch-surface .learn-press a.button:hover,
body.ch-surface .lp-button:hover,
body.ch-surface .learnpress a.button:hover {
	filter: brightness(1.05);
}

/* —— Elementor (botones genéricos; las secciones siguen usando tus fondos) —— */
body.ch-surface .elementor-button {
	font-family: var(--ch-font-display) !important;
	letter-spacing: var(--ch-track) !important;
	border-radius: var(--ch-radius-sm) !important;
}

body.ch-surface .elementor-widget-text-editor,
body.ch-surface .elementor-widget-theme-post-content {
	color: var(--ch-fg);
}

/* —— LearnPress: catálogo y cursos —— */
body.ch-surface .lp-archive-courses .course,
body.ch-surface ul.learn-press-courses .course,
body.ch-surface .lp-page-content .lp-courses .course,
body.ch-surface .lp-content-area .course,
body.ch-surface .lp-courses__item {
	border-radius: var(--ch-radius) !important;
	border: 1px solid var(--ch-line) !important;
	background: var(--ch-elevated) !important;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25) !important;
	overflow: hidden;
}

@media (hover: hover) and (pointer: fine) {
	body.ch-surface .lp-archive-courses .course:hover,
	body.ch-surface ul.learn-press-courses .course:hover,
	body.ch-surface .lp-courses__item:hover {
		border-color: rgba(56, 217, 255, 0.28) !important;
		transform: translateY(-3px);
	}
}

/* Single curso, pestañas y cajas de contenido LP */
body.ch-surface .learn-press,
body.ch-surface .lp-single-course,
body.ch-surface #learn-press-content {
	--lp-primary-color: var(--ch-accent);
	--lp-secondary-color: #7ae9ff;
}

body.ch-surface .lp-single-course__extra {
	border-radius: var(--ch-radius);
	border: 1px solid var(--ch-line);
}

body.ch-surface .lp-tab-navs,
body.ch-surface .lp-tabs .tabs-nav,
body.ch-surface .lp-nav-tabs {
	border-color: var(--ch-line) !important;
}

body.ch-surface .lp-nav-tabs a {
	color: var(--ch-muted) !important;
}

body.ch-surface .lp-nav-tabs .active a,
body.ch-surface .lp-nav-tabs a:hover {
	color: var(--ch-fg) !important;
}

/* Foco accesible */
body.ch-surface a:focus-visible,
body.ch-surface .ast-button:focus-visible,
body.ch-surface .elementor-button:focus-visible {
	outline: 2px solid var(--ch-accent);
	outline-offset: 3px;
}

/* Opcional: en Elementor → sección o contenedor → Avanzado → Clases CSS → escribir: ch-sec
   (quita el aspecto "cajita blanca" y alinea con el look del tema) */
body.ch-surface .elementor-section.ch-sec,
body.ch-surface .e-con.ch-sec {
	background-color: var(--ch-elevated) !important;
	background-image: none !important;
	border: 1px solid var(--ch-line);
	border-radius: var(--ch-radius);
}

/* Contenido en bloques (Gutenberg) — alineado con el LMS y el look oscuro */
body.ch-surface .entry-content,
body.ch-surface .ast-entry-content {
	font-family: var(--ch-font);
}
body.ch-surface .entry-content h1,
body.ch-surface .entry-content h2,
body.ch-surface .entry-content h3 {
	font-family: var(--ch-font-display);
	letter-spacing: -0.02em;
}
body.ch-surface .entry-content .wp-block-group,
body.ch-surface .entry-content .wp-block-columns,
body.ch-surface .entry-content p {
	max-width: none;
}
body.ch-surface .entry-content .alignwide,
body.ch-surface .alignwide {
	max-width: 1160px;
	margin-left: auto;
	margin-right: auto;
}
body.ch-surface .entry-content .alignfull,
body.ch-surface .alignfull {
	width: 100%;
	max-width: 100%;
}
body.ch-surface .entry-content .is-style-outline .wp-block-button__link {
	color: var(--ch-fg) !important;
	border: 1px solid var(--ch-line) !important;
	background: transparent !important;
}
body.ch-surface .entry-content .is-style-outline .wp-block-button__link:hover {
	border-color: var(--ch-accent) !important;
}
