:root {
    --prot: #f21d25;
    --prot_light: #ff222b;
    --text_color: #342E37;
    --text_color2: #6d6d6d;
    --inverse_text_color: rgba(255, 255, 255, 0.9);
    --light_gray: #edeeef;
    --dark_gray: #9A8F97;
    --hover_alt-button: #adadad;
    --foreground: #fff;
    --inverse_foreground: #342E37;
    --header_color: #342E37;
    --background: #fafafa;
    --border_radius: 4px;
    --gap-px: 10px;
    --selection-background: #708da6;
}

#agendabutton {
    margin-top: 10px;
}

.rsepro_events_module {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--gap-px);
    padding-bottom: var(--gap-px);
}

.rsepro_events_module li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background-color: var(--foreground);
    border: 1px solid var(--light_gray);
    border-radius: var(--border_radius);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Soft shadow */
    gap: 10px;
    transition: transform 0.1s ease-in-out; /* Hover scale effect */
}

/* First column: Date block */
.ContentAgendaItemBlock {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    color: var(--inverse_text_color);
    background-color: var(--prot);
    border-radius: var(--border_radius);
    padding: 4px; 
    text-align: center;
    box-sizing: content-box;
}

.EventDay {
    font-size: 24px;
    line-height: 21px;
    font-weight: bold;
}

.EventMonth {
    line-height: 17px;
}

/* Second column: Event details */
.ContentAgendaText {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ContentAgendaText h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--text_color);
    word-break: break-word; /* Break long words */
    hyphens: auto; /* Add hyphens where appropriate */
}

.ContentAgendaText h5 {
    margin: 0;
    font-size: 0.8em;
    font-weight: normal;
    color: var(--text_color2);
    word-break: break-word; /* Break long words */
    hyphens: auto; /* Add hyphens where appropriate */
}

/* Third column: Event image */
.rsepro-image {
    width: 70px;
    height: 70px;
    overflow: hidden; /* Ensure any overflow is hidden */
    flex-shrink: 0; /* Prevents shrinking */
    border-radius: var(--border_radius);
}

.rsepro-image img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Fills the container while maintaining aspect ratio */
    border-radius: inherit; /* Matches container's rounded corners */
}

/* Hover state */
.rsepro_events_module li:hover {
    transition: transform 0.5s;
    transform: scale(0.95); /* Slight scale on hover */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Enhanced shadow */
}

.ContentAgendaItem:hover .ContentAgendaItemBlock {
    background-color: var(--prot_light);
}

.rsepro_events_module li:active {
    transform: scale(0.98); /* Slightly shrink on click */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); /* Compact shadow on click */
}

/* Scrollable on smaller screens */
@media only screen and (max-width: 1000px) {
    .rsepro_events_module {
        flex-direction: row; /* Change the flex direction to row */
        overflow-x: auto;
        -ms-overflow-style: none;  /* IE 10+ */
        scrollbar-width: none;  /* Firefox */
    }

    .rsepro_events_module::-webkit-scrollbar { 
        display: none;  /* Chrome, Safari */
    }

    .rsepro_events_module li {
        flex-shrink: 0; /* Prevent shrinking of list items */
        width: 300px; /* Ensures the items have enough width when scrolling */
        padding: 8px;
        border-radius: 4px;
        background-color: var(--foreground);
        border: 1px solid var(--light_gray);
    }
    
    #agendabutton {
        display: none;
    }
}