/* =============================================== */
/* ====== ESTILOS PARA PÁGINAS DEL BLOG ====== */
/* =============================================== */

/* --- Estructura Principal de las Páginas de Blog y Artículos --- */
.blog-main-page, .article-main {
    padding-top: 80px; /* Espacio para la barra de navegación fija */
}

/* --- Encabezado Principal (Ej: "Blog de Enyell Studios") --- */
.blog-header, .article-header {
    background-color: #2c3e50;
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.blog-header h1, .article-header h1 {
    font-size: 3rem;
    font-family: 'Montserrat', sans-serif;
}

/* --- Sección que contiene la lista de artículos --- */
.blog-list-section, .article-content-section {
    padding: 60px 0;
}

/* --- Cuadrícula (Grid) para la lista de artículos --- */
.blog-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

/* --- Tarjeta individual de cada artículo del blog --- */
.article-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

/* --- Imagen de la tarjeta del artículo (CON LA CORRECCIÓN) --- */
.article-card-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 16 / 9; /* Proporción para que la imagen sea más grande */
}

/* --- Contenedor del texto dentro de la tarjeta --- */
.article-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Asegura que el contenido ocupe el espacio disponible */
}

.article-card-date {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 0.5rem;
}

.article-card-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    flex-grow: 1; /* Empuja el link "Leer más" hacia abajo */
}

.article-card-excerpt {
    color: #555;
    margin-bottom: 1.5rem;
}

.article-card-link {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    align-self: flex-start; /* Se alinea a la izquierda */
}

.article-card-link:hover {
    text-decoration: underline;
}


/* --- Estilos para la página de un artículo individual --- */
.article-header {
    background-size: cover;
    background-position: center;
    position: relative;
}

.article-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.article-header .container {
    position: relative;
    z-index: 2;
}

.article-meta {
    font-size: 1rem;
    color: #ecf0f1;
    margin-top: 0.5rem;
}

.article-container {
    max-width: 800px;
}

.article-content-section h2 {
    font-size: 2rem;
    font-family: 'Montserrat', sans-serif;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content-section p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.article-content-section ul {
    margin-bottom: 1rem;
    padding-left: 20px;
}

.article-content-section blockquote {
    border-left: 4px solid #3498db;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #555;
    font-size: 1.2rem;
}

.article-cta {
    background-color: #f4f4f4;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    margin-top: 3rem;
}

.article-cta h3 {
    font-size: 1.8rem;
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 1rem;
}

/* ============================================ */
/* ====== MODO OSCURO PARA EL BLOG ====== */
/* ============================================ */

@media (prefers-color-scheme: dark) {
    .article-card {
        background-color: #2a3946;
        color: #e0e0e0;
    }
    .article-card-title {
        color: #e0e0e0;
    }
    .article-card-excerpt {
        color: #b0bec5;
    }
    .blog-list-section, .article-content-section {
        background-color: #1a252f;
    }
    .article-cta {
        background-color: #1a252f;
    }
}

/* =============================================== */
/* ====== ESTILOS RESPONSIVE PARA EL BLOG ====== */
/* =============================================== */

@media (max-width: 768px) {
    .blog-list-grid {
        grid-template-columns: 1fr;
    }
}