/* --- CONTENEDOR PRINCIPAL --- */
.eventos-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* --- TÍTULOS DE SECCIÓN --- */
.seccion-titulo {
    text-align: center;
    color: #2c3e50;
    margin: 40px 0 25px 0;
    font-size: 1.8rem;
}

/* ========================================== */
/* SECCIÓN 1: EVENTOS REALIZADOS (DESTACADOS) */
/* ========================================== */

/* La grilla que pone las tarjetas lado a lado */
.eventos-destacados-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

/* La tarjeta en sí (el enlace <a>) */
.evento-destacado {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    height: 400px; /* Altura controlada para que el texto entre bien */
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    text-decoration: none;
    display: block;
}

.evento-destacado img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Clave para que la foto llene el espacio sin deformarse */
    transition: transform 0.5s ease;
}

.evento-destacado:hover img {
    transform: scale(1.05);
}

/* El degradado oscuro para que el texto se lea perfecto */
.evento-destacado-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.6) 40%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Empuja el texto hacia abajo */
    padding: 30px;
    box-sizing: border-box;
}

/* Badge verde de "Evento Realizado" */
.badge-realizado {
    background-color: #27ae60; 
    color: white; 
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    align-self: flex-start;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.evento-destacado-titulo {
    color: white;
    font-size: 1.8rem;
    margin: 0 0 10px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    line-height: 1.2;
}

.evento-destacado-desc {
    color: #eee;
    font-size: 1rem;
    margin-bottom: 20px;
    max-width: 90%;
    line-height: 1.4;
}

.btn-destacado {
    display: inline-block;
    background-color: #ff8f00;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.95rem;
    align-self: flex-start;
    transition: background-color 0.3s;
}

.evento-destacado:hover .btn-destacado {
    background-color: #e67e00;
}

/* ========================================== */
/* SECCIÓN 2: PRÓXIMOS EVENTOS (TARJETAS)     */
/* ========================================== */

.eventos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.evento-card {
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.evento-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

.evento-imagen {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 3px solid #1a6ebd;
}

.evento-contenido {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.evento-fecha-lugar {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 12px;
    font-weight: bold;
}

.evento-fecha-lugar i {
    color: #1a6ebd;
    margin-right: 5px;
}

.evento-titulo {
    margin: 0 0 10px 0;
    font-size: 1.3rem;
    color: #2c3e50;
    line-height: 1.2;
}

.evento-descripcion {
    margin: 0 0 20px 0;
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
    flex-grow: 1;
}

/* --- RESPONSIVIDAD PARA CELULARES --- */
@media (max-width: 850px) {
    .eventos-destacados-grid {
        grid-template-columns: 1fr; /* 1 columna en celular */
    }
    .evento-destacado {
        height: 380px;
    }
    .evento-destacado-titulo {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .evento-destacado {
        height: 320px;
    }
    .evento-destacado-overlay {
        padding: 20px;
    }
    .evento-destacado-desc {
        display: none; /* En celulares muy chicos ocultamos la descripción para no saturar */
    }
}