
/* =========================
   BARRA DE IDIOMA & BOTONES
========================= */
.lang-bar {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 48px;
}

.lang-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 6px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    transition: all 0.2s ease;
}

.lang-btn.active {
    border-color: var(--text);
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.lang-btn:hover:not(.active) {
    border-color: var(--text-muted);
    color: var(--text);
}

/* Control de visibilidad del artículo */
.lang-article {
    display: none;
}

.lang-article.visible {
    display: block;
}

/* =========================
   BLOQUES DE CÓDIGO Y ELEMENTOS DEL ARTÍCULO
========================= */
.section-label {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 48px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Títulos con cursivas estilizadas como tu HTML viejo */
.article-body h2 em {
    font-style: italic;
    opacity: 0.9;
}

/* Bloques de Código */
.code-block {
    background: #1a1a1a;
    border: 1px solid var(--border);
    border-radius: 6px;
    margin: 32px 0;
    padding: 18px;
    overflow-x: auto;
}

.code-block code {
    font-family: monospace;
    font-size: 14px;
    color: #e2e2e2;
    line-height: 1.5;
    display: block;
    white-space: pre;
}

/* Recuadros / Notas (Callouts) */
.callout {
    background: rgba(255, 255, 255, 0.02);
    border-left: 2px solid var(--text-muted);
    padding: 18px 24px;
    margin: 32px 0;
    border-radius: 0 6px 6px 0;
}

.callout p {
    margin-bottom: 0 !important;
    font-size: 15px;
    color: var(--text);
}

/* Cita destacada final */
.post-quote {
    text-align: center;
    font-size: 20px;
    font-style: italic;
    color: var(--text);
    margin: 56px 0;
    line-height: 1.4;
}
/* =========================
   INDIVIDUAL ARTICLE VIEW
========================= */

/* Main layout wrapper to keep reading line lengths optimized */
.article-container {
    width: 100%;
    max-width: 584px; /* Matches your home hero max-width perfectly */
    margin: 0 auto;
    padding: 72px 24px;
}

/* Category indicator above title */
.article-category {
    font-size: 14px;
    color: var(--text-muted);
    text-transform: capitalize;
    text-align: center;
    margin-bottom: 24px;
    display: block;
    letter-spacing: 0.05em;
}

/* Main title styling */
.article-title {
    font-size: 48px;
    font-weight: 400;
    line-height: 1.15;
    text-align: center;
    color: var(--text);
    margin-bottom: 24px;
}

/* Author / Meta line */
.article-author {
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 64px;
}

/* Deep layout structure for text elements */
.article-body p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    margin-bottom: 24px;
}

/* Article Subheadings */
.article-body h2 {
    font-size: 28px;
    font-weight: 400;
    line-height: 1.3;
    text-align: center;
    margin-top: 56px;
    margin-bottom: 40px;
    color: var(--text);
}

/* Image wrappers and Captions */
.article-figure {
    margin: 56px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.article-figure img {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    margin-bottom: 12px;
}

.article-caption {
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.4;
}

/* =========================
   RESPONSIVE OVERRIDES
========================= */
@media (max-width: 600px) {
    .article-container {
        padding: 40px 20px;
    }

    .article-title {
        font-size: 32px;
    }

    .article-body h2 {
        font-size: 22px;
        margin-top: 40px;
        margin-bottom: 24px;
    }
}
/* =========================
   BLOG STYLES
========================= */

/* Blog Post List Layout */
.blog-grid {
    display: flex;
    flex-direction: column;
    gap: 0px;
    margin-top: 40px;
}

.blog-card {
    text-decoration: none;
    color: inherit;
    display: block;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.blog-card:hover {
    transform: translateY(-2px);
    border-color: var(--text-muted);
}

.blog-meta {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.blog-card h3 {
    font-size: 22px;
    font-weight: 400;
    margin-bottom: 8px;
}

/* Individual Article Styles */
.article-header {
    margin-bottom: 40px;
    text-align: left;
}

.article-header h1 {
    font-size: 48px;
    margin-bottom: 16px;
}

.article-content {
    font-size: 18px;
    line-height: 1.6;
}

.article-content p {
    margin-bottom: 24px;
    font-size: 18px;
}

.article-content h2 {
    font-size: 28px;
    margin-top: 40px;
    margin-bottom: 16px;
}

/* Styling Images & Code blocks inside articles */
.article-content img {
    width: 100%;
    max-width: 100%;
    border-radius: 6px;
    margin: 32px 0;
}

.article-content pre {
    background: #1e1e1e;
    border: 1px solid var(--border);
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 24px 0;
}

.article-content code {
    font-family: monospace;
    font-size: 15px;
    color: #e2e2e2;
}
/* =========================
   TAG FILTERS
========================= */
.tag-container {
    display: flex;
    gap: 12px;
    margin-bottom: 56px;
    flex-wrap: wrap;
}

.tag {
    font-size: 14px;
    padding: 6px 16px;
    border-radius: 999px;
    text-decoration: none;
    border: 1px solid var(--text-muted);
    color: var(--text);
    transition: all 0.2s ease;
}

.tag.active {
    background: #c7c7c7;
    color: #141414;
    border-color: #c7c7c7;
}

.tag:hover:not(.active) {
    border-color: var(--text);
    opacity: 0.9;
}

/* =========================
   3-COLUMN BLOG GRID
========================= */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
    align-items: start;
}

.blog-card {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card h3 {
    font-size: 32px;
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 32px;
    color: var(--text);
}

.blog-card p {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 24px;
    /* Keeps alignment clean */
    flex-grow: 1; 
}

/* Author Section inside Card */
.author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: #444; /* Fallback */
}

.author-name {
    font-size: 14px;
    color: var(--text-muted);
}

/* Extra status text */
.coming-soon {
    grid-column: 1 / -1;
    font-size: 20px;
    color: var(--text-muted);
    margin-top: 64px;
}

/* =========================
   RESPONSIVE DESIGN
========================= */
@media (max-width: 900px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }
}

@media (max-width: 600px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    
    .blog-card h3 {
        font-size: 26px;
        margin-bottom: 16px;
    }
}

/* Mobile Responsive Adjustments */
@media (max-width: 600px) {
    .article-header h1 {
        font-size: 32px;
    }
    .article-content {
        font-size: 16px;
    }
}