/* Container Layout */
.notice-container {
    width: 100%;
    background-color: #fff;
    display: flex;
    justify-content: center;

    .notice-inner {
        width: 100%;
        max-width: 1200px;
        margin: 0 auto;
        padding: 60px 0;
        box-sizing: border-box;

        .notice-content-wrapper {
            display: flex;
            gap: 40px;

            @media (max-width: 1300px) {
                flex-direction: column;
            }
        }

        @media (max-width: 1300px) {
            padding: 40px 20px;
        }
    }
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    height: 40px;

    h3 {
        font-size: 2rem;
        font-weight: 600;
        color: #2D2D2D;
        margin: 0;
        font-weight: 700;

        @media (max-width: 768px) {
            font-size: 1.7rem;
        }
    }

    .btn-more {
        color: #005770;
        text-decoration: none;
        border: 1px solid #005770;
        border-radius: 30px;
        font-size: 17px;
        font-weight: 500;
        transition: all 0.2s;
        display: inline-flex;
        padding: 0 13px;
        align-items: center;
        justify-content: space-between;
        height: 39px;
        box-sizing: border-box;


        .btn-more-icon {
            display: inline-block;
            margin-left:8px;
            width: 14px;
            height: 14px;
            margin-bottom: 2px;
            background: url('/images/more.png') no-repeat center/contain;
            transition: background-image 0.2s;
        }

        &:hover {
            background-color: #005770;
            color: #fff;

            .btn-more-icon {
                background-image: url('/images/more_w.png');
            }
        }

    }
}

/* Left: Notice Section */
.notice-section {
    flex: 7;

    .notice-header-wrapper {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
        margin-bottom: 20px;
        flex-wrap: wrap;

        @media (max-width: 768px) {
            flex-direction: column;
            align-items: flex-start;
            gap: 15px;
        }
    }

    .section-header {
        margin-bottom: 0;
        height: auto;
        flex-shrink: 0;
        display: flex;
        justify-content: space-between;
        align-items: center;

        @media (max-width: 768px) {
            width: 100%;
            margin-bottom: 0;
        }
    }

    .notice-tabs {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        flex: 1;
        gap: 15px;
        min-width: 0;

        @media (max-width: 768px) {
            width: 100%;
            justify-content: flex-start;
            gap: 5px;
            flex-wrap: nowrap;
            margin-top: 0;
        }

        .btn-more {
            color: #005770;
            text-decoration: none;
            border: 1px solid #005770;
            border-radius: 30px;
            font-size: 17px;
            font-weight: 500;
            transition: all 0.2s;
            display: inline-flex;
            padding: 0 13px;
            align-items: center;
            justify-content: space-between;
            height: 39px;
            box-sizing: border-box;
            flex-shrink: 0;
            white-space: nowrap;
            margin-left: 15px;

            .btn-more-icon {
                display: inline-block;
                margin-left: 8px;
                width: 14px;
                height: 14px;
                margin-bottom: 2px;
                background: url('/images/more.png') no-repeat center/contain;
                transition: background-image 0.2s;
            }

            &:hover {
                background-color: #005770;
                color: #fff;

                .btn-more-icon {
                    background-image: url('/images/more_w.png');
                }
            }

            @media (max-width: 768px) {
                padding: 0 10px;
                font-size: 14px;
                height: 34px;
                margin-left: auto;
            }

            @media (max-width: 370px) {
                font-size: 0;
                padding: 0;
                width: 34px;
                height: 34px;
                justify-content: center;
                border-radius: 50%;

                .btn-more-icon {
                    margin-left: 0;
                }
            }
        }

        .tab-btn {
            background: none;
            border: none;
            padding: 0;
            font-size: 20px;
            font-weight: 500;
            color: #666;
            cursor: pointer;
            position: relative;
            padding-bottom: 10px;
            margin-bottom: -10px;
            transition: all 0.2s;
            white-space: nowrap;
            margin-right: 10px;

            @media (max-width: 768px) {
                font-size: 18px;
                margin-right: 10px;
            }

            &::after {
                content: '';
                position: absolute;
                bottom: -1px;
                left: 0;
                width: 0;
                height: 3px;
                background-color: #005770;
                transition: width 0.3s ease;
            }

            &.active {
                color: #005770;
                font-weight: 700;

                &::after {
                    width: 100%;
                }
            }

            &:hover {
                color: #005770;
            }
        }

    }

    .notice-list-wrapper {
        border: 1px solid #BEC5C9;
        border-radius: 18px;
        padding: 17px 33px 10px 33px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
        height: 430px;
        overflow-y: auto;
        box-sizing: border-box;

        @media (max-width: 768px) {
            padding:  15px 18px 6px;
            }
    }

    .notice-list {
        list-style: none;
        padding: 0;
        margin: 0;

        li {
            border-bottom: 1px solid #BEC5C9;
            height: 98px;

            &:last-child {
                border-bottom: none;
            }

            a {
                display: flex;
                justify-content: space-between;
                align-items: flex-start;
                padding: 20px 10px;
                text-decoration: none;
                color: #333;
                transition: background-color 0.2s;
                box-sizing: border-box;
                height: 100%;
                align-items: center;
            }
        }
    }

    .tab-content {
        display: none;

        &.active {
            display: block;
        }
    }
}

.notice-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;

    .title-row {
        display: grid;
        grid-template-columns: 1fr 40px;
        align-items: center;
        gap: 8px;

        @media (max-width: 768px) {
            grid-template-columns: 1fr;
            width: 100%;
        }

        .title {
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
            display: block;
            min-width: 0;
            color: #252525;
            text-overflow: ellipsis;
            font-size: 1.35rem;
            font-weight: 600;
            width: 100%;

            @media (max-width: 768px) {
                font-size: 1.2rem;
            }

            .category {
                font-weight: 700;
                color: #333;
                margin-right: 5px;
            }

        }

        .badge-new {
            font-size: 17px;
            color: #005770;
            font-weight: 600;
            justify-self: end;
            white-space: nowrap;
            margin-left: 10px;

            @media (max-width: 768px) {
                display: none;
            }
        }
        
    }

    .date-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-top: 10px;
        width: 100%;

        @media (max-width: 768px) {
            margin-top: 8px;
        }
    }

    .date {
        font-size: 18px;
        color: #595959;
        font-weight: 400;
        text-align: left;
    }

}

.icon-plus {
    width: 24px;
    height: 24px;
    object-fit: contain;
    transition: transform .35s ease; 
    transform-origin: 50% 50%; 
    will-change: transform;
    flex-shrink: 0;

    @media (max-width: 768px) {
                width: 20px;
                height: 20px;
            }
}

.icon-plus-desktop {
    margin-left: 20px;

    @media (max-width: 768px) {
        display: none;
    }
}

.icon-plus-mobile {
    @media (min-width: 769px) {
        display: none;
    }
}
.notice-list a:hover .icon-plus {
    transform: rotate(180deg);
}
.notice-list a:hover .title {
    color: #005770;
}



/* Right: Alim Section */
.alim-section {
    flex: 0 0 470px;
    max-width: 470px;

    @media (max-width: 1300px) {
        flex: 1 1 auto;
        max-width: 100%;
    }

    .section-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;

        .alim-controls {
            display: flex;
            gap: 10px;

            .btn-control {
                width: 40px;
                height: 40px;
                border: 1px solid #005770;
                border-radius: 50%;
                background-color: transparent;
                display: flex;
                align-items: center;
                justify-content: center;
                cursor: pointer;
                padding: 0;
                transition: all 0.2s;
                text-decoration: none;

                img {
                    width: auto;
                    height: 20px;
                    object-fit: contain;
                }

                &.more {
                    img {
                        width: 15px;
                        height: 15px;
                    }
                }

                &:hover {
                    background-color: #E8F4F6;
                }

                @media (max-width: 768px) {
                    width: 30px;
                    height: 30px;

                    img {
                        height: 15px;
                    }
                }
            }
        }
    }

    .alim-list-wrapper {
        overflow: hidden;
        width: 100%;
        height: 430px;
        box-sizing: border-box;
        position: relative;

        @media (max-width: 1300px) {
            height: 430px;
        }

        @media (max-width: 768px) {
            height: auto;
            min-height: 390px;
        }
    }

    .alim-list {
        display: flex;
        gap: 0;
        transition: transform 0.5s ease;
        will-change: transform;
        height: 100%;
    }

    .alim-card {
        flex-shrink: 0;
        background-color: #fff;
        border: 1px solid #CDD1D5;
        border-radius: 12px;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        transition: all 0.3s ease;
        position: relative;
        cursor: pointer;
        box-sizing: border-box;
        height: 430px;

        @media (max-width: 1300px) {
            height: 430px;
        }

        @media (max-width: 768px) {
            height: auto;
            min-height: 390px;
        }

        &:hover {
            background-color: #e8f4f6;
            border: 1px solid #005770;
        }

        .alim-image {
            width: 100%;
            height: 309px;
            background-color: #E0E0E0;
            flex-shrink: 0;
			
			img {
		        width: 100%;
		        height: 100%;
		        object-fit: cover; 
		        /* object-fit: contain;  */
		        object-position: center; 
		    }
		    
            @media (max-width: 768px) {
                min-height: 200px;
            }

            @media (max-width: 767px) {
                min-height: 180px;
            }
        }

        .alim-content {
            padding: 20px;
            flex: 1;
            display: flex;
            flex-direction: column;
            position: relative;
            box-sizing: border-box;

            @media (max-width: 767px) {
                padding: 18px;
            }

            .alim-title {
                font-size: 19px;
                font-weight: 700;
                color: #252525;
                margin: 0 0 12px 0;
                line-height: 1.3;
                display: -webkit-box;
                -webkit-box-orient: vertical;
                -webkit-line-clamp: 2;
                overflow: hidden;
                text-overflow: ellipsis;
                word-break: break-word;
                overflow-wrap: break-word;
                max-height: calc(1.5em * 2);
                min-height: 1.5em;
                flex: 0 0 auto;

                @media (max-width: 767px) {
                    max-height: calc(1.7em * 2);
                    min-height: 1.7em;
                }
            }

            .alim-date {
                font-size: 17px;
                color: #666;
                font-weight: 500;
                margin-top: auto;
                display: block;

                @media (max-width: 767px) {
                    font-size: 13px;
                }
            }

            .btn-alim-more {
                position: absolute;
                bottom: 20px;
                right: 20px;
                width: 40px;
                height: 40px;
                background-color: #E8F4F6;
                border: none;
                border-radius: 50%;
                display: flex;
                align-items: center;
                justify-content: center;
                cursor: pointer;
                transition: background-color 0.2s;
                flex-shrink: 0;

                img {
                    width: 18px;
                    height: 18px;
                }

                &:hover {
                    background-color: #fff;
                }

                @media (max-width: 767px) {
                    width: 36px;
                    height: 36px;
                    bottom: 18px;
                    right: 18px;

                    img {
                        width: 16px;
                        height: 16px;
                    }
                }
            }
        }

        &:hover .alim-content .btn-alim-more {
            background-color: #fff;
        }
    }
}