/*
Theme Name: Agente SEO Core Theme
Theme URI: https://conjuntasseo.com/
Author: Centro de Mando SEO
Author URI: https://conjuntasseo.com/
Description: Theme ultra-rápido, minimalista y optimizado para E-E-A-T, Core Web Vitals, AdSense y Afiliación. Diseñado específicamente para la arquitectura de Silos, Tablas Técnicas, Consejos de Experto, Multimedia y REST API del Centro de Mando WP Automation.
Version: 4.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GPL v2 or later
Text Domain: agente-seo-theme
*/

:root {
    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    --bg-subtle: #f1f5f9;
    --text-main: #1e293b;
    --text-heading: #0f172a;
    --text-muted: #64748b;
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-soft: #eef2ff;
    --accent-emerald: #059669;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --container-max: 1200px;
    --reading-max: 840px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    font-size: 17px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

a:hover {
    color: var(--primary-hover);
}

img, iframe, video {
    max-width: 100%;
    height: auto;
    display: block;
}

.site-container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.25rem;
}

.reading-container {
    width: 100%;
    max-width: var(--reading-max);
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ==========================================================================
   HEADER & NAVIGATION (LOGO DALL-E 3 + SITE TITLE + HEADER SILOS)
   ========================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 1.5rem;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    flex-shrink: 0;
}

.site-logo-img {
    width: 42px;
    height: 42px;
    border-radius: 9px;
    object-fit: contain;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    padding: 2px;
    box-shadow: var(--shadow-sm);
}

.site-title-group {
    display: flex;
    flex-direction: column;
}

.site-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: -0.025em;
    line-height: 1.2;
    margin: 0;
}

.site-branding:hover .site-title {
    color: var(--primary);
}

.main-navigation {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    display: inline-block;
    padding: 0.45rem 0.85rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}

.nav-menu a:hover,
.nav-menu .current-menu-item > a,
.nav-menu .current-cat > a {
    color: var(--primary);
    background-color: var(--primary-soft);
}

.menu-toggle {
    display: none;
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.7rem;
    cursor: pointer;
    color: var(--text-heading);
    font-size: 1.1rem;
    line-height: 1;
}

/* ==========================================================================
   HERO SECTION & SILO PILLS (HOME & ARCHIVES)
   ========================================================================== */
.hero-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    color: #ffffff;
    padding: 3.5rem 0 3rem;
    border-bottom: 1px solid #1e293b;
    margin-bottom: 2.5rem;
}

.hero-inner {
    max-width: 860px;
    margin: 0 auto;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(79, 70, 229, 0.25);
    border: 1px solid rgba(129, 140, 248, 0.4);
    color: #c7d2fe;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: clamp(1.85rem, 4vw, 2.75rem);
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.03em;
    line-height: 1.18;
    margin: 0 0 0.85rem;
}

.hero-description {
    font-size: 1.08rem;
    color: #cbd5e1;
    max-width: 680px;
    margin: 0 auto 1.75rem;
    line-height: 1.6;
}

.silo-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.silo-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background-color: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #f8fafc;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.silo-pill:hover {
    background-color: var(--primary);
    border-color: #818cf8;
    color: #ffffff;
    transform: translateY(-1px);
}

.silo-pill-count {
    font-size: 0.72rem;
    background: rgba(15, 23, 42, 0.45);
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    color: #cbd5e1;
}

/* ==========================================================================
   POSTS GRID & CARDS
   ========================================================================== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.section-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-heading);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
    margin-bottom: 3rem;
}

.post-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: #cbd5e1;
}

.post-card-thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    background-color: #0f172a;
    overflow: hidden;
    display: block;
}

.post-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.post-card:hover .post-card-thumb img {
    transform: scale(1.04);
}

.post-card-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e293b 0%, #312e81 100%);
    color: #94a3b8;
    font-size: 2rem;
}

.post-card-body {
    padding: 1.35rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.post-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
    font-size: 0.76rem;
}

.cat-badge {
    display: inline-block;
    background-color: var(--primary-soft);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
}

.post-card-date {
    color: var(--text-muted);
    font-weight: 500;
}

.post-card-title {
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1.38;
    margin: 0 0 0.65rem;
}

.post-card-title a {
    color: var(--text-heading);
}

.post-card-title a:hover {
    color: var(--primary);
}

.post-card-excerpt {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0 0 1.1rem;
    flex: 1;
}

.post-card-readmore {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: auto;
}

/* ==========================================================================
   SINGLE ARTICLE & PAGE VIEW (OPTIMIZADO PARA EL MOTOR DE REDACCIÓN V3.5)
   ========================================================================== */
.article-wrapper {
    padding: 2.25rem 0 4rem;
}

.article-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 4vw, 3.25rem);
    box-shadow: var(--shadow-md);
}

.breadcrumbs {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 1.15rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.breadcrumbs a {
    color: var(--text-muted);
    font-weight: 500;
}

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

.entry-header {
    margin-bottom: 1.75rem;
}

.entry-title {
    font-size: clamp(1.75rem, 3.8vw, 2.45rem);
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: -0.025em;
    line-height: 1.22;
    margin: 0.6rem 0 1rem;
}

.entry-meta-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    font-size: 0.84rem;
    color: var(--text-muted);
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.entry-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.entry-featured-image {
    margin: 0 0 2rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.entry-featured-image img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
}

/* TOC (Tabla de Contenidos Automática) */
.agente-toc {
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 1.15rem 1.35rem;
    margin: 1.75rem 0 2.25rem;
}

.agente-toc summary {
    font-weight: 700;
    font-size: 0.96rem;
    color: var(--text-heading);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}

.agente-toc-list {
    margin: 0.85rem 0 0;
    padding-left: 1.15rem;
    font-size: 0.9rem;
    line-height: 1.65;
}

.agente-toc-list li {
    margin-bottom: 0.35rem;
}

.agente-toc-list li.toc-h3 {
    margin-left: 1.1rem;
    font-size: 0.85rem;
    list-style-type: circle;
}

.agente-toc-list a {
    color: #334155;
    font-weight: 500;
}

.agente-toc-list a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* ==========================================================================
   ENTRY CONTENT (ESTILOS EXACTOS PARA EL HTML GENERADO EN MAIN.JS)
   ========================================================================== */
.entry-content {
    color: var(--text-main);
    font-size: 1.0625rem;
    line-height: 1.8;
    overflow-wrap: break-word;
}

/* Primeros 2 párrafos introductorios antes del primer H2 */
.entry-content > p:first-of-type {
    font-size: 1.12rem;
    color: #0f172a;
}

.entry-content p {
    margin: 0 0 1.35rem;
}

/* Negritas inyectadas en cada párrafo */
.entry-content strong,
.entry-content b {
    color: var(--text-heading);
    font-weight: 700;
}

/* Smart Interlinking dentro de párrafos <p> */
.entry-content p a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(79, 70, 229, 0.35);
    text-underline-offset: 3px;
    transition: all 0.15s ease;
}

.entry-content p a:hover {
    color: var(--primary-hover);
    text-decoration-color: var(--primary-hover);
    background-color: var(--primary-soft);
    border-radius: 3px;
}

/* Encabezados H2 y H3 del Blueprint */
.entry-content h2 {
    font-size: clamp(1.4rem, 2.6vw, 1.75rem);
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin: 2.75rem 0 1.1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #eef2ff;
    scroll-margin-top: 90px;
}

.entry-content h3 {
    font-size: clamp(1.18rem, 2vw, 1.35rem);
    font-weight: 700;
    color: #1e293b;
    line-height: 1.38;
    margin: 2rem 0 0.85rem;
    scroll-margin-top: 90px;
}

/* Listas <ul> y <li> con inicio en <strong> */
.entry-content ul,
.entry-content ol {
    margin: 1rem 0 1.6rem 1.25rem;
    padding-left: 0.75rem;
    line-height: 1.75;
}

.entry-content ul li {
    margin-bottom: 0.65rem;
}

.entry-content ul li::marker {
    color: var(--primary);
}

/* Blockquote: Consejo de Experto (💡 Consejo de experto:) */
.entry-content blockquote {
    background-color: #f8fafc !important;
    border-left: 4px solid var(--primary) !important;
    padding: 1.1rem 1.35rem !important;
    margin: 1.65rem 0 !important;
    border-radius: 0 var(--radius-md) var(--radius-md) 0 !important;
    color: var(--text-main) !important;
    font-style: normal !important;
    box-shadow: var(--shadow-sm) !important;
}

/* Fix para wpautop dentro de blockquotes */
.entry-content blockquote p {
    margin: 0 0 0.5rem !important;
}
.entry-content blockquote p:last-child {
    margin-bottom: 0 !important;
}

/* Tablas comparativas de 4 columnas (Wrapper responsive + Zebra striping) */
.agente-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.75rem 0;
    border-radius: var(--radius-md);
}

.entry-content table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 0 !important;
    font-size: 0.94rem !important;
    min-width: 540px;
}

.entry-content table th {
    background-color: #0f172a !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    text-align: left !important;
    padding: 12px 14px !important;
    border: 1px solid #334155 !important;
}

.entry-content table td {
    padding: 12px 14px !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-main) !important;
    vertical-align: top;
}

.entry-content table tr:nth-child(even) td {
    background-color: #f8fafc !important;
}

.entry-content table tr:hover td {
    background-color: #f1f5f9 !important;
}

/* Multimedia inyectada: Imágenes Pexels y Vídeos YouTube */
.entry-content figure.wp-block-image {
    margin: 1.85rem 0 !important;
}

.entry-content figure.wp-block-image img {
    width: 100% !important;
    max-height: 480px !important;
    object-fit: cover !important;
    border-radius: 10px !important;
}

.entry-content figure.wp-block-embed {
    margin: 2rem 0 !important;
}

.entry-content .wp-block-embed__wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background: #0f172a;
}

.entry-content .wp-block-embed__wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: 0;
}

/* ==========================================================================
   CAJA DE AUTOR E-E-A-T Y ARTÍCULOS RELACIONADOS DEL SILO
   ========================================================================== */
.eeat-box {
    margin-top: 3rem;
    padding: 1.5rem;
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 1.15rem;
}

.eeat-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.eeat-info h4 {
    margin: 0 0 0.25rem;
    font-size: 0.98rem;
    color: var(--text-heading);
}

.eeat-info p {
    margin: 0;
    font-size: 0.86rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.related-section {
    margin-top: 3.5rem;
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */
.navigation.pagination .nav-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 2.5rem 0;
}

.navigation.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.85rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.navigation.pagination .page-numbers.current,
.navigation.pagination .page-numbers:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

/* ==========================================================================
   FOOTER & PÁGINAS LEGALES AUTOMÁTICAS
   ========================================================================== */
.site-footer {
    margin-top: auto;
    background-color: #0f172a;
    color: #94a3b8;
    padding: 3.5rem 0 2rem;
    border-top: 1px solid #1e293b;
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid #1e293b;
}

.footer-brand-title {
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0 0 0.65rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.footer-heading {
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.55rem;
}

.footer-links a {
    color: #94a3b8;
    font-size: 0.88rem;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-bottom {
    padding-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-size: 0.82rem;
    color: #64748b;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MOBILE & TABLET)
   ========================================================================== */
@media (max-width: 992px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .main-navigation {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: #ffffff;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-lg);
        padding: 1rem 1.25rem;
    }
    .main-navigation.is-open {
        display: block;
    }
    .nav-menu {
        flex-direction: column;
        align-items: stretch;
    }
    .nav-menu a {
        display: block;
        padding: 0.65rem 0.85rem;
    }
    .posts-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .eeat-box {
        flex-direction: column;
        text-align: center;
    }
}


/* ==========================================================================
   LAYOUT 2 COLUMNAS EN POSTS + SIDEBAR DERECHA ADSENSE (STICKY)
   ========================================================================== */
.single-layout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 2.25rem;
    align-items: start;
}

.single-main-col {
    min-width: 0;
}

.post-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 100%;
}

.sidebar-sticky-container {
    position: sticky;
    top: 92px;
    z-index: 10;
}

.sidebar-widget {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.35rem;
    box-shadow: var(--shadow-sm);
}

.sidebar-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-heading);
    margin: 0 0 1rem;
    padding-bottom: 0.65rem;
    border-bottom: 2px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.sidebar-post-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.sidebar-post-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-main);
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.35;
}

.sidebar-post-link:hover {
    color: var(--primary);
}

.sidebar-post-thumb {
    width: 54px !important;
    height: 54px !important;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
}

.sidebar-post-bullet {
    color: var(--primary);
    font-weight: 800;
}

.sidebar-silo-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.sidebar-silo-tag {
    font-size: 0.78rem;
    font-weight: 600;
    background-color: #f8fafc;
    color: #334155;
    border: 1px solid var(--border-color);
    padding: 0.35rem 0.7rem;
    border-radius: 8px;
}

.sidebar-silo-tag:hover {
    background-color: var(--primary-soft);
    color: var(--primary);
    border-color: #c7d2fe;
}

/* Tarjeta CTA Sticky por defecto (cuando aún no hay bloque manual 300x600) */
.sidebar-cta-box {
    background: linear-gradient(145deg, #0f172a 0%, #1e1b4b 100%);
    color: #ffffff;
    border-color: #312e81;
}

.sidebar-cta-badge {
    display: inline-block;
    background: rgba(79, 70, 229, 0.3);
    border: 1px solid rgba(129, 140, 248, 0.4);
    color: #c7d2fe;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    margin-bottom: 0.75rem;
}

.sidebar-cta-box h4 {
    color: #ffffff;
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
}

.sidebar-cta-box p {
    color: #cbd5e1;
    font-size: 0.84rem;
    line-height: 1.55;
    margin: 0 0 1rem;
}

.sidebar-cta-btn {
    display: block;
    text-align: center;
    background-color: var(--primary);
    color: #ffffff !important;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.6rem 1rem;
    border-radius: 8px;
}

.sidebar-cta-btn:hover {
    background-color: var(--primary-hover);
}

/* Contenedores de Anuncios AdSense (Reserva de espacio anti-CLS) */
.ad-slot-box {
    background-color: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius-md);
    padding: 0.75rem;
    text-align: center;
}

.ad-in-article {
    margin: 1.85rem 0;
}

.ad-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8;
    margin-bottom: 0.4rem;
}

.ad-slot-inner {
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ad-slot-tall {
    min-height: 600px;
}

@media (max-width: 1024px) {
    .single-layout-grid {
        grid-template-columns: 1fr;
    }
    .sidebar-sticky-container {
        position: static;
    }
}


/* ==========================================================================
   ACORDEÓN AUTOMÁTICO DE PREGUNTAS FRECUENTES (FAQ)
   ========================================================================== */
.faq-accordion-container {
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-accordion-item {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.faq-accordion-item[open] {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.faq-accordion-question {
    font-weight: 700;
    font-size: 1.02rem;
    color: var(--text-heading);
    padding: 1rem 1.25rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}

.faq-accordion-question::-webkit-details-marker {
    display: none;
}

.faq-accordion-question::after {
    content: "+";
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--primary);
    transition: transform 0.2s ease;
}

.faq-accordion-item[open] .faq-accordion-question::after {
    transform: rotate(45deg);
}

.faq-accordion-answer {
    padding: 0 1.25rem 1.25rem;
    color: var(--text-main);
    font-size: 0.98rem;
    line-height: 1.7;
    border-top: 1px solid #f1f5f9;
    background-color: #f8fafc;
}

.faq-accordion-answer p {
    margin: 0.75rem 0 0 !important;
}
