/* ==========================================
   CSS MODULAR: ENTRADA DE BLOG (DISEÑO CLÁSICO)
   ========================================== */

/* 1. Blindaje contra texto infinito */
body {
    overflow-x: hidden;
}

article,
.article-body {
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
}

/* 2. Contenedor Principal */
.article-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px 80px;
}


.back-link {
    display: inline-block;
    color: var(--accent-gold);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 30px;
    transition: transform 0.3s ease;
}

.back-link:hover {
    transform: translateX(-5px);
}

.article-category {
    display: block;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--blue-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.article-title {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    line-height: 1.2;
    color: var(--blue-dark);
}

/* Info del Autor */
.article-meta-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(128, 150, 181, 0.2);
    margin-top: 2rem;
}

.author-img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
}

.meta-text {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--blue-navy);
}

.post-date {
    font-size: 0.85rem;
    color: var(--blue-muted);
}

/* 4. Imagen Principal */
.article-hero-image {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 50px;
    background-color: var(--bg-light);
}

.article-hero-image img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    display: block;
}

/* 5. Contenido de Lectura */
.article-body {
    font-family: var(--font-body);
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--blue-slate);
}

.article-body p {
    margin-bottom: 25px;
}

.article-body h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin: 40px 0 20px;
    color: var(--blue-dark);
}

/* 6. Compartir en Redes */
.article-footer {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid rgba(128, 150, 181, 0.2);
}

.share-box span {
    font-weight: 600;
    color: var(--blue-navy);
}

.share-icons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.share-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--bg-light);
    color: var(--blue-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(128, 150, 181, 0.2);
}

.share-btn:hover {
    background: var(--accent-gold);
    color: white;
    transform: translateY(-3px);
    border-color: var(--accent-gold);
}

.share-btn svg {
    transition: transform 0.3s ease;
}

.share-btn:hover svg {
    transform: scale(1.1);
}

/* 7. Artículos Relacionados (Con el auto-fill arreglado) */
.related-articles-section {
    max-width: 800px;
    margin: 60px auto 100px;
    padding: 0 20px;
}

.related-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 30px;
    text-align: center;
    color: var(--blue-dark);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    justify-content: center;
}

.related-card {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.3s ease;
}

.related-card:hover {
    transform: translateY(-5px);
}

.related-img-box {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
}

.related-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-card:hover .related-img-box img {
    transform: scale(1.05);
}

.related-card-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    line-height: 1.3;
    color: var(--blue-dark);
}