#event {
    #sec-title {
        position: relative;
        height: 480px;
        background-color: #FFCD9A;

        .background-img {
            height: 100%;

            img {
                width: 100%;
                height: 100%;
                object-fit: cover;
            }
        }

        .title-container {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;

            &.with-overlay {
                backdrop-filter: blur(2px);
                background: rgba(255, 255, 255, 0.6);
            }

            .title-text {
                height: 100%;
                flex: 1;
                display: flex;
                flex-direction: column;
                padding: 40px;

                h1 {
                    text-transform: uppercase;
                    font-family: 'Bayon', sans-serif;
                    font-size: 50px;
                    color: black;
                }

                .subtitle-container {
                    margin-top: 10px;
                    padding: 8px;
                    /* background: rgba(0, 0, 0, 1); */
                    width: fit-content;
                    background: linear-gradient(to right, #FE5000, #FFC175);

                    h2 {
                        text-transform: uppercase;
                        font-size: 18px;
                        color: white;
                    }
                }

                .description {
                    flex: 1;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    text-align: center;
                    font-size: 16px;
                    line-height: 1.5;
                    padding: 0 40px;
                    padding-top: 20px;
                    margin: 0 auto;
                    max-width: 800px;
                    color: black;
                }
            }
        }
    }

    #sec-events {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 40px;

        .box-containers {
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: space-between;
            width: 100%;
            max-width: 1000px;

            .container {
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                width: 48%;
                min-height: 400px;
                border: 1px solid black;
                cursor: pointer;

                .event-img-inner {
                    display: flex;
                    flex-direction: column;
                    align-items: center;
                    justify-content: center;
                    gap: 10px;
                    flex: 1;

                    & img {
                        width: 100%;
                        max-width: 300px;
                    }

                    & p {
                        text-align: center;
                    }
                }
    
                &:hover {
                    .event-label img {
                        transform: scale(1.3, 1) translateX(2px);
                    }
                }

                .event-label {
                    padding: 10px 20px;
                    display: flex;
                    width: 100%;
                    justify-content: space-between;
                    align-items: center;
                    background-color: #E66E05;
                    color: white;

                    & img {
                        transition: transform 0.3s ease;
                        /* transform: scale(0.98); */
                    }
                }

                .archive-inner {
                    position: relative;
                    flex: 1;
                    width: 100%;
                    display: flex;
                    flex-direction: column;
                    align-items: center;
                    justify-content: center;
                    padding: 20px 40px;
                    /* height: 400px; */

                    .background {
                        position: absolute;
                        top: 0;
                        left: 0;
                        width: 100%;
                        height: 100%;
                    }
                    
                    .img-container {
                        transition: transform 0.3s ease, box-shadow 0.3s ease;
                        position: relative;
                        padding-bottom: 15px;
                        cursor: pointer;

                        &.img-container-01 {
                            rotate: -10deg;
                            margin-right: auto;
                            z-index: 2;
                        }

                        &.img-container-02 {
                            rotate: 10deg;
                            margin-left: auto;
                            z-index: 1;
                        }

                        &:hover {
                            transform: scale(1.02) translateY(-1px);
                            z-index: 5;

                            .img-wrapper {
                                box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.5);
                            }
                        }
                        
                        &:nth-child(2) {
                            margin-top: -20px;
                        }

                        .tape {
                            position: absolute;
                            top: -10px;
                            left: 50%;
                            transform: translateX(-50%);
                            height: 40px;
                            z-index: 1;
                        }

                        .img-wrapper {
                            /* position: absolute; */
                            top: 10px;
                            left: 50%;
                            transform: translateX(-50%);
                            width: 200px;
                            position: relative;
                            aspect-ratio: 4/3;
                            overflow: hidden;
                            box-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.5);

                            & img {
                                transition: transform 0.3s ease;
                                position: absolute;
                                top: 0;
                                left: 0;
                                width: 100%;
                                height: 100%;
                                object-fit: cover;
                            }
                        }
                    }
                }
            }
        }
    }
}

@media (max-width: 768px) {
    #event {
        #sec-title {
            .title-container {
                .title-text {
                    padding: 20px;

                    .description {
                        padding: 0;
                        padding-top: 20px;

                        & br {
                            display: none;
                        }
                    }
                }
            }
        }

        #sec-events {
            padding: 20px;

            .box-containers {
                flex-direction: column;
                gap: 20px;

                .container {
                    width: 100%;
                    min-height: 300px;

                    .event-img-inner {
                        height: 200px;

                        & img {
                            max-width: 200px;
                        }
                    }

                    .archive-inner {
                        padding: 20px 20px;

                        .img-container {

                            &:nth-child(2) {
                                margin-top: -20px;
                            }

                            .tape {
                                top: -5px;
                                height: 30px;
                            }

                            .img-wrapper {
                                width: 180px;
                            }
                        }
                    }
                }
            }
        }
    }
}

#event-current {
    #sec-title {
        position: relative;
        height: 480px;
        background-color: #FFCD9A;

        .background-img {
            height: 100%;

            img {
                width: 100%;
                height: 100%;
                object-fit: cover;
            }
        }

        .title-container {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;

            &.with-overlay {
                backdrop-filter: blur(2px);
                background: rgba(255, 255, 255, 0.6);
            }

            .title-text {
                height: 100%;
                flex: 1;
                display: flex;
                flex-direction: column;
                padding: 40px;

                h1 {
                    text-transform: uppercase;
                    font-family: 'Bayon', sans-serif;
                    font-size: 50px;
                    color: black;
                }

                .subtitle-container {
                    margin-top: 10px;
                    padding: 8px;
                    width: fit-content;
                    background: linear-gradient(to right, #FE5000, #FFC175);

                    h2 {
                        text-transform: uppercase;
                        font-size: 18px;
                        color: white;
                    }
                }

                .description {
                    flex: 1;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    text-align: center;
                    font-size: 16px;
                    line-height: 1.5;
                    padding: 0 40px;
                    padding-top: 20px;
                    margin: 0 auto;
                    max-width: 800px;
                    color: black;
                }
            }
        }
    }

    #sec-events {
        .no-events {
            font-size: 20px;
            font-weight: 600;
            color: black;
            text-align: center;
            margin: 0 auto;
            padding: 40px 0;
        }

        .events {
            max-width: 800px;
            margin: 0 auto;
            padding: 40px 0;

            .event {
                display: flex;
                flex-direction: row;
                gap: 30px;
                margin: 0 10px;
                padding: 20px 20px;
                justify-content: center;
                cursor: pointer;
                transition: all 0.3s ease;

                &:hover:not(:has(.text-bottom:hover)) {
                    & .img-container img {
                        opacity: 0.9;
                    }

                    & .text-container {
                        & .title {
                            & a {
                                color: gray;
                            }
                            & h4 {
                                color: black;
                            }
                        }
                        & p {
                            color: gray;
                        }
                    }
                }

                .img-container {
                    width: 40%;
                    position: relative;
                    aspect-ratio: 4/3;
                    overflow: hidden;

                    & img {
                        transition: transform 0.3s ease;
                        position: absolute;
                        top: 0;
                        left: 0;
                        width: 100%;
                        height: 100%;
                        object-fit: cover;
                    }
                }

                .text-container {
                    flex: 1;
                    display: flex;
                    flex-direction: column;
                    justify-content: space-between;
                    padding: 25px 0 20px 0;
                    gap: 10px;
                    max-width: 80%;

                    & .title {
                        display: flex;
                        flex-direction: column;
                        align-items: flex-start;
                        gap: 10px;

                        & a {
                            color: gray;
                        }

                        & h4 {
                            font-size: 22px;
                            font-family: "Hiragino Kaku Gothic Pro W6", sans-serif;
                        }
                    }

                    & p {
                        font-size: 20px;
                        line-height: 1.25;
                    }

                    .text-bottom {
                        display: flex;
                        justify-content: space-between;
                        align-items: center;
                        font-size: 16px;
                        color: #666;

                        .author {
                            display: flex;
                            flex-direction: row;
                            align-items: center;
                            gap: 10px;

                            & img {
                                width: 24px;
                                height: 24px;
                                border-radius: 50%;
                                object-fit: cover;
                            }
                        }
                    }
                }
            }
        }
    }
}

@media (max-width: 768px) {
    #event-current {
        #sec-title {
            .title-container {
                .title-text {
                    padding: 20px;

                    .description {
                        padding: 0;
                        padding-top: 20px;

                        & br {
                            display: none;
                        }
                    }
                }
            }
        }

        #sec-events {
            .events {
                padding: 20px 16px;
                max-width: 100%;

                .event {
                    flex-direction: column;
                    gap: 16px;
                    margin: 0;
                    padding: 16px 0;

                    .img-container {
                        width: 100%;
                        aspect-ratio: 16/9;
                    }

                    .text-container {
                        max-width: 100%;
                        padding: 0 0 12px 0;
                        gap: 8px;

                        .title {
                            flex-direction: row;
                            align-items: center;
                            gap: 10px;

                            & a {
                                font-size: 14px;
                            }
                            & h4 {
                                font-size: 18px;
                            }
                        }

                        & p {
                            font-size: 16px;
                            line-height: 1.4;
                        }

                        .text-bottom {
                            justify-content: center;
                            gap: 8px 0;
                            font-size: 14px;
                        }
                    }
                }
            }
        }
    }
}

#event-archive {
    #sec-events {
        .events {
            max-width: 800px;
            margin: 0 auto;
            padding: 40px 0;

            .academic-year-group {
                margin-bottom: 30px;

                &:last-child {
                    margin-bottom: 0;
                }

                .academic-year-header {
                    font-size: 14px;
                    color: white;
                    margin-bottom: 20px;
                    padding: 15px 25px;
                    background-color: #E66E05;
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    cursor: pointer;
                    user-select: none;
                    transition: background-color 0.2s ease;

                    &:hover {
                        background-color: #d46204;
                    }

                    .year-title {
                        flex: 1;
                    }

                    .chevron-icon {
                        font-size: 10px;
                        transition: transform 0.3s ease;
                        margin-left: 10px;
                    }
                }

                .year-events {
                    max-height: 10000px;
                    overflow: hidden;
                    transition: max-height 0.3s ease, opacity 0.3s ease;
                    opacity: 1;
                }

                &.collapsed {
                    .academic-year-header {
                        .chevron-icon {
                            transform: rotate(-90deg);
                        }
                    }

                    .year-events {
                        max-height: 0;
                        opacity: 0;
                        margin-bottom: 0;
                    }
                }
            }
            
            .event {
                display: flex;
                flex-direction: row;
                gap: 30px;
                margin: 0 10px;
                padding: 20px 20px;
                /* border-bottom: 1px solid #CCCBCB; */
                justify-content: center;
                cursor: pointer;
                transition: all 0.3s ease;

                &:hover:not(:has(.text-bottom:hover)) {

                    & .img-container img {
                        opacity: 0.9;
                    }

                    & .text-container {
                        & h4 {
                            color: gray;
                        }
                        & p {
                            color: gray;
                        }
                    }
                }

                .img-container {
                    width: 40%;
                    position: relative;
                    aspect-ratio: 16/9;
                    overflow: hidden;

                    & img {
                        transition: transform 0.3s ease;
                        position: absolute;
                        top: 0;
                        left: 0;
                        width: 100%;
                        height: 100%;
                        object-fit: cover;
                    }
                }

                .text-container {
                    flex: 1;
                    display: flex;
                    flex-direction: column;
                    justify-content: space-between;
                    padding: 20px 0 15px 0;
                    gap: 10px;
                    max-width: 80%;

                    & h4 {
                        font-size: 22px;
                        font-family: "Hiragino Kaku Gothic Pro W6", sans-serif;
                    }

                    & p {
                        font-size: 16px;
                        line-height: 1.25;
                    }

                    .text-bottom {
                        display: flex;
                        justify-content: flex-start;
                        align-items: center;
                        font-size: 16px;
                        color: #666;
                        
                        .hr-line{
                            position: relative;
                            padding-left: 80px;
                            color: black;

                            &:not(:last-child) {
                                padding-top: 10px;
                                padding-bottom: 10px;
                                padding-right: 30px;
                                border-right: 1px solid #ccc;
                                margin-right: 30px;
                            }

                            &:before{
                                content:" ";
                                display: block;
                                height: 1px;
                                width: 60px;
                                position: absolute;
                                top: 50%;
                                left: 0;
                                background: black;
                            }
                            
                            &:hover {
                                color: gray;

                                &:before {
                                    background: gray;
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}

@media (max-width: 768px) {
    #event-archive {
        #sec-events {
            .events {
                padding: 20px 16px;
                max-width: 100%;

                .academic-year-group {
                    margin-bottom: 24px;

                    .academic-year-header {
                        padding: 12px 16px;
                        font-size: 13px;
                        margin-bottom: 16px;
                    }
                }

                .event {
                    flex-direction: column;
                    gap: 16px;
                    margin: 0;
                    padding: 16px 0;

                    .img-container {
                        width: 100%;
                        aspect-ratio: 16/9;
                    }

                    .text-container {
                        max-width: 100%;
                        padding: 0 0 12px 0;
                        gap: 8px;

                        & h4 {
                            font-size: 18px;
                        }

                        & p {
                            font-size: 16px;
                            line-height: 1.4;
                        }

                        .text-bottom {
                            /* flex-wrap: wrap; */
                            justify-content: center;
                            gap: 8px 0;
                            font-size: 14px;

                            .hr-line {
                                padding-left: 56px;

                                &:not(:last-child) {
                                    padding-top: 6px;
                                    padding-bottom: 6px;
                                    padding-right: 16px;
                                    margin-right: 16px;
                                }

                                &:before {
                                    width: 40px;
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}