/* Events Grid Layout */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 50px;
}

/* Event Card Styling */
.event-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.event-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid #e0e0e0;
}

.event-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.event-title {
    margin-top: 0;
    margin-bottom: 15px;
    color: #011433;
    font-size: 1.8rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
}

.event-meta {
    margin: 5px 0;
    color: #011433;
    font-size: 1.4rem;
}

.event-description {
    margin-top: 15px;
    color: #282e36;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-register-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 20px;
    background-color: #011433;
    color: white !important;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.3s ease;
}

.event-register-btn:hover {
    background-color: #d77e0a;
    text-decoration: none;
}

.event-details-btn {
    display: inline-block;
    margin-top: 15px;
    margin-right: 10px;
    padding: 8px 20px;
    background-color: transparent;
    color: #011433 !important;
    text-decoration: none;
    border: 1px solid #011433;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
}

.event-details-btn:hover {
    background-color: #011433;
    color: white !important;
    text-decoration: none;
}

/* Event Filters Styling */
.event-filters {
    margin: 30px 0;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
}

.event-filters h3 {
    margin-bottom: 20px;
    color: #011433;
    font-weight: 600;
}

.event-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.event-filter-buttons .btn {
    padding: 8px 16px;
    margin: 5px;
    border: 2px solid #ec840c;
    color: #011433;
    background-color: transparent;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.event-filter-buttons .btn.active,
.event-filter-buttons .btn:hover {
    background-color: #ec840c;
    color: white;
}

/* Event Modal Styling */
.event-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.event-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.event-modal {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.event-modal-overlay.active .event-modal {
    transform: translateY(0);
}

.event-modal-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
}

.event-modal-header h2 {
    margin: 0;
    color: #011433;
    padding-right: 30px;
}

.event-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 24px;
    color: #777;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.event-modal-close:hover {
    background-color: #f0f0f0;
    color: #333;
}

.event-modal-body {
    padding: 20px;
}

.event-modal-image {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 20px;
}

.event-modal-meta {
    margin-bottom: 20px;
}

.event-modal-meta p {
    margin: 10px 0;
    color: #333;
    font-size: 16px;
}

.event-modal-description {
    margin-bottom: 20px;
    line-height: 1.6;
}

.event-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    text-align: right;
}

.event-modal-register {
    display: inline-block;
    padding: 10px 24px;
    background-color: #ec840c;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.event-modal-register:hover {
    background-color: #d77e0a;
    text-decoration: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .events-grid {
        grid-template-columns: 1fr;
    }
    
    .event-filter-buttons {
        flex-direction: column;
    }
    
    .event-filter-buttons .btn {
        width: 100%;
        margin: 5px 0;
    }
    
    .event-modal {
        width: 95%;
    }
    
    .event-modal-header h2 {
        font-size: 20px;
    }
}

/* Animation for modal */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-20px); }
}

.fade-in {
    animation: fadeIn 0.3s ease forwards;
}

.fade-out {
    animation: fadeOut 0.3s ease forwards;
}