/*
Theme Name:   Hiren's BootCD en español
Description:  Tema hijo de Astra para la guía de Hiren's BootCD y Hiren's BootCD PE.
Template:     astra
Version:      1.2.0
Text Domain:  hirens
*/

/* ---------- Paleta (sobrescribe la paleta global de Astra) ---------- */
:root {
	--hb-ink: #0b1220;
	--hb-ink-2: #131d33;
	--hb-text: #1f2937;
	--hb-muted: #5b6577;
	--hb-line: #e3e7ee;
	--hb-bg-alt: #f4f6fa;
	--hb-accent: #f59e0b;
	--hb-accent-dark: #b45309;
	--hb-teal: #14b8a6;
	--hb-blue: linear-gradient(135deg, #0a2a66 0%, #12409a 55%, #1d5fd1 100%);
	--hb-blue-soft: #c9d8f5; /* texto secundario sobre azul */
	--hb-radius: 14px;
	--hb-mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;

	--ast-global-color-0: #b45309; /* enlaces y botones */
	--ast-global-color-1: #92400e; /* hover */
	--ast-global-color-2: #0b1220; /* títulos */
	--ast-global-color-3: #1f2937; /* texto */
	--ast-global-color-4: #f4f6fa;
	--ast-global-color-5: #ffffff;
}

body {
	color: var(--hb-text);
	font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}

h1, h2, h3, h4 {
	color: var(--hb-ink);
	letter-spacing: -0.01em;
	line-height: 1.2;
}

/* ---------- Cabecera ---------- */
.site-header .main-header-bar,
.ast-primary-header-bar {
	background: var(--hb-blue);
	border-bottom: 0;
}
.site-header .site-title a,
.site-header .site-title a:hover,
.site-header .main-header-menu .menu-link,
.site-header .ast-header-break-point .menu-toggle {
	color: #fff;
}
.site-header .site-title {
	font-family: var(--hb-mono);
	font-size: 1.05rem;
	font-weight: 700;
}
.site-header .site-title a::before {
	content: "▸ ";
	color: var(--hb-accent);
}
.site-header .main-header-menu .menu-link:hover,
.site-header .main-header-menu .current-menu-item > .menu-link {
	color: var(--hb-accent);
}
.site-header .ast-site-title-wrap .site-description { color: var(--hb-blue-soft); }

/* ---------- Selector de idioma (menú principal) ---------- */
.main-header-menu .hb-lang { display: flex; align-items: center; padding: 0 0 0 12px; }
.hb-lang__list {
	display: inline-flex;
	gap: 2px;
	padding: 3px;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.06);
}
.hb-lang__a {
	font-family: var(--hb-mono);
	font-size: 0.78rem;
	font-weight: 700;
	line-height: 1;
	padding: 6px 10px;
	border-radius: 999px;
	color: #fff !important;
	text-decoration: none !important;
}
.hb-lang__a:hover { background: rgba(255, 255, 255, 0.15); }
.hb-lang__a.is-current { background: var(--hb-accent); color: var(--hb-ink) !important; }
/* En el menú móvil de Astra (fondo claro). */
.ast-mobile-popup-drawer .hb-lang,
.ast-header-break-point .main-header-menu .hb-lang { padding: 14px 20px; }
.ast-mobile-popup-drawer .hb-lang__list,
.ast-header-break-point .hb-lang__list { border-color: var(--hb-line); background: transparent; }
.ast-mobile-popup-drawer .hb-lang__a:not(.is-current),
.ast-header-break-point .hb-lang__a:not(.is-current) { color: var(--hb-ink) !important; }

/* Chino: tipografía con buena cobertura CJK. */
html[lang^="zh"] body { font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Segoe UI", system-ui, sans-serif; }

/* ---------- Secciones de la portada ---------- */
.hb-hero {
	background:
		radial-gradient(1200px 400px at 85% -10%, rgba(245, 158, 11, 0.18), transparent 60%),
		radial-gradient(800px 400px at 0% 110%, rgba(20, 184, 166, 0.16), transparent 60%),
		var(--hb-blue);
	color: #d7deea;
	padding: clamp(56px, 9vw, 120px) 24px clamp(48px, 7vw, 96px);
	margin-top: 0 !important;
}
.hb-hero h1 {
	color: #fff;
	font-size: clamp(2rem, 4.6vw, 3.4rem);
	max-width: 900px;
	margin: 0 0 20px;
}
.hb-hero .hb-lead {
	font-size: clamp(1.05rem, 1.6vw, 1.25rem);
	max-width: 720px;
	color: var(--hb-blue-soft);
}
.hb-hero .hb-lead strong { color: var(--hb-accent); }
.hb-kicker {
	font-family: var(--hb-mono);
	font-size: 0.85rem;
	color: #5eead4;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-bottom: 12px;
}
.hb-hero .wp-block-buttons { margin: 32px 0 28px; gap: 12px; }
.hb-hero .wp-block-button__link {
	background: var(--hb-accent);
	color: var(--hb-ink);
	font-weight: 700;
	border-radius: 10px;
	padding: 14px 26px;
}
.hb-hero .wp-block-button__link:hover { background: #fbbf24; color: var(--hb-ink); }
.hb-hero .is-style-outline .wp-block-button__link {
	background: transparent;
	color: #fff;
	border: 2px solid rgba(255, 255, 255, 0.35);
}
.hb-hero .is-style-outline .wp-block-button__link:hover { border-color: #fff; color: #fff; }
.hb-badges {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	padding: 0;
	margin: 0;
}
.hb-badges li {
	font-family: var(--hb-mono);
	font-size: 0.8rem;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 999px;
	padding: 6px 14px;
	color: var(--hb-blue-soft);
}
.hb-badges li::before { content: "✓ "; color: #5eead4; }

.hb-section {
	padding: clamp(48px, 7vw, 88px) 24px;
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}
.hb-section--alt { background: var(--hb-bg-alt); }
.hb-section > h2,
.hb-section > .wp-block-heading { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 8px; }
.hb-section > p { color: var(--hb-muted); margin-bottom: 28px; }

.hb-resumen {
	background: var(--hb-blue);
	color: #d7deea;
	border-radius: var(--hb-radius);
	padding: 28px 32px;
}
.hb-resumen h3 { color: #fff; margin-top: 0; }
.hb-resumen ul { margin-bottom: 0; }
.hb-resumen li::marker { color: var(--hb-accent); }

/* Tarjetas de versiones */
.hb-version {
	background: #fff;
	border: 1px solid var(--hb-line);
	border-radius: var(--hb-radius);
	padding: 28px 32px;
	height: 100%;
}
.hb-version--pe { border: 2px solid var(--hb-accent); box-shadow: 0 10px 30px rgba(245, 158, 11, 0.12); }
.hb-version h3 { margin-top: 6px; }
.hb-tag {
	display: inline-block;
	font-family: var(--hb-mono);
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	background: var(--hb-accent);
	color: var(--hb-ink);
	padding: 3px 10px;
	border-radius: 6px;
	margin: 0;
	font-weight: 700;
}
.hb-tag--muted { background: var(--hb-line); color: var(--hb-muted); }

/* Problemas */
.hb-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 20px;
}
.hb-grid > * { margin: 0 !important; }
.hb-card {
	background: #fff;
	border: 1px solid var(--hb-line);
	border-left: 4px solid var(--hb-teal);
	border-radius: var(--hb-radius);
	padding: 22px 24px;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.hb-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(11, 18, 32, 0.08); }
.hb-card h3 { font-size: 1.15rem; margin: 0 0 6px; }
.hb-card p { margin: 0 0 10px; color: var(--hb-muted); }
.hb-card__tools { font-size: 0.92rem; font-weight: 600; }

/* Categorías */
.hb-cats {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 14px;
	margin-bottom: 32px;
}
.hb-cat {
	display: flex;
	flex-direction: column;
	gap: 4px;
	background: #fff;
	border: 1px solid var(--hb-line);
	border-radius: var(--hb-radius);
	padding: 18px 20px;
	text-decoration: none !important;
	color: var(--hb-ink) !important;
	transition: border-color 0.15s ease, transform 0.15s ease;
}
.hb-cat:hover { border-color: var(--hb-accent); transform: translateY(-2px); }
.hb-cat__icon { font-size: 1.4rem; color: var(--hb-accent-dark); line-height: 1; }
.hb-cat__name { font-weight: 700; }
.hb-cat__count { font-family: var(--hb-mono); font-size: 0.8rem; color: var(--hb-muted); }

/* Pasos */
.hb-step {
	font-family: var(--hb-mono);
	font-weight: 700;
	font-size: 1.1rem;
	width: 44px;
	height: 44px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: var(--hb-blue);
	color: var(--hb-accent);
	margin-bottom: 4px;
}
.hb-steps h3 { margin-top: 8px; }

/* FAQ */
.hb-faq {
	background: #fff;
	border: 1px solid var(--hb-line);
	border-radius: 10px;
	padding: 16px 20px;
	margin-bottom: 10px;
}
.hb-faq summary { font-weight: 700; cursor: pointer; color: var(--hb-ink); }
.hb-faq[open] summary { margin-bottom: 8px; color: var(--hb-accent-dark); }
.hb-faq p { margin: 0; }

/* ---------- Ficha de herramienta ---------- */
.hb-ficha {
	background: var(--hb-bg-alt);
	border: 1px solid var(--hb-line);
	border-top: 4px solid var(--hb-accent);
	border-radius: var(--hb-radius);
	padding: 20px 24px;
	margin: 0 0 32px;
}
.hb-ficha__titulo {
	font-family: var(--hb-mono);
	font-size: 0.85rem !important;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--hb-muted) !important;
	margin: 0 0 12px !important;
}
.hb-ficha dl {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 12px 24px;
	margin: 0;
}
.hb-ficha dt { font-size: 0.8rem; color: var(--hb-muted); }
.hb-ficha dd { margin: 0; font-weight: 600; }

.hb-consejo {
	background: #fff8eb;
	border-left: 4px solid var(--hb-accent);
	border-radius: 8px;
	padding: 14px 20px !important;
	margin: 28px 0;
}
.hb-consejo p { margin: 0; }

.hb-chips {
	list-style: none;
	padding: 0;
	margin: 0 0 24px;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.hb-chips li a {
	display: inline-block;
	border: 1px solid var(--hb-line);
	background: #fff;
	border-radius: 999px;
	padding: 6px 14px;
	font-size: 0.92rem;
	text-decoration: none;
	color: var(--hb-ink);
}
.hb-chips li a:hover { border-color: var(--hb-accent); color: var(--hb-accent-dark); }
.hb-relacionadas { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--hb-line); }
.hb-relacionadas h2 { font-size: 1.3rem; }

/* Tablas */
.hb-tabla table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
/* El degradado va en la fila de cabecera (no en cada celda) para que cruce toda la tabla. */
.hb-tabla thead tr, .hb-tools thead tr { background: var(--hb-blue); }
.hb-tabla th { background: transparent; color: #fff; text-align: left; }
.hb-tabla tbody th { color: inherit; }
.hb-tabla th, .hb-tabla td { padding: 10px 14px; border: 1px solid var(--hb-line); vertical-align: top; }
.hb-tabla tbody tr:nth-child(even) { background: var(--hb-bg-alt); }
.hb-tabla code { word-break: break-all; font-size: 0.82rem; }

/* ---------- Archivos (catálogo y categorías) ---------- */
.post-type-archive-herramienta .ast-archive-description,
.tax-categoria-herramienta .ast-archive-description,
.tax-version-hirens .ast-archive-description {
	background: var(--hb-blue);
	color: var(--hb-blue-soft);
	border-radius: var(--hb-radius);
	padding: 32px 36px;
}
.post-type-archive-herramienta .ast-archive-description .ast-archive-title,
.tax-categoria-herramienta .ast-archive-description .ast-archive-title,
.tax-version-hirens .ast-archive-description .ast-archive-title { color: #fff; }

.post-type-archive-herramienta .ast-article-post,
.tax-categoria-herramienta .ast-article-post,
.tax-version-hirens .ast-article-post {
	border: 1px solid var(--hb-line);
	border-radius: var(--hb-radius);
	background: #fff;
}
.post-type-archive-herramienta .ast-article-post .entry-title,
.tax-categoria-herramienta .ast-article-post .entry-title,
.tax-version-hirens .ast-article-post .entry-title { font-size: 1.15rem; }

/* ---------- Bloques de comandos (guías) ---------- */
.entry-content pre.wp-block-code {
	background: #0b1a3a;
	color: #e6edf8;
	border: 0;
	border-left: 4px solid var(--hb-accent);
	border-radius: 10px;
	padding: 16px 20px;
	margin: 0 0 24px;
	overflow-x: auto;
	font-size: 0.88rem;
	line-height: 1.6;
}
.entry-content pre.wp-block-code code { font-family: var(--hb-mono); white-space: pre; background: transparent; color: inherit; padding: 0; }
.entry-content :not(pre) > code { background: var(--hb-bg-alt); border: 1px solid var(--hb-line); border-radius: 4px; padding: 1px 5px; font-size: 0.9em; }

/* ---------- Tablas de herramientas por categoría ---------- */
.hb-tablas { margin: 8px 0 32px; }
.hb-tabla-cat { margin-bottom: 36px; }
.hb-tabla-cat__titulo {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 1.2rem !important;
	margin: 0 0 12px !important;
}
.hb-tabla-cat__titulo > span:first-child { color: var(--hb-accent-dark); }
.hb-tabla-cat__titulo a { color: var(--hb-ink); text-decoration: none; }
.hb-tabla-cat__titulo a:hover { color: var(--hb-accent-dark); }
.hb-tabla-cat__n {
	font-family: var(--hb-mono);
	font-size: 0.75rem;
	background: var(--hb-line);
	color: var(--hb-muted);
	border-radius: 999px;
	padding: 2px 10px;
}
table.hb-tools {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	border: 1px solid var(--hb-line);
	border-radius: var(--hb-radius);
	overflow: hidden;
	background: #fff;
	font-size: 0.95rem;
	margin: 0;
}
.hb-tools thead th {
	background: transparent;
	color: #fff;
	text-align: left;
	font-size: 0.8rem;
	font-family: var(--hb-mono);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 10px 16px;
	border: 0;
}
.hb-tools th, .hb-tools td { border: 0; border-top: 1px solid var(--hb-line); padding: 12px 16px; vertical-align: top; }
.hb-tools thead th { border-top: 0; }
.hb-tools tbody th { width: 30%; font-weight: 700; text-align: left; }
.hb-tools tbody th a { color: var(--hb-ink); text-decoration: none; }
.hb-tools tbody th a:hover { color: var(--hb-accent-dark); text-decoration: underline; }
.hb-tools tbody td { color: var(--hb-muted); }
.hb-tools__row { cursor: pointer; transition: background 0.12s ease; }
.hb-tools__row:hover, .hb-tools__row.is-open { background: #fffaf0; }
.hb-tools .hb-tools__toggle { width: 48px; text-align: center; vertical-align: middle; padding: 8px; }
.hb-tools__toggle button {
	background: transparent;
	border: 1px solid var(--hb-line);
	border-radius: 8px;
	width: 32px;
	height: 32px;
	padding: 0;
	color: var(--hb-accent-dark);
	font-size: 1rem;
	line-height: 1;
	cursor: pointer;
}
.hb-tools__toggle button:hover, .hb-tools__toggle button:focus-visible { border-color: var(--hb-accent); background: #fff; }
.hb-tools__toggle button span { display: inline-block; transition: transform 0.2s ease; }
.hb-tools__row.is-open .hb-tools__toggle button span { transform: rotate(180deg); }
.hb-tools__det td { border-top: 0; background: #fffaf0; padding: 0 16px 16px; }
.hb-tools__det-in {
	border-left: 3px solid var(--hb-accent);
	padding: 4px 0 4px 16px;
	color: var(--hb-text);
}
.hb-tools__det-in p { margin: 0 0 6px; }
.hb-tools__meta { font-size: 0.85rem; color: var(--hb-muted); }

@media (max-width: 640px) {
	.hb-tools thead { display: none; }
	.hb-tools tbody th { width: auto; }
	.hb-tools__row td:nth-child(2) { display: none; } /* En móvil la descripción va en el desplegable. */
}

/* En el catálogo, las categorías van después de la cabecera del archivo. */
.post-type-archive-herramienta #primary { display: flex; flex-direction: column; }
.post-type-archive-herramienta .ast-archive-description { order: 1; }
.post-type-archive-herramienta .hb-archive-cats { order: 2; margin-top: 24px; }
.post-type-archive-herramienta #primary > .site-main,
.post-type-archive-herramienta #primary > .ast-pagination { order: 3; }

/* Botón secundario del hero (Astra le aplica su color de acento). */
.hb-hero .wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color) {
	color: #fff;
	border-color: rgba(255, 255, 255, 0.35);
	background: transparent;
}

/* ---------- Pie ---------- */
/* Oculta las filas del pie de Astra: el pie lo pinta hirens-core.php. */
.site-footer .site-above-footer-wrap,
.site-footer .site-primary-footer-wrap,
.site-footer .site-below-footer-wrap { display: none !important; }

.site-footer { background: var(--hb-blue) !important; }
.hb-footer {
	position: relative;
	color: var(--hb-blue-soft);
	background:
		radial-gradient(700px 300px at 100% 0%, rgba(245, 158, 11, 0.12), transparent 60%),
		radial-gradient(600px 300px at 0% 100%, rgba(20, 184, 166, 0.10), transparent 60%),
		var(--hb-blue);
	border-top: 3px solid var(--hb-accent);
}
.hb-footer a { color: #d7deea; text-decoration: none; }
.hb-footer a:hover { color: var(--hb-accent); }
.hb-footer__top {
	max-width: 1200px;
	margin: 0 auto;
	padding: 64px 24px 40px;
	display: grid;
	grid-template-columns: 1.6fr 1fr 1fr 1fr;
	gap: 40px;
}
.hb-footer__logo {
	font-family: var(--hb-mono);
	font-weight: 700;
	font-size: 1.1rem;
	color: #fff !important;
}
.hb-footer__logo span { color: var(--hb-accent); }
.hb-footer__brand p { margin: 14px 0 18px; line-height: 1.6; max-width: 380px; }
.hb-footer__stats {
	list-style: none;
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	padding: 0;
	margin: 0 0 22px;
}
.hb-footer__stats li {
	font-family: var(--hb-mono);
	font-size: 0.78rem;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 8px;
	padding: 6px 12px;
}
.hb-footer__stats strong { color: var(--hb-accent); font-size: 0.95rem; }
.hb-footer__cta {
	display: inline-block;
	background: var(--hb-accent);
	color: var(--hb-ink) !important;
	font-weight: 700;
	border-radius: 10px;
	padding: 11px 20px;
	transition: background 0.15s ease;
}
.hb-footer__cta:hover { background: #fbbf24; }
.hb-footer__col h2 {
	font-family: var(--hb-mono);
	font-size: 0.8rem !important;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: #5eead4 !important;
	margin: 6px 0 16px !important;
}
.hb-footer__col ul { list-style: none; margin: 0; padding: 0; }
.hb-footer__col li { margin-bottom: 10px; font-size: 0.95rem; }
.hb-footer__col li a { position: relative; transition: padding 0.15s ease, color 0.15s ease; }
.hb-footer__col li a:hover { padding-left: 6px; }
.hb-footer__aviso {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
}
.hb-footer__aviso p {
	margin: 0;
	padding: 16px 20px;
	font-size: 0.85rem;
	line-height: 1.5;
	border: 1px dashed rgba(255, 255, 255, 0.16);
	border-radius: 10px;
}
.hb-footer__aviso strong { color: #fff; }
.hb-footer__bottom {
	max-width: 1200px;
	margin: 0 auto;
	padding: 22px 24px 28px;
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	font-size: 0.85rem;
}
.hb-footer__links { display: flex; gap: 20px; flex-wrap: wrap; }

@media (max-width: 921px) {
	.hb-footer__top { grid-template-columns: 1fr 1fr; }
	.hb-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 544px) {
	.hb-footer__top { grid-template-columns: 1fr; padding-top: 48px; gap: 28px; }
	.hb-footer__bottom { flex-direction: column; }
}

/* Las imágenes destacadas son para redes y Google: no se muestran en la página. */
.home .site-main > article { margin-top: 0 !important; }
.single-herramienta .ast-single-post-featured-section,
.page .ast-single-post-featured-section { display: none; }
.post-type-archive-herramienta .post-thumb,
.tax-categoria-herramienta .post-thumb,
.tax-version-hirens .post-thumb { display: none; }

@media (max-width: 781px) {
	.hb-resumen, .hb-version { padding: 22px; }
}
