/*
 * Plugin: EVA FM News Importer Styles
 * Description: Estilos personalizados para el plugin EVA FM News Importer.
 */

.evafm-news-container {
    display: grid;
    /* CAMBIO AQUI:
       - 'repeat(auto-fit, ...)' sigue siendo bueno para la responsividad.
       - 'minmax(min(100%, 250px), 1fr)' intenta forzar que los ítems sean más pequeños si es necesario,
         permitiendo que dos quepan en un espacio más estrecho.
       - Si aún no caben dos, el grid naturalmente los apilará.
       - Puedes ajustar el '250px' a un valor aún menor si tus tarjetas pueden ser más pequeñas.
    */
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    
    gap: 20px;
    padding: 20px;
    background-color: #1a1a1a;
    border-radius: 8px;
    margin-top: 30px;
}

.evafm-news-item {
    background-color: #2c2c2c;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    display: flex; /* Mantenemos flex para la estructura interna de la tarjeta */
    flex-direction: column;
}

.evafm-news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
}

.evafm-news-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid #3a3a3a;
}

.evafm-news-item h3.evafm-news-title {
    font-size: 1.2em;
    font-weight: 600;
    margin: 15px 15px 10px;
    line-height: 1.4;
    color: #ffffff;
    flex-grow: 1;
}

.evafm-news-item h3.evafm-news-title a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

.evafm-news-item h3.evafm-news-title a:hover {
    color: #007bff;
    text-decoration: underline;
}

.evafm-news-item p.evafm-news-description {
    font-size: 0.9em;
    color: #bbbbbb;
    margin: 0 15px 15px;
    line-height: 1.6;
}

/* Estilos para errores o cuando no hay noticias */
.evafm-news-error,
.evafm-news-empty {
    color: #ff4d4d;
    background-color: #330000;
    padding: 15px;
    border: 1px solid #ff4d4d;
    border-radius: 5px;
    text-align: center;
    margin: 20px auto;
    max-width: 600px;
}

/* Adaptaciones para pantallas más pequeñas */
@media (max-width: 768px) {
    .evafm-news-container {
        grid-template-columns: 1fr; /* Una columna en móviles */
        padding: 15px;
    }
    .evafm-news-image {
        height: 200px;
    }
}