/* ============================================================================
   ESTILOS DEL BLOG Y DE LA PÁGINA DE ARTÍCULO — Soluciones KRG
   ----------------------------------------------------------------------------
   Archivo NUEVO, separado a propósito: style.css no se toca.
   Usa las mismas variables de color que el resto del sitio, así que el modo
   claro y el modo oscuro funcionan sin agregar nada más.
   ============================================================================ */

/* ============================================================================
   1. LISTADO DEL BLOG
   ============================================================================ */

.mas-articulos {
    display: flex;
    justify-content: center;
    margin: 40px 0 10px;
}

.btn-ver-mas {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.btn-ver-mas:hover {
    background-color: var(--primary-color);
    color: var(--card-bg);
    transform: translateY(-2px);
}

.btn-ver-mas:disabled {
    opacity: 0.6;
    cursor: wait;
    transform: none;
}

/* ============================================================================
   2. PÁGINA DE UN ARTÍCULO
   ============================================================================ */

.articulo {
    max-width: 780px;
    margin: 40px auto 60px;
    padding: 0 20px;
}

.articulo-volver {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.92rem;
    margin-bottom: 22px;
    transition: transform 0.2s ease;
}

.articulo-volver:hover {
    transform: translateX(-4px);
}

.articulo h1 {
    font-size: 2.4rem;
    line-height: 1.2;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.articulo-fecha {
    display: block;
    font-size: 0.82rem;
    color: var(--text-color);
    opacity: 0.6;
    margin-bottom: 22px;
}

.articulo-portada {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 34px;
    box-shadow: var(--shadow);
}

/* --- Bloques de contenido --- */

.articulo-cuerpo {
    color: var(--text-color);
    font-size: 1.08rem;
    line-height: 1.75;
}

.bloque + .bloque {
    margin-top: 20px;
}

.bloque-parrafo {
    margin-bottom: 20px;
}

.bloque-subtitulo {
    color: var(--primary-color);
    margin-top: 42px;
    margin-bottom: 16px;
    line-height: 1.3;
}

h2.bloque-subtitulo { font-size: 1.75rem; }
h3.bloque-subtitulo { font-size: 1.35rem; color: var(--text-color); }

.bloque-cita {
    border-left: 4px solid var(--primary-color);
    background: var(--card-bg);
    padding: 16px 22px;
    border-radius: 0 10px 10px 0;
    font-style: italic;
    margin: 26px 0;
    box-shadow: var(--shadow);
}

.bloque-imagen {
    margin: 30px 0;
}

.bloque-imagen img {
    width: 100%;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: block;
}

.bloque-imagen figcaption {
    font-size: 0.82rem;
    opacity: 0.65;
    text-align: center;
    margin-top: 10px;
}

/* Enlace destacado dentro del texto */
.bloque-enlace {
    display: block;
    background: var(--card-bg);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    padding: 16px 20px;
    margin: 26px 0;
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.bloque-enlace:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.bloque-enlace .etiqueta {
    display: block;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.bloque-enlace .titulo-enlace {
    font-weight: 700;
    font-size: 1.02rem;
}

/* Los enlaces dentro de los párrafos */
.articulo-cuerpo a {
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ============================================================================
   3. "LEER TAMBIÉN" — ayuda a seguir navegando dentro del blog
   ============================================================================ */

.leer-tambien {
    max-width: 780px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

.leer-tambien h2 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.leer-tambien-lista {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.leer-tambien article {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.leer-tambien article:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.leer-tambien img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    display: block;
}

.leer-tambien .texto {
    padding: 14px 16px;
}

.leer-tambien a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.35;
    display: block;
}

.leer-tambien a:hover {
    color: var(--primary-color);
}

/* ============================================================================
   4. AVISOS Y PANTALLAS DE CARGA
   ============================================================================ */

.aviso-articulo {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-color);
    opacity: 0.8;
}

.aviso-articulo a {
    color: var(--primary-color);
    font-weight: 700;
}

/* ============================================================================
   5. PANTALLAS PEQUEÑAS
   ============================================================================ */

@media (max-width: 640px) {
    .articulo h1 { font-size: 1.75rem; }
    .articulo-cuerpo { font-size: 1rem; }
    h2.bloque-subtitulo { font-size: 1.45rem; }
}

/* ============================================================================
   6. SI EL SISTEMA PIDE MENOS MOVIMIENTO
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
    .btn-ver-mas,
    .bloque-enlace,
    .leer-tambien article,
    .articulo-volver {
        transition: none;
    }
    .btn-ver-mas:hover,
    .bloque-enlace:hover,
    .leer-tambien article:hover,
    .articulo-volver:hover {
        transform: none;
    }
}
