/* News Page Styles */


/* Subpage Hero Section */
.subpage-hero-section {
    position: relative;
    width: 100%;
    height: 280px;
    background-image: url('/image/news_bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.subpage-hero-section .inner {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    z-index: 10;
}

.subpage-hero-content {
    position: relative;
    z-index: 10;
    color: white;
}

.subpage-title {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 48px;
    margin-bottom: 0px;
    color: white;
    font-style: Italic;
    font-size: 80px;
    letter-spacing: 0%;

}

.subpage-subtitle {
    font-family: 'Inter', sans-serif;
    color: white;
    margin: 0;
    font-weight: 900;
    font-style: Italic;
    font-size: 24px;
    line-height: 100%;
    letter-spacing: 0%;
}

/* News Section */
.news-section {
    position: relative;
    width: 100%;
    padding: 172px 0 290px;
    background: #fafafa;
}

.section-title {
    font-family: 'Inter', 'Noto Sans KR', sans-serif;
    font-weight: 800;
    font-size: 50px;
    line-height: 62px;
    color: black;
    margin-bottom: 0;
}

.section-description {
    font-family: 'Inter', 'Noto Sans KR', sans-serif;
    font-weight: 500;
    font-size: 24px;
    line-height: 38px;
    letter-spacing: -0.24px;
    color: #797979;
    max-width: 929px;
}

.section-description.single-line {
    margin-top: 0;
    margin-bottom: 50px;
}

.news-grid {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    margin-bottom: 50px;
}

/* Pagination */
.news-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 60px;
}

.pagination-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #CCCCCC;
    text-decoration: none;
    transition: color 0.3s ease;
}

.pagination-item:hover {
    color: #2B8D8F;
}

.pagination-item.active {
    color: #2B8D8F;
    background-color: transparent;
}

/* Responsive Styles */
@media (max-width: 1920px) {
    section > .inner {
        max-width: 1440px;
    }
}

@media (max-width: 1680px) {
    section > .inner {
        max-width: 1200px;
        padding: 0 30px;
    }
    
    .subpage-title {
        /* font-size: 42px; */
    }
    
    .section-title {
        font-size: 44px;
        line-height: 54px;
    }
    
    .section-description {
        font-size: 22px;
        line-height: 34px;
    }
    
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
}

@media (max-width: 1280px) {
    section > .inner {
        max-width: 100%;
        padding: 0 24px;
    }
    
    .subpage-hero-section {
        height: 230px;
    }
    
    .subpage-title {
        /* font-size: 36px; */
    }
    
    .subpage-subtitle {
        font-size: 16px;
    }
    
    .news-section {
        padding: 120px 0 200px;
    }
    
    .section-title {
        font-size: 38px;
        line-height: 48px;
    }
    
    .section-description {
        font-size: 20px;
        line-height: 32px;
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .news-card {
        height: auto;
        min-height: 320px;
    }
    
    .news-title {
        font-size: 18px;
        line-height: 26px;
        height: auto;
        margin-bottom: 24px;
    }
}

@media (max-width: 768px) {
    .subpage-hero-section .inner {
        justify-content: center;
    }
    section > .inner {
        padding: 0 20px;
    }
    
    .subpage-hero-section {
        height: 230px;
    }
    
    .subpage-title {
        text-align: center;
        font-size: 36px;
    }

    .subpage-subtitle {
        font-size: 18px;
    }
    
    .news-section {
        padding: 80px 0 120px;
    }
    
    .section-title {
        font-size: 32px;
        line-height: 40px;
    }
    
    .section-description {
        font-size: 18px;
        line-height: 28px;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .news-card {
        height: auto;
        min-height: 300px;
    }
    
    .news-image {
        height: 160px;
    }
    
    .news-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* 기본 썸네일 이미지일 경우 가운데 정렬, 원본 사이즈 */
    .news-image img[src="/image/bd_thumb.png"],
    .news-image img[src*="bd_thumb.png"] {
        width: auto;
        height: auto;
        max-width: 150px;
        max-height: 100%;
        object-fit: contain;
        margin: 0 auto;
    }
    
    .news-content {
        padding: 20px;
    }
    
    .news-title {
        font-size: 16px;
        line-height: 24px;
        margin-bottom: 20px;
    }
    
    .news-date {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    section > .inner {
        padding: 0 16px;
    }
    
    .subpage-hero-section {
        height: 230px;
    }
    
    .subpage-title {
        /* font-size: 28px; */
        /* margin-bottom: 10px; */
    }
    
    .subpage-subtitle {
        font-size: 14px;
    }
    
    .news-section {
        padding: 60px 0 100px;
    }
    
    .section-title {
        font-size: 28px;
        line-height: 36px;
    }
    
    .section-description {
        font-size: 16px;
        line-height: 24px;
    }
    
    .news-grid {
        gap: 16px;
    }
    
    .news-card {
        min-height: 280px;
    }
    
    .news-image {
        height: 140px;
    }
    
    .news-image img {
        /* max-width: 120px; */
    }
    
    .news-content {
        padding: 16px;
    }
    
    .news-title {
        font-size: 15px;
        line-height: 22px;
        margin-bottom: 16px;
    }
    
    .news-date {
        font-size: 13px;
    }
}

.news-card {
    background: white;
    border: 1px solid #2b8d8f;
    width: 100%;
    height: 350px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 10px 15px 25px 0px rgba(0, 0, 0, 0.3);
}

.news-image {
    width: 100%;
    height: 192px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #d9d9d9;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 기본 썸네일 이미지일 경우 가운데 정렬, 원본 사이즈 */
.news-image img[src="/image/bd_thumb.png"],
.news-image img[src*="bd_thumb.png"] {
    width: auto;
    height: auto;
    max-width: 180px;
    max-height: 100%;
    object-fit: contain;
    margin: 0 auto;
}

.news-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.news-title {
    font-family: 'Inter', 'Noto Sans KR', sans-serif;
    font-weight: 700;
    font-size: 20px;
    line-height: 30px;
    color: black;
    height: 48px;
    margin-bottom: 36px;
}

.news-date {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #919191;
}

/* Common Styles */
section > .inner {
    width: 100%;
    max-width: 1440px;
    padding: 0 20px;
    margin: 0 auto;
    position: relative;
}

/* News Detail Popup */
.news-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.news-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.news-popup {
    width: 800px;
    max-height: 90vh;
    background: white;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.news-popup-overlay.active .news-popup {
    transform: scale(1);
}

.news-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    background: #2b8d8f;
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.news-popup-title {
    font-family: 'Inter', 'Noto Sans KR', sans-serif;
    font-weight: 700;
    font-size: 24px;
    margin: 0;
    color: white;
    flex: 1;
    margin-right: 20px;
    padding-right: 20px;
}

.news-popup-date {
    font-family: 'Inter', 'Noto Sans KR', sans-serif;
    font-weight: 400;
    font-size: 16px;
    color: white;
    margin: 0;
    white-space: nowrap;
}

.news-popup-close {
    background: none;
    border: none;
    color: white;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    margin-left: 20px;
}

.news-popup-close:hover {
    transform: rotate(90deg);
}

.news-popup-content {
    padding: 40px 30px;
    overflow-y: auto;
    max-height: calc(90vh - 100px);
    flex: 1;
}

.news-popup-content::-webkit-scrollbar {
    display: none;
}

.news-popup-content {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.news-popup-body {
    font-family: 'Inter', 'Noto Sans KR', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* News Popup Responsive */
@media (max-width: 1280px) {
    .news-popup {
        width: 90%;
        max-width: 700px;
    }
    
    .news-popup-header {
        padding: 20px 24px;
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .news-popup-title {
        font-size: 22px;
        margin-right: 15px;
        width: 100%;
        order: 1;
    }
    
    .news-popup-date {
        font-size: 15px;
        order: 2;
    }
    
    .news-popup-close {
        order: 3;
        margin-left: auto;
    }
    
    .news-popup-content {
        padding: 30px 24px;
    }
    
    .news-popup-body {
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    .news-popup {
        width: 95%;
        max-height: 85vh;
    }
    
    .news-popup-header {
        padding: 18px 20px;
    }
    
    .news-popup-title {
        font-size: 20px;
        margin-right: 12px;
    }
    
    .news-popup-date {
        font-size: 14px;
    }
    
    .news-popup-close {
        font-size: 32px;
        width: 32px;
        height: 32px;
        margin-left: 12px;
    }
    
    .news-popup-content {
        padding: 24px 20px;
    }
    
    .news-popup-body {
        font-size: 14px;
        line-height: 1.7;
    }
}

@media (max-width: 480px) {
    .news-popup {
        width: 100%;
        max-height: 90vh;
        border-radius: 0;
    }
    
    .news-popup-header {
        padding: 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .news-popup-title {
        font-size: 18px;
        margin-right: 0;
        width: calc(100% - 40px);
    }
    
    .news-popup-date {
        font-size: 13px;
    }
    
    .news-popup-close {
        position: absolute;
        top: 16px;
        right: 16px;
        margin-left: 0;
        font-size: 28px;
        width: 28px;
        height: 28px;
    }
    
    .news-popup-content {
        padding: 20px 16px;
    }
    
    .news-popup-body {
        font-size: 14px;
        line-height: 1.6;
    }
}

/* News Detail Page Styles */
.news-detail-section {
    width: 100%;
    padding: 250px 0;
}

.news-detail-container {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    background: white;
    border-top: 2px solid #000;
}

.news-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
    border-bottom: 1px solid #DDDDDD;
}

.news-detail-title {
    font-family: 'Inter', 'Noto Sans KR', sans-serif;
    font-weight: 800;
    font-size: 20px;
    line-height: 1.4;
    color: #000;
    margin: 0;
    flex: 1;
}

.news-detail-date {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #A1A1A1;
    margin: 0;
    white-space: nowrap;
    margin-left: 20px;
}

.news-detail-content {
    font-family: 'Inter', 'Noto Sans KR', sans-serif;
    font-size: 18px;
    line-height: 1.8;
    color: #000;
    padding: 20px 0 150px 0;
    border-bottom: 1px solid #DDDDDD;
}

.news-detail-content p {
    margin: 0;
}

.news-detail-footer {
    padding-top: 15px;
}

.news-back-btn {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #000;
    background-color: #fff;
    text-decoration: none;
    padding: 12px 24px;
    border: 1px solid #000;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.news-back-btn:hover {
    background-color: #333;
    color: #fff;
}

/* News Detail Mobile */
@media (max-width: 768px) {
    .news-detail-section {
        padding: 40px 0;
    }

    .news-detail-container {
        padding: 0 20px;
    }

    .news-detail-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 20px 0;
    }

    .news-detail-title {
        font-size: 24px;
        width: 100%;
    }

    .news-detail-date {
        margin-left: 0;
        font-size: 14px;
    }

    .news-detail-content {
        font-size: 16px;
        line-height: 1.6;
        padding: 15px 0;
    }

    .news-detail-footer {
        padding-top: 15px;
    }
}
