/* =====================================================================
 * Campus CODEINEP — header y footer de todo el sitio (mockups Campus-*)
 * Ver inc/campus-global.php. Todo va bajo #masthead / #colophon.
 * ===================================================================== */

/* Ancho único de todo el sitio: header, contenido, carrito, curso y footer
   usan el mismo contenedor (1160px con 32px de margen; 18px en celular). */
:root { --ch-page-max: 1160px; --ch-page-pad: 32px; }
@media (max-width: 640px) { :root { --ch-page-pad: 18px; } }

#masthead,
#colophon {
	--ch-ink: #0B1B4D;
	--ch-violet: var(--ch-accent, #2E5BFF);
	--ch-violet-dark: var(--ch-accent-hover);
	--ch-purple: #2E5BFF;
	font-family: 'Manrope', system-ui, sans-serif;
}

/* ---------- Barra de consultas (widgets "Toolbar") ---------- */
#masthead #toolbar {
	background: #0B1B4D !important;
	border: 0 !important;
	padding: 0 !important;
	color: #c2c2ca;
	font-size: 12px;
}
#masthead #toolbar .toolbar-container {
	max-width: var(--ch-page-max);
	margin: 0 auto;
	padding: 8px var(--ch-page-pad);
	box-sizing: border-box;
	display: flex;
	justify-content: flex-start; /* alineado con el logo, como antes */
	align-items: center;
	gap: 20px;
	min-height: 0;
}
#masthead #toolbar .widget { margin: 0 !important; padding: 0 !important; border: 0 !important; }
#masthead #toolbar .widget_login-popup { display: none !important; } /* el botón de sesión ahora está en el header */
#masthead #toolbar .thim-have-any-question { display: flex !important; flex-wrap: wrap; align-items: center; gap: 20px; margin: 0; padding: 0; }
#masthead #toolbar .thim-have-any-question > div { display: inline-flex; align-items: center; gap: 6px; margin: 0 !important; padding: 0 !important; border: 0 !important; line-height: 1.4; }
#masthead #toolbar .thim-have-any-question > div::before,
#masthead #toolbar .thim-have-any-question > div::after { display: none !important; }
#masthead #toolbar .thim-have-any-question .question { font-weight: 700; letter-spacing: .06em; color: #8f8f9c; font-size: 12px; text-transform: uppercase; }
#masthead #toolbar .thim-have-any-question a { color: #f5f5f7 !important; font-size: 12px !important; font-weight: 600; text-decoration: none; }
#masthead #toolbar .thim-have-any-question a:hover { color: #fff !important; }
#masthead #toolbar .thim-have-any-question .mobile i { color: #C8F05A; }
#masthead #toolbar .thim-have-any-question .email i { color: #8FA8FF; }
#masthead #toolbar .thim-have-any-question i { font-size: 14px; }

/* ---------- Barra principal ---------- */
#masthead {
	background: rgba(255, 255, 255, .96) !important;
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid rgba(0, 0, 0, .06) !important;
	box-shadow: none !important;
}
#masthead .thim-nav-wrapper { width: auto !important; max-width: var(--ch-page-max) !important; margin: 0 auto !important; padding: 0 var(--ch-page-pad) !important; box-sizing: border-box; background: transparent !important; }
#masthead .thim-nav-wrapper > .row { margin: 0 !important; }
#masthead .thim-nav-wrapper .navigation { padding: 0 !important; }
#masthead #toolbar .header_full { padding: 0 !important; max-width: none !important; }
#masthead #toolbar .header_full > .row { margin: 0 !important; }
#masthead #toolbar .header_full > .row > [class*="col-"] { padding: 0 !important; }
#masthead .tm-table { display: flex !important; align-items: center; gap: 20px; min-height: 70px; width: 100%; }
#masthead .tm-table > .table-cell { display: block !important; height: auto !important; }
#masthead .tm-table > .width-logo { flex: 0 1 auto; width: auto !important; min-width: 0 !important; max-width: 60%; padding: 0 !important; }
#masthead .width-logo img { max-height: 40px; width: auto !important; }
#masthead .width-navigation { flex: 1; min-width: 0; display: flex !important; justify-content: flex-end; }

/* menú: pastillas como en el mockup */
#masthead .menu-main-menu { display: flex !important; flex-wrap: wrap; justify-content: flex-end; gap: 8px; align-items: center; width: auto !important; margin: 0 0 0 auto !important; padding: 0 !important; float: none !important; }
#masthead .menu-main-menu #magic-line { display: none !important; }
#masthead .menu-main-menu > li { margin: 0 !important; padding: 0 !important; }
#masthead .menu-main-menu > li > .tc-menu-inner,
#masthead .menu-main-menu > li > a {
	display: inline-flex !important;
	align-items: center;
	gap: 6px;
	padding: 9px 16px !important;
	border-radius: 40px;
	border: 1px solid rgba(0, 0, 0, .1);
	font: 600 13px/1.2 'Manrope', system-ui, sans-serif !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	color: #5c5c66 !important;
	transition: border-color .2s ease, color .2s ease, background .2s ease;
}
#masthead .menu-main-menu > li:hover > .tc-menu-inner,
#masthead .menu-main-menu > li:hover > a { border-color: rgba(0, 0, 0, .3); color: var(--ch-ink) !important; }
/* primer ítem (Cursos online) resaltado */
#masthead .menu-main-menu > li:first-of-type > .tc-menu-inner,
#masthead .menu-main-menu > li:first-of-type > a { border-color: var(--ch-violet); color: var(--ch-violet) !important; font-weight: 700 !important; }
/* ítem de la membresía: en Apariencia → Menús, poner la clase CSS "ch-menu-pro" */
#masthead .menu-main-menu > li.ch-menu-pro > .tc-menu-inner,
#masthead .menu-main-menu > li.ch-menu-pro > a { background: var(--ch-ink); border-color: var(--ch-ink); color: #fff !important; font-weight: 700 !important; }
#masthead .menu-main-menu > li.ch-menu-pro:hover > a { background: #2a2140; }
#masthead .menu-main-menu > li > .icon-toggle { display: none !important; }
#masthead .menu-main-menu > li.menu-item-has-children > .tc-menu-inner::after,
#masthead .menu-main-menu > li.menu-item-has-children > a::after,
#masthead .menu-main-menu > li:has(> .sub-menu) > .tc-menu-inner::after,
#masthead .menu-main-menu > li:has(> .sub-menu) > a::after {
	/* flecha propia dentro de la pastilla (pisa la flecha absoluta de Eduma) */
	content: "" !important; font-family: inherit !important; position: static !important;
	display: block !important; flex: none; width: 6px !important; height: 6px !important;
	border: solid currentColor !important; border-width: 0 1.5px 1.5px 0 !important; background: none !important;
	transform: translateY(-2px) rotate(45deg) !important; margin: 0 0 0 4px !important; align-self: center;
	top: auto !important; right: auto !important; left: auto !important; line-height: 0 !important;
}
#masthead .menu-main-menu > li:hover > .tc-menu-inner::after,
#masthead .menu-main-menu > li:hover > a::after { transform: translateY(1px) rotate(-135deg) !important; }
#masthead .menu-main-menu > li > .tc-menu-inner::before,
#masthead .menu-main-menu > li > a::before { display: none !important; }
/* submenú */
#masthead .menu-main-menu .sub-menu {
	border-radius: 16px !important;
	border: 1px solid rgba(0, 0, 0, .08) !important;
	box-shadow: 0 20px 40px rgba(11, 27, 77, .12) !important;
	padding: 8px !important;
	background: #fff !important;
}
#masthead .menu-main-menu .sub-menu li { margin: 0 !important; padding: 0 !important; }
#masthead .menu-main-menu .sub-menu .tc-icon { display: none !important; } /* triangulito de Eduma */
#masthead .menu-main-menu .sub-menu li a,
#masthead .menu-main-menu .sub-menu li .tc-menu-inner {
	display: block !important; margin: 0 !important; text-indent: 0 !important;
	border-radius: 10px;
	padding: 9px 12px !important;
	font: 600 13px/1.3 'Manrope', system-ui, sans-serif !important;
	text-transform: none !important;
	color: var(--ch-ink) !important;
}
#masthead .menu-main-menu .sub-menu li a,
#masthead .menu-main-menu .sub-menu li .tc-menu-inner { display: flex !important; align-items: center; gap: 10px; }
/* flecha en cada ítem del desplegable */
#masthead .menu-main-menu .sub-menu li > a::before,
#masthead .menu-main-menu .sub-menu li > .tc-menu-inner::before {
	content: "" !important; flex: none; width: 6px; height: 6px;
	border: solid #b5b5bf; border-width: 1.5px 1.5px 0 0; transform: rotate(45deg);
	transition: border-color .2s ease, transform .2s ease; font-family: inherit !important;
	position: static !important; margin: 0 !important;
}
#masthead .menu-main-menu .sub-menu li > a::after,
#masthead .menu-main-menu .sub-menu li > .tc-menu-inner::after { display: none !important; }
#masthead .menu-main-menu .sub-menu li a:hover { background: #f6f6f8 !important; color: var(--ch-violet) !important; }
#masthead .menu-main-menu .sub-menu li a:hover::before { border-color: var(--ch-violet); transform: translateX(2px) rotate(45deg); }

/* carrito + iniciar sesión */
.ch-header-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.ch-header-cart {
	position: relative; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .1);
	display: flex; align-items: center; justify-content: center; color: #0B1B4D !important; text-decoration: none !important;
}
.ch-header-cart:hover { border-color: rgba(0, 0, 0, .3); }
.ch-header-cart__count {
	position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; box-sizing: border-box;
	border-radius: 10px; background: #FF6AC1; color: #0c0c0c; font: 800 10.5px/18px 'Manrope', sans-serif; text-align: center;
}
.ch-header-cart__count.is-empty { display: none; }

/* menú del usuario logueado */
.ch-header-userwrap { position: relative; }
.ch-usermenu {
	position: absolute; right: 0; top: 100%; z-index: 1000; width: 240px; margin-top: 10px; padding: 8px;
	border-radius: 18px; background: #fff; border: 1px solid rgba(0, 0, 0, .08); box-shadow: 0 20px 40px rgba(11, 27, 77, .14);
	font: 600 13px/1.3 'Manrope', system-ui, sans-serif;
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.ch-usermenu::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.ch-header-userwrap:hover .ch-usermenu,
.ch-header-userwrap:focus-within .ch-usermenu { opacity: 1; visibility: visible; transform: none; }
.ch-usermenu__head { padding: 10px 12px 12px; margin-bottom: 4px; border-bottom: 1px solid rgba(0, 0, 0, .06); }
.ch-usermenu__head strong { display: block; font-weight: 800; color: #0B1B4D; }
.ch-usermenu__head span { display: block; font-size: 12px; font-weight: 500; color: #8f8f9c; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-usermenu a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: #0B1B4D !important; text-decoration: none !important; }
.ch-usermenu a::before { content: ""; width: 6px; height: 6px; flex: none; border: solid #b5b5bf; border-width: 1.5px 1.5px 0 0; transform: rotate(45deg); transition: border-color .2s ease, transform .2s ease; }
.ch-usermenu a:hover { background: #f6f6f8; color: var(--ch-accent) !important; }
.ch-usermenu a:hover::before { border-color: var(--ch-accent); transform: translateX(2px) rotate(45deg); }
.ch-usermenu a.ch-usermenu__out { margin-top: 4px; border-top: 1px solid rgba(0, 0, 0, .06); border-radius: 0 0 10px 10px; color: #c2415d !important; }
.ch-usermenu a.ch-usermenu__out::before { border-color: #e7a3b1; }
@media (hover: none), (max-width: 640px) { .ch-usermenu { display: none; } }

/* desplegable del carrito */
.ch-header-cartwrap { position: relative; }
.ch-minicart {
	position: absolute; right: -8px; top: 100%; z-index: 1000; width: 320px; margin-top: 10px;
	padding: 16px; border-radius: 18px; background: #fff; border: 1px solid rgba(0, 0, 0, .08);
	box-shadow: 0 20px 40px rgba(11, 27, 77, .14); font: 500 13px/1.35 'Manrope', system-ui, sans-serif; color: #0B1B4D;
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.ch-minicart::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; } /* puente para no perder el hover */
.ch-header-cartwrap:hover .ch-minicart,
.ch-header-cartwrap:focus-within .ch-minicart { opacity: 1; visibility: visible; transform: none; }
.ch-minicart__title { font-weight: 800; font-size: 14px; margin-bottom: 10px; }
.ch-minicart__empty { margin: 0; color: #5c5c66; }
.ch-minicart__list { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow-y: auto; }
.ch-minicart__list li { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid rgba(0, 0, 0, .06); margin: 0; }
.ch-minicart__img { width: 44px; height: 44px; border-radius: 10px; background: #E3E9FF center / cover no-repeat; }
.ch-minicart__name { font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ch-minicart__price { font-weight: 800; white-space: nowrap; }
.ch-minicart__total { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0; }
.ch-minicart__total strong { font-size: 16px; font-weight: 800; }
.ch-minicart__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ch-minicart__btn { text-align: center; padding: 10px 12px; border-radius: 40px; border: 1px solid rgba(0, 0, 0, .12); color: #0B1B4D !important; font-weight: 800; text-decoration: none !important; }
.ch-minicart__btn.is-primary { background: var(--ch-accent); border-color: var(--ch-accent); color: #fff !important; }
@media (hover: none), (max-width: 640px) { .ch-minicart { display: none; } }
.ch-header-login {
	display: inline-flex; gap: 8px; align-items: center; padding: 10px 20px; border-radius: 40px;
	background: var(--ch-accent); color: #fff !important; font: 700 13px/1.2 'Manrope', system-ui, sans-serif; text-decoration: none !important;
	white-space: nowrap; transition: background .2s ease;
}
.ch-header-login:hover { background: var(--ch-accent-hover); color: #fff !important; }

/* íconos dibujados con CSS (no dependen de ninguna fuente de íconos) */
.ch-ico { display: inline-block; width: 15px; height: 15px; background: currentColor; flex: none; }
.ch-ico--bag {
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M5 8h14l-1 13H6L5 8z'/%3E%3Cpath d='M9 8V6a3 3 0 0 1 6 0v2'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M5 8h14l-1 13H6L5 8z'/%3E%3Cpath d='M9 8V6a3 3 0 0 1 6 0v2'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ch-ico--user {
	width: 13px; height: 13px;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4 4-6 8-6s8 2 8 6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4 4-6 8-6s8 2 8 6'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Footer ---------- */
#colophon { background: #0B1B4D !important; color: #c2c2ca; padding: 0 !important; margin: 0 !important; border: 0 !important; }
#colophon .footer { background: #0B1B4D !important; }
.ch-footer__inner {
	max-width: var(--ch-page-max); margin: 0 auto; padding: 48px var(--ch-page-pad) 28px; box-sizing: border-box;
	display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; align-items: flex-start;
}
.ch-footer__brand { max-width: 340px; }
.ch-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none !important; }
.ch-brand img { height: 30px; width: auto; display: block; }

/* marca v2: tokens y sellos (kit BRAND-CODEINEP.md) */
:root {
	/* Paleta del CAMPUS "3b · Cobalto clínico" (codeinep.org usa violeta):
	 * cobalto = botones y links · lima = progreso / completado · marino = hero y texto ·
	 * hielo = acentos sobre oscuro · niebla = bordes · blanco clínico = fondo.
	 * El naranja → rosa queda reservado para CODEINEP Pro. */
	--ch-accent: #2E5BFF;
	--ch-accent-hover: #1F45E0;
	--ch-accent-rgb: 46, 91, 255;
	--ch-accent-soft: #E8EEFF;
	--ch-lima: #C8F05A;
	--ch-marino: #0B1B4D;
	--ch-hielo: #BFD0FF;
	--ch-niebla: #DCE3F2;
	--ch-fondo: #F0F3FA;
	--cdp-ink: #0B1B4D; --cdp-lila: #8FA8FF; --cdp-menta: #C8F05A; --cdp-pro-naranja: #FF9F6B; --cdp-pro-rosa: #FF6AC1;
	--cdp-grad: linear-gradient(180deg, #8FA8FF, #C8F05A); --cdp-grad-pro: linear-gradient(180deg, #FF9F6B, #FF6AC1);
}
.cdp-sello { display: inline-flex; align-items: center; gap: 4px; font: 800 11px/1 'Manrope', sans-serif; letter-spacing: .05em; }
.cdp-sello__pill { padding: 7px 10px 7px 13px; border-radius: 20px 3px 3px 20px; background: linear-gradient(90deg, #C8F05A, #8FA8FF); color: #0c0c0c; }
.cdp-sello__dot { width: 25px; height: 25px; border-radius: 50%; background: #8FA8FF; }
.cdp-sello--pro .cdp-sello__pill { background: linear-gradient(90deg, #FF9F6B, #FF6AC1); }
.cdp-sello--pro .cdp-sello__dot { background: #FF6AC1; }
.cdp-sello--nuevo .cdp-sello__pill { background: #0B1B4D; color: #fff; }
.cdp-sello--nuevo .cdp-sello__dot { background: #C8F05A; }
/* logo del header */
#masthead .ch-logo { display: inline-flex; align-items: center; padding: 8px 0; }
#masthead .ch-logo img { height: 32px !important; max-height: none; width: auto !important; display: block; }
.ch-footer__brand p { font-size: 13.5px; line-height: 1.65; margin: 12px 0 0; color: #8f8f9c; }
.ch-footer__social .widget { margin: 0 !important; padding: 0 !important; }
.ch-footer__social .widget-title,
.ch-footer__social h3 { display: none; }
#colophon .ch-footer__social ul.social_link { display: flex !important; gap: 10px; margin: 0 !important; padding: 0 !important; list-style: none; }
#colophon .ch-footer__social ul.social_link li { margin: 0 !important; padding: 0 !important; }
#colophon .ch-footer__social ul.social_link li a {
	width: 38px !important; height: 38px !important; border-radius: 50% !important;
	border: 1px solid rgba(255, 255, 255, .15) !important; background: transparent !important;
	display: flex !important; align-items: center; justify-content: center;
	color: #f5f5f7 !important; font-size: 14px; line-height: 1 !important; transition: background .2s ease, border-color .2s ease;
}
#colophon .ch-footer__social ul.social_link li a:hover { background: rgba(255, 255, 255, .08) !important; border-color: rgba(255, 255, 255, .3) !important; }
.ch-footer__legal { border-top: 1px solid rgba(255, 255, 255, .08); text-align: center; padding: 18px var(--ch-page-pad); font-size: 12px; color: #8f8f9c; }
.ch-footer__legal br { display: none; }
.ch-footer__legal a { color: #c2c2ca; }

/* ---------- Popup de Mailchimp "Suscribite a nuestras novedades" ----------
   El contenido del formulario lo estiliza assets/campus-global.js. */
.mc-modal-bg {
	background: rgba(11, 27, 77, .55) !important;
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}
.mc-modal {
	border-radius: 24px !important;
	overflow-x: hidden !important;
	overflow-y: auto !important;
	border: 0 !important;
	box-shadow: 0 30px 70px rgba(11, 27, 77, .3) !important;
	background: #fff !important;
}
.mc-modal { height: auto !important; max-height: calc(100vh - 32px) !important; }
.mc-modal .mc-closeModal {
	width: 32px !important;
	height: 32px !important;
	top: 12px !important;
	right: 12px !important;
	border-radius: 50% !important;
	background: #fff !important;
	border: 1px solid rgba(0, 0, 0, .1) !important;
	box-shadow: 0 4px 12px rgba(0, 0, 0, .08) !important;
	z-index: 5;
}
/* la X: dos líneas centradas (las de Mailchimp quedaban corridas) */
.mc-modal .mc-closeModal::before,
.mc-modal .mc-closeModal::after {
	content: "" !important;
	position: absolute !important;
	top: 50% !important;
	left: 50% !important;
	width: 2px !important;
	height: 14px !important;
	margin: 0 !important;
	border-radius: 2px;
	background: #52525c !important;
}
.mc-modal .mc-closeModal::before { transform: translate(-50%, -50%) rotate(45deg) !important; }
.mc-modal .mc-closeModal::after { transform: translate(-50%, -50%) rotate(-45deg) !important; }
.mc-modal .mc-closeModal:hover::before,
.mc-modal .mc-closeModal:hover::after { background: #0B1B4D !important; }
.mc-banner {
	box-shadow: 0 10px 30px rgba(11, 27, 77, .15) !important;
	border-radius: 0 0 18px 18px !important;
	overflow: hidden !important;
}


/* ---------- Celular ---------- */
@media (max-width: 1024px) {
	#masthead .tm-table > nav.width-navigation { display: none !important; } /* en celular el menú lo abre el botón de 3 rayas de Eduma */
	.ch-header-actions { margin-left: auto; }
	/* el botón de 3 rayas de Eduma va en la fila, a la derecha del carrito (Eduma lo posiciona absoluto) */
	#masthead .tm-table .menu-mobile-effect {
		position: static !important; flex: none; margin: 0 0 0 4px !important; top: auto !important; right: auto !important;
	}
}
@media (max-width: 640px) {
	#masthead #toolbar .toolbar-container { justify-content: center; padding: 6px var(--ch-page-pad); }
	#masthead #toolbar .thim-have-any-question { justify-content: center; gap: 14px; }
	#masthead #toolbar .thim-have-any-question .question { display: none !important; }
	#masthead .tm-table { gap: 10px; min-height: 60px; }
	#masthead .width-logo img { max-height: 32px; }
	#masthead .ch-logo img { height: 26px !important; }
	.ch-header-login { padding: 0; width: 40px; height: 40px; justify-content: center; font-size: 0; gap: 0; }
	.ch-header-login .ch-ico--user { width: 15px; height: 15px; }
	.ch-footer__inner { padding-top: 36px; padding-bottom: 22px; }
}

/* =====================================================================
 * Marca v2: progreso del curso e indicador de carga
 * ===================================================================== */
.cdp-progreso { --s: 74px; display: inline-flex; align-items: center; gap: calc(var(--s) * .12); flex: none; }
.cdp-progreso__pill { width: var(--s); height: var(--s); border-radius: calc(var(--s) / 2) 0 0 calc(var(--s) / 2); background: linear-gradient(180deg, #8FA8FF, #C8F05A); }
.cdp-progreso__ring { position: relative; width: var(--s); height: var(--s); border-radius: 50%; background: conic-gradient(#8FA8FF 0, #C8F05A calc(var(--p) * 1%), #ebe8f2 0); }
.cdp-progreso__ring b { position: absolute; inset: calc(var(--s) * .15); border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; font: 800 calc(var(--s) * .19) 'Manrope', sans-serif; color: #0B1B4D; }
.cdp-progreso--mini { --s: 38px; }
.cdp-progreso--mini .cdp-progreso__ring b { font-size: 10px; inset: 5px; }

.cdp-loader { display: inline-flex; gap: 8px; align-items: center; }
.cdp-loader span { width: 40px; height: 40px; background: linear-gradient(180deg, #8FA8FF, #C8F05A); }
.cdp-loader span:first-child { border-radius: 20px 0 0 20px; animation: cdpA 1.2s ease-in-out infinite; }
.cdp-loader span:last-child { border-radius: 50%; animation: cdpB 1.2s ease-in-out infinite; }
@keyframes cdpA { 0%, 100% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(-10px); opacity: .55; } }
@keyframes cdpB { 0%, 100% { transform: translateY(-10px); opacity: .55; } 50% { transform: translateY(0); opacity: 1; } }

/* preloader de Eduma (pantalla de carga): se reemplaza por el indicador de marca */
#preload { background: #fff !important; display: flex; align-items: center; justify-content: center; gap: 8px; }
#preload > * { display: none !important; }
#preload::before,
#preload::after { content: ""; width: 40px; height: 40px; background: linear-gradient(180deg, #8FA8FF, #C8F05A); }
#preload::before { border-radius: 20px 0 0 20px; animation: cdpA 1.2s ease-in-out infinite; }
#preload::after { border-radius: 50%; animation: cdpB 1.2s ease-in-out infinite; }

/* botones de LearnPress mientras cargan (completar lección, enviar quiz, comprar): mini indicador */
.lp-button.loading::before,
button.loading::before,
.lp-btn-loading::before { content: none !important; }
.lp-button.loading,
button.lp-button.loading { position: relative; color: transparent !important; pointer-events: none; }
.lp-button.loading::after {
	content: "" !important; position: absolute; left: 50%; top: 50%; width: 30px; height: 12px; margin: -6px 0 0 -15px;
	background:
		radial-gradient(circle at 24px 6px, #C8F05A 5.5px, transparent 6px),
		linear-gradient(180deg, #8FA8FF, #C8F05A) 0 0 / 12px 12px no-repeat;
	border-radius: 6px 0 0 6px; animation: cdpPulse 1.2s ease-in-out infinite;
}
@keyframes cdpPulse { 50% { opacity: .5; transform: translateY(-2px); } }
@media (prefers-reduced-motion: reduce) {
	.cdp-loader span, #preload::before, #preload::after, .lp-button.loading::after { animation: none; }
}

/* =====================================================================
 * Ventana de "Iniciar sesión"
 * ===================================================================== */
.ch-login[hidden] { display: none !important; }
.ch-login { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.ch-login__backdrop { position: absolute; inset: 0; background: rgba(11, 27, 77, .55); backdrop-filter: blur(3px); }
.ch-login__box {
	position: relative; width: 100%; max-width: 400px; max-height: calc(100vh - 32px); overflow-y: auto; box-sizing: border-box;
	padding: 32px; border-radius: 24px; background: #fff; box-shadow: 0 30px 60px rgba(11, 27, 77, .25);
	font-family: 'Manrope', system-ui, sans-serif; color: #0B1B4D; animation: chLoginIn .2s ease;
}
@keyframes chLoginIn { from { opacity: 0; transform: translateY(10px) scale(.98); } }
html.ch-login-open { overflow: hidden; }
.ch-login__close { all: unset; position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; border-radius: 50%; background: #f3f2f7; cursor: pointer; }
.ch-login__close::before,
.ch-login__close::after { content: ""; position: absolute; top: 50%; left: 50%; width: 13px; height: 1.8px; border-radius: 2px; background: #0B1B4D; }
.ch-login__close::before { transform: translate(-50%, -50%) rotate(45deg); }
.ch-login__close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.ch-login__close:hover { background: #e9e6f3; }
.ch-login__logo { display: block; height: 24px; width: auto; margin-bottom: 20px; }
.ch-login__box h2 { font: 800 24px/1.2 'Manrope', sans-serif !important; margin: 0 !important; color: #0B1B4D !important; text-transform: none !important; letter-spacing: -.01em; }
.ch-login__sub { margin: 6px 0 20px; font-size: 14px; color: #5c5c66; }
.ch-login form p { margin: 0 0 14px !important; padding: 0 !important; }
.ch-login form label { display: block; margin-bottom: 6px; font: 700 13px/1.3 'Manrope', sans-serif !important; color: #0B1B4D; }
.ch-login form :is(input[type="text"], input[type="password"]) {
	width: 100% !important; box-sizing: border-box; height: auto !important; padding: 12px 14px !important; border-radius: 12px !important;
	border: 1px solid rgba(0, 0, 0, .14) !important; background: #fbfaff !important; font: 500 14px/1.4 'Manrope', sans-serif !important; color: #0B1B4D !important; box-shadow: none !important;
}
.ch-login form :is(input[type="text"], input[type="password"]):focus { border-color: var(--ch-accent) !important; outline: 3px solid rgba(var(--ch-accent-rgb), .15); }
.ch-login form .login-remember label { display: inline-flex; gap: 8px; align-items: center; font-weight: 600 !important; }
.ch-login form input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: var(--ch-accent); }
.ch-login form input[type="submit"] {
	width: 100%; height: auto !important; padding: 13px 22px !important; border-radius: 40px !important; border: 0 !important; background: var(--ch-accent) !important; color: #fff !important;
	font: 800 14px/1.2 'Manrope', sans-serif !important; text-transform: none !important; letter-spacing: 0 !important; cursor: pointer;
}
.ch-login form input[type="submit"]:hover { background: var(--ch-accent-hover) !important; }
.ch-login__links { display: flex; flex-direction: column; gap: 8px; align-items: center; margin-top: 16px; font-size: 13px; color: #5c5c66; text-align: center; }
.ch-login__links a { color: var(--ch-accent) !important; font-weight: 700; text-decoration: none !important; }

/* menú del usuario: íconos en vez de flechitas */
.ch-usermenu a::before {
	width: 16px !important; height: 16px !important; border: 0 !important; transform: none !important;
	background: #8f8f9c; -webkit-mask: var(--ch-ico) center / contain no-repeat; mask: var(--ch-ico) center / contain no-repeat;
}
.ch-usermenu a:hover::before { background: var(--ch-accent); transform: none !important; }
.ch-usermenu a.ch-usermenu__out::before { background: #e7a3b1; }
.ch-usermenu a.ch-usermenu__i--book { --ch-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 4h7a3 3 0 0 1 3 3v13a2 2 0 0 0-2-2H2z'/%3E%3Cpath d='M22 4h-7a3 3 0 0 0-3 3v13a2 2 0 0 1 2-2h8z'/%3E%3C/svg%3E"); }
.ch-usermenu a.ch-usermenu__i--receipt { --ch-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 3h14v18l-3-2-2 2-2-2-2 2-2-2-3 2z'/%3E%3Cpath d='M9 8h6M9 12h6'/%3E%3C/svg%3E"); }
.ch-usermenu a.ch-usermenu__i--gear { --ch-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1.1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1.1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z'/%3E%3C/svg%3E"); }
.ch-usermenu a.ch-usermenu__i--panel { --ch-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='9' rx='1'/%3E%3Crect x='14' y='3' width='7' height='5' rx='1'/%3E%3Crect x='14' y='12' width='7' height='9' rx='1'/%3E%3Crect x='3' y='16' width='7' height='5' rx='1'/%3E%3C/svg%3E"); }
.ch-usermenu a.ch-usermenu__out { --ch-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpath d='m16 17 5-5-5-5M21 12H9'/%3E%3C/svg%3E"); }

/* footer: redes a la derecha, centradas en alto con el bloque de logo + texto */
.ch-footer__inner { justify-content: space-between; align-items: center; }
.ch-footer__brand { max-width: 420px; }
.ch-footer__social { margin-top: 0; }
#colophon .ch-footer__social ul.social_link { gap: 8px; }
#colophon .ch-footer__social ul.social_link li a {
	width: 40px !important; height: 40px !important; background: rgba(255, 255, 255, .06) !important; border-color: rgba(255, 255, 255, .1) !important;
	font-size: 15px !important; transition: background .2s ease, color .2s ease, transform .2s ease;
}
#colophon .ch-footer__social ul.social_link li a:hover {
	background: linear-gradient(135deg, #8FA8FF, #C8F05A) !important; border-color: transparent !important; color: #0c0c0c !important; transform: translateY(-2px);
}
#colophon .ch-footer__social ul.social_link li a :is(i, svg) { color: inherit !important; fill: currentColor; }

/* barra de arriba: consulta + teléfono a la izquierda, mail a la derecha */
#masthead #toolbar .toolbar-container > *,
#masthead #toolbar .toolbar-container .widget:has(.thim-have-any-question) { flex: 1 1 auto; min-width: 0; }
#masthead #toolbar .thim-have-any-question { width: 100%; }
#masthead #toolbar .thim-have-any-question .email { margin-left: auto !important; }
@media (max-width: 640px) {
	#masthead #toolbar .thim-have-any-question .question { display: none !important; }
}
