/* ─── Blog Post — Estilos del artículo ──────────────────────── */

/* Ajuste para header fijo */
.blog-layout {
    padding-top: 78px;
}

@media (max-width: 768px) {
    .blog-layout {
        padding-top: 68px;
    }
}

.article-placeholder {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 20px;
    color: #ddd;
}

.article-placeholder h1 {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 16px;
}

.article-placeholder p {
    color: #aaa;
    line-height: 1.75;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: #00d4ff;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: #444;
}

/* Cabecera del artículo */
.post-article {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
}

.post-header {
    margin-bottom: 32px;
}

.post-tags-header {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.post-header h1 {
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    color: #fff;
    line-height: 1.3;
    margin: 0 0 16px;
}

.post-lead {
    font-size: 1.1rem;
    color: #aaa;
    line-height: 1.7;
    margin-bottom: 20px;
}

/* Índice */
.toc {
    display: block;
    background: #0e0e2a;
    border: 1px solid #1e1e3e;
    border-left: 4px solid #00d4ff;
    border-radius: 10px;
    padding: 24px 28px;
    margin-bottom: 40px;
    line-height: 1.4;
}

.toc h2 {
    color: #00d4ff;
    font-size: 1rem;
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.toc ol {
    margin: 0;
    padding-left: 20px;
}

.toc li {
    padding: 2px 0;
}

.toc a {
    color: #ccc;
    text-decoration: none;
    font-size: 0.92rem;
}

.toc a:hover {
    color: #00d4ff;
}

/* Cuerpo del artículo */
.post-body {
    color: #ddd;
    line-height: 1.8;
    font-size: 1rem;
}

.post-body h2 {
    font-size: 1.5rem;
    color: #fff;
    margin: 48px 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #1e1e3e;
}

.post-body h3 {
    font-size: 1.15rem;
    color: #e0e0f0;
    margin: 28px 0 10px;
}

.post-body p {
    margin: 0 0 18px;
}

.post-body ul,
.post-body ol {
    padding-left: 24px;
    margin-bottom: 18px;
}

.post-body li {
    padding: 5px 0;
}

.post-body a {
    color: #00d4ff;
    text-decoration: none;
}

.post-body a:hover {
    text-decoration: underline;
}

.post-body code {
    background: #1a1a3e;
    color: #00d4ff;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'Courier New', monospace;
}

/* Bloque de código */
.code-block {
    background: #0a0a1e;
    border: 1px solid #1e1e3e;
    border-radius: 10px;
    overflow: hidden;
    margin: 24px 0;
}

.code-header {
    background: #111130;
    padding: 10px 18px;
    font-size: 0.82rem;
    color: #666;
    border-bottom: 1px solid #1e1e3e;
    font-family: 'Courier New', monospace;
}

.code-block pre {
    margin: 0;
    padding: 20px 18px;
    overflow-x: auto;
}

.code-block code {
    background: transparent;
    color: #a0e0ff;
    padding: 0;
    font-size: 0.92rem;
    line-height: 1.6;
}

/* Info box */
.info-box {
    background: #0e1a2e;
    border: 1px solid #00d4ff33;
    border-left: 4px solid #00d4ff;
    border-radius: 8px;
    padding: 16px 20px;
    margin: 24px 0;
    color: #ccc;
    font-size: 0.95rem;
}

.info-box.success {
    background: #0a1e0e;
    border-color: #00ff8833;
    border-left-color: #00d46a;
}

.info-box strong {
    display: block;
    margin-bottom: 6px;
}

/* Tarjetas de proyectos */
.project-card {
    display: flex;
    gap: 20px;
    background: #0e0e2a;
    border: 1px solid #1e1e3e;
    border-radius: 10px;
    padding: 20px;
    margin: 16px 0;
    transition: border-color .2s;
}

.project-card:hover {
    border-color: #00d4ff44;
}

.project-number {
    font-size: 2rem;
    font-weight: 700;
    color: #2A146E;
    min-width: 48px;
    line-height: 1;
}

.project-content h3 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 1.05rem;
}

.project-content p {
    margin: 0 0 10px;
    color: #999;
    font-size: 0.9rem;
    line-height: 1.5;
}

.project-difficulty {
    font-size: 0.82rem;
    color: #666;
}

/* Tabla info */
.info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.92rem;
}

.info-table th {
    background: #111130;
    color: #00d4ff;
    padding: 10px 16px;
    text-align: left;
    border-bottom: 2px solid #1e1e3e;
}

.info-table td {
    padding: 10px 16px;
    border-bottom: 1px solid #1a1a3a;
    color: #ccc;
}

.info-table tr:hover td {
    background: #0e0e2a;
}

/* FAQ */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.faq-item {
    background: #0e0e2a;
    border: 1px solid #1e1e3e;
    border-radius: 10px;
    padding: 20px 24px;
}

.faq-item h3 {
    color: #e0e0f0;
    font-size: 1rem;
    margin: 0 0 10px;
}

.faq-item p {
    color: #999;
    font-size: 0.92rem;
    line-height: 1.6;
    margin: 0;
}

/* CTA final */
.post-cta {
    background: linear-gradient(135deg, #150d3b, #0a1a2e);
    border: 1px solid #2A146E;
    border-radius: 14px;
    padding: 40px 32px;
    text-align: center;
    margin: 48px 0 32px;
}

.post-cta h2 {
    color: #fff;
    font-size: 1.6rem;
    margin: 0 0 14px;
    border: none;
    padding: 0;
}

.post-cta p {
    color: #aaa;
    margin-bottom: 24px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-block;
    padding: 14px 32px;
    background: linear-gradient(135deg, #2A146E, #00d4ff);
    color: #fff;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    transition: opacity .2s, transform .2s;
}

.cta-button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    text-decoration: none;
}

.cta-note {
    font-size: 0.82rem;
    color: #555;
    margin-top: 14px;
    margin-bottom: 0;
}

/* Navegación entre posts */
.post-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    border-top: 1px solid #1e1e3e;
    gap: 16px;
    flex-wrap: wrap;
}

.nav-prev,
.nav-next {
    color: #00d4ff;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
}

.nav-prev:hover,
.nav-next:hover {
    text-decoration: underline;
}

/* ─── Responsive ────────────────────────────────────────────── */

@media (max-width: 600px) {
    .post-article {
        max-width: 100%;
    }

    .post-header h1 {
        font-size: 1.5rem;
    }

    .project-card {
        flex-direction: column;
        gap: 10px;
    }

    .project-number {
        font-size: 1.4rem;
    }

    .post-cta {
        padding: 28px 20px;
    }

    .post-navigation {
        flex-direction: column;
        text-align: center;
    }
}
