/* === ReadFy Blog Article Page Styles (styles/blog/articulo.css) === */

:root {
    --color-primario: #5867dd;
    --color-secundario: #ffffff;
    --color-terciario: #79829c;
    --color-fondo-page: #f8f9fa;
    --color-borde: #e2e8f0;
    --color-texto-titulo: #1a202c;
    --color-texto-cuerpo: #2d3748;
    --border-radius-main: 12px;
    --shadow-main: 0 8px 25px rgba(0,0,0,0.07);
    --font-headings: 'Nunito', sans-serif;
    --font-body: 'Merriweather', serif; /* Fuente serif para lectura cómoda */
}

/* Barra de progreso */
#reading-progress-container {
    width: 100%;
    height: 4px;
    background: transparent;
    position: fixed;
    top: var(--navbar-height, 70px);
    z-index: 999;
}

#reading-progress-bar {
    height: 4px;
    background: var(--color-primario);
    width: 0%;
}

/* Main Container */
.article-main {
    padding: 2rem 1rem 4rem 1rem;
    background-color: var(--color-secundario);
    flex-grow: 1;
    text-align: left; /* CRÍTICO: Resetea la alineación centrada global */
}

.article-container {
    max-width: 740px; /* Ancho óptimo para lectura */
    margin: 0 auto;
}

/* --- Header del Artículo (Clase Renombrada) --- */
.article-header-content {
    text-align: center;
    margin-bottom: 2.5rem;
    /* Aseguramos que no herede propiedades flex extrañas */
    display: block; 
    position: relative;
    top: auto;
}

.article-meta-top {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-family: var(--font-headings);
    font-size: 0.9rem;
    color: #718096;
}

.article-category-badge {
    background-color: #eef2ff;
    color: var(--color-primario);
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.article-title {
    font-family: var(--font-headings);
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--color-texto-titulo);
    margin-bottom: 1.5rem;
}

.article-author-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.author-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info {
    display: flex;
    flex-direction: column;
    text-align: left;
    font-family: var(--font-headings);
    font-size: 0.9rem;
}

.author-name {
    font-weight: 700;
    color: var(--color-texto-titulo);
}

.read-time {
    color: #718096;
    font-size: 0.85rem;
}

/* --- Hero Image --- */
.article-hero-image-wrapper {
    margin-bottom: 3rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    width: 100%;
}

.article-hero-image {
    width: 100%;
    height: auto;
    display: block;
    max-height: 500px; /* Limitar altura */
    object-fit: cover;
}

/* --- Body Content --- */
.article-body {
    font-family: var(--font-body);
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--color-texto-cuerpo);
}

.article-body h2 {
    font-family: var(--font-headings);
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--color-texto-titulo);
}

.article-body h3 {
    font-family: var(--font-headings);
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
}

.article-body p {
    margin-bottom: 1.5rem;
}

.article-body ul, .article-body ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-body blockquote {
    border-left: 4px solid var(--color-primario);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #4a5568;
    font-size: 1.2rem;
    background: transparent;
}

.article-body img {
    max-width: 100%;
    border-radius: 8px;
    margin: 2rem 0;
}

/* Quill Overrides (Critical) */
.ql-snow.ql-container {
    border: none !important;
    font-family: inherit !important;
}
.ql-editor {
    padding: 0 !important;
    overflow-y: visible !important;
}

/* --- Tags y Share --- */
.article-tags {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.article-share-section {
    margin-top: 3rem;
    background-color: #f7fafc;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
}

.article-share-section h4 {
    font-family: var(--font-headings);
    margin-bottom: 1rem;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn-share {
    padding: 0.6rem 1.2rem;
    border: 1px solid #cbd5e0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-family: var(--font-headings);
    transition: all 0.2s;
}
.btn-share:hover { transform: translateY(-2px); box-shadow: 0 2px 5px rgba(0,0,0,0.1); }

/* --- Related Section --- */
.related-articles-section {
    background-color: #f8f9fa;
    padding: 4rem 1rem;
    margin-top: 4rem;
}
.related-articles-section h3 { font-family: var(--font-headings); font-size: 1.8rem; font-weight: 800; margin-bottom: 2rem; }
.btn-primary {
    background-color: var(--color-primario);
    color: var(--color-secundario);
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
}

/* --- Skeleton --- */
.skeleton-header { display: flex; flex-direction: column; align-items: center; gap: 1rem; margin-bottom: 3rem; }
.skeleton-meta { width: 150px; height: 20px; background: #e2e8f0; border-radius: 10px; }
.skeleton-title { width: 100%; height: 40px; background: #e2e8f0; border-radius: 8px; }
.skeleton-image { width: 100%; height: 400px; background: #e2e8f0; border-radius: 12px; margin-bottom: 2rem; }
.skeleton-text { width: 100%; height: 15px; background: #e2e8f0; margin-bottom: 1rem; border-radius: 4px; }
.skeleton-header *, .skeleton-image, .skeleton-text {
    animation: pulse 1.5s infinite ease-in-out;
}
@keyframes pulse { 0% { opacity: 0.6; } 50% { opacity: 1; } 100% { opacity: 0.6; } }

/* --- Responsive --- */
@media (max-width: 768px) {
    .article-title { font-size: 2rem; }
    .article-body { font-size: 1.05rem; }
}