/**
 * Estilos del Frontend
 * RSS Remote Events - Visualización de eventos
 */

/* Contenedor principal del grid */
.rre-eventos-grid {
    display: grid;
    gap: 25px;
    margin: 30px 0;
}

/* Columnas responsivas */
.rre-eventos-grid.rre-col-1 {
    grid-template-columns: 1fr;
}

.rre-eventos-grid.rre-col-2 {
    grid-template-columns: repeat(2, 1fr);
}

.rre-eventos-grid.rre-col-3 {
    grid-template-columns: repeat(3, 1fr);
}

.rre-eventos-grid.rre-col-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Card de evento */
.rre-evento-card {
    background: #2c2c2c;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.rre-evento-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.3);
}

/* Enlace de imagen (clicable) */
.rre-evento-imagen-link {
    display: block;
    width: 100%;
    height: 280px;
    overflow: hidden;
    position: relative;
}

.rre-evento-imagen-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0);
    transition: background 0.3s ease;
}

.rre-evento-imagen-link:hover::after {
    background: rgba(0,0,0,0.1);
}

/* Imagen del evento */
.rre-evento-imagen {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.rre-evento-imagen-link:hover .rre-evento-imagen {
    transform: scale(1.05);
}

/* Placeholder cuando no hay imagen */
.rre-evento-imagen[src=""],
.rre-evento-imagen[src*="placeholder"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: 600;
}

/* Contenido del evento */
.rre-evento-contenido {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    background: #2c2c2c;
}

/* Enlace del título (invisible, mantiene estilo del título) */
.rre-evento-titulo-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: opacity 0.3s ease;
}

.rre-evento-titulo-link:hover {
    opacity: 0.8;
}

/* Título del evento - Sobre fondo oscuro */
.rre-evento-titulo {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 20px 0;
    line-height: 1.3;
    text-align: left;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 52px;
    transition: color 0.3s ease;
}

.rre-evento-titulo-link:hover .rre-evento-titulo {
    color: #e8e8e8;
}

/* Descripción del evento - Recuadro blanco */
.rre-evento-descripcion {
    font-size: 15px;
    color: #4a4a4a;
    line-height: 1.6;
    margin: 0 0 20px 0;
    flex-grow: 1;
    text-align: left;
    background: #f5f5f5;
    padding: 18px;
    border-radius: 12px;
    min-height: 100px;
}

/* Enlace "Leer más" - Flecha azul */
.rre-evento-link {
    display: inline-flex;
    align-items: center;
    font-size: 16px;
    font-weight: 600;
    color: #3498db;
    text-decoration: none;
    transition: all 0.3s ease;
    gap: 8px;
    margin-top: auto;
}

.rre-evento-link:hover {
    color: #2980b9;
    gap: 12px;
}

.rre-evento-link::after {
    content: '→';
    font-size: 20px;
    transition: transform 0.3s ease;
}

.rre-evento-link:hover::after {
    transform: translateX(5px);
}

/* Responsive - Tablets */
@media screen and (max-width: 1024px) {
    .rre-eventos-grid.rre-col-4,
    .rre-eventos-grid.rre-col-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .rre-evento-imagen-link,
    .rre-evento-imagen {
        height: 240px;
    }
    
    .rre-evento-titulo {
        font-size: 18px;
    }
    
    .rre-evento-descripcion {
        font-size: 14px;
    }
}

/* Responsive - Móviles */
@media screen and (max-width: 768px) {
    .rre-eventos-grid {
        gap: 20px;
    }
    
    .rre-eventos-grid.rre-col-4,
    .rre-eventos-grid.rre-col-3,
    .rre-eventos-grid.rre-col-2 {
        grid-template-columns: 1fr;
    }
    
    .rre-evento-imagen-link,
    .rre-evento-imagen {
        height: 220px;
    }
    
    .rre-evento-contenido {
        padding: 20px;
    }
    
    .rre-evento-titulo {
        font-size: 17px;
        margin-bottom: 15px;
    }
    
    .rre-evento-descripcion {
        font-size: 14px;
        padding: 15px;
        margin-bottom: 15px;
    }
}

/* Animación de carga */
@keyframes rre-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rre-eventos-grid {
    animation: rre-fade-in 0.6s ease-out;
}

/* Mensaje cuando no hay eventos */
.rre-eventos-grid p {
    text-align: left;
    color: #666;
    font-size: 16px;
    padding: 10px 0px 10px 0px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0px 0px 0px;
}
*/
/* Estilos para temas oscuros (opcional) */
@media (prefers-color-scheme: dark) {
    .rre-evento-card {
        background: #1a1a1a;
        box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    }
    
    .rre-evento-card:hover {
        box-shadow: 0 12px 25px rgba(0,0,0,0.5);
    }
    
    .rre-evento-contenido {
        background: #1a1a1a;
    }
    
    .rre-evento-titulo {
        color: #ffffff;
    }
    
    .rre-evento-descripcion {
        background: #e8e8e8;
        color: #2c2c2c;
    }
}

/* ================================================
   PAGINACIÓN - ESTILO ULTRA SIMPLE (SOLO TEXTO)
   ================================================ */

/* Contenedor de paginación */
.rre-pagination {
    margin-top: 40px;
    text-align: center;
    clear: both;
}

/* ===== PAGINACIÓN CLÁSICA ===== */
.rre-pagination-classic {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.rre-pagination-classic .rre-page-link {
    display: inline-block;
    color: #757575;
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 400;
    font-size: 15px;
}

.rre-pagination-classic .rre-page-link:hover {
    color: #424242;
}

.rre-pagination-classic .rre-page-link.rre-page-active {
    color: #212121;
    font-weight: 600;
    pointer-events: none;
}

/* ===== PAGINACIÓN ELEGANTE ===== */
.rre-pagination-elegant {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.rre-pagination-elegant .rre-page-btn {
    color: #616161;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s ease;
}

.rre-pagination-elegant .rre-page-btn:hover {
    color: #212121;
}

.rre-pagination-elegant .rre-page-numbers {
    display: flex;
    gap: 15px;
    align-items: center;
}

.rre-pagination-elegant .rre-page-num {
    display: inline-block;
    color: #757575;
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 400;
    font-size: 15px;
}

.rre-pagination-elegant .rre-page-num:hover {
    color: #424242;
}

.rre-pagination-elegant .rre-page-num.rre-page-active {
    color: #212121;
    font-weight: 600;
    pointer-events: none;
}

.rre-pagination-elegant .rre-page-dots {
    color: #bdbdbd;
    font-weight: 400;
}

/* ===== PAGINACIÓN "CARGAR MÁS" ===== */
.rre-pagination-loadmore {
    padding: 20px 0;
}

.rre-loadmore-btn {
    padding: 0;
    background: none;
    color: #616161;
    border: none;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease;
    text-decoration: underline;
}

.rre-loadmore-btn:hover {
    color: #212121;
}

/* Loading state */
.rre-loadmore-btn.loading {
    opacity: 0.5;
    pointer-events: none;
}

.rre-loadmore-btn.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Responsive - Paginación */
@media screen and (max-width: 768px) {
    .rre-pagination-classic,
    .rre-pagination-elegant {
        gap: 12px;
    }
    
    .rre-pagination-elegant .rre-page-btn,
    .rre-pagination-elegant .rre-page-num,
    .rre-pagination-classic .rre-page-link,
    .rre-loadmore-btn {
        font-size: 14px;
    }
}