/* --- BLOG LISTING --- */
.blog-header {
    padding-top: 140px;
    padding-bottom: 3rem;
    background: var(--color-bg-body);
}

.page-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 2rem;
    color: var(--color-text-main);
}

.blog-categories {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border);
}

.cat-link {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    font-weight: 500;
    padding-bottom: 1rem;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.cat-link:hover, .cat-link.active {
    color: var(--color-accent);
    border-color: var(--color-accent);
}

/* Featured Card */
.featured-section { padding-block: 3rem; }

.featured-card {
    display: grid;
    grid-template-columns: 1fr;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

@media (min-width: 992px) {
    .featured-card { grid-template-columns: 1.2fr 1fr; }
}

.featured-image {
    min-height: 300px;
    background: #e5e7eb;
}
.img-placeholder { width: 100%; height: 100%; background: linear-gradient(45deg, #1a2436, #2d3748); }

.featured-content {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tag {
    text-transform: uppercase;
    font-size: 0.75rem;
    color: var(--color-accent);
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-right: 1rem;
}

.date { color: var(--color-text-muted); font-size: 0.85rem; }

.featured-title a {
    font-size: 2rem;
    color: var(--color-text-main);
    font-weight: 800;
    line-height: 1.2;
    display: block;
    margin-block: 1rem;
}

.featured-title a:hover { color: var(--color-accent); }

.featured-excerpt {
    color: var(--color-text-muted);
    margin-bottom: 2rem;
}

/* Post Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding-bottom: 4rem;
}

.post-card {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 0.3s;
}

.post-card:hover { transform: translateY(-5px); }

.post-image {
    height: 200px;
    background: #e5e7eb;
}

.post-body { padding: 1.5rem; }

.post-title a {
    font-size: 1.25rem;
    color: var(--color-text-main);
    font-weight: 700;
    display: block;
    margin-block: 0.75rem;
}
.post-title a:hover { color: var(--color-accent); }

/* --- SINGLE POST --- */
.article-header {
    padding-top: 140px;
    padding-bottom: 3rem;
    background: var(--color-bg-surface); /* Header distinto */
    border-bottom: 1px solid var(--color-border);
}

.article-container {
    max-width: 800px; /* Ancho lectura óptima */
    margin-inline: auto;
}

.article-h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.1;
    color: var(--color-text-main);
    margin-block: 1.5rem;
}

.article-author-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--color-border);
    padding-top: 1.5rem;
    margin-top: 2rem;
}

.author-info { display: flex; align-items: center; gap: 1rem; }
.avatar { 
    width: 40px; height: 40px; 
    background: var(--color-accent); 
    color: #fff; 
    border-radius: 50%; 
    display: flex; align-items: center; justify-content: center; 
    font-weight: 700;
}

.role { display: block; font-size: 0.75rem; color: var(--color-text-muted); }

/* Article Body (Typography) */
.article-body {
    padding-block: 1rem;
    font-size: 1.125rem; /* 18px */
    line-height: 1.8;
    color: var(--color-text-main);
}

.article-body p { margin-bottom: 1.5rem; }

.article-body h2 { 
    font-size: 2rem; 
    margin-top: 3rem; 
    margin-bottom: 1rem; 
    color: var(--color-text-main);
}

.article-body h3 { 
    font-size: 1.5rem; 
    margin-top: 2.5rem; 
    margin-bottom: 1rem; 
}

.article-body blockquote {
    border-left: 4px solid var(--color-accent);
    padding-left: 1.5rem;
    font-style: italic;
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin-block: 2rem;
}

/* Code Blocks Styles */
pre {
    background: #1e1e1e; /* Dark theme para código */
    padding: 1.5rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin-block: 2rem;
}

code {
    font-family: 'Fira Code', monospace; /* O monospace default */
    font-size: 0.9rem;
    color: #e2e2e2;
}

/* Post CTA */
.post-cta {
    background: var(--color-bg-surface-2);
    padding: 2.5rem;
    border-radius: var(--radius-md);
    margin-top: 4rem;
    text-align: center;
    border: 1px solid var(--color-border);
}


/* --- BLOG POST STYLES (Editorial Clean) --- */

/* Header del Artículo */
.article-header {
    padding-top: 160px; /* Espacio bajo el nav fijo */
    padding-bottom: 3rem;
    background-color: var(--color-bg-body);
    text-align: center;
}

.article-container {
    max-width: 800px; /* Ancho ideal de lectura (aprox 75 caracteres) */
    margin-inline: auto;
    padding-inline: 1.5rem;
}

.article-meta-top {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.category-badge {
    color: var(--color-accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.8rem;
    background: rgba(255, 107, 53, 0.1);
    padding: 4px 10px;
    border-radius: 4px;
}

.article-h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem); /* Título grande responsivo */
    line-height: 1.15;
    color: var(--color-text-main);
    margin-bottom: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* Barra de Autor */
.article-author-bar {
    display: flex;
    justify-content: center; /* Centrado */
    align-items: center;
    gap: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.author-info {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.avatar {
    width: 44px;
    height: 44px;
    background: var(--color-text-main);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.name { display: block; font-weight: 700; color: var(--color-text-main); font-size: 0.95rem; }
.role { display: block; font-size: 0.8rem; color: var(--color-text-muted); }

.publish-info {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Imagen Destacada */
.featured-image-wrapper {
    margin-top: 3rem;
    margin-bottom: 4rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.1);
}

.article-main-image {
    width: 100%;
    height: auto;
    display: block;
}

/* --- CUERPO DEL ARTÍCULO (Typography) --- */
/* Esto da estilo al HTML crudo que viene del Markdown */

.content-prose {
    font-family: var(--font-body); /* Inter */
    font-size: 1.125rem; /* 18px para buena lectura */
    line-height: 1.75;
    color: var(--color-text-body);
    padding-bottom: 0rem;
}

/* Espaciado entre párrafos */
.content-prose p {
    margin-bottom: 1.5rem;
}

/* Títulos dentro del post */
.content-prose h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--color-text-main);
    margin-top: 3.5rem;
    margin-bottom: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.content-prose h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--color-text-main);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

/* Listas */
.content-prose ul, .content-prose ol {
    margin-bottom: 2rem;
    padding-left: 1.5rem;
}

.content-prose li {
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
}

/* Citas (Blockquotes) */
.content-prose blockquote {
    border-left: 4px solid var(--color-accent);
    padding-left: 1.5rem;
    margin-block: 2.5rem;
    font-style: italic;
    font-size: 1.35rem;
    line-height: 1.5;
    color: var(--color-text-main);
}

/* Código */
.content-prose pre {
    background: #1e293b; /* Azul oscuro código */
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.9rem;
    font-family: 'Fira Code', monospace; /* O monospace genérico */
    margin-block: 2rem;
}

.content-prose strong {
    color: var(--color-text-main);
    font-weight: 700;
}

.content-prose a {
    color: var(--color-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}