/* Contenedor principal */
.ebem-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

/* Tarjeta de evento */
.ebem-event-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.ebem-event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

/* Imagen del evento */
.ebem-event-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.ebem-event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ebem-event-card:hover .ebem-event-image img {
    transform: scale(1.05);
}

/* Badge de fecha */
.ebem-event-date-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #fff;
    border-radius: 8px;
    text-align: center;
    padding: 8px 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.ebem-date-day {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
    line-height: 1;
}

.ebem-date-month {
    display: block;
    font-size: 12px;
    color: #e74c3c;
    text-transform: uppercase;
}

/* Contenido de la tarjeta */
.ebem-event-content {
    padding: 20px;
}

.ebem-event-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: #2c3e50;
    line-height: 1.3;
}

.ebem-event-datetime {
    margin-bottom: 12px;
}

.ebem-event-date,
.ebem-event-time,
.ebem-event-location {
    display: block;
    font-size: 13px;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.ebem-event-description {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 15px;
}

.ebem-event-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ecf0f1;
}

.ebem-view-details {
    color: #e74c3c;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}

.ebem-view-details:hover {
    text-decoration: underline;
}

.ebem-price-tag {
    background: #ecf0f1;
    color: #2c3e50;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.ebem-price-free {
    background: #d4edda;
    color: #155724;
}

.ebem-price-paid {
    background: #f8d7da;
    color: #721c24;
}

/* Formulario de búsqueda */
.ebem-search-container {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.ebem-search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.ebem-search-field {
    flex: 2;
    min-width: 200px;
}

.ebem-date-field {
    flex: 1;
    min-width: 150px;
}

.ebem-filter-field {
    flex: 1;
    min-width: 150px;
}

.ebem-search-input,
.ebem-date-input,
.ebem-filter-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.ebem-search-input:focus,
.ebem-date-input:focus,
.ebem-filter-select:focus {
    outline: none;
    border-color: #e74c3c;
}

.ebem-reset-btn {
    background: #95a5a6;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.ebem-reset-btn:hover {
    background: #7f8c8d;
}

/* Loading y no resultados */
.ebem-loading {
    text-align: center;
    padding: 50px;
    font-size: 18px;
    color: #7f8c8d;
}

.ebem-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 2px solid #e74c3c;
    border-top-color: transparent;
    border-radius: 50%;
    animation: ebem-spin 0.6s linear infinite;
}

@keyframes ebem-spin {
    to { transform: rotate(360deg); }
}

.ebem-no-results {
    text-align: center;
    padding: 50px;
    background: #f8f9fa;
    border-radius: 12px;
    grid-column: 1 / -1;
}

.ebem-no-results p {
    font-size: 16px;
    color: #7f8c8d;
}

/* Estilos del Modal */
.ebem-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    overflow: auto;
}

.ebem-modal-content {
    background-color: #fff;
    margin: 5% auto;
    width: 90%;
    max-width: 800px;
    border-radius: 16px;
    animation: ebem-modal-open 0.3s ease;
    overflow: hidden;
    position: relative;
}

@keyframes ebem-modal-open {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ebem-modal-close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    z-index: 10;
    background: rgba(0,0,0,0.5);
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.ebem-modal-close:hover {
    background: #e74c3c;
}

.ebem-modal-body {
    display: flex;
    flex-direction: column;
}

.ebem-modal-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.ebem-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ebem-modal-info {
    padding: 25px;
}

.ebem-modal-info h2 {
    margin: 0 0 20px 0;
    font-size: 24px;
    color: #2c3e50;
}

.ebem-modal-datetime,
.ebem-modal-location,
.ebem-modal-price,
.ebem-modal-description {
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid #ecf0f1;
}

.ebem-modal-description p {
    margin: 8px 0 0 0;
    line-height: 1.5;
    color: #555;
}

.ebem-modal-footer {
    margin-top: 25px;
    text-align: center;
}

.ebem-modal-footer .ebem-register-btn {
    display: inline-block;
    padding: 12px 30px;
    font-size: 16px;
    background: #e74c3c;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.ebem-modal-footer .ebem-register-btn:hover {
    background: #c0392b;
}

/* Responsive */
@media (max-width: 768px) {
    .ebem-events-grid {
        grid-template-columns: 1fr;
    }
    
    .ebem-search-form {
        flex-direction: column;
    }
    
    .ebem-search-field,
    .ebem-date-field,
    .ebem-filter-field {
        width: 100%;
    }
    
    .ebem-modal-body {
        flex-direction: column;
    }
    
    .ebem-modal-image {
        height: 200px;
    }
}



/* Mejoras para el botón Ver detalles */
.ebem-view-details {
    color: #e74c3c;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s ease;
}

.ebem-view-details:hover {
    color: #c0392b;
    text-decoration: underline;
}

/* Asegurar que la tarjeta completa sea clickeable pero el texto no se interponga */
.ebem-event-card {
    cursor: pointer;
}

.ebem-event-footer {
    pointer-events: auto;
}

.ebem-view-details {
    pointer-events: auto;
    display: inline-block;
}

.ebem-price-tag {
    pointer-events: none;
}


/* Botón Ver detalles */
.ebem-view-details-btn {
    background: transparent;
    border: none;
    color: #e74c3c;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease;
}

.ebem-view-details-btn:hover {
    color: #c0392b;
    text-decoration: underline;
}

.ebem-event-card {
    cursor: pointer;
}

.ebem-event-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ecf0f1;
}

.ebem-price-tag {
    background: #ecf0f1;
    color: #2c3e50;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    pointer-events: none;
}

.ebem-price-free {
    background: #d4edda;
    color: #155724;
}

.ebem-price-paid {
    background: #f8d7da;
    color: #721c24;
}

/* View details link */
.ebem-view-details-link {
    color: #e74c3c;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.ebem-view-details-link:hover {
    color: #c0392b;
    text-decoration: underline;
}