/**
 * @ Author: MyoMoonlight
 * @ Create Time: 2024-08-25 01:45:32
 * @ Modified time: 2025-05-13 01:09:30
 */

#events,
#news {
    position: relative;
    & > h1 {
        position: relative;
        padding-top: 2em;
        width: fit-content;
        margin: auto;
        text-align: center;
        font-family: "Old-English";
        font-weight: 500;
        line-height: 1em;
        font-size: 2.2em;

        &::after {
            content: "";
            display: block;
            height: 3px;
            width: 30%;
            position: absolute;
            top: 105%;
            left: 50%;
            transform: translateX(-50%);
            background-color: black;
        }
    }
    & > img {
        position: absolute;
        display: block;
        height: 50px;
        cursor: pointer;
        z-index: 4;
        box-sizing: border-box;
        top: calc(50% + 3em);
        transform: translateY(-50%);
        &:nth-of-type(1) {
            left: calc(50vw - 550px);
        }
        &:nth-of-type(2) {
            left: calc(50vw + 550px);
        }
    }
    & > section {
        display: flex;
        flex-direction: row;
        gap: 40px;
        width: 920px;
        max-width: 80vw;
        margin: auto;
        z-index: 3;
        padding: 30px 20px;
        overflow-x: hidden;
    }
}

#news {
    & > img {
        bottom: 100px;
    }
    & > section > .card-cnt {
        aspect-ratio: 1/1;
    }
}

.card-cnt {
    width: 200px;
    aspect-ratio: 1/1.5;
    background-color: transparent;
    perspective: 2000px;
    flex-shrink: 0;

    & > div {
        height: 100%;
        width: 100%;
        max-width: 300px;
        max-height: 450px;
        position: relative;
        transform-style: preserve-3d;
        transition: 0.7s ease-in-out;
        box-shadow: 0px 5px 20px #0006;
        border-radius: 20px;

        /* Front and back */
        & > div {
            border-radius: 20px;
            height: inherit;
            width: inherit;
            position: absolute;
            top: 0;
            background-size: cover;
            -webkit-backface-visibility: hidden;
            backface-visibility: hidden;
            overflow: hidden;

            & > span {
                position: absolute;
                text-align: center;
                box-sizing: border-box;
                padding: 1.5em 1em;
                width: 100%;
                /* bottom: 1em; */
                bottom: 0;
                background-image: linear-gradient(0deg, #000a 60%, transparent);
            }

            & > img {
                width: 100%;
            }

            & > p {
                text-align: center;
            }

            & > button {
                /* padding: 0.4em 1.3em;
                border: none;
                font-weight: 500;
                background-color: #fff;
                border-radius: 1.2em;
                font-size: 1.2em; */
                font-size: 1em;
            }

            &:nth-child(1) {
                background-color: white;
                color: white;
                font-size: 0.9em;
            }

            &:nth-child(2) {
                transform: rotateY(180deg);
                padding: 1em;
                box-sizing: border-box;
                display: flex;
                flex-direction: column;
                gap: 0.5em;
                justify-content: center;
                align-items: center;
            }
        }
    }

    &:hover > div {
        transform: rotateY(180deg);
    }
}

@media screen and (max-width: 1000px) {
    #events > img,
    #news > img {
        transform: translate(-50%, -50%);
        &:nth-child(2) {
            left: calc(50vw - 375px);
        }
        &:nth-child(3) {
            left: calc(50vw + 375px);
        }
    }
    #events > section,
    #news > section {
        width: 680px;
    }
}

/* Mobile */
@media screen and (max-width: 450px) {
    #events > img,
    #news > img {
        transform: translate(-50%, -50%);
        &:nth-child(2) {
            left: calc(50vw - 172px);
        }
        &:nth-child(3) {
            left: calc(50vw + 172px);
        }
    }
    #events > section,
    #news > section {
        width: 80vw;
        max-width: 270px;
        & > div {
            width: 80vw;
            max-width: 270px;
        }
    }
}
