/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

/* All Events Section */
.all-events-page {
    padding: 5px 5px; /* Reduced padding for mobile-first */
    max-width: 100%; /* Allow full width on mobile */
    margin: 10px auto;
}

/* Event Card */
.event-card {
    display: flex;
    flex-direction: row; /* Image and text side by side */
    align-items: center;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
    padding: 15px;
    transition: transform 0.3s, box-shadow 0.3s;
    width: 100%;
}

.event-card:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Event Image */
.event-image {
    margin: 10px;
    flex-shrink: 0; /* Prevent shrinking of the image */
    display: flex; /* Keep the container a flex box */
    align-items: center; /* Center image vertically */
    justify-content: center; /* Center image horizontally */
}

.event-image img {
    width: 180px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #f1f1f1;
}


/* Event Details */
.event-details {
    flex: 1;
    text-align: center; /* Align text to the left for readability */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Vertically center the text */
    margin-left: 15px; /* Add some space between the image and text */
}

.event-title {
    font-size: 1.1em;
    font-weight: 700;
    color: #007bff;
    margin-bottom: 5px;
    line-height: 1.3;
}

.event-title a {
    text-decoration: none;
    color: #007bff;
}

.event-title a:hover {
    text-decoration: underline;
}

.event-details span {
    display: block;
    color: #666;
    font-size: 1.0em;
    margin-top: 6px;
}

/* Responsive Design for Smaller Screens (less than 480px) */
@media (max-width: 480px) {
    .event-card {
        flex-direction: column; /* Stack image and text vertically for small screens */
        align-items: center; /* Center all content */
        text-align: center; /* Center text for better readability */
        padding: 10px; /* Reduce padding for smaller screens */
    }

    .event-image {
        margin-bottom: 10px; /* Add some space between image and text */
    }

    .event-image img {
        width: 200px !important;
        height: auto !important;
    }

    .event-details {
        margin-left: 0; /* Remove left margin for smaller screens */
    }
}

/* Responsive Design for Larger Screens */
@media (min-width: 768px) {
    .all-events-page {
        max-width: 1200px;
    }

    .event-card {
        align-items: center; /* Vertically center content for larger screens */
        padding: 25px;
    }

    .event-image {
        flex: 0 0 120px;
        margin-right: 25px;
        margin-bottom: 0; /* Remove bottom margin for row layout */
    }

    .event-image img {
        width: 200px !important;
        height: auto !important;
    }

    .event-details {
        text-align: left; /* Align text to the left for better readability */
    }

    .event-title {
        font-size: 1.2em;
    }
}
