
body {
    background-color: var(--blog-bg);
}

/* --- 1. HERO HEADER --- */
.blog-hero {
    background: #000; /* Fondo negro o imagen oscura */
    color: white;
    text-align: center;
    padding: 80px 20px;
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
}

/* Decoración de fondo sutil (gradiente) */
.blog-hero::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(138,43,226,0.2) 0%, rgba(0,0,0,0) 70%);
    pointer-events: none;
}

.blog-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.blog-title {
    font-size: 3rem;
    font-weight: 800;
    margin: 0 0 15px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; /* Texto con gradiente */
}

.blog-subtitle {
    font-size: 1.2rem;
    color: #ccc;
}

/* --- 2. GRID LAYOUT --- */
.blog-container {
    max-width: 1200px;
    margin: 0 auto 80px;
    padding: 0 20px;
}

.blog-grid {
    display: grid;
    grid-template-columns: 1fr; /* Mobile First */
    gap: 30px;
}

/* --- 3. TARJETA (CARD) --- */
.blog-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(138,43,226,0.15);
}

/* Imagen */
.card-image-wrapper {
    height: 220px;
    overflow: hidden;
    background: #eee;
    position: relative;
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .card-image-wrapper img {
    transform: scale(1.05); /* Zoom suave al hover */
}

.no-thumb {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: #333; color: #444; font-weight: bold; font-size: 2rem;
}

/* Contenido */
.card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-meta {
    font-size: 0.8rem;
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.card-date { color: #999; }

.card-cat a {
    color: var(--primary-color);
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: none;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.card-title {
    margin: 0 0 15px;
    font-size: 1.4rem;
    line-height: 1.3;
}

.card-title a {
    text-decoration: none;
    color: var(--text-dark);
    transition: color 0.2s;
}

.card-title a:hover {
    color: var(--primary-color);
}

.card-excerpt {
    color: var(--text-grey);
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Botón Leer Más */
.read-more-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: bold;
    font-size: 0.9rem;
    margin-top: auto; /* Empuja hacia abajo */
}

.read-more-link .arrow {
    margin-left: 5px;
    transition: transform 0.2s;
    color: var(--primary-color);
}

.read-more-link:hover .arrow {
    transform: translateX(5px);
}

/* --- 4. PAGINACIÓN --- */
.blog-pagination {
    margin-top: 50px;
    text-align: center;
}

.nav-links {
    display: inline-flex;
    gap: 10px;
}

.nav-links a, .nav-links span {
    display: inline-block;
    padding: 10px 15px;
    border-radius: 5px;
    background: white;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.2s;
}

.nav-links a:hover, .nav-links span.current {
    background: var(--primary-color);
    color: white;
}

/* --- RESPONSIVE DESKTOP (Grid de 3) --- */
@media (min-width: 768px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr); /* Tablet */
    }
}

@media (min-width: 992px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr); /* Desktop */
    }
    
    .blog-title { font-size: 4rem; }
}

/* --- ESTILOS SINGLE POST (Entrada Individual) --- */

.single-post-container {
    max-width: 800px; /* Ancho de lectura ideal */
    margin: 40px auto;
    padding: 0 20px;
    background: #fff; /* Fondo blanco para lectura limpia */
    padding-bottom: 60px;
}

/* 1. Cabecera */
.entry-header {
    text-align: center;
    margin-bottom: 40px;
    padding-top: 40px;
}

.entry-meta-top {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.entry-meta-top .post-cat a {
    color: #8A2BE2; /* Morado */
    font-weight: bold;
    text-decoration: none;
    margin-right: 10px;
}

.entry-title {
    font-size: 2.5rem;
    line-height: 1.2;
    color: #111;
    margin-bottom: 30px;
}

.entry-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* 2. Contenido del Artículo (Tipografía) */
.entry-content {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #333;
    font-family: Georgia, 'Times New Roman', serif; /* Serif para cuerpo es más legible */
}

/* Encabezados dentro del post */
.entry-content h2, .entry-content h3 {
    font-family: system-ui, -apple-system, sans-serif; /* Sans-serif para títulos */
    color: #111;
    margin-top: 40px;
    margin-bottom: 20px;
    font-weight: bold;
}

.entry-content h2 { font-size: 1.8rem; border-left: 4px solid #8A2BE2; padding-left: 15px; }
.entry-content h3 { font-size: 1.5rem; }

/* Párrafos y listas */
.entry-content p { margin-bottom: 25px; }
.entry-content ul, .entry-content ol { margin-bottom: 25px; padding-left: 20px; }
.entry-content li { margin-bottom: 10px; }

/* Citas (Blockquotes) */
.entry-content blockquote {
    background: #f9f9f9;
    border-left: 5px solid #8A2BE2;
    margin: 30px 0;
    padding: 20px;
    font-style: italic;
    color: #555;
    font-size: 1.2rem;
}

/* Enlaces dentro del texto */
.entry-content a {
    color: #8A2BE2;
    text-decoration: underline;
}

/* 3. Navegación */
.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.post-navigation a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    transition: color 0.2s;
}
.post-navigation a:hover { color: #8A2BE2; }

/* 4. Relacionados */
.related-posts {
    margin-top: 60px;
    background: #fafafa;
    padding: 30px;
    border-radius: 10px;
}

.related-posts h3 {
    margin-top: 0;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.related-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.related-card {
    text-decoration: none;
    color: #333;
    display: block;
}

.related-card:hover h4 { color: #8A2BE2; }

.related-thumb img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.related-card h4 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.4;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .entry-title { font-size: 2rem; }
    .related-grid { grid-template-columns: 1fr; }
}