@import "../../styles/variables";

.event {
    &-item {
        padding: 0 5px 20px 5px;

        a {
            display: block;
            height: 100%;

            &:hover {
                .event-cap,
                .event-date {
                    color: $color-white;
                }

                .bg,
                .event-picture {
                    display: block;
                }
            }
        }
    }

    &-content {
        position: relative;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        height: 100%;
        padding: 10px;
        border-top: solid 3px $color-blue;
        background: $color-grey-2;

        h3 {
            font-size: 1.3rem;
            text-transform: uppercase;
        }

        .place {
            font-size: 1.4rem;
        }

        .bg {
            display: block;
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.6);
            z-index: 2;
        }
    }

    &-cap {
        position: relative;
        z-index: 3;
        color: $color-white;
    }

    &-date {
        position: relative;
        text-align: right;
        z-index: 3;
        font-size: 1.4rem;
        color: $color-white;

        span {
            &:first-child {
                font-weight: $semi-bold;
            }

            &:last-child {
                display: block;
                font-size: 1.1rem;
            }
        }
    }

    &-picture {
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        overflow: hidden;

        img {
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%,-50%);
            width: 100%;
        }
    }

    @media (min-width: 768px) {
        &-item {
            width: 50%;

            a {
                &:hover {
                    .event-cap,
                    .event-date {
                        color: $color-white;
                    }

                    .bg,
                    .event-picture {
                        display: block;
                    }
                }
            }
        }

        &-date,
        &-cap {
            color: $color-black;
        }

        &-picture, &-content .bg {
            display: none;
        }
    }
}