/* General Styling */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    overflow-x: hidden;
}

body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}


/* Add gap between navbar and first section */
.upcoming-events, .past-events {
    margin-top: 20px;
    padding: 20px;
    background-color: #fff;
    text-align: center;
}

/* Upcoming Events Section */
.upcoming-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px; /* Consistent gap between event cards */
    margin-top: 20px;
}

h2 {
    text-align: center; 
}

.event-card {
    position: relative;
    width: 250px; /* Fixed width */
    height: 350px; 
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background-color: #2c3e50;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.event-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.event-card:hover img {
    transform: scale(1.1);
}

.event-card p {
    position: absolute;
    bottom: 10px;
    left: 10px;
    color: white;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal.modal-open {
    opacity: 1;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    max-width: 500px;
    width: 80%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.modal-open .modal-content {
    transform: scale(1);
}

.modal-content h3 {
    margin-top: 0;
    color: #2c3e50;
}

.modal-content p {
    line-height: 1.6;
    color: #555;
}

/* Close Button */
.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: #333;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    line-height: 1;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.05);
}

.close:hover {
    color: #fff;
    background-color: #ff3333;
    transform: rotate(90deg);
}

/* Past Events Carousel */
.past-events {
    padding: 20px;
    background-color: #fff;
}

.carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    max-width: 100%;
    margin-top: 20px;
}

.carousel {
    display: flex;
    gap: 20px; /* Add gap between items */
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.carousel-item {
    flex: 0 0 500px; /* Match the size of event cards */
    height: 600px;
    background-color: #2c3e50;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensure the image fits the square */
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

.carousel-text {
    position: absolute;
    bottom: 10px;
    left: 10px;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
    z-index: 1;
}




/* For screens between 768px and 1000px */
@media screen and (min-width: 768px) and (max-width: 1000px) {

    .menu a {
        margin-left: 10px;
        font-size: 14px;
    }
    .event-card {
        width: 30%;
        height: 300px;
    }
    .carousel-item {
        flex: 0 0 40%;
        height: 400px;
    }
}
