/* --- General Container & Layout --- */
.custom-events-display-container {
    display: flex;
    gap: 30px; /* Space between sidebar and content */
    margin: 20px 0 0;
    font-family: sans-serif; /* Basic font, adjust as needed */
}
.custom-events-display-container.no-sidebar {
    margin: 20px auto;
    width: 1050px;
}

.custom-events-display-container.no-sidebar .ced-event-list {
    width: 100%;
}

/* --- Sidebar --- */
.ced-sidebar {
    flex: 0 0 300px; /* Sidebar width, adjust as needed */
    background-color: #00bfb2; /* Teal color from screenshot */
    padding: 20px;
    box-sizing: border-box;
    border-radius: 0; /* As per screenshot, sidebar is flush with left edge */
}

.ced-category-filters {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ced-category-filters li a {
    display: block;
    padding: 12px 15px;
    margin-bottom: 8px; /* Space between filter items */
    text-decoration: none;
    color: #ffffff; /* White text */
    font-weight: 600;
    border-radius: 25px; /* Rounded pill shape */
    transition: background-color 0.3s ease, color 0.3s ease;
}

.ced-category-filters li.active a,
.ced-category-filters li a:hover {
    background-color: #ffffff; /* White background for active/hover */
    color: #00bfb2; /* Teal text for active/hover */
}

/* --- Event List --- */
.ced-event-list {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 20px; /* Space between event items */
}

/* --- Event Item --- */
.ced-event-item {
    display: flex;
    gap: 30px; /* Space between image and details */
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0; /* Separator line */
}

.ced-event-item:last-child {
    border-bottom: none;
}

.ced-event-image {
    flex: 0 0 420px; /* Width of the image container, adjust as needed */
    max-width: 420px;
    height: auto; /* Maintain aspect ratio */
}

.ced-event-image img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover; /* Ensure image covers the area, might crop */
    border-radius: 4px; /* Slight rounding for image */
}
.ced-event-image-placeholder {
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px; /* Minimum height for placeholder */
    border-radius: 4px;
    color: #888;
    text-align: center;
}
.ced-event-image-placeholder a {
    text-decoration: none;
    color: inherit;
}


.ced-event-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    max-width: 600px;
}

.ced-event-date {
    font-size: 0.85em;
    color: #00bfb2; /* Teal color for date */
    margin: 0 0 5px 0;
    font-weight: 600;
}

.ced-event-title {
    font-size: 1.5em; /* Adjust as needed */
    margin: 0 0 10px 0;
    font-weight: bold;
    line-height: 1.2;
}

.ced-event-title a {
    text-decoration: none;
    color: #333333; /* Dark grey for title */
}

.ced-event-title a:hover {
    color: #00bfb2; /* Teal on hover */
}

.ced-event-excerpt {
    font-size: 0.95em;
    color: #555555;
    line-height: 1.6;
    margin-bottom: 15px;
    flex-grow: 1; /* Pushes button to bottom if details are short */
}
.ced-event-excerpt p {
    margin-top: 0;
}
.ced-event-excerpt p:last-child {
    margin-bottom: 0;
}


.ced-event-button {
    display: inline-block;
    background-color: #00bfb2; 
    color: #ffffff!important;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    text-align: center;
    transition: background-color 0.3s ease;
    align-self: flex-start;
    font-size: .9em;
}

.ced-event-button:hover {
    background-color: #2bc4c1;
    color: #ffffff;
    text-decoration: none;
}


@media (min-width: 991px) {
    aside.ced-sidebar {
        margin-left: -30px;
        padding-left: 5%;
        flex: 0 0 20%;
        min-width: 250px;
    }
    aside.ced-sidebar {
        margin-left: -30px;
    }
    aside.ced-sidebar, .ced-event-list {
        padding-top: 10%;
        padding-bottom: 6%;
    }
    .ced-event-details {
        padding: 1.5em 0;
    }
    .ced-event-list {
        align-items: center;
        gap: 30px;
    }
    .ced-category-filters li a {
        text-align: right;
        padding-right: 30px;
        border-radius: 25px 0 0 25px;
        margin-right: -20px;
    }
    .ced-event-item {
        padding-bottom: 30px;
    }
}

/* --- Mobile Responsiveness --- */
@media (max-width: 991px) { /* Tablet breakpoint */
    .custom-events-display-container {
        flex-direction: column;
        gap: 20px;
    }

    .ced-sidebar {
        flex: 0 0 auto; /* Allow sidebar to take natural height */
        width: 100%;
        border-radius: 8px; /* Add some rounding when stacked */
    }
     .ced-category-filters {
        display: flex;
        flex-wrap: wrap; /* Allow filters to wrap */
        gap: 10px; /* Spacing between wrapped filter items */
    }
    .ced-category-filters li {
        margin-bottom: 0; /* Remove bottom margin as gap handles it */
    }
    .ced-category-filters li a {
        padding: 8px 12px; /* Slightly smaller padding */
    }

    .ced-event-image {
        flex: 0 0 180px; /* Smaller image on tablets */
        max-width: 180px;
    }
}

@media (max-width: 767px) { /* Mobile breakpoint */
    .ced-event-item {
        flex-direction: column; /* Stack image above details */
        gap: 15px;
    }

    .ced-event-image {
        flex: 0 0 auto; /* Allow image to take natural height */
        width: 100%; /* Full width image */
        max-width: 100%;
        max-height: 250px; /* Max height to prevent overly tall images */
    }
    .ced-event-image img {
        max-height: 250px;
    }
    .ced-event-image-placeholder {
        min-height: 120px;
    }

    .ced-event-title {
        font-size: 1.3em;
    }

    .ced-event-button {
        width: 100%; /* Full width button on mobile */
        box-sizing: border-box;
    }
}