.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}
.blog-hero {
    background-color: #f5f5f5; 
    padding: 60px 0;
    text-align: center;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 30px; 
    margin: 50px 0;
}

@media (max-width: 768px) {
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .blog-grid { grid-template-columns: 1fr; }
}


.blog-card-item {
    background: #ffffff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.card-thumbnail img {
    width: 100%;
    height: 220px;
    object-fit: cover; 
    display: block;
}
.card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; 
}
.card-meta {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 10px;
}
.card-meta a { color: #0073aa; text-decoration: none; } 

.card-title {
    font-size: 1.3rem;
    margin: 0 0 20px 0;
    line-height: 1.4;
}
.card-title a {
    color: #333;
    text-decoration: none;
}
.card-title a:hover { color: #0073aa; }

/* --- BOTÓN LEER MÁS --- */
.card-footer-btn {
    margin-top: auto; /* Alinea el botón siempre abajo */
}
.btn-read-more {
    display: inline-block;
    background-color: #333; /* Cambia por el color de KGM Colombia */
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    text-align: center;
    width: 100%; /* Botón ancho completo opcional, o quítalo para tamaño texto */
    transition: background 0.3s ease;
}
.btn-read-more:hover {
    background-color: #0073aa;
}

/* --- PAGINACIÓN --- */
.blog-pagination {
    text-align: center;
    margin-bottom: 50px;
}
.blog-pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 10px;
}
.blog-pagination a, .blog-pagination .current {
    padding: 8px 16px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
}
.blog-pagination .current {
    background-color: #333;
    color: #fff;
    border-color: #333;
}
/* --- TARJETA BASE (ESTADO EN REPOSO) --- */
.kgm-blog-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 4px; /* Bordes ligeramente suavizados como la imagen */
    overflow: visible; /* Permitir que la barra flote hacia afuera de la caja de la imagen */
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Efecto hover general en la tarjeta (opcional para dar profundidad) */
.kgm-blog-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* --- CONTENEDOR SUPERIOR --- */
.kgm-card-header {
    position: relative;
    margin-bottom: 25px; /* Espacio para que la barra flotante no pise el título */
}

.kgm-card-thumbnail img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

/* --- BARRA FLOTANTE AZUL/MORADO OSCURO --- */
.kgm-card-meta {
    position: absolute;
    bottom: 0;
    left: 5%;
    width: 90%;
    background-color: #2b2647; /* Color oscuro institucional de la imagen */
    color: #ffffff;
    display: grid;
    grid-template-columns: 1fr 1fr; /* Mitad fecha, mitad categoría */
    transform: translateY(50%); /* Empuja la mitad de la barra hacia afuera de la imagen */
    border-radius: 2px;
    z-index: 10;
}

.meta-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 10px;
    font-size: 0.85rem;
    font-weight: 600;
}

.meta-date {
    border-right: 1px solid rgba(255, 255, 255, 0.15);
}

/* Iconos (puedes usar dashicons de WP añadiendo la librería, o cambiarlos por texto/svg) */
.meta-item .dashicons {
    margin-right: 6px;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* --- CUERPO DEL TEXTO --- */
.kgm-card-body {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: center; /* Todo el texto va centrado según la imagen */
}

.kgm-card-title {
    font-size: 1.25rem;
    color: #1e1b4b;
    margin: 10px 0 15px 0;
    line-height: 1.4;
    font-weight: 700;
}

.kgm-card-title a {
    color: inherit;
    text-decoration: none;
}

.kgm-card-excerpt {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* --- BOTÓN LEER MÁS (CAMBIOS EN HOVER) --- */
.kgm-card-footer {
    margin-top: auto; /* Empuja el botón al fondo */
    display: flex;
    justify-content: center;
}

.kgm-btn-readmore {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #1e1b4b; /* Color del texto inicial */
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    padding: 10px 30px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.kgm-btn-readmore .arrow {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

/* --- COMPORTAMIENTO HOVER (DERECHA DE TU IMAGEN) --- */
.kgm-blog-card:hover .kgm-btn-readmore {
    background-color: #2b2647; /* Pasa a fondo oscuro */
    color: #ffffff; /* Texto pasa a blanco */
}

/* Pequeño detalle: la flecha se mueve sutilmente a la derecha en hover */
.kgm-blog-card:hover .kgm-btn-readmore .arrow {
    transform: translateX(4px);
}
/* --- INTEGRACIÓN DEL HERO BAJO EL MENÚ --- */
.blog-hero {
    /* Reemplaza la URL por la ruta real de la imagen que vas a subir a tu biblioteca de medios */
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('https://kgmcolombia.com.co/wp-content/uploads/2026/07/blog-autos-suv-kgm-mobility-colombia.webp'); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    
    /* Forzar que suba por debajo del menú transparente */
    margin-top: -90px; /* AJUSTA ESTE VALOR: Pon aquí los píxeles exactos que mide de alto tu menú principal */
    padding-top: 150px; /* Espacio extra arriba para que el título del blog no quede tapado por el menú */
    padding-bottom: 80px;
    
    text-align: center;
}

/* Forzar que las letras en el Hero sean blancas para contrastar con la imagen de fondo */
.blog-hero h1 {
    color: #ffffff !important;
    font-size: 2.5rem;
    margin-bottom: 10px;
}
.blog-hero p {
    color: #f1f1f1 !important;
    font-size: 1.1rem;
}

.kgm-btn-readmore, 
.kgm-btn-readmore:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #2b2647 !important; 
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    padding: 10px 30px;
    border-radius: 4px;
    transition: all 0.3s ease;
}


.kgm-blog-card:hover .kgm-btn-readmore,
.kgm-blog-card:hover .kgm-btn-readmore:visited {
    background-color: #2b2647 !important; 
    color: #ffffff !important; 
}

/* Flecha animada */
.kgm-btn-readmore .arrow {
    margin-left: 8px;
    transition: transform 0.3s ease;
    color: inherit; 
}

.kgm-blog-card:hover .kgm-btn-readmore .arrow {
    transform: translateX(4px);
}
/* ==========================================================================
   ESTILOS PARA EL ARTÍCULO INDIVIDUAL (SINGLE POST)
   ========================================================================== */

/* 1. Contenedor Principal: Centrado y con ancho óptimo de lectura */
.single-post #primary {
    max-width: 800px;
    margin: 60px auto;
    padding: 0 20px;
    font-family: sans-serif; /* Cambia por la fuente oficial de tu web si usas otra */
}

/* Ocultar la barra lateral por defecto si interrumpe la lectura (Opcional, muy recomendado) */
.single-post #secondary {
    display: none; 
}

/* 2. Cabecera del Artículo */
.single-post .entry-header {
    text-align: center;
    margin-bottom: 35px;
}

.single-post .entry-title {
    font-size: 2.5rem;
    color: #2b2647; /* Morado/Oscuro KGM */
    line-height: 1.3;
    font-weight: 700;
    margin-bottom: 15px;
}

/* Metadatos (Fecha, Autor) debajo del título */
.single-post .entry-meta {
    font-size: 0.95rem;
    color: #64748b;
}

.single-post .entry-meta a {
    color: #2b2647;
    text-decoration: none;
    font-weight: 600;
}

.single-post .entry-meta a:hover {
    text-decoration: underline;
}

/* 3. Imagen Destacada Interna */
.single-post .post-thumbnail {
    margin-bottom: 40px;
    text-align: center;
}

.single-post .post-thumbnail img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* 4. Cuerpo del Texto del Artículo */
.single-post .entry-content {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #334155;
}

/* Estilizar los párrafos dentro del artículo */
.single-post .entry-content p {
    margin-bottom: 25px;
}

/* Estilizar títulos internos por si meten H2 o H3 en el texto */
.single-post .entry-content h2,
.single-post .entry-content h3 {
    color: #2b2647;
    margin-top: 40px;
    margin-bottom: 20px;
    font-weight: 700;
}

/* 5. Pie del Artículo (Categorías, Etiquetas y Navegación) */
.single-post .entry-footer {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    font-size: 0.95rem;
    color: #64748b;
}

.single-post .entry-footer a {
    color: #2b2647;
    font-weight: 600;
    text-decoration: none;
}

/* Botones de navegación "Anterior / Siguiente" artículo */
.single-post .nav-links {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid #e2e8f0;
}

.single-post .nav-links a {
    color: #2b2647;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.single-post .nav-links a:hover {
    color: #0073aa; /* O tu color de acento azul */
}
/* 1. Contenedor Principal: Ajustado para librar el menú superior transparente */
.single-post #primary {
    max-width: 800px;
    margin: 0 auto 60px auto; /* Eliminamos el margen superior externo para evitar saltos raros */
    
    /* EN LA SIGUIENTE LÍNEA: Pon los mismos píxeles que mide tu menú + unos 40px extras de holgura */
    padding-top: 140px; 
    
    padding-left: 20px;
    padding-right: 20px;
    font-family: sans-serif;
}
/* Forzar que el header tenga fondo oscuro (o color institucional) solo en la vista interna del artículo */
.single-post .site-header {
    background-color: #2b2647 !important; /* El morado oscuro de KGM */
    position: relative !important; /* O fixed si quieres que baje contigo al hacer scroll */
}