.container--wide {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
}

.navigation {
    display: flex;
    justify-content: space-between;
    font-size: 1.5em;
}

.navigation h1 {
    text-transform: uppercase;
}

.navigation a {
    text-decoration: none;
    color: #333;
}

.calendar {
    display: flex;
    flex-wrap: wrap;
    font-size: 1.5em;
    color: #374250;
}

.calendar.header {
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
    color: #374250;
}

.calendar > div, .calendar.header > div {
    width: calc(100% / 7);
    box-sizing: border-box;
    padding: 5px;
}

.day {
    height: 384px;
    position: relative;
    text-align: center;
    border: 1px solid #eee;
    background-color: #fff;
}

.day .events {
    flex-direction: column;
    display: flex;
    height: 100%;
}

.day .events a {
    text-decoration: none;
}

.day .events .event {
    flex-grow: 1;
    display: flex;
    color: #374250;
    justify-content: center;
    flex-direction: column;
    cursor: pointer;
}

.day.empty {
    background-color: #ececec;
}

.wrapperOutside {
    background-color: #f5f5f5;
}

.wrapperEmpty {
    background-color: #fafafa;
}

.wrapperToday {
    border: 2px solid #ff0000;
}

.wrapperPast {
    opacity: 0.5;
}

.dateLabel {
    position: absolute;
    left: 14px;
    top: 7px;
    font-weight: bold;
}

.events {
    display: flex;
    flex-direction: column;
    height: calc(100% - 30px);
}

.event {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    cursor: pointer;
    margin: 2px;
    padding: 5px;
    font-size: 0.9em;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event span {
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
}

.time {
    font-size: 0.8em;
}

.event-details-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.event-details-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.close-details {
    float: right;
    font-size: 24px;
    cursor: pointer;
    background: none;
    border: none;
}

.past-event {
    opacity: 0.5;
}

.full-event {
    border: 2px solid #FF0000;
}

/* Mobile Ansicht */
@media (max-width: 768px) {
    .calendar.header {
        display: none;
    }

    .calendar {
        display: block;
        font-size: 1em;
    }

    .calendar > div {
        width: 100%;
    }

    .day {
        height: auto;
        min-height: 40px;
        margin-bottom: 1px;
        padding: 8px 0;
        display: flex;
        flex-direction: column;
        background-color: #f5f5f5;
    }

    .day.wrapperEmpty {
        background-color: #f5f5f5;
        display: flex !important;
    }

    .day.wrapperOutside {
        display: none !important;
    }

    .dateLabel {
        position: static;
        display: block;
        margin-left: 15px;
        margin-bottom: 5px;
        font-size: 1.1em;
        color: #666;
        text-align: left;
    }

    .events {
        height: auto;
        padding: 0 10px;
    }

    .event {
        margin: 2px 0;
        padding: 15px;
        font-size: 1.1em;
        text-align: center;
        min-height: 80px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
    }

    .time {
        font-size: 0.9em;
        margin-top: 5px;
    }

    .navigation h1 {
        font-size: 1.2em;
        margin: 0 10px;
    }

    .navigation {
        font-size: 1.2em;
        padding: 10px;
        margin-bottom: 20px;
    }

    .event span {
        line-height: 1.4;
    }
}

/* let navigation of Eventkalender always be on top*/
#events-calendar .navigation {
    position: sticky;
    top: 80px;
    background: white;
    z-index: 1000;
    padding: 10px 0;
}

/* Desktop Optimization */
@media (min-width: 769px) {
    .day {
        min-height: 384px;
        height: auto
    }

    .event {
        margin: 2px;
        padding: 5px;
    }
    
    .day .events {
        padding-top: 34px;
    }
}