/* ============================================================
   HONESTIA CONNECT — BLOG & ARTICLE SSR TEMPLATE
   Modularized External Stylesheet
   ============================================================ */

/* ── Performance Improvements ── */
        .blog-comments-section, .blog-post-content {
            content-visibility: auto;
            contain-intrinsic-size: 0 500px;
        }
        :root {
            --primary: #2563eb;
            --primary-light: #eff6ff;
            --content-width: 740px;
            --toc-width: 220px;
        }

        body {
            font-family: 'Outfit', sans-serif;
            background: #f9fafb;
        }
        .dark body { background: #0a0a0f; }

        /* ── Reading Progress Bar ── */
        #reading-progress {
            position: fixed;
            top: 0;
            left: 0;
            width: 0%;
            height: 3px;
            background: linear-gradient(90deg, #2563eb, #6366f1);
            z-index: 9999;
            transition: width 0.1s linear;
            border-radius: 0 2px 2px 0;
        }

        /* ══════════════════════════════════════════
           LAYOUT CENTRADO (nuevo default)
        ══════════════════════════════════════════ */
        .blog-centered-layout {
            max-width: var(--content-width);
            margin: 0 auto;
            padding: 2.5rem 1.5rem 5rem;
            box-sizing: border-box;
            width: 100%;
        }

        /* ── Hero Cover Image ── */
        .blog-cover-wrapper {
            width: 100%;
            max-width: 1100px;
            margin: 0 auto 3rem;
            padding: 0 1.5rem;
            box-sizing: border-box;
        }
        .blog-cover-img {
            width: 100%;
            aspect-ratio: 16/9;
            max-height: 480px;
            object-fit: cover;
            border-radius: 20px;
            display: block;
            box-shadow: 0 20px 60px rgba(0,0,0,0.12);
        }
        .dark .blog-cover-img {
            box-shadow: 0 20px 60px rgba(0,0,0,0.5);
        }

        @media (max-width: 768px) {
            .blog-centered-layout {
                padding: 1.75rem 1.25rem 3.5rem !important;
            }
            .blog-cover-wrapper {
                padding: 0 !important;
                margin-bottom: 2rem !important;
            }
            .blog-cover-img {
                border-radius: 14px !important;
                aspect-ratio: 16/9 !important;
            }
        }

        /* ── Breadcrumb ── */
        .breadcrumb {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.75rem;
            font-weight: 600;
            color: #94a3b8;
            margin-bottom: 1.75rem;
        }
        .breadcrumb a { color: #64748b; text-decoration: none; transition: color 0.2s; }
        .breadcrumb a:hover { color: #2563eb; }
        .dark .breadcrumb a { color: #94a3b8; }

        /* ── Tags ── */
        .blog-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin-bottom: 1.25rem;
        }
        .blog-tag {
            font-size: 0.65rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            padding: 0.3rem 0.85rem;
            border-radius: 999px;
            background: #eff6ff;
            color: #1d4ed8;
            text-decoration: none;
            transition: background 0.2s;
        }
        .blog-tag:hover { background: #dbeafe; }
        .dark .blog-tag { background: #1e3a5f; color: #93c5fd; }

        /* ── Post Title ── */
        .blog-post-title {
            font-size: clamp(2rem, 5vw, 3.25rem);
            font-weight: 900;
            color: #0f172a;
            line-height: 1.15;
            letter-spacing: -0.035em;
            margin-bottom: 1.25rem;
        }
        .dark .blog-post-title { color: #f1f5f9; }

        /* ── Excerpt ── */
        .blog-post-excerpt {
            font-size: 1.2rem;
            color: #475569;
            line-height: 1.65;
            margin-bottom: 2rem;
            font-weight: 400;
        }
        .dark .blog-post-excerpt { color: #94a3b8; }

        /* ── Meta Row (author + share) ── */
        .blog-meta-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 1rem;
            padding: 1.25rem 0;
            border-top: 1px solid #f1f5f9;
            border-bottom: 1px solid #f1f5f9;
            margin-bottom: 2.5rem;
            flex-wrap: wrap;
        }
        .dark .blog-meta-row { border-color: #1e293b; }

        .blog-author-info {
            display: flex;
            align-items: center;
            gap: 0.875rem;
        }
        .author-avatar-img {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            object-fit: cover;
        }
        .author-avatar-letter {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            background: linear-gradient(135deg, #4f46e5, #2563eb);
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 800;
            font-size: 1rem;
            flex-shrink: 0;
        }
        .author-name {
            font-size: 0.9rem;
            font-weight: 700;
            color: #0f172a;
            line-height: 1.2;
        }
        .dark .author-name { color: #f1f5f9; }
        .author-meta {
            font-size: 0.78rem;
            color: #64748b;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin-top: 0.1rem;
            flex-wrap: wrap;
        }
        .meta-dot { color: #cbd5e1; }
        .read-time-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.3rem;
            font-size: 0.72rem;
            font-weight: 600;
            color: #64748b;
            background: #f1f5f9;
            padding: 0.2rem 0.6rem;
            border-radius: 999px;
        }
        .dark .read-time-badge { background: #1e293b; color: #94a3b8; }

        /* ── Share Buttons (inline, compact) ── */
        .share-inline {
            display: flex;
            align-items: center;
            gap: 0.375rem;
        }
        .share-btn-sm {
            width: 34px;
            height: 34px;
            border-radius: 10px;
            border: 1.5px solid #e2e8f0;
            background: #fff;
            color: #64748b;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s;
        }
        .share-btn-sm:hover {
            background: #eff6ff;
            border-color: #2563eb;
            color: #2563eb;
        }
        .dark .share-btn-sm {
            background: #18181b;
            border-color: #27272a;
            color: #94a3b8;
        }
        .dark .share-btn-sm:hover {
            background: #1e3a5f;
            border-color: #3b82f6;
            color: #3b82f6;
        }
        .share-btn-sm.copied {
            background: #ecfdf5;
            border-color: #10b981;
            color: #10b981;
        }

        /* ── TOC Floating (Encapsulated, only on screens >= 1540px with ample margin) ── */
        .blog-toc-float {
            display: none;
            background: rgba(255, 255, 255, 0.94);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border: 1px solid rgba(226, 232, 240, 0.85);
            border-radius: 1.25rem;
            padding: 1.25rem;
            box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.06);
            z-index: 30;
            box-sizing: border-box;
        }
        .dark .blog-toc-float {
            background: rgba(15, 23, 42, 0.94);
            border-color: rgba(30, 41, 59, 0.85);
            box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.4);
        }
        @media (min-width: 1540px) {
            .blog-toc-float {
                display: block;
                position: fixed;
                top: 120px;
                left: calc(50% + (var(--content-width) / 2) + 2.5rem);
                width: var(--toc-width);
                max-height: calc(100vh - 160px);
                overflow-y: auto;
                padding-right: 0.5rem;
            }
        }
        .toc-label {
            font-size: 9px;
            font-weight: 900;
            letter-spacing: 0.15em;
            color: #94a3b8;
            text-transform: uppercase;
            margin-bottom: 1rem;
        }
        .toc-nav { display: flex; flex-direction: column; gap: 0.5rem; }
        .toc-link {
            font-size: 0.78rem;
            color: #64748b;
            text-decoration: none !important;
            line-height: 1.4;
            transition: all 0.2s ease;
            border-left: 2px solid transparent;
            padding-left: 0.75rem;
            font-weight: 500;
            display: inline-block;
            width: 100%;
        }
        .toc-link:hover { color: #2563eb; border-left-color: #cbd5e1; }
        .toc-link.active {
            color: #2563eb;
            font-weight: 700;
            border-left-color: #2563eb;
        }
        .toc-link.toc-h3 { padding-left: 1.25rem; font-size: 0.73rem; border-left: 1px solid #f1f5f9; margin-left: 0.5rem; }
        .dark .toc-link.toc-h3 { border-left-color: #1e293b; }
        .dark .toc-link { color: #94a3b8; }
        .dark .toc-link:hover { color: #3b82f6; }
        .dark .toc-link.active { color: #3b82f6; border-left-color: #3b82f6; }

        /* ── Collapsible TOC Groups ── */
        .toc-group {
            display: flex;
            flex-direction: column;
            width: 100%;
        }
        .toc-group-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            width: 100%;
            gap: 4px;
        }
        .toc-group-header .toc-link {
            flex: 1;
            min-width: 0;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .toc-toggle-btn {
            background: none;
            border: none;
            cursor: pointer;
            color: #94a3b8;
            padding: 2px 6px;
            font-size: 0.65rem;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s;
            border-radius: 4px;
            height: 24px;
            width: 24px;
        }
        .toc-toggle-btn:hover {
            color: #2563eb;
            background: rgba(37, 99, 237, 0.05);
        }
        .dark .toc-toggle-btn:hover {
            color: #3b82f6;
            background: rgba(255, 255, 255, 0.05);
        }
        .toc-toggle-btn.expanded {
            transform: rotate(180deg);
        }
        .toc-sub-nav {
            display: flex;
            flex-direction: column;
            gap: 0.35rem;
            margin-top: 0.15rem;
            margin-bottom: 0.15rem;
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
            opacity: 0;
        }
        .toc-sub-nav.expanded {
            max-height: 800px;
            opacity: 1;
        }

        /* ── Article Body ── */
        .blog-post-content {
            font-family: 'Lora', Georgia, serif;
            font-size: 1.1rem;
            line-height: 1.9;
            color: #1e293b;
        }
        .dark .blog-post-content { color: #cbd5e1; }

        .blog-post-content h1,
        .blog-post-content h2,
        .blog-post-content h3,
        .blog-post-content h4 {
            font-family: 'Outfit', sans-serif;
            font-weight: 800;
            color: #0f172a;
            letter-spacing: -0.025em;
            margin: 2.75rem 0 1rem;
            line-height: 1.2;
        }
        .dark .blog-post-content h1,
        .dark .blog-post-content h2,
        .dark .blog-post-content h3,
        .dark .blog-post-content h4 { color: #f1f5f9; }

        .blog-post-content h2 { font-size: 1.6rem; }
        .blog-post-content h3 { font-size: 1.3rem; }
        .blog-post-content h4 { font-size: 1.1rem; }

        .blog-post-content p { margin-bottom: 1.6rem; }

        .blog-post-content img {
            max-width: 100%;
            border-radius: 18px;
            margin: 2rem auto;
            display: block;
            box-shadow: 0 8px 32px rgba(0,0,0,0.1);
        }

        .blog-post-content a {
            color: #2563eb;
            text-decoration: underline;
            text-underline-offset: 3px;
        }
        .dark .blog-post-content a { color: #60a5fa; }

        .blog-post-content blockquote {
            border-left: 4px solid #2563eb;
            padding: 1rem 1.5rem;
            background: #eff6ff;
            border-radius: 0 16px 16px 0;
            margin: 2rem 0;
            font-style: italic;
            color: #1d4ed8;
            font-size: 1.05rem;
        }
        .dark .blog-post-content blockquote { background: #1e3a5f; color: #93c5fd; }

        .blog-post-content pre {
            background: #0f172a;
            color: #e2e8f0;
            padding: 1.5rem;
            border-radius: 16px;
            overflow-x: auto;
            font-size: 0.875rem;
            line-height: 1.7;
            margin: 2rem 0;
        }
        .dark .blog-post-content pre { background: #1c1c1e; }

        .blog-post-content code {
            font-family: 'Courier New', monospace;
            background: #f1f5f9;
            padding: 0.15rem 0.4rem;
            border-radius: 6px;
            font-size: 0.875em;
            color: #1e40af;
        }
        .dark .blog-post-content code { background: #27272a; color: #93c5fd; }

        .blog-post-content ul,
        .blog-post-content ol {
            padding-left: 1.5rem;
            margin-bottom: 1.5rem;
        }
        .blog-post-content li { margin-bottom: 0.5rem; }

        /* ── Premium Content Boxes (preserved) ── */
        .blog-post-content .blog-info-box {
            background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
            border: 1px solid #dbeafe;
            border-left: 5px solid #2563eb;
            border-radius: 20px;
            padding: 1.5rem 1.75rem;
            margin: 2.5rem 0;
            color: #1e3a8a;
        }
        .dark .blog-post-content .blog-info-box {
            background: linear-gradient(135deg, #111115 0%, #1e1b4b 100%);
            border-color: #312e81;
            border-left-color: #4f46e5;
            color: #cbd5e1;
        }
        .blog-post-content .blog-warning-box {
            background: linear-gradient(135deg, #fffbeb 0%, #fff7ed 100%);
            border: 1px solid #fed7aa;
            border-left: 5px solid #f97316;
            border-radius: 20px;
            padding: 1.5rem 1.75rem;
            margin: 2.5rem 0;
            color: #7c2d12;
        }
        .dark .blog-post-content .blog-warning-box {
            background: linear-gradient(135deg, #1c1917 0%, #2e1509 100%);
            border-color: #7c2d12;
            border-left-color: #f97316;
            color: #fed7aa;
        }
        .blog-post-content .blog-grid-2col {
            display: grid;
            grid-template-columns: 1fr;
            gap: 1.5rem;
            margin: 2.5rem 0;
        }
        @media (min-width: 640px) {
            .blog-post-content .blog-grid-2col { grid-template-columns: 1fr 1fr; }
        }
        .blog-post-content .blog-grid-item {
            background: #fff;
            border: 1px solid #f1f5f9;
            border-radius: 20px;
            padding: 1.5rem;
        }
        .dark .blog-post-content .blog-grid-item { background: #18181b; border-color: #27272a; }

        .blog-post-content .blog-checklist { list-style: none; padding-left: 0 !important; }
        .blog-post-content .blog-checklist li { position: relative; padding-left: 1.75rem; margin-bottom: 0.75rem; }
        .blog-post-content .blog-checklist li::before {
            content: '✓'; position: absolute; left: 0; top: 0.1rem;
            font-weight: 900; color: #10b981; font-size: 1.1rem;
        }

        /* ── CTA Inline (al final del artículo) ── */
        .blog-cta-section {
            margin: 3.5rem 0 2rem;
            border-radius: 24px;
            overflow: hidden;
            background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
            border: 1px solid rgba(0, 0, 0, 0.08);
            padding: 2.5rem 2rem;
            color: #1e293b;
            position: relative;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
            transition: all 0.3s ease;
        }
        .dark .blog-cta-section {
            background: linear-gradient(135deg, #0b0b0f 0%, #121218 100%);
            border-color: rgba(255, 255, 255, 0.08);
            color: #cbd5e1;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        }
        .blog-cta-section::before {
            content: '';
            position: absolute;
            top: -60px; right: -60px;
            width: 220px; height: 220px;
            background: radial-gradient(circle, rgba(0, 113, 227, 0.08) 0%, transparent 70%);
            border-radius: 50%;
            pointer-events: none;
        }
        .dark .blog-cta-section::before {
            background: radial-gradient(circle, rgba(0, 113, 227, 0.15) 0%, transparent 70%);
        }
        .blog-cta-logo {
            height: 28px;
            width: auto;
            display: block;
            transition: filter 0.4s ease;
        }
        .dark .blog-cta-logo {
            filter: brightness(0) invert(1);
        }
        .blog-cta-eyebrow {
            font-size: 0.65rem;
            font-weight: 800;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            color: #0071e3;
            display: inline-block;
            background: rgba(0, 113, 227, 0.06);
            padding: 0.25rem 0.75rem;
            border-radius: 999px;
            font-family: 'Outfit', sans-serif;
        }
        .dark .blog-cta-eyebrow {
            color: #3b82f6;
            background: rgba(59, 130, 246, 0.15);
        }
        .blog-cta-title {
            font-family: 'Outfit', sans-serif;
            font-size: clamp(1.35rem, 3vw, 1.75rem);
            font-weight: 800;
            color: #0f172a;
            margin-bottom: 0.75rem;
            line-height: 1.2;
            letter-spacing: -0.02em;
        }
        .dark .blog-cta-title {
            color: #ffffff;
        }
        .blog-cta-desc {
            font-size: 0.9rem;
            color: #475569;
            line-height: 1.65;
            margin-bottom: 1.5rem;
            font-family: 'Outfit', sans-serif;
        }
        .dark .blog-cta-desc {
            color: #94a3b8;
        }
        .blog-cta-btn {
            display: inline-block;
            background: #0071e3;
            color: #fff !important;
            text-decoration: none !important;
            padding: 0.75rem 1.75rem;
            border-radius: 999px;
            font-family: 'Outfit', sans-serif;
            font-weight: 700;
            font-size: 0.85rem;
            letter-spacing: 0.02em;
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            border: none;
            cursor: pointer;
            box-shadow: 0 4px 12px rgba(0, 113, 227, 0.15);
        }
        .blog-cta-btn:hover {
            background: #0077ed;
            transform: translateY(-1px);
            box-shadow: 0 6px 16px rgba(0, 113, 227, 0.3);
        }

        /* ── Related Course Card (Encapsulated CSS, Zero-Tailwind Dependency) ── */
        .blog-related-course-wrapper {
            background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
            border: 1px solid rgba(226, 232, 240, 0.9);
            border-radius: 24px;
            padding: 2rem;
            margin: 3rem 0 2rem;
            display: grid;
            grid-template-columns: 1fr;
            gap: 2rem;
            align-items: center;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
            box-sizing: border-box;
            width: 100%;
            overflow: hidden;
        }
        @media (min-width: 768px) {
            .blog-related-course-wrapper.layout-centered {
                grid-template-columns: 1.1fr 0.9fr;
            }
        }
        .dark .blog-related-course-wrapper {
            background: linear-gradient(135deg, #0f172a 0%, #0b0f19 100%);
            border-color: rgba(30, 41, 59, 0.9);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        }
        .blog-related-eyebrow {
            display: inline-flex;
            align-items: center;
            gap: 0.375rem;
            font-size: 0.65rem;
            font-weight: 800;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            color: #4f46e5;
            background: #eef2ff;
            padding: 0.3rem 0.75rem;
            border-radius: 999px;
            margin-bottom: 0.75rem;
            font-family: 'Outfit', sans-serif;
        }
        .dark .blog-related-eyebrow {
            background: rgba(79, 70, 229, 0.2);
            color: #a5b4fc;
        }
        .blog-related-title {
            font-family: 'Outfit', sans-serif;
            font-size: 1.35rem;
            font-weight: 800;
            color: #0f172a;
            margin: 0 0 0.5rem;
            line-height: 1.25;
        }
        .dark .blog-related-title { color: #f8fafc; }
        .blog-related-desc {
            font-size: 0.88rem;
            color: #64748b;
            line-height: 1.6;
            margin: 0;
            font-family: 'Outfit', sans-serif;
        }
        .dark .blog-related-desc { color: #94a3b8; }
        .blog-related-card-container {
            width: 100%;
            max-width: 320px;
            margin: 0 auto;
        }
        .blog-related-card-container .course-card {
            display: flex;
            flex-direction: column;
            background: #ffffff;
            border: 1px solid #f1f5f9;
            border-radius: 1.5rem;
            overflow: hidden;
            text-decoration: none !important;
            color: inherit;
            box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
            transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
            width: 100%;
            box-sizing: border-box;
        }
        .blog-related-card-container .course-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.12);
        }
        .dark .blog-related-card-container .course-card {
            background: #18181b;
            border-color: #27272a;
            box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
        }
        .blog-related-card-container .course-card img {
            width: 100%;
            aspect-ratio: 16/9;
            object-fit: cover;
            display: block;
        }

        /* ── Divider ── */
        .blog-divider {
            border: none;
            border-top: 1px solid #f1f5f9;
            margin: 2.5rem 0;
        }
        .dark .blog-divider { border-color: #1e293b; }

        /* ── Comments ── */
        .blog-comments-section { margin-top: 2.5rem; }
        .blog-comments-title {
            font-size: 1.15rem;
            font-weight: 800;
            color: #0f172a;
            margin-bottom: 1.5rem;
            font-family: 'Outfit', sans-serif;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .dark .blog-comments-title { color: #f1f5f9; }

        .comment-form {
            background: #fff;
            border: 1.5px solid #e2e8f0;
            border-radius: 18px;
            padding: 1.25rem;
            margin-bottom: 2rem;
        }
        .dark .comment-form { background: #18181b; border-color: #27272a; }
        .comment-form textarea {
            width: 100%;
            border: 1.5px solid #e2e8f0;
            border-radius: 12px;
            padding: 0.875rem 1rem;
            font-family: 'Outfit', sans-serif;
            font-size: 0.9rem;
            resize: vertical;
            min-height: 100px;
            outline: none;
            transition: border-color 0.2s;
            background: #f8fafc;
            box-sizing: border-box;
        }
        .comment-form textarea:focus { border-color: #2563eb; }
        .dark .comment-form textarea { background: #27272a; border-color: #3f3f46; color: #e4e4e7; }
        .comment-submit-btn {
            margin-top: 0.75rem;
            padding: 0.625rem 1.5rem;
            background: #2563eb;
            color: #fff;
            border: none;
            border-radius: 999px;
            font-weight: 700;
            font-size: 0.875rem;
            cursor: pointer;
            transition: background 0.2s;
        }
        .comment-submit-btn:hover { background: #1d4ed8; }
        .comment-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }
        .comment-item {
            display: flex;
            gap: 1rem;
            padding: 1rem 0;
            border-bottom: 1px solid #f1f5f9;
        }
        .dark .comment-item { border-color: #27272a; }
        .comment-item:last-child { border-bottom: none; }
        .comment-avatar {
            width: 36px; height: 36px; border-radius: 50%;
            background: #4f46e5; color: #fff;
            display: flex; align-items: center; justify-content: center;
            font-weight: 700; font-size: 0.8rem; flex-shrink: 0;
        }
        .comment-body { flex: 1; }
        .comment-author { font-size: 0.85rem; font-weight: 700; color: #0f172a; }
        .dark .comment-author { color: #f1f5f9; }
        .comment-date { font-size: 0.72rem; color: #94a3b8; margin-left: 0.5rem; }
        .comment-content { font-size: 0.9rem; color: #334155; line-height: 1.6; margin-top: 0.375rem; }
        .dark .comment-content { color: #94a3b8; }

        /* ── Tailwind / dark overrides for injected CTAs ── */
        .blog-post-content div.bg-slate-900,
        .blog-post-content div.bg-zinc-900,
        .blog-post-content div.bg-blue-900,
        .blog-post-content div.bg-indigo-900 {
            background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%) !important;
            border: 1px solid #dbeafe !important;
            color: #1e3a8a !important;
        }
        .dark .blog-post-content div.bg-slate-900,
        .dark .blog-post-content div.bg-zinc-900,
        .dark .blog-post-content div.bg-blue-900,
        .dark .blog-post-content div.bg-indigo-900 {
            background: linear-gradient(135deg, #111115 0%, #1e1b4b 100%) !important;
            border: 1px solid #312e81 !important;
            color: #fff !important;
        }
        .blog-post-content a.inline-block { text-decoration: none !important; }
        .blog-post-content a.inline-block.bg-blue-600,
        .blog-post-content a.inline-block.bg-indigo-500,
        .blog-post-content a.inline-block.bg-indigo-600,
        .blog-post-content a.inline-block.bg-emerald-600 { color: #fff !important; }

        /* ══════════════════════════════════════════
           LAYOUT CLÁSICO (retrocompatibilidad)
           Activado con body.blog-layout-sidebar
        ══════════════════════════════════════════ */
        body.blog-layout-sidebar .blog-classic-wrapper {
            max-width: 1280px;
            margin: 0 auto;
            padding: 3rem 1.5rem 5rem;
            display: grid;
            grid-template-columns: 1fr;
            gap: 2.5rem;
        }
        @media (min-width: 1024px) {
            body.blog-layout-sidebar .blog-classic-wrapper {
                grid-template-columns: 240px 1fr 300px;
            }
        }
        body.blog-layout-sidebar .blog-toc-col {
            display: none;
        }
        @media (min-width: 1024px) {
            body.blog-layout-sidebar .blog-toc-col { display: block; }
        }
        body.blog-layout-sidebar .blog-toc-col .blog-toc-sticky {
            position: sticky; top: 100px;
            max-height: calc(100vh - 140px);
            overflow-y: auto; padding-right: 1rem;
            border-right: 1px solid #f1f5f9;
        }
        body.blog-layout-sidebar .toc-float-sidebar { display: none !important; }

        /* ── Related Course Card Grid (No reinventar la rueda) ── */
        .blog-related-course-wrapper {
            margin: 3.5rem 0 2rem;
            border-radius: 2.5rem;
            padding: 2.5rem;
            border: 1px solid rgba(0, 0, 0, 0.08);
            background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
            transition: all 0.3s ease;
        }
        .dark .blog-related-course-wrapper {
            border-color: rgba(255, 255, 255, 0.08);
            background: linear-gradient(135deg, #09090b 0%, #18181b 100%);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        }

        .share-bottom-box {
            background: #fff;
            border: 1px solid #f1f5f9;
            border-radius: 20px;
            padding: 1.25rem;
        }
        .dark .share-bottom-box {
            background: #18181b;
            border-color: #27272a;
        }

        /* ── SEO anti-orphan ── */
        .seo-orphan-guard { position:absolute;left:-9999px;top:-9999px;pointer-events:none; }
