/* Main and title */
main {
    background-color: floralwhite;
    color: black;
    text-align: center;
}

h1 {
    font-size: 3rem;
    font-weight: bold;
    margin-top: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* Event filters */
.event-filters {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 100px;
    margin-block: 25px 5px;
}

.event-filters::after {
    content: "";
    position: absolute;
    width: calc(100% + 100px);
    height: 1.5px;
    left: 50%;
    bottom: -5px;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 25%;
}

.event-filters>span {
    font-size: 1.4rem;
    transition: 0.3s;
    cursor: pointer;
    user-select: none;

    &:hover {
        text-decoration: underline;
        color: rgba(53, 198, 255, 0.8) !important;
    }

    &:active {
        opacity: 0.8;
    }

    &:not(.active) {
        color: grey;
    }
}

.event-filters>span.active {
    color: rgb(53, 198, 255);
    text-decoration: underline;
}

.no-events {
    display: none;
    font-size: 1.8rem;
    font-weight: 500;
    margin-top: 25px;
}

/* Event items */
.event-item {
    display: flex;
    gap: 15px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    width: clamp(300px, 60%, 600px);
    height: 175px;
    background-color: rgb(230, 230, 230);
    border: 1px solid lightgrey;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    font-family: "Poppins", sans-serif;
    margin-block: 20px;
    cursor: pointer;
    transition: 0.3s;
    overflow: hidden;
}

.event-item.upcoming::before {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    width: 15px;
    height: 15px;
    margin: 10px;
    background-color: orangered;
    border-radius: 50%;
    z-index: 1;
}

.event-item::after {
    /* Decorative line at the bottom of upcoming events */
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 100%;
    height: 5px;
    background-color: rgb(53, 198, 255);
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

.event-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.event-item>img {
    height: 100%;
    max-width: 20%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    user-select: none;
}

.event-item>.info-column {
    text-align: left;
    height: 100%;
    width: 100%;
    padding-block: 10px;
    overflow-y: auto;
    overflow-x: hidden;
}

.event-item>.info-column>h2 {
    line-height: 1.2;
}

.event-item .event-details {
    position: relative;
    display: inline-flex;
    justify-content: start;
    align-items: center;
    font-style: italic;
    gap: 15px;
}

.event-item .event-details::after {
    content: "";
    position: absolute;
    width: calc(100% + 20px);
    height: 1px;
    left: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
}

.event-item .event-details>div {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.event-item .event-description {
    font-size: 1rem;
    margin-top: 5px;
    line-break: normal;
    line-height: 1.5;
    color: #333;
}


@media only screen and (max-width: 600px) {
    div.events {
        padding-inline: 20px;
    }

    .event-filters {
        gap: 50px;
    }

    .event-filters::after {
        width: calc(100% + 50px);
    }

    .event-item {
        flex-direction: column;
        gap: 0;
        width: 100%;
        height: auto;
        padding-bottom: 10px;
    }

    .event-item>img {
        width: 100%;
        max-width: none;
    }

    .event-item>.info-column {
        padding: 5px;
    }
}