/* =====================================================
   ADCORDIS THEME — main.css
   Estilos principales (excl. variables y críticos,
   que van inline en functions.php)
   ===================================================== */

/* ─────────────────────────────────────────────────────
   UTILIDADES GLOBALES
───────────────────────────────────────────────────── */

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

.container {
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* Contenedor estrecho para contenido sin sidebar */
.container--narrow {
    max-width: var(--content-max-width);
}

/* Focus visible — WCAG AA */
*:focus-visible {
    outline: 2px solid var(--color-secondary);
    outline-offset: 3px;
    border-radius: 3px;
}

/* ─────────────────────────────────────────────────────
   TIPOGRAFÍA
───────────────────────────────────────────────────── */

h1 { font-size: 2.25rem;   line-height: 1.2; margin-bottom: 1rem; }
h2 { font-size: 1.625rem;  line-height: 1.3; margin-bottom: 0.875rem; }
h3 { font-size: 1.1875rem; line-height: 1.4; margin-bottom: 0.75rem; }
h4 { font-size: 1rem;      line-height: 1.5; color: var(--color-text); margin-bottom: 0.5rem; }

p  { margin-bottom: 1.5rem; }
p:last-child { margin-bottom: 0; }

small { font-size: 0.8125rem; color: var(--color-text-muted); }

a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: color 0.15s ease;
}
a:hover { text-decoration: underline; }

/* ─────────────────────────────────────────────────────
   BOTONES
───────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    border: 2px solid transparent;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    white-space: nowrap;
}

.btn--primary {
    background-color: var(--color-secondary);
    color: var(--color-white);
    border-color: var(--color-secondary);
}
.btn--primary:hover {
    background-color: #1a6bbf;
    border-color: #1a6bbf;
    text-decoration: none;
    color: var(--color-white);
}

.btn--outline {
    background-color: transparent;
    color: var(--color-secondary);
    border-color: var(--color-secondary);
}
.btn--outline:hover {
    background-color: var(--color-secondary);
    color: var(--color-white);
    text-decoration: none;
}

.btn--ghost {
    background-color: var(--color-white);
    color: var(--color-primary);
    border-color: var(--color-border);
}
.btn--ghost:hover {
    border-color: var(--color-secondary);
    color: var(--color-secondary);
    text-decoration: none;
}

.btn--lg {
    padding: 14px 28px;
    font-size: 1.0625rem;
}

/* ─────────────────────────────────────────────────────
   BADGES / PILLS
───────────────────────────────────────────────────── */

.category-badge {
    display: inline-block;
    padding: 3px 10px;
    background-color: var(--color-accent-bg);
    color: var(--color-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 100px;
    text-decoration: none;
    transition: background-color 0.15s ease;
}
.category-badge:hover {
    background-color: #d0e8f5;
    text-decoration: none;
}

.badge--pillar {
    display: inline-block;
    padding: 4px 12px;
    background-color: #14532d;
    color: #dcfce7;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 100px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

/* ─────────────────────────────────────────────────────
   HEADER
───────────────────────────────────────────────────── */

/* (Base del header ya en CSS crítico; aquí los detalles de nav) */

.site-nav__menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    /* Evitar que items extra rompan el layout del header */
    flex-wrap: nowrap;
    overflow: hidden;
}

/* Ocultar bullets de todos los <ul> dentro del nav, incluso sub-menús */
.site-nav ul,
.site-nav__menu,
.site-nav__menu ul {
    list-style: none !important;
    margin: 0;
    padding: 0;
}

/* Ocultar sub-menús de WordPress (child items) — este tema es flat */
.site-nav__menu .sub-menu,
.site-nav__menu .children {
    display: none !important;
}

.site-nav__link {
    display: block;
    padding: 6px 12px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text);
    border-radius: 6px;
    text-decoration: none;
    transition: color 0.15s ease, background-color 0.15s ease;
}
.site-nav__link:hover,
.current-menu-item .site-nav__link {
    color: var(--color-secondary);
    background-color: var(--color-accent-bg);
    text-decoration: none;
}
.current-menu-item .site-nav__link {
    font-weight: 600;
}

/* Acciones del header (lupa + hamburguesa) */
.site-header__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-toggle,
.menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text);
    border-radius: 6px;
    transition: background-color 0.15s ease, color 0.15s ease;
    padding: 0;
}
.search-toggle:hover,
.menu-toggle:hover {
    background-color: var(--color-accent-bg);
    color: var(--color-secondary);
}

/* Hamburguesa */
.menu-toggle {
    flex-direction: column;
    gap: 5px;
    display: none; /* visible solo en mobile via responsive.css */
}
.menu-toggle__bar {
    display: block;
    width: 22px;
    height: 2px;
    background-color: currentColor;
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
    pointer-events: none;
}

/* Buscador desplegable del header */
.header-search {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    padding: 12px 0;
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.2s ease, opacity 0.2s ease, visibility 0.2s ease;
    z-index: 99;
}
.site-header.search-open .header-search {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}
.header-search .container {
    display: flex;
    align-items: center;
    gap: 12px;
}
.header-search__form {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 8px 12px;
}
.header-search__input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: var(--color-text);
    outline: none;
}
.header-search__input::placeholder { color: var(--color-text-muted); }
.header-search__submit {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    display: flex;
    padding: 0;
}
.header-search__submit:hover { color: var(--color-secondary); }
.header-search__close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    display: flex;
    padding: 6px;
    border-radius: 4px;
    transition: color 0.15s ease;
}
.header-search__close:hover { color: var(--color-text); }

/* Menú mobile abierto */
.site-header.nav-open .site-nav {
    display: block;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    padding: 12px 20px 20px;
    z-index: 99;
}
.site-header.nav-open .site-nav__menu {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
}
.site-header.nav-open .site-nav__link {
    padding: 10px 12px;
    font-size: 1rem;
}

/* ─────────────────────────────────────────────────────
   LAYOUT PRINCIPAL CON SIDEBAR
───────────────────────────────────────────────────── */

.content-area--with-sidebar {
    display: flex;
    align-items: flex-start;
    gap: 48px;
    padding-top: 40px;
    padding-bottom: 60px;
}

.main-content {
    flex: 1;
    min-width: 0; /* evita overflow en flex */
}

/* ─────────────────────────────────────────────────────
   HERO (FRONT PAGE)
───────────────────────────────────────────────────── */

.hero {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 80px 0;
    text-align: center;
}

.hero__title {
    font-size: 2.5rem;
    color: var(--color-white);
    margin-bottom: 1rem;
    line-height: 1.15;
}

.hero__subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.65;
}

.hero__search {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 640px;
    margin: 0 auto;
}

.hero__search-input {
    flex: 1;
    height: 52px;
    padding: 0 20px;
    border: none;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: var(--color-text);
    background: var(--color-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    outline: none;
    transition: box-shadow 0.2s ease;
}
.hero__search-input:focus {
    box-shadow: 0 0 0 3px rgba(45, 125, 210, 0.4), 0 2px 8px rgba(0, 0, 0, 0.15);
}
.hero__search-input::placeholder { color: var(--color-text-muted); }

/* ─────────────────────────────────────────────────────
   SECCIÓN PILARES (HOME)
───────────────────────────────────────────────────── */

.home-pilares {
    padding: 60px 0;
    background: var(--color-bg);
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
}

.pilares-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* La última tarjeta si es impar: centrada */
.pilares-grid .pilar-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: calc(50% - 10px);
    margin: 0 auto;
}

.pilar-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 24px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.pilar-card:hover {
    border-color: var(--color-secondary);
    box-shadow: 0 4px 16px rgba(45, 125, 210, 0.12);
}

.pilar-card__icon {
    color: var(--color-secondary);
    margin-bottom: 12px;
}

.pilar-card__title {
    font-size: 1.0625rem;
    margin-bottom: 8px;
    color: var(--color-primary);
}
.pilar-card__title a {
    color: inherit;
    text-decoration: none;
}
.pilar-card__title a:hover { color: var(--color-secondary); text-decoration: none; }

.pilar-card__desc {
    font-size: 0.9375rem;
    color: var(--color-text-muted);
    margin-bottom: 16px;
    line-height: 1.6;
}

.pilar-card__link {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-secondary);
    text-decoration: none;
}
.pilar-card__link:hover { text-decoration: underline; }

/* ─────────────────────────────────────────────────────
   GRIDS DE ARTÍCULOS
───────────────────────────────────────────────────── */

.home-articles {
    padding: 60px 0;
    background: var(--color-white);
}

.articles-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 40px;
}

.articles-grid--3col { grid-template-columns: repeat(3, 1fr); }
.articles-grid--2col { grid-template-columns: repeat(2, 1fr); }

/* Tarjeta de artículo */
.article-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}
.article-card:hover {
    border-color: var(--color-secondary);
    box-shadow: 0 4px 16px rgba(45, 125, 210, 0.1);
    transform: translateY(-2px);
}

.article-card__link {
    display: block;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    height: 100%;
}
.article-card__link:hover { text-decoration: none; }

.article-card .category-badge { margin-bottom: 10px; }

.article-card__title {
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.45;
    margin-bottom: 8px;
    /* Máximo 2 líneas con ellipsis */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-card__link:hover .article-card__title { color: var(--color-secondary); }

.article-card__date {
    display: block;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    margin-bottom: 10px;
}

.article-card__excerpt {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin: 0;
}

/* Variante compacta (artículos relacionados) */
.article-card--compact .article-card__link { padding: 16px; }
.article-card--compact .article-card__title { font-size: 0.9375rem; }

/* Grid relacionados (3 columnas) */
.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 16px;
}

/* ─────────────────────────────────────────────────────
   HERRAMIENTAS (HOME)
───────────────────────────────────────────────────── */

.home-tools {
    padding: 60px 0;
    background-color: var(--color-accent-bg);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 8px;
}

.tool-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: box-shadow 0.2s ease;
}
.tool-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.tool-card__icon {
    flex-shrink: 0;
    color: var(--color-secondary);
}

.tool-card__info { flex: 1; }

.tool-card__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 6px;
}

.tool-card__desc {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    line-height: 1.55;
    margin: 0;
}

/* ─────────────────────────────────────────────────────
   ADSENSE — SLOTS Y CONTROL DE CLS
   CLS (Cumulative Layout Shift): el mayor enemigo del RPM.
   Reservar min-height en cada slot evita que el contenido
   salte al cargar el anuncio → CLS cercano a 0.
───────────────────────────────────────────────────── */

/* Etiqueta "Publicidad" encima de cada slot */
.ad-label {
    font-size: 11px;
    color: var(--color-text-muted);
    text-align: center;
    margin: 0 0 4px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Contenedor base de todos los slots */
.ad-slot {
    overflow: hidden;
    text-align: center;
    /* Sin margin aquí — cada variante tiene el suyo propio */
}

/* Asegurar que el <ins> de AdSense ocupe el ancho del contenedor */
.ad-slot ins.adsbygoogle {
    display: block !important;
}

/* Placeholder visible en WP_DEBUG — nunca en producción */
.ad-placeholder {
    background: #f8f8f8;
    border: 2px dashed #d0d0d0;
    color: #aaa;
    font-size: 12px;
    font-family: monospace;
    padding: 20px;
    text-align: center;
    border-radius: 6px;
    max-width: 728px;
    margin: 24px auto;
}

/* ── In-content (artículo, tras §2 y §6) ── */
.ad-in-content {
    max-width: 336px;
    /* Reservar 280px previene CLS cuando el anuncio 336×280 carga */
    min-height: 280px;
    margin: 2rem auto;
}
.ad-in-content--second {
    margin-top: 2.5rem;
}

/* ── Post-bottom (728×90 al final del artículo) ── */
.ad-post-bottom {
    max-width: 728px;
    /* 90px mínimo para el leaderboard; el responsive puede ser más alto */
    min-height: 90px;
    margin: 2rem auto 0;
}
.ad-post-bottom-wrap {
    margin-top: 1.5rem;
}

/* ── Sidebar (300×600, solo desktop) ── */
.ad-sidebar {
    width: 300px;
    /* 250px mínimo: el 300×600 puede degradar a 300×250 en inventario bajo */
    min-height: 250px;
    margin: 0 auto;
}
.sidebar-widget--ad {
    padding: 0;
    border: none;
    background: transparent;
}

/* ── Home (728×90 entre artículos y herramientas) ── */
.ad-home {
    max-width: 728px;
    min-height: 90px;
    margin: 0 auto;
}
.home-ad-section {
    padding: 8px 0 24px;
    background: var(--color-bg);
}

/* ── Pillar bottom (728×90 al final de la guía) ── */
.ad-pillar {
    max-width: 728px;
    min-height: 90px;
    margin: 0 auto;
}
.ad-pillar-wrap {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

/* ── Legado: ad-leaderboard (front-page anterior, mantener compat) ── */
.ad-leaderboard {
    max-width: 728px;
    min-height: 90px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
.home-ad {
    background-color: var(--color-bg);
    padding: 16px 0;
}

/* ─────────────────────────────────────────────────────
   SINGLE POST — BREADCRUMB
───────────────────────────────────────────────────── */

.breadcrumb {
    margin-bottom: 16px;
}

.breadcrumb ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    padding: 0;
    margin: 0;
}

.breadcrumb li { display: flex; align-items: center; }

.breadcrumb a {
    color: var(--color-text-muted);
    text-decoration: none;
}
.breadcrumb a:hover { color: var(--color-secondary); }

.breadcrumb__sep { margin: 0 4px; }

/* ─────────────────────────────────────────────────────
   SINGLE POST — CABECERA
───────────────────────────────────────────────────── */

.single-post { padding: 40px 0 60px; }

.entry-header { margin-bottom: 24px; }

.entry-header .category-badge { margin-bottom: 14px; }

.entry-title {
    font-size: 2rem;
    line-height: 1.2;
    color: var(--color-primary);
    margin-bottom: 16px;
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.entry-meta__sep { opacity: 0.5; }

.entry-header__divider {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 20px 0 0;
}

/* ─────────────────────────────────────────────────────
   SINGLE POST — CAJA DE RESUMEN
───────────────────────────────────────────────────── */

.article-summary {
    background-color: var(--color-accent-bg);
    border-left: 4px solid var(--color-secondary);
    border-radius: 6px;
    padding: 16px 20px;
    margin-bottom: 2rem;
}
/* Ocultar si JS no generó items */
.article-summary:has(#article-summary-list:empty) { display: none; }

.article-summary__label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 8px;
}

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

.article-summary__list a {
    font-size: 0.9rem;
    color: var(--color-secondary);
    text-decoration: none;
}
.article-summary__list a:hover { text-decoration: underline; }

/* ─────────────────────────────────────────────────────
   SINGLE POST — CONTENIDO (.entry-content)
───────────────────────────────────────────────────── */

.entry-content p { margin-bottom: 1.5rem; }

.entry-content h2 {
    border-left: 4px solid var(--color-secondary);
    padding-left: 12px;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.entry-content h3 {
    color: var(--color-primary);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
}

.entry-content h4 {
    color: var(--color-text);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.entry-content ul,
.entry-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.entry-content ul { list-style: none; padding-left: 0; }
.entry-content ul li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
}
.entry-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 6px;
    height: 6px;
    background-color: var(--color-secondary);
    border-radius: 1px; /* bullet cuadrado */
    flex-shrink: 0;
}

.entry-content ol li { margin-bottom: 0.5rem; }

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
    overflow-x: auto;
    display: block;
}

.entry-content th {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
}

.entry-content td {
    border: 1px solid var(--color-border);
    padding: 10px 12px;
    vertical-align: top;
}

.entry-content tr:nth-child(even) td {
    background-color: var(--color-bg);
}

.entry-content blockquote {
    border-left: 4px solid var(--color-secondary);
    background-color: var(--color-accent-bg);
    padding: 16px 20px;
    margin: 1.5rem 0;
    font-style: italic;
    border-radius: 0 6px 6px 0;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }

.entry-content a {
    color: var(--color-secondary);
    text-decoration: none;
}
.entry-content a:hover { text-decoration: underline; }

.entry-content strong { color: var(--color-primary); }

.entry-content code {
    background-color: #f1f5f9;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.875rem;
    font-family: 'Courier New', Courier, monospace;
}

.entry-content pre {
    background-color: #f1f5f9;
    border-radius: 6px;
    padding: 16px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}
.entry-content pre code {
    background: none;
    padding: 0;
    font-size: 0.875rem;
}

.entry-content img {
    border-radius: 6px;
    margin-bottom: 1rem;
}

/* ─────────────────────────────────────────────────────
   AVISO LEGAL
───────────────────────────────────────────────────── */

.aviso-legal {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background-color: var(--color-warning-bg);
    border-left: 4px solid var(--color-warning-border);
    border-radius: 6px;
    padding: 16px 20px;
    margin-top: 2rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #78350f;
}

.aviso-legal__icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    line-height: 1.4;
}

.aviso-legal p { margin: 0; color: inherit; }

/* ─────────────────────────────────────────────────────
   ARTÍCULOS RELACIONADOS
───────────────────────────────────────────────────── */

.related-posts {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.related-posts__title {
    font-size: 1.1875rem;
    color: var(--color-primary);
    margin-bottom: 16px;
}

/* ─────────────────────────────────────────────────────
   SIDEBAR
───────────────────────────────────────────────────── */

.site-sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    position: sticky;
    top: 80px; /* 64px header + 16px margen */
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-widget {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 20px;
}

.sidebar-widget__title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border);
}

/* Buscador en sidebar */
.sidebar-search .search-form__inner {
    display: flex;
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}
.sidebar-search .search-form__inner:focus-within {
    border-color: var(--color-secondary);
}
.sidebar-search .search-form__input {
    flex: 1;
    border: none;
    padding: 8px 12px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: var(--color-text);
    outline: none;
    background: transparent;
}
.sidebar-search .search-form__submit {
    background: none;
    border: none;
    padding: 8px 10px;
    cursor: pointer;
    color: var(--color-text-muted);
    display: flex;
}
.sidebar-search .search-form__submit:hover { color: var(--color-secondary); }

/* Ad slot sin borde en sidebar */
.sidebar-widget:has(.ad-slot) {
    padding: 0;
    border: none;
    background: transparent;
}

/* Categorías en sidebar */
.sidebar-categories__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-categories__item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 8px;
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--color-text);
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.sidebar-categories__item a:hover {
    background-color: var(--color-accent-bg);
    color: var(--color-secondary);
}

.sidebar-categories__count {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    background-color: var(--color-bg);
    padding: 2px 7px;
    border-radius: 100px;
}

/* ─────────────────────────────────────────────────────
   BUSCADOR GLOBAL (searchform.php)
───────────────────────────────────────────────────── */

.search-form__inner {
    display: flex;
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--color-white);
    transition: border-color 0.2s ease;
}
.search-form__inner:focus-within {
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(45, 125, 210, 0.15);
}
.search-form__input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: var(--color-text);
    outline: none;
    background: transparent;
}
.search-form__input::placeholder { color: var(--color-text-muted); }
.search-form__submit {
    padding: 0 16px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    height: 100%;
    transition: color 0.15s ease;
}
.search-form__submit:hover { color: var(--color-secondary); }

/* ─────────────────────────────────────────────────────
   PILLAR PAGE
───────────────────────────────────────────────────── */

.pillar-layout {
    display: flex;
    position: relative;
    padding-top: 40px;
    padding-bottom: 80px;
}

.pillar-content { flex: 1; }

.pillar-post { }

.pillar-header { margin-bottom: 28px; }
.pillar-header .badge--pillar { margin-bottom: 14px; }

/* H2 en pillar: offset para el header sticky */
.entry-content--pillar h2 { scroll-margin-top: 80px; }

/* TOC lateral */
.toc-sidebar {
    position: fixed;
    left: max(20px, calc(50% - var(--content-max-width) / 2 - 220px));
    top: 120px;
    width: 200px;
    display: none; /* visible solo en > 1200px via responsive.css */
}

.toc {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 16px;
}

.toc__title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
}

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

.toc__list a {
    display: block;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    line-height: 1.4;
    transition: color 0.15s ease, background-color 0.15s ease;
}
.toc__list a:hover { color: var(--color-secondary); background-color: var(--color-accent-bg); }
.toc__list .toc-active a {
    color: var(--color-secondary);
    font-weight: 600;
}

/* ─────────────────────────────────────────────────────
   CATEGORÍAS — HEADER
───────────────────────────────────────────────────── */

.category-hero {
    background-color: var(--color-accent-bg);
    padding: 40px 0;
    margin-bottom: 0;
}

.category-hero__title {
    margin-bottom: 12px;
    font-size: 2rem;
}

.category-hero__desc {
    font-size: 1rem;
    color: var(--color-text-muted);
    max-width: 600px;
}

.archive-header {
    padding: 40px 0 20px;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 32px;
}

.archive-title { margin-bottom: 8px; }

/* ─────────────────────────────────────────────────────
   PAGINACIÓN
───────────────────────────────────────────────────── */

.pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.pagination__list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    margin: 0;
}

.pagination__list .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text);
    background: var(--color-white);
    border: 1px solid var(--color-border);
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.pagination__list .page-numbers:hover {
    border-color: var(--color-secondary);
    color: var(--color-secondary);
}
.pagination__list .page-numbers.current {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}
.pagination__list .dots { border: none; background: none; cursor: default; }
.pagination__list .dots:hover { color: var(--color-text); }

/* ─────────────────────────────────────────────────────
   404
───────────────────────────────────────────────────── */

.error-404 {
    text-align: center;
    padding: 80px 0;
}

.error-404__icon {
    color: var(--color-border);
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
}

.error-404__title {
    font-size: 1.75rem;
    margin-bottom: 16px;
}

.error-404__desc {
    color: var(--color-text-muted);
    font-size: 1.0625rem;
    max-width: 520px;
    margin: 0 auto 28px;
}

.error-404__search {
    max-width: 480px;
    margin: 0 auto 24px;
}

.error-404__links { margin-bottom: 40px; }

.error-404__pilares-title {
    font-size: 1.125rem;
    margin-bottom: 16px;
}

.pilares-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

/* ─────────────────────────────────────────────────────
   SHORTCODES
───────────────────────────────────────────────────── */

/* [descargable] */
.shortcode-descargable {
    display: flex;
    align-items: center;
    gap: 16px;
    background-color: var(--color-accent-bg);
    border-radius: 8px;
    padding: 20px;
    margin: 1.5rem 0;
    border: 1px solid #c3dff0;
}

.shortcode-descargable__icon {
    color: var(--color-secondary);
    flex-shrink: 0;
}

.shortcode-descargable__info { flex: 1; }

.shortcode-descargable__texto {
    font-weight: 600;
    color: var(--color-primary);
    margin: 0 0 4px;
    font-size: 0.9375rem;
}

.shortcode-descargable__formato {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* [faq] — acordeón */
.faq-item {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--color-white);
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-primary);
    line-height: 1.4;
    transition: background-color 0.15s ease;
}
.faq-question:hover { background-color: var(--color-accent-bg); }
.faq-question[aria-expanded="true"] { background-color: var(--color-accent-bg); }

/* Icono +/- con CSS puro */
.faq-question__icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    position: relative;
    color: var(--color-secondary);
}
.faq-question__icon::before,
.faq-question__icon::after {
    content: '';
    position: absolute;
    background-color: currentColor;
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.faq-question__icon::before {
    width: 14px; height: 2px;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}
.faq-question__icon::after {
    width: 2px; height: 14px;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}
.faq-question[aria-expanded="true"] .faq-question__icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
    opacity: 0;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.faq-answer.is-open { max-height: 600px; }

.faq-answer__inner {
    padding: 0 20px 20px;
    font-size: 0.9375rem;
    color: var(--color-text);
    line-height: 1.7;
    border-top: 1px solid var(--color-border);
    padding-top: 16px;
}
.faq-answer__inner p:last-child { margin: 0; }

/* ─────────────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────────────── */

.site-footer {
    background-color: var(--color-primary);
    color: rgba(255, 255, 255, 0.8);
    margin-top: auto;
}

.site-footer__body {
    padding: 48px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
}

.footer-logo {
    display: inline-flex;
    flex-direction: column;
    text-decoration: none;
    margin-bottom: 16px;
}

.footer-logo__name {
    font-family: 'Merriweather', Georgia, serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--color-white);
    line-height: 1.2;
}

.footer-logo__tagline {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-col__desc,
.footer-col__disclaimer {
    font-size: 0.875rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.footer-col__title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-white);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.footer-col__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-col__list a {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.15s ease;
}
.footer-col__list a:hover { color: var(--color-white); }

/* Barra inferior del footer */
.site-footer__bar {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px 0;
}

.site-footer__bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bar__copy,
.footer-bar__credits {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.footer-bar__credits a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: underline;
}
.footer-bar__credits a:hover { color: var(--color-white); }

/* ─────────────────────────────────────────────────────
   PILLAR CARD (usada en archivos si se filtra por tipo)
───────────────────────────────────────────────────── */

.pillar-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.pillar-card:hover {
    border-color: var(--color-secondary);
    box-shadow: 0 4px 16px rgba(45, 125, 210, 0.1);
}

.pillar-card__link {
    display: block;
    padding: 24px;
    text-decoration: none;
    color: inherit;
}

.pillar-card .badge--pillar { margin-bottom: 12px; }

.pillar-card__title {
    font-size: 1.125rem;
    color: var(--color-primary);
    margin-bottom: 10px;
    line-height: 1.35;
}

.pillar-card__excerpt {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: 14px;
}

.pillar-card__meta {
    display: flex;
    gap: 12px;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}
