/* History Page Styles */

/* Top Info Box */
.history-info-box {
    background-color: #F9F9F9;
    border-radius: 8px;
    padding: 25px 35px 25px 35px;
    position: relative;
    border: 1px solid #EEE;
    overflow: hidden;
    margin-bottom: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-image: url(/images/history-top-bg.png);
    background-repeat: no-repeat;
    background-position: right bottom;
    background-size: contain;

    .box-title {
        font-size: 22px;
        font-weight: 700;
        color: #252525;
        margin-bottom: 30px;
    }

    .box-content {
        position: relative;
        z-index: 2;

        .info-row {
            display: flex;
            margin-bottom: 15px;
            font-size: 18px;
            color: #252525;
            font-weight: 600;
            line-height: 1.5rem;

            &:last-child {
                margin-bottom: 0;
            }

            .label {
                font-weight: 700;
                width: 100px;
                color: #252525;
                position: relative;
                margin-right: 20px;

                &::after {
                    content: '|';
                    position: absolute;
                    right: 0;
                    color: #000;
                    font-weight: 400;
                }
            }

            .value {
                font-weight: 500;
            }
        }
    }

    }

/* Duties Box */
.history-duties-box {
    background-color: #F9F9F9;
    border-radius: 8px;
    padding: 25px 35px 25px 35px;
    position: relative;
    border: 1px solid #EEE;
    margin-bottom: 80px;

    .box-title {
        font-size: 22px;
        font-weight: 700;
        color: #252525;
        margin-bottom: 25px;
    }

    .duties-list {
        list-style: none;
        counter-reset: duties-counter;
        padding: 0;
        margin: 0;

        li {
            position: relative;
            padding-left: 35px;
            margin-bottom: 18px;
            font-size: 18px;
            color: #252525;
            font-weight: 500;
            line-height: 1.6;

            &:last-child {
                margin-bottom: 0;
            }

            &::before {
                counter-increment: duties-counter;
                content: counter(duties-counter) ".";
                position: absolute;
                left: 0;
                top: 0;
                font-weight: 600;
                color: #005770;
            }
        }
    }
}

/* Timeline-wrap Section */
.history-wrap {
	display: flex;
	flex-direction: column;
	row-gap: 4em;
}

/* Timeline Section */
.history-timeline {
    padding-left: 20px;

    .year-group {

        .year-title {
            font-size: 27px;
            color: #005770;
            font-weight: 700;
            margin-bottom: 30px;
            position: relative;
            display: inline-block;

            &::before {
                content: '';
                display: block;
                width: 40px;
                height: 3px;
                background-color: #005770;
                position: absolute;
                top: -15px;
                left: 0;
            }
        }

        .month-list {
            list-style: none;
            padding: 0;
            margin: 0;
            position: relative;

            /* Vertical Line */
            &::before {
                content: '';
                position: absolute;
                left: 7px;
                top: 10px;
                bottom: 10px;
                width: 1px;
                background-color: #BEC5C9;
                z-index: 1;

                @media (max-width: 1300px) {
                    bottom: 50px;
                }
                @media (max-width: 568px) {
                    bottom: 70px;
                }
            }

            li {
                display: flex;
                align-items: flex-start;
                margin-bottom: 35px;
                position: relative;
                padding-left: 35px;

                &:last-child {
                    margin-bottom: 0;
                }

                /* Dot */
                &::after {
                    content: '';
                    position: absolute;
                    left: 2px;
                    top: 8px;
                    width: 11px;
                    height: 11px;
                    background-color: #005770;
                    border-radius: 50%;
                    z-index: 2;
                }

                /* Halo for the first item (optional, or specific class) */
                &:first-child::after {
                    box-shadow: 0 0 0 4px rgba(0, 87, 112, 0.2);
                }

                .date {
                    font-size: 20px;
                    color: #666;
                    font-weight: 500;
                    width: 120px;
                    flex-shrink: 0;
                    line-height: 1.3;
                }

                .desc {
                    font-size: 20px;
                    color: #252525;
                    font-weight: 500;
                    line-height: 1.3;
                }
            }
        }
    }
}

/* Responsive */
@media (max-width: 1300px) {
    .history-info-box {
        padding: 30px;

        .box-content .info-row {
            flex-direction: column;

            .label {
                width: 100%;
                margin-bottom: 10px;

                &::after {
                    display: none;
                }
            }
        }
    }
    .history-info-box {
        background-size: 170px;
    }
    .history-timeline .year-group .month-list li {
        flex-direction: column;
        gap: 5px;

        .date {
            width: 100%;
            margin-bottom: 5px;
        }
    }
}
@media (max-width: 500px) {
    .box-icon img {
        display: none;
    }
    .history-info-box {
        background-image: none;
    }
}