/**
 * Centro de Ayuda — estilos principales.
 *
 * Las variables de marca (--hc-accent, --hc-ink, etc.) se inyectan desde el
 * Customizer. Aquí se definen el resto de tokens de diseño y los componentes.
 */

/* ------------------------------------------------------------------ *
 * 1. Tokens de diseño
 * ------------------------------------------------------------------ */
:root {
	/* Estas cuatro se sobrescriben desde el Customizer, pero dejamos
	   valores de reserva por si el estilo inline no cargara. */
	--hc-accent: #4338CA;
	--hc-accent-hover: #3730A3;
	--hc-ink: #1A1D29;
	--hc-surface: #F6F7F9;

	--hc-font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--hc-font-heading: var(--hc-font-body);

	/* Neutros derivados / fijos. */
	--hc-bg: #ffffff;
	--hc-text: #3a4150;
	--hc-muted: #6b7280;
	--hc-border: #e6e8ec;
	--hc-border-strong: #d3d7de;

	/* Acento suavizado para fondos (con reserva sólida). */
	--hc-accent-soft: color-mix(in srgb, var(--hc-accent) 8%, #ffffff);
	--hc-accent-tint: color-mix(in srgb, var(--hc-accent) 14%, #ffffff);

	--hc-radius-sm: 8px;
	--hc-radius: 14px;
	--hc-radius-lg: 20px;

	--hc-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
	--hc-shadow: 0 4px 12px rgba(16, 24, 40, 0.06), 0 2px 4px rgba(16, 24, 40, 0.04);
	--hc-shadow-lg: 0 18px 40px rgba(16, 24, 40, 0.10), 0 6px 14px rgba(16, 24, 40, 0.06);

	--hc-maxw: 1120px;
	--hc-gap: 24px;
}

/* ------------------------------------------------------------------ *
 * 2. Base
 * ------------------------------------------------------------------ */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: 90px;
}

body {
	margin: 0;
	font-family: var(--hc-font-body);
	font-size: 16px;
	line-height: 1.65;
	color: var(--hc-text);
	background: var(--hc-bg);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--hc-font-heading);
	color: var(--hc-ink);
	line-height: 1.25;
	margin: 0 0 0.5em;
	font-weight: 700;
	letter-spacing: -0.01em;
}

a {
	color: var(--hc-accent);
	text-decoration: none;
	transition: color 0.15s ease;
}

a:hover {
	color: var(--hc-accent-hover);
}

img {
	max-width: 100%;
	height: auto;
}

p {
	margin: 0 0 1em;
}

.hc-container {
	max-width: var(--hc-maxw);
	margin-inline: auto;
	padding-inline: 20px;
	width: 100%;
}

.hc-icon {
	display: inline-block;
	vertical-align: middle;
	flex-shrink: 0;
}

/* Accesibilidad. */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.hc-skip-link {
	position: absolute;
	left: 12px;
	top: -60px;
	z-index: 1000;
	background: var(--hc-accent);
	color: #fff;
	padding: 10px 16px;
	border-radius: var(--hc-radius-sm);
	transition: top 0.2s ease;
}

.hc-skip-link:focus {
	top: 12px;
	color: #fff;
}

:where(a, button, input, select, textarea):focus-visible {
	outline: 2px solid var(--hc-accent);
	outline-offset: 2px;
	border-radius: 4px;
}

/* ------------------------------------------------------------------ *
 * 3. Botones
 * ------------------------------------------------------------------ */
.hc-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--hc-accent);
	color: #fff;
	padding: 11px 20px;
	border-radius: var(--hc-radius-sm);
	font-weight: 600;
	font-size: 0.95rem;
	border: 0;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.15s ease;
}

.hc-btn:hover {
	background: var(--hc-accent-hover);
	color: #fff;
	transform: translateY(-1px);
}

/* ------------------------------------------------------------------ *
 * 4. Cabecera
 * ------------------------------------------------------------------ */
.hc-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(255, 255, 255, 0.9);
	backdrop-filter: saturate(180%) blur(10px);
	border-bottom: 1px solid var(--hc-border);
}

.hc-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	min-height: 68px;
}

.hc-header__brand img,
.hc-header__logo,
.custom-logo {
	max-height: 40px;
	width: auto;
	display: block;
}

.hc-header__brand-link {
	display: inline-flex;
	align-items: center;
}

.hc-header__brand-link:hover {
	opacity: 0.9;
}

.hc-header__title {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-family: var(--hc-font-heading);
	font-weight: 700;
	font-size: 1.2rem;
	color: var(--hc-ink);
	letter-spacing: -0.02em;
}

.hc-header__mark {
	display: inline-flex;
	color: var(--hc-accent);
}

.hc-nav__menu {
	display: flex;
	align-items: center;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.hc-nav__menu li {
	position: relative;
}

.hc-nav__menu a {
	display: block;
	padding: 8px 14px;
	border-radius: var(--hc-radius-sm);
	color: var(--hc-text);
	font-weight: 500;
	font-size: 0.95rem;
}

.hc-nav__menu a:hover {
	background: var(--hc-surface);
	color: var(--hc-ink);
}

/* Submenús. */
.hc-nav__menu .sub-menu {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	min-width: 200px;
	background: #fff;
	border: 1px solid var(--hc-border);
	border-radius: var(--hc-radius-sm);
	box-shadow: var(--hc-shadow);
	padding: 6px;
	list-style: none;
	margin: 0;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-4px);
	transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

.hc-nav__menu li:hover > .sub-menu,
.hc-nav__menu li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.hc-nav-toggle {
	display: none;
	background: transparent;
	border: 1px solid var(--hc-border);
	border-radius: var(--hc-radius-sm);
	padding: 8px;
	color: var(--hc-ink);
	cursor: pointer;
}

/* ------------------------------------------------------------------ *
 * 5. Banners / alertas
 * ------------------------------------------------------------------ */
.hc-banners {
	padding-top: 16px;
}

.hc-banner {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	border-radius: var(--hc-radius-sm);
	border: 1px solid;
	margin-bottom: 10px;
	font-size: 0.95rem;
}

.hc-banner__content {
	flex: 1;
}

.hc-banner__content p {
	margin: 0;
}

.hc-banner__icon {
	display: inline-flex;
}

.hc-banner__link {
	font-weight: 600;
	white-space: nowrap;
}

.hc-banner__close {
	background: transparent;
	border: 0;
	cursor: pointer;
	color: inherit;
	opacity: 0.65;
	display: inline-flex;
	padding: 2px;
}

.hc-banner__close:hover {
	opacity: 1;
}

.hc-banner--info {
	background: #eff6ff;
	border-color: #bfdbfe;
	color: #1e40af;
}

.hc-banner--success {
	background: #ecfdf5;
	border-color: #a7f3d0;
	color: #065f46;
}

.hc-banner--warning {
	background: #fffbeb;
	border-color: #fde68a;
	color: #92400e;
}

.hc-banner--error {
	background: #fef2f2;
	border-color: #fecaca;
	color: #991b1b;
}

.hc-banner--info .hc-banner__link { color: #1e40af; }
.hc-banner--success .hc-banner__link { color: #065f46; }
.hc-banner--warning .hc-banner__link { color: #92400e; }
.hc-banner--error .hc-banner__link { color: #991b1b; }

/* ------------------------------------------------------------------ *
 * 6. Hero + buscador
 * ------------------------------------------------------------------ */
.hc-hero {
	/* El fondo y el relleno se controlan desde el Customizer vía variables. */
	background: var(--hc-hero-bg, var(--hc-surface));
	border-bottom: 1px solid var(--hc-border);
	padding: var(--hc-hero-pad, 72px 0 64px);
	text-align: center;
	position: relative;
	isolation: isolate;
}

/* En contextos compactos (archivo, búsqueda) el relleno es fijo y menor. */
.hc-hero--compact {
	padding: 44px 0 40px;
}

/* Capa oscura opcional sobre la imagen de fondo, para legibilidad. */
.hc-hero--overlay::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: rgba(15, 23, 42, 0.5);
}

/* Texto en blanco (para fondos oscuros o imagen). */
.hc-hero--light .hc-hero__title {
	color: #fff;
}

.hc-hero--light .hc-hero__subtitle {
	color: rgba(255, 255, 255, 0.9);
}

/* Cuando hay imagen de fondo, quitamos el borde inferior. */
.hc-hero--bg-image {
	border-bottom: 0;
}

.hc-hero__inner {
	max-width: 720px;
	position: relative;
	z-index: 1;
}

.hc-hero__title {
	font-size: clamp(1.9rem, 4vw, 2.75rem);
	margin-bottom: 14px;
}

.hc-hero__subtitle {
	font-size: clamp(1rem, 2vw, 1.15rem);
	color: var(--hc-muted);
	margin-bottom: 32px;
}

.hc-hero--compact .hc-hero__subtitle {
	margin-bottom: 24px;
}

/* Buscador. */
.hc-search {
	position: relative;
	display: flex;
	align-items: center;
	background: #fff;
	border: 1px solid var(--hc-border-strong);
	border-radius: var(--hc-radius);
	box-shadow: var(--hc-shadow-sm);
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.hc-search:focus-within {
	border-color: var(--hc-accent);
	box-shadow: 0 0 0 4px var(--hc-accent-soft);
}

.hc-search--hero {
	box-shadow: var(--hc-shadow-lg);
}

.hc-search__icon {
	display: inline-flex;
	padding-left: 16px;
	color: var(--hc-muted);
}

.hc-search__input {
	flex: 1;
	border: 0;
	background: transparent;
	padding: 15px 16px;
	font-size: 1rem;
	color: var(--hc-ink);
	font-family: inherit;
	min-width: 0;
}

.hc-search__input:focus {
	outline: none;
}

.hc-search__input::placeholder {
	color: var(--hc-muted);
}

/* Resultados instantáneos. */
.hc-search__results {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	background: #fff;
	border: 1px solid var(--hc-border);
	border-radius: var(--hc-radius);
	box-shadow: var(--hc-shadow-lg);
	overflow: hidden;
	text-align: left;
	z-index: 50;
	max-height: 420px;
	overflow-y: auto;
}

.hc-search__result {
	display: block;
	padding: 12px 16px;
	border-bottom: 1px solid var(--hc-border);
}

.hc-search__result:last-child {
	border-bottom: 0;
}

.hc-search__result:hover,
.hc-search__result.is-active {
	background: var(--hc-surface);
}

.hc-search__result-title {
	display: block;
	font-weight: 600;
	color: var(--hc-ink);
	margin-bottom: 2px;
}

.hc-search__result-cat {
	color: var(--hc-accent);
	font-weight: 500;
}

.hc-search__result-excerpt {
	display: block;
	font-size: 0.875rem;
	color: var(--hc-muted);
}

.hc-search__empty {
	padding: 18px 16px;
	color: var(--hc-muted);
	text-align: center;
	font-size: 0.925rem;
}

/* ------------------------------------------------------------------ *
 * 7. Títulos de sección
 * ------------------------------------------------------------------ */
.hc-section-title {
	font-size: 1.35rem;
	margin-bottom: 20px;
}

.hc-empty {
	color: var(--hc-muted);
	background: var(--hc-surface);
	border: 1px dashed var(--hc-border-strong);
	border-radius: var(--hc-radius);
	padding: 28px;
	text-align: center;
}

/* ------------------------------------------------------------------ *
 * 8. Cuadrícula de categorías (SIGNATURE)
 * ------------------------------------------------------------------ */
.hc-home__grid-wrap {
	padding: 56px 20px 72px;
}

.hc-cat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: var(--hc-gap);
}

.hc-cat-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 6px;
	background: #fff;
	border: 1px solid var(--hc-border);
	border-radius: var(--hc-radius);
	padding: 24px;
	color: var(--hc-ink);
	overflow: hidden;
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.hc-cat-card::before {
	content: "";
	position: absolute;
	inset: 0 auto 0 0;
	width: 3px;
	background: var(--hc-cat-color, var(--hc-accent));
	opacity: 0;
	transition: opacity 0.18s ease;
}

.hc-cat-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--hc-shadow);
	border-color: transparent;
	color: var(--hc-ink);
}

.hc-cat-card:hover::before {
	opacity: 1;
}

.hc-cat-card__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: 12px;
	margin-bottom: 8px;
	color: var(--hc-cat-color, var(--hc-accent));
	background: color-mix(in srgb, var(--hc-cat-color, var(--hc-accent)) 12%, #ffffff);
}

.hc-cat-card__title {
	font-weight: 700;
	font-size: 1.1rem;
}

.hc-cat-card__desc {
	color: var(--hc-muted);
	font-size: 0.925rem;
	line-height: 1.5;
}

.hc-cat-card__count {
	margin-top: auto;
	padding-top: 10px;
	color: var(--hc-muted);
	font-size: 0.85rem;
	font-weight: 500;
}

/* ------------------------------------------------------------------ *
 * 9. Artículos (tarjetas y listas)
 * ------------------------------------------------------------------ */
.hc-home__popular,
.hc-archive__articles {
	margin-top: 56px;
}

.hc-article-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 14px;
}

.hc-article-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.hc-article-card {
	display: flex;
	align-items: center;
	gap: 14px;
	background: #fff;
	border: 1px solid var(--hc-border);
	border-radius: var(--hc-radius-sm);
	padding: 14px 16px;
	color: var(--hc-ink);
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.hc-article-card:hover {
	border-color: var(--hc-accent);
	box-shadow: var(--hc-shadow-sm);
	color: var(--hc-ink);
	transform: translateX(2px);
}

.hc-article-card__icon {
	display: inline-flex;
	color: var(--hc-accent);
	flex-shrink: 0;
}

.hc-article-card__body {
	flex: 1;
	min-width: 0;
}

.hc-article-card__title {
	display: block;
	font-weight: 600;
	line-height: 1.4;
}

.hc-article-card__meta {
	font-size: 0.85rem;
	color: var(--hc-muted);
}

.hc-article-card__arrow {
	color: var(--hc-muted);
	display: inline-flex;
	transition: transform 0.15s ease, color 0.15s ease;
}

.hc-article-card:hover .hc-article-card__arrow {
	color: var(--hc-accent);
	transform: translateX(3px);
}

/* ------------------------------------------------------------------ *
 * 10. Portada — diseño con barra lateral
 * ------------------------------------------------------------------ */
.hc-home__grid-sidebar {
	display: grid;
	grid-template-columns: 300px 1fr;
	gap: 48px;
	padding: 48px 20px 72px;
	align-items: start;
}

.hc-cat-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.hc-cat-list a {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	border-radius: var(--hc-radius-sm);
	color: var(--hc-ink);
	font-weight: 500;
}

.hc-cat-list a:hover {
	background: var(--hc-surface);
}

.hc-cat-list__icon {
	display: inline-flex;
	color: var(--hc-cat-color, var(--hc-accent));
}

.hc-cat-list__name {
	flex: 1;
}

.hc-cat-list__count {
	color: var(--hc-muted);
	font-size: 0.8rem;
	background: var(--hc-surface);
	padding: 2px 8px;
	border-radius: 20px;
}

/* Cuando se oculta la lista de categorías, el contenido usa el ancho completo. */
.hc-home__main--full {
	max-width: 720px;
	margin-inline: auto;
}

/* ------------------------------------------------------------------ *
 * 11. Portada — diseño compacto
 * ------------------------------------------------------------------ */
.hc-home__compact {
	max-width: 760px;
	padding: 8px 20px 72px;
	text-align: center;
}

.hc-cat-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
	margin-bottom: 48px;
}

.hc-cat-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #fff;
	border: 1px solid var(--hc-border);
	border-radius: 40px;
	padding: 9px 16px;
	color: var(--hc-ink);
	font-weight: 500;
	font-size: 0.95rem;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hc-cat-chip:hover {
	border-color: var(--hc-cat-color, var(--hc-accent));
	box-shadow: var(--hc-shadow-sm);
	color: var(--hc-ink);
}

.hc-cat-chip__icon {
	display: inline-flex;
	color: var(--hc-cat-color, var(--hc-accent));
}

.hc-cat-chip__count {
	color: var(--hc-muted);
	font-size: 0.8rem;
}

.hc-home__popular-compact {
	text-align: left;
}

/* ------------------------------------------------------------------ *
 * 12. Migas de pan
 * ------------------------------------------------------------------ */
.hc-breadcrumbs {
	padding: 22px 0 0;
}

.hc-breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 0.875rem;
}

.hc-breadcrumbs li {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--hc-muted);
}

.hc-breadcrumbs li:not(:last-child)::after {
	content: "/";
	color: var(--hc-border-strong);
}

.hc-breadcrumbs a {
	color: var(--hc-muted);
}

.hc-breadcrumbs a:hover {
	color: var(--hc-accent);
}

.hc-breadcrumbs [aria-current="page"] {
	color: var(--hc-ink);
	font-weight: 500;
}

/* ------------------------------------------------------------------ *
 * 13. Cabecera de taxonomía
 * ------------------------------------------------------------------ */
.hc-tax-header {
	padding: 24px 0 32px;
	border-bottom: 1px solid var(--hc-border);
}

.hc-tax-header__inner {
	display: flex;
	align-items: center;
	gap: 18px;
}

.hc-tax-header__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	border-radius: 16px;
	color: var(--hc-cat-color, var(--hc-accent));
	background: color-mix(in srgb, var(--hc-cat-color, var(--hc-accent)) 12%, #ffffff);
	flex-shrink: 0;
}

.hc-tax-header__title {
	margin: 0;
	font-size: clamp(1.5rem, 3vw, 2rem);
}

.hc-tax-header__desc {
	margin: 4px 0 0;
	color: var(--hc-muted);
}

.hc-tax-body {
	padding: 36px 20px 72px;
}

/* Subcategorías. */
.hc-subcat {
	margin-bottom: 44px;
}

.hc-subcat__head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 16px;
}

.hc-subcat__icon {
	display: inline-flex;
	color: var(--hc-cat-color, var(--hc-accent));
}

.hc-subcat__title {
	margin: 0;
	font-size: 1.2rem;
}

.hc-subcat__title a {
	color: var(--hc-ink);
}

.hc-subcat__title a:hover {
	color: var(--hc-accent);
}

.hc-subcat__more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 14px;
	font-weight: 600;
	font-size: 0.925rem;
}

.hc-article-list--full .hc-article-card {
	padding: 16px 18px;
}

/* ------------------------------------------------------------------ *
 * 14. Artículo individual
 * ------------------------------------------------------------------ */
.hc-article {
	padding: 20px 0 72px;
}

.hc-article__layout {
	display: block;
}

.hc-article--sidebar .hc-article__layout {
	display: grid;
	grid-template-columns: 1fr 280px;
	gap: 56px;
	align-items: start;
}

.hc-article__main {
	min-width: 0;
	max-width: 760px;
}

.hc-article--centered .hc-article__main {
	margin-inline: auto;
}

.hc-article__header {
	margin-bottom: 28px;
	padding-bottom: 24px;
	border-bottom: 1px solid var(--hc-border);
}

.hc-article__title {
	font-size: clamp(1.7rem, 3.5vw, 2.4rem);
	margin-bottom: 12px;
}

.hc-article__meta {
	color: var(--hc-muted);
	font-size: 0.9rem;
}

/* Contenido del artículo. */
.hc-article__content {
	font-size: 1.05rem;
	line-height: 1.75;
}

.hc-article__content > *:first-child {
	margin-top: 0;
}

.hc-article__content h2 {
	font-size: 1.5rem;
	margin: 2em 0 0.6em;
	padding-top: 0.3em;
}

.hc-article__content h3 {
	font-size: 1.2rem;
	margin: 1.6em 0 0.5em;
}

.hc-article__content ul,
.hc-article__content ol {
	padding-left: 1.4em;
	margin: 0 0 1.2em;
}

.hc-article__content li {
	margin-bottom: 0.5em;
}

.hc-article__content img {
	border-radius: var(--hc-radius);
	margin: 1.5em 0;
}

.hc-article__content blockquote {
	margin: 1.5em 0;
	padding: 4px 20px;
	border-left: 3px solid var(--hc-accent);
	color: var(--hc-ink);
	background: var(--hc-surface);
	border-radius: 0 var(--hc-radius-sm) var(--hc-radius-sm) 0;
}

.hc-article__content pre {
	background: #1e293b;
	color: #e2e8f0;
	padding: 18px;
	border-radius: var(--hc-radius-sm);
	overflow-x: auto;
	font-size: 0.9rem;
}

.hc-article__content code {
	background: var(--hc-surface);
	padding: 2px 6px;
	border-radius: 5px;
	font-size: 0.9em;
}

.hc-article__content pre code {
	background: transparent;
	padding: 0;
}

.hc-article__content a {
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* Índice (TOC). */
.hc-toc {
	background: var(--hc-surface);
	border: 1px solid var(--hc-border);
	border-radius: var(--hc-radius);
	padding: 18px 20px;
}

.hc-toc__title {
	font-weight: 700;
	color: var(--hc-ink);
	margin: 0 0 10px;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.hc-toc ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.hc-toc__item a {
	display: block;
	padding: 5px 10px;
	border-radius: 6px;
	color: var(--hc-text);
	font-size: 0.9rem;
	border-left: 2px solid transparent;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.hc-toc__item a:hover,
.hc-toc__item a.is-active {
	background: #fff;
	color: var(--hc-accent);
	border-left-color: var(--hc-accent);
}

.hc-toc__item--l3 a {
	padding-left: 22px;
	font-size: 0.86rem;
}

.hc-article__toc-inline {
	margin-bottom: 32px;
}

/* Barra lateral del artículo. */
.hc-article__sidebar-inner {
	position: sticky;
	top: 90px;
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.hc-article__widgets .hc-widget {
	margin-bottom: 20px;
}

.hc-widget__title {
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--hc-muted);
	margin-bottom: 10px;
}

/* Recursos: descargas y enlaces. */
.hc-resources {
	margin-top: 40px;
	display: grid;
	gap: 28px;
}

.hc-resources__title {
	font-size: 1.1rem;
	margin-bottom: 14px;
}

.hc-download-list,
.hc-link-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.hc-download-list a,
.hc-link-list a {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	border: 1px solid var(--hc-border);
	border-radius: var(--hc-radius-sm);
	color: var(--hc-ink);
	background: #fff;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.hc-download-list a:hover,
.hc-link-list a:hover {
	border-color: var(--hc-accent);
	background: var(--hc-accent-soft);
}

.hc-download-list__icon,
.hc-link-list__icon {
	display: inline-flex;
	color: var(--hc-accent);
}

.hc-download-list__name {
	flex: 1;
	font-weight: 500;
}

.hc-download-list__meta {
	color: var(--hc-muted);
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

/* ------------------------------------------------------------------ *
 * 15. Valoración por estrellas
 * ------------------------------------------------------------------ */
.hc-rating {
	margin-top: 44px;
	padding: 28px;
	background: var(--hc-surface);
	border: 1px solid var(--hc-border);
	border-radius: var(--hc-radius);
	text-align: center;
}

.hc-rating__label {
	font-weight: 600;
	color: var(--hc-ink);
	margin: 0 0 14px;
	font-size: 1.05rem;
}

.hc-rating__stars {
	display: inline-flex;
	gap: 4px;
	margin-bottom: 12px;
}

.hc-star {
	background: transparent;
	border: 0;
	cursor: pointer;
	padding: 4px;
	color: var(--hc-border-strong);
	transition: color 0.12s ease, transform 0.12s ease;
	line-height: 0;
}

.hc-star:hover {
	transform: scale(1.12);
}

.hc-star .hc-star__icon {
	fill: none;
	transition: fill 0.12s ease;
}

.hc-star.is-filled {
	color: #f59e0b;
}

.hc-star.is-filled .hc-star__icon {
	fill: #f59e0b;
}

.hc-rating.is-voted .hc-star {
	cursor: default;
	pointer-events: none;
}

.hc-rating__summary {
	color: var(--hc-muted);
	font-size: 0.925rem;
	margin: 0;
}

.hc-rating__avg {
	font-weight: 700;
	color: var(--hc-ink);
}

.hc-rating__thanks {
	margin: 10px 0 0;
	color: #065f46;
	font-weight: 600;
}

/* ------------------------------------------------------------------ *
 * 16. Relacionados
 * ------------------------------------------------------------------ */
.hc-related {
	margin-top: 48px;
	padding-top: 40px;
	border-top: 1px solid var(--hc-border);
}

.hc-related__title {
	font-size: 1.25rem;
	margin-bottom: 18px;
}

/* ------------------------------------------------------------------ *
 * 17. Resultados de búsqueda (página)
 * ------------------------------------------------------------------ */
.hc-search-hero {
	background: var(--hc-surface);
	border-bottom: 1px solid var(--hc-border);
	padding: 44px 0;
}

.hc-search-hero__title {
	font-size: clamp(1.4rem, 3vw, 1.9rem);
	margin-bottom: 20px;
}

.hc-search-hero__title span {
	color: var(--hc-accent);
}

.hc-search-hero__form {
	max-width: 620px;
}

.hc-search-results {
	padding: 40px 20px 72px;
}

.hc-search-results__count {
	color: var(--hc-muted);
	margin-bottom: 20px;
}

.hc-result {
	display: flex;
	gap: 14px;
	padding: 18px;
	border: 1px solid var(--hc-border);
	border-radius: var(--hc-radius-sm);
	background: #fff;
	color: var(--hc-ink);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hc-result:hover {
	border-color: var(--hc-accent);
	box-shadow: var(--hc-shadow-sm);
	color: var(--hc-ink);
}

.hc-result__icon {
	display: inline-flex;
	color: var(--hc-accent);
	flex-shrink: 0;
}

.hc-result__title {
	display: block;
	font-weight: 600;
	font-size: 1.05rem;
	margin-bottom: 4px;
}

.hc-result__excerpt {
	display: block;
	color: var(--hc-muted);
	font-size: 0.925rem;
}

.hc-no-results {
	text-align: center;
	padding: 60px 20px;
	max-width: 460px;
	margin-inline: auto;
}

.hc-no-results__icon {
	display: inline-flex;
	color: var(--hc-accent);
	margin-bottom: 16px;
}

.hc-no-results h2 {
	margin-bottom: 8px;
}

.hc-no-results p {
	color: var(--hc-muted);
	margin-bottom: 24px;
}

/* ------------------------------------------------------------------ *
 * 18. 404
 * ------------------------------------------------------------------ */
.hc-404 {
	text-align: center;
	padding: 80px 20px;
	max-width: 560px;
	margin-inline: auto;
}

.hc-404__icon {
	display: inline-flex;
	color: var(--hc-accent);
	margin-bottom: 20px;
}

.hc-404__title {
	font-size: clamp(1.5rem, 3vw, 2rem);
	margin-bottom: 12px;
}

.hc-404__text {
	color: var(--hc-muted);
	margin-bottom: 28px;
}

.hc-404__search {
	max-width: 460px;
	margin: 0 auto 28px;
}

/* ------------------------------------------------------------------ *
 * 19. Paginación
 * ------------------------------------------------------------------ */
.pagination,
.hc-pagination {
	margin-top: 40px;
	display: flex;
	justify-content: center;
}

.pagination .nav-links,
.hc-pagination .nav-links {
	display: inline-flex;
	gap: 6px;
	flex-wrap: wrap;
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--hc-border);
	border-radius: var(--hc-radius-sm);
	color: var(--hc-text);
	background: #fff;
	font-weight: 500;
}

.pagination .page-numbers:hover {
	border-color: var(--hc-accent);
	color: var(--hc-accent);
}

.pagination .page-numbers.current {
	background: var(--hc-accent);
	border-color: var(--hc-accent);
	color: #fff;
}

/* ------------------------------------------------------------------ *
 * 20. Índice / fallback
 * ------------------------------------------------------------------ */
.hc-index {
	padding: 40px 20px 72px;
}

/* ------------------------------------------------------------------ *
 * 21. Pie de página
 * ------------------------------------------------------------------ */
.hc-footer {
	background: var(--hc-surface);
	border-top: 1px solid var(--hc-border);
	margin-top: 40px;
}

.hc-footer__widgets {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 40px;
	padding: 56px 0 40px;
}

.hc-footer__col ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.hc-footer__col li {
	margin-bottom: 8px;
}

.hc-footer__col a {
	color: var(--hc-text);
}

.hc-footer__col a:hover {
	color: var(--hc-accent);
}

.hc-footer__title {
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--hc-muted);
	margin-bottom: 14px;
}

.hc-footer__bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
	padding: 28px 0;
	border-top: 1px solid var(--hc-border);
}

.hc-footer__name {
	font-weight: 700;
	color: var(--hc-ink);
}

.hc-footer__logo {
	max-height: 32px;
	width: auto;
	display: block;
}

.hc-footer__brand a {
	display: inline-flex;
	align-items: center;
}

.hc-footer__menu {
	display: flex;
	gap: 20px;
	list-style: none;
	margin: 0;
	padding: 0;
	flex-wrap: wrap;
}

.hc-footer__menu a {
	color: var(--hc-text);
	font-size: 0.925rem;
}

.hc-footer__copy {
	color: var(--hc-muted);
	font-size: 0.875rem;
}

.hc-footer__copy p {
	margin: 0;
}

/* ------------------------------------------------------------------ *
 * 22. Responsive
 * ------------------------------------------------------------------ */
@media (max-width: 900px) {
	.hc-article--sidebar .hc-article__layout {
		grid-template-columns: 1fr;
		gap: 32px;
	}

	.hc-article__sidebar {
		order: -1;
	}

	.hc-article__sidebar-inner {
		position: static;
	}

	.hc-home__grid-sidebar {
		grid-template-columns: 1fr;
		gap: 32px;
	}
}

@media (max-width: 782px) {
	.hc-nav-toggle {
		display: inline-flex;
	}

	.hc-nav {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: #fff;
		border-bottom: 1px solid var(--hc-border);
		box-shadow: var(--hc-shadow);
		padding: 10px;
		display: none;
	}

	.hc-nav.is-open {
		display: block;
	}

	.hc-nav__menu {
		flex-direction: column;
		align-items: stretch;
		gap: 2px;
	}

	.hc-nav__menu .sub-menu {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		border: 0;
		padding-left: 16px;
	}

	.hc-hero {
		padding: 52px 0 44px;
	}
}

@media (max-width: 560px) {
	.hc-cat-grid {
		grid-template-columns: 1fr;
	}

	.hc-article-grid {
		grid-template-columns: 1fr;
	}

	.hc-footer__bottom {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* ------------------------------------------------------------------ *
 * 23. Movimiento reducido
 * ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		transition-duration: 0.001ms !important;
	}
}
