:root {
    --ics-hell: #4696ef;
    --ics-dunkel: #183159;
}

.page-id-12640 {
    .container {
        max-width: 1268px;
        width: 100%;

        .col-md-8 {
            width: 100% !important;

            &.col-md-offset-2 {
                margin: 0 !important;
            }
        }
    }

    h3 {
        margin: 0 !important;
        line-height: 1.0833em !important;
        font-weight: 400 !important;
        font-size: 1.8em !important;
    }

    div[align="right"] {
        display: none;
    }
} 

/* EVENTS */

/* Container */
.ics-events-wrapper {
    width: 100%;
    margin: 40px auto;
    padding: 0 20px;
    overflow: visible;

    h3 {
        margin: 0 !important;
        line-height: 1.0833em !important;
        font-weight: 400 !important;
        font-size: 1.8em !important;
    }

    /* Grid Layout */

    .ics-events-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        margin: 0;
        padding: 0;

        /* Event Card */

        .ics-event-card {
            background: #fff;
            transition: all 0.3s ease;
            min-height: 13em;

            .ics-event-link {
                display: block;
                text-decoration: none;
                color: inherit;
                height: 100%;
                border: 1px solid var(--ics-hell);
                border-top: 0;
                padding: 1.4em 1.8em;
                margin-bottom: -1px;
                margin-right: -1px;
                margin-top: -1px;
                margin-left: -1px;

                &.item-1,
                &.item-2,
                &.item-3 {
                    border-top: 1px solid var(--ics-hell) !important;
                }

                .ics-event-content {
                    height: 100%;
                    display: flex;
                    flex-direction: column;
                    justify-content: space-between;
                }


                .ics-event-wrapper {
                    position: relative;
                    margin-top: 20px;

                    .date-location-wrapper {
                        padding-right: 3em;
                        font-size: 0.9em;
                        line-height: 1.38em;
                        letter-spacing: 0.05em;
                        position: relative;

                        .arrow-icon {
                            position: absolute;
                            right: 0;
                            bottom: 0;
                            height: 2em;
                            width: 2em;
                            justify-content: center;
                            align-content: end;
                            align-items: end;
                            display: none;

                            svg {
                                width: 1.5em;
                                height: 1.5em;
                            }
                        }

                        &:after {
                            content: "\002B";
                            font-family: icons, sans-serif;
                            display: inline-block;
                            text-align: center;
                            white-space: nowrap;
                            position: absolute;
                            right: 0;
                            bottom: 0;
                            font-size: 2em;
                        }
                    }
                }

                &:hover {
                    .date-location-wrapper {
                        color: #fff;

                        .arrow-icon {
                            display: flex;
                        }

                        &:after {
                            content: none;
                        }
                    }
                }

                &:hover {
                    background: var(--ics-dunkel);
                }

                &.ics-event-internal {
                    .title-wrapper .ics-event-title,
                    .ics-event-wrapper {
                        color: var(--ics-hell);
                    }

                    &:hover {
                        background: var(--ics-hell);
                    }
                }
            }
        }
    }

    .show-more-events {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        margin-top: 50px;

        a {
            background: var(--ics-hell);
            padding: 8px 16px;
            border: 3px solid var(--ics-hell);
            color: #fff;
            text-decoration: none;
        }

        &:hover {
            a {
                background: #fff;
                color: var(--ics-hell);
            }
        }
    }
}

#lio-prio .ics-event-card:hover h3 {
    color: #fff;
    text-decoration: none;
}

/* Responsive */
@media (min-width: 768px) and (max-width: 900px) {
    .ics-events-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0;
    }

    .ics-event-title {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .ics-events-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 0;
    }

    .ics-event-title {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .ics-events-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .ics-events-wrapper {
        padding: 0 15px;
    }
}

/* NEWS */

.ics-news-wrapper {
    width: 100%;
    margin: 40px auto;
    padding: 0 20px;
    overflow: visible;
    h3 {
        margin: 0 !important;
        line-height: 1.0833em !important;
        font-weight: 400 !important;
        font-size: 1.8em !important;
    }

    .ics-news-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        grid-column-gap: 1px;

        .ics-news-card {
            a {
                text-decoration: none;

                .ics-news-content {
                    padding-bottom: 2em;

                    .ics-news-image {
                        position: relative;
                        overflow: hidden;

                        img {
                            margin-bottom: 0 !important;
                            height: 220px;
                            aspect-ratio: 16 / 9;
                            object-fit: cover;
                        }

                        .icon-overlay {
                            position: absolute;
                            left: 0;
                            right: 0;
                            bottom: 0;
                            display: flex;
                            justify-content: center;
                            align-items: center;
                            background: rgba(0, 149, 239, 0.7);
                            top: 0;
                            transform: translateY(200%);
                            transition: transform 400ms ease;

                            svg {
                                height: 3em;
                                width: 3em;
                                z-index: 5;
                            }
                        }
                    }

                    .title-wrapper {
                        padding: 0.8em;

                        .ics-news-title {
                            display: block;
                            font-size: 1.33em !important;
                            line-height: 1.125em !important;
                            font-weight: 400 !important;
                            min-width: 100%;
                            word-break: break-word;
                            color: var(--ics-hell);

                            &:before {
                                content: '';
                                background: var(--ics-hell);
                                display: inline-block;
                                width: 2em;
                                height: 0;
                                border: 1px none;
                                border: 0.1rem none;
                                border-top-style: none;
                                border-top-style: solid;
                                vertical-align: middle;
                                margin-left: 0;
                                margin-right: 0.5em;
                            }
                        }
                    }
                }

                &:hover {
                    .ics-news-content {
                        .ics-news-image {
                            .icon-overlay {
                                transform: translateY(0);
                            }
                        }
                    }
                }
            }
        }
    }

    .show-more-news {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;

        a {
            background: var(--ics-hell);
            padding: 8px 16px;
            border: 3px solid var(--ics-hell);
            color: #fff;
            text-decoration: none;
        }

        &:hover {
            a {
                background: #fff;
                color: var(--ics-hell);
            }
        }
    }
}

@media (min-width: 768px) and (max-width: 900px) {
    .ics-news-wrapper {
        .ics-news-grid {
            grid-template-columns: repeat(2, 1fr);
        }
    }
}

@media (max-width: 768px) {
    .ics-news-wrapper {
        .ics-news-grid {
            grid-template-columns: 1fr;

            .ics-news-image {
                text-align: center;
                img {
                    width: 100%;
                }
            }
        }
    }

    .ics-events-wrapper {
        .ics-events-grid {
            grid-template-columns: 1fr;
        }
    }
}

@media (max-width: 480px) {
     .ics-events-wrapper {
        margin-top: 120px;

        .ics-events-grid {
            .ics-event-title {
                font-size: 24px !important;
            }
        }
    }
}