/* =====================================================================
 * Reab — main stylesheet
 *
 * Mobile-first. CSS nativo, sin librerías ni preprocesadores.
 * Tipografías de sistema para máxima velocidad y nada de FOIT/FOUT.
 * ================================================================== */

:root {
	--reab-accent: #1f6feb;
	--reab-accent-soft: rgba(31, 111, 235, 0.08);
	--reab-grid-cols: 3;
	--reab-fg: #1a1d24;
	--reab-fg-soft: #4a5060;
	--reab-bg: #ffffff;
	--reab-bg-alt: #f6f7f9;
	--reab-border: #e3e6eb;
	--reab-radius: 10px;
	--reab-radius-sm: 6px;
	--reab-shadow: 0 1px 3px rgba(15, 23, 42, .04), 0 2px 12px rgba(15, 23, 42, .04);
	--reab-shadow-hover: 0 4px 14px rgba(15, 23, 42, .08), 0 12px 30px rgba(15, 23, 42, .06);
	--reab-max-w: 1180px;
	--reab-content-w: 720px;
	--reab-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	--reab-font-serif: "Iowan Old Style", "Apple Garamond", Baskerville, "Times New Roman", "Droid Serif", Times, "Source Serif Pro", serif;
}

@media (prefers-color-scheme: dark) {
	:root.reab-auto-dark, :root.reab-auto-dark body {
		--reab-fg: #ecedef;
		--reab-fg-soft: #b6bac6;
		--reab-bg: #0e1116;
		--reab-bg-alt: #161a23;
		--reab-border: #232938;
		--reab-shadow: 0 1px 3px rgba(0,0,0,.4), 0 2px 12px rgba(0,0,0,.4);
		--reab-shadow-hover: 0 4px 14px rgba(0,0,0,.6), 0 12px 30px rgba(0,0,0,.5);
	}
}

/* Reset razonable
 * --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--reab-bg);
	color: var(--reab-fg);
	font-family: var(--reab-font);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--reab-accent); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--reab-accent); outline-offset: 2px; border-radius: 3px; }

h1, h2, h3, h4, h5, h6 { line-height: 1.25; margin: 1.5em 0 .6em; color: var(--reab-fg); }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.55rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1.1em; }

/* Skip link
 * --------------------------------------------------------------- */
.reab-skip {
	position: absolute; top: -100px; left: 0;
	background: var(--reab-accent); color: #fff;
	padding: 10px 16px; z-index: 999; border-radius: 0 0 var(--reab-radius-sm) 0;
}
.reab-skip:focus { top: 0; }
.screen-reader-text {
	border: 0 !important; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
	height: 1px; width: 1px; overflow: hidden; padding: 0; position: absolute !important;
	white-space: nowrap; word-wrap: normal !important;
}

/* Container + layout
 * --------------------------------------------------------------- */
.reab-container {
	width: 100%; max-width: var(--reab-max-w);
	margin: 0 auto; padding: 0 20px;
}
.reab-layout {
	display: grid; gap: 36px;
	grid-template-columns: 1fr;
	margin: 32px auto 56px;
}
@media (min-width: 960px) {
	.reab-layout { grid-template-columns: minmax(0, 1fr) 300px; }
	.reab-no-sidebar .reab-layout { grid-template-columns: minmax(0, 1fr); }
}
.reab-content { min-width: 0; }

/* Header
 * --------------------------------------------------------------- */
.reab-header {
	background: var(--reab-bg);
	border-bottom: 1px solid var(--reab-border);
	position: sticky; top: 0; z-index: 50;
	backdrop-filter: saturate(180%) blur(8px);
	-webkit-backdrop-filter: saturate(180%) blur(8px);
}
.reab-header__inner {
	display: flex; align-items: center; gap: 16px;
	padding: 14px 20px; flex-wrap: wrap;
}
.reab-header__brand {
	display: flex; flex-direction: column; gap: 2px;
	margin-right: auto; min-width: 0;
}
.reab-header__title { margin: 0; font-size: 1.4rem; font-weight: 700; }
.reab-header__title a { color: var(--reab-fg); text-decoration: none; }
.reab-header__tagline { margin: 0; font-size: .85rem; color: var(--reab-fg-soft); }
.custom-logo { max-height: 60px; width: auto; }
.custom-logo-link { display: block; }

.reab-nav { display: none; width: 100%; order: 4; }
.reab-nav.is-open { display: block; }
.reab-menu { list-style: none; margin: 0; padding: 14px 0; display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--reab-border); }
.reab-menu li { position: relative; }
.reab-menu a {
	display: block; padding: 8px 4px;
	color: var(--reab-fg); font-weight: 500;
}
.reab-menu a:hover { color: var(--reab-accent); text-decoration: none; }
.reab-menu .current-menu-item > a, .reab-menu .current_page_item > a { color: var(--reab-accent); }
.reab-menu .sub-menu { list-style: none; margin: 4px 0 4px 12px; padding: 0; }

.reab-nav-toggle {
	background: none; border: 1px solid var(--reab-border);
	border-radius: var(--reab-radius-sm);
	width: 40px; height: 40px;
	display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.reab-nav-toggle__bar { display: block; width: 18px; height: 2px; background: var(--reab-fg); border-radius: 2px; transition: transform .2s; }
.reab-nav-toggle[aria-expanded="true"] .reab-nav-toggle__bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.reab-nav-toggle[aria-expanded="true"] .reab-nav-toggle__bar:nth-child(2) { opacity: 0; }
.reab-nav-toggle[aria-expanded="true"] .reab-nav-toggle__bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.reab-header__search { display: none; flex: 0 0 100%; order: 5; padding-top: 6px; }
.reab-header__search.is-open { display: block; }

@media (min-width: 800px) {
	.reab-nav { display: block !important; width: auto; order: 0; flex: 1; }
	.reab-menu { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px; padding: 0; border-top: 0; }
	.reab-menu > li > a { padding: 8px 12px; border-radius: var(--reab-radius-sm); }
	.reab-menu > li > a:hover { background: var(--reab-accent-soft); }
	.reab-nav-toggle { display: none; }
	.reab-header__search { display: block !important; flex: 0 0 220px; order: 0; padding-top: 0; }
}

/* Buscador
 * --------------------------------------------------------------- */
.reab-search { display: flex; align-items: center; gap: 6px; }
.reab-search__input {
	flex: 1 1 auto; min-width: 0;
	padding: 8px 12px; border: 1px solid var(--reab-border);
	border-radius: var(--reab-radius-sm); background: var(--reab-bg-alt);
	color: var(--reab-fg); font-size: .92rem;
}
.reab-search__input:focus { outline: 2px solid var(--reab-accent); outline-offset: 1px; }
.reab-search__submit {
	border: 0; background: var(--reab-accent); color: #fff;
	width: 36px; height: 36px; border-radius: var(--reab-radius-sm);
	display: inline-flex; align-items: center; justify-content: center;
}
.reab-search__submit:hover { filter: brightness(.92); }

/* Breadcrumbs + page header
 * --------------------------------------------------------------- */
.reab-breadcrumbs { font-size: .85rem; color: var(--reab-fg-soft); margin: 4px 0 12px; }
.reab-breadcrumbs a { color: var(--reab-fg-soft); }
.reab-breadcrumbs a:hover { color: var(--reab-accent); }
.reab-page-header { margin-bottom: 24px; }
.reab-page-title { margin: 0 0 8px; font-size: 2rem; }
.reab-page-desc { color: var(--reab-fg-soft); }

/* Grid de cards
 * --------------------------------------------------------------- */
.reab-grid {
	display: grid; gap: 24px;
	grid-template-columns: repeat(1, minmax(0, 1fr));
}
@media (min-width: 600px) {
	.reab-grid[data-reab-cols="2"], .reab-grid[data-reab-cols="3"], .reab-grid[data-reab-cols="4"] {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media (min-width: 900px) {
	.reab-grid[data-reab-cols="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.reab-grid[data-reab-cols="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.reab-card {
	display: flex; flex-direction: column;
	background: var(--reab-bg); border: 1px solid var(--reab-border);
	border-radius: var(--reab-radius); overflow: hidden;
	transition: transform .2s ease, box-shadow .2s ease;
}
.reab-card:hover { transform: translateY(-2px); box-shadow: var(--reab-shadow-hover); }
.reab-card__thumb { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--reab-bg-alt); }
.reab-card__img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.reab-card:hover .reab-card__img { transform: scale(1.04); }
.reab-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.reab-card__cat {
	display: inline-block; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase;
	color: var(--reab-accent); font-weight: 700;
}
.reab-card__title { margin: 0; font-size: 1.18rem; line-height: 1.3; }
.reab-card__title a { color: var(--reab-fg); }
.reab-card__title a:hover { color: var(--reab-accent); text-decoration: none; }
.reab-card__excerpt { margin: 0; font-size: .95rem; color: var(--reab-fg-soft); flex: 1; }
.reab-card__meta { margin: 4px 0 0; font-size: .78rem; color: var(--reab-fg-soft); }

/* Single post
 * --------------------------------------------------------------- */
.reab-post__header { margin-bottom: 18px; }
.reab-post__title { margin: 6px 0 8px; font-size: 2.1rem; line-height: 1.2; }
.reab-meta { font-size: .9rem; color: var(--reab-fg-soft); margin: 0; }
.reab-meta a { color: var(--reab-fg-soft); }
.reab-meta a:hover { color: var(--reab-accent); }
.reab-meta__sep { margin: 0 6px; }

.reab-post__hero { margin: 18px 0 28px; }
.reab-post__hero-img { width: 100%; border-radius: var(--reab-radius); }
.reab-post__hero-cap { color: var(--reab-fg-soft); font-size: .85rem; margin-top: 6px; text-align: center; }

.reab-post__content {
	font-family: var(--reab-font-serif); font-size: 1.12rem; line-height: 1.75;
	max-width: var(--reab-content-w);
}
.reab-post__content > * { max-width: 100%; }
.reab-post__content a { color: var(--reab-accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.reab-post__content h2 { font-size: 1.55rem; margin-top: 2em; }
.reab-post__content h3 { font-size: 1.2rem; margin-top: 1.6em; }
.reab-post__content img { border-radius: var(--reab-radius-sm); margin: 1em 0; }
.reab-post__content blockquote {
	border-left: 4px solid var(--reab-accent);
	margin: 1.5em 0; padding: .4em 1em;
	background: var(--reab-accent-soft);
	border-radius: 0 var(--reab-radius-sm) var(--reab-radius-sm) 0;
	color: var(--reab-fg);
}
.reab-post__content blockquote p:last-child { margin-bottom: 0; }
.reab-post__content code, .reab-post__content pre {
	font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
	background: var(--reab-bg-alt); border-radius: var(--reab-radius-sm);
}
.reab-post__content code { padding: 1px 6px; font-size: .92em; }
.reab-post__content pre { padding: 14px; overflow-x: auto; }
.reab-post__content ul, .reab-post__content ol { padding-left: 1.5em; }
.reab-post__content li { margin-bottom: .35em; }

.reab-post__tags { font-size: .9rem; color: var(--reab-fg-soft); }
.reab-post__tags a { display: inline-block; padding: 2px 10px; background: var(--reab-bg-alt); border-radius: 999px; margin: 0 4px 4px 0; font-size: .8rem; color: var(--reab-fg); }
.reab-post__tags a:hover { background: var(--reab-accent-soft); color: var(--reab-accent); text-decoration: none; }

.reab-post-nav { display: grid; gap: 12px; margin: 32px 0; padding: 18px 0; border-top: 1px solid var(--reab-border); border-bottom: 1px solid var(--reab-border); }
@media (min-width: 600px) { .reab-post-nav { grid-template-columns: 1fr 1fr; } }
.reab-post-nav a { color: var(--reab-fg); }
.reab-post-nav a:hover { color: var(--reab-accent); }

/* Pagination
 * --------------------------------------------------------------- */
.reab-pagination, .navigation.pagination { margin: 36px 0; }
.reab-pagination .nav-links, .navigation.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 38px; padding: 8px 12px; border: 1px solid var(--reab-border);
	border-radius: var(--reab-radius-sm); color: var(--reab-fg); font-weight: 500;
}
.page-numbers.current { background: var(--reab-accent); color: #fff; border-color: var(--reab-accent); }
.page-numbers:hover { background: var(--reab-accent-soft); color: var(--reab-accent); text-decoration: none; }

/* Sidebar + widgets
 * --------------------------------------------------------------- */
.reab-sidebar { display: flex; flex-direction: column; gap: 20px; }
.reab-widget {
	background: var(--reab-bg-alt); border: 1px solid var(--reab-border);
	border-radius: var(--reab-radius); padding: 18px 20px;
}
.reab-widget__title { margin: 0 0 12px; font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; color: var(--reab-fg-soft); }
.reab-widget ul { list-style: none; margin: 0; padding: 0; }
.reab-widget li { padding: 6px 0; border-bottom: 1px solid var(--reab-border); }
.reab-widget li:last-child { border-bottom: 0; }
.reab-widget a { color: var(--reab-fg); }
.reab-widget a:hover { color: var(--reab-accent); }

/* Comments
 * --------------------------------------------------------------- */
.reab-comments { margin-top: 36px; }
.reab-comments__title { margin-bottom: 16px; }
.reab-comments__list { list-style: none; padding: 0; }
.reab-comments .comment-body {
	padding: 16px; border: 1px solid var(--reab-border);
	border-radius: var(--reab-radius); margin-bottom: 14px;
	background: var(--reab-bg);
}
.reab-comments .comment-author img { border-radius: 999px; }
.reab-comments .comment-author { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.reab-comments .comment-metadata { font-size: .8rem; color: var(--reab-fg-soft); margin-bottom: 8px; }
.reab-comment-form { display: grid; gap: 14px; }
.reab-comment-form input[type=text], .reab-comment-form input[type=email], .reab-comment-form input[type=url], .reab-comment-form textarea {
	width: 100%; padding: 10px 12px; border: 1px solid var(--reab-border);
	border-radius: var(--reab-radius-sm); background: var(--reab-bg); color: var(--reab-fg); font: inherit;
}
.reab-btn { display: inline-block; padding: 10px 18px; border-radius: var(--reab-radius-sm); border: 1px solid transparent; font-weight: 600; }
.reab-btn--primary { background: var(--reab-accent); color: #fff; border-color: var(--reab-accent); }
.reab-btn--primary:hover { filter: brightness(.92); text-decoration: none; }
.reab-btn--secondary { background: transparent; color: var(--reab-fg); border-color: var(--reab-border); }
.reab-btn--secondary:hover { background: var(--reab-bg-alt); text-decoration: none; }

/* 404 + empty states
 * --------------------------------------------------------------- */
.reab-404 { text-align: center; padding: 40px 0; }
.reab-404__code { font-size: 5rem; font-weight: 800; color: var(--reab-accent); margin: 0; line-height: 1; }
.reab-404__title { margin: 10px 0 6px; }
.reab-404__msg { color: var(--reab-fg-soft); margin-bottom: 24px; }
.reab-404 .reab-search { max-width: 480px; margin: 0 auto 36px; }
.reab-404__subtitle { text-align: left; margin-top: 30px; }
.reab-empty { background: var(--reab-bg-alt); border: 1px solid var(--reab-border); border-radius: var(--reab-radius); padding: 28px; text-align: center; }

/* Footer
 * --------------------------------------------------------------- */
.reab-footer {
	background: var(--reab-bg-alt);
	border-top: 1px solid var(--reab-border);
	margin-top: 56px; padding: 36px 0 24px;
	color: var(--reab-fg-soft); font-size: .92rem;
}
.reab-footer__widgets {
	display: grid; gap: 28px; padding-bottom: 24px;
	border-bottom: 1px solid var(--reab-border);
}
@media (min-width: 720px) { .reab-footer__widgets { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.reab-footer-widget__title { margin: 0 0 10px; font-size: .95rem; color: var(--reab-fg); }
.reab-footer__bottom {
	display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
	padding-top: 18px;
}
.reab-footer__copy { margin: 0; }
.reab-menu--inline { flex-direction: row; flex-wrap: wrap; gap: 4px 12px; border: 0; padding: 0; }
.reab-menu--inline a { padding: 4px 0; }
.reab-footer__consent-link { margin: 0 0 0 auto; }

/* Consent banner
 * --------------------------------------------------------------- */
.reab-consent {
	position: fixed; left: 16px; right: 16px; bottom: 16px;
	z-index: 9999; max-width: 720px; margin: 0 auto;
	background: var(--reab-bg); color: var(--reab-fg);
	border: 1px solid var(--reab-border); border-radius: var(--reab-radius);
	box-shadow: var(--reab-shadow-hover);
	animation: reabFadeIn .35s ease both;
}
@keyframes reabFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.reab-consent__box { padding: 18px 20px; }
.reab-consent__title { margin: 0 0 6px; font-size: 1.05rem; }
.reab-consent__msg { margin: 0 0 14px; font-size: .92rem; color: var(--reab-fg-soft); }
.reab-consent__prefs { display: grid; gap: 10px; margin: 0 0 14px; padding: 14px; background: var(--reab-bg-alt); border-radius: var(--reab-radius-sm); }
.reab-consent__row { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.reab-consent__row input { margin-top: 3px; }
.reab-consent__row small { color: var(--reab-fg-soft); }
.reab-consent__buttons { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.reab-consent__btn { padding: 9px 16px; border-radius: var(--reab-radius-sm); border: 1px solid var(--reab-border); background: var(--reab-bg); color: var(--reab-fg); font-weight: 600; font-size: .9rem; }
.reab-consent__btn--primary { background: var(--reab-accent); color: #fff; border-color: var(--reab-accent); }
.reab-consent__btn--primary:hover { filter: brightness(.92); }
.reab-consent__btn--secondary:hover { background: var(--reab-bg-alt); }
.reab-consent__btn--save { background: var(--reab-fg); color: var(--reab-bg); border-color: var(--reab-fg); }
.reab-consent__policy { margin: 12px 0 0 0; font-size: .82rem; text-align: center; }
.reab-consent__policy a { color: var(--reab-fg-soft); }

@media (max-width: 600px) {
	.reab-consent { left: 8px; right: 8px; bottom: 8px; }
	.reab-consent__buttons { justify-content: stretch; }
	.reab-consent__btn { flex: 1; }
}

/* AdSense in-content responsiveness fix
 * --------------------------------------------------------------- */
.reab-post__content .adsbygoogle { display: block; margin: 22px auto; }
