/* 언어설정 */
@charset 'utf-8';

@font-face {
    font-family: 'SUIT-Regular';
    src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_suit@1.0/SUIT-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'KCCHyerim-Regular';
    src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/2411-3@1.0/KCCHyerim-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

/* 전체설정 */
* {
    margin: 0;
    padding: 0;
    font-family: 'SUIT-Regular';
}

ul,
ol {
    list-style: none;
}

a {
    text-decoration: none;
    color: var(--main-text);
}

img {
    vertical-align: bottom;
}

html,
body {
    overflow-x: hidden;
    scroll-behavior: smooth;

}

.body {
    max-width: 100%;
    overflow-x: hidden;
}

body.menu-open {
    overflow: hidden;
    /* 스크롤 막기 */
    touch-action: none;
    /* 터치 시 흔들림 방지 (모바일 UX 향상) */
}

/* 색상설정 */
:root {
    --main-navi: #204B62;
    --main-text: #333;
    --main-white: #fff;
}

/* 상세설정 ---------------------------------------------------------------------------- */

main {
    margin-top: 60px;
}

.txt {
    background-image: url(/img/success_bg2.png);
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    width: 100%;
    height: 400px;
    /* 또는 원하는 높이 */
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 50px;
}

.txt h1 {
    font-size: 60px;
    margin-top: 50px;
    font-weight: bold;
    display: inline-block;
    color: #fff;
}

/* 내용 설정 */
.news-section {
    max-width: 1000px;
    margin: 40px auto;
    padding: 30px;
    background: #F0F6F9;
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.news-tabs {
    display: flex;
    border-bottom: 2px solid #ccc;
    margin-bottom: 20px;
}

.news-tabs .tab {
    padding: 12px 24px;
    cursor: pointer;
    font-weight: bold;
    border: none;
    background: none;
    border-bottom: 3px solid transparent;
    font-size: 20px;
    color: #333;
}

.news-tabs .tab.active {
    border-bottom: 3px solid #0076d7;
    color: #0076d7;
}

.news-content .tab-content {
    display: none;
}

.news-content .tab-content.active {
    display: block;
}

.news-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.news-list li {
    border-bottom: 1px solid #ddd;
}

.news-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    text-decoration: none;
    color: #222;
}

.news-list .title {
    text-align: left;
    flex: 1;
    font-weight: 500;
    font-size: 18px;
}

.news-list .date {
    text-align: right;
    white-space: nowrap;
    font-size: 14px;
    color: #666;
}

/* 미디어 탭 */

/* 카드 그리드 */
.media-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);  /* ✅ 항상 3개 열 유지 */
    gap: 24px;
    margin-top: 30px;
    align-items: start;  /* ✅ 이거 추가 */
    grid-auto-rows: minmax(min-content, max-content);  /* ✅ 이거 추천 */
}

.media-card {
    text-decoration: none;
    color: inherit;
    display: block;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.media-card:hover {
    transform: translateY(-5px);
}

.media-card img {
    width: 100%;
    height: 15rem;
    display: block;
    object-fit: fill;
}

.media-card .text {
    padding: 15px;
}

.media-card .text .title {
    font-size: 16px;
    font-weight: bold;
    color: #222;
    margin-bottom: 8px;
    line-height: 1.4;
}

.media-card .text .date {
    font-size: 13px;
    color: #888;
}


/* 페이지네이션 */

.pagination {
    margin-top: 50px;
    text-align: center;
}

.pagination button {
    border: none;
    background: none;
    margin: 0 5px;
    font-size: 16px;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 5px;
    color: #333;
}

.pagination button.active {
    background-color: #0076d7;
    color: white;
}

.pagination button:hover {
    background-color: #e4f0ff;
}
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

/* 비활성 상태는 연한 회색 */
.pagination a.page {
    background-color: #eee;
    color: #333;
    font-weight: bold;
    border-radius: 10px;
    width: 40px;
    height: 40px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s, transform 0.2s;
}

.pagination a.page.active {
    background-color: #1f4e64;
    color: #fff;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

/* hover 시 약간 진한 느낌 */
.pagination .page:hover {
    background-color: #ccc;
    transform: scale(1.05);
}

.pagination .prev,
.pagination .next {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: #eee;
    color: #333;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
}
/* 미디어 쿼리 구간------------------------------------------------------------------------------------- */


/* PC 전용 */
@media screen and (min-width: 1440px) {}

/* 노트북 전용 */
@media screen and (min-width: 1025px) and (max-width: 1439px) {
    .txt h1 {
        font-size: 45px;
        margin-top: 50px;
        font-weight: bold;
        display: inline-block;
        color: var(--main-white);
    }
}

/* 태블릿 전용 */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    .txt h1 {
        font-size: 45px;
        margin-top: 50px;
        font-weight: bold;
        display: inline-block;
        color: var(--main-white);
    }
}

/* 모바일 전용 */
@media screen and (min-width: 481px) and (max-width: 767px) {

    .txt h1 {
        font-size: 40px;
        margin-top: 50px;
        font-weight: bold;
        display: inline-block;
        color: var(--main-white);
    }

    .txt {
        background-image: url(/img/news_bg.png);
        background-size: cover;
        background-position: center top;
        background-repeat: no-repeat;
        width: 100%;
        height: 300px;
        /* 또는 원하는 높이 */
        display: flex;
        justify-content: center;
        align-items: center;
        margin-top: 50px;
    }
}

@media screen and (max-width: 480px) and (orientation: portrait) {

    .txt h1 {
        font-size: 35px;
        margin-top: 50px;
        font-weight: bold;
        display: inline-block;
        color: var(--main-white);
    }

    .txt {
        height: 250px;          /* 배경 영역 축소 */
    }

    .media-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .media-card {
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: space-between;  /* ✅ 이미지 + 텍스트 분리 */
    }

    .media-card img {
        height: 150px; /* ✅ 모바일에서 고정 높이 */
        object-fit: fill;
    }

    .media-card .text {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        padding: 10px;
    }

    .media-card .text .title {
        font-size: 11px;
        line-height: 1.3;
        margin-bottom: 5px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap; /* ✅ 한 줄 말줄임 */
    }

    .media-card .text .date {
        font-size: 10px;
        color: #999;
    }
}