/* 메인 콘텐츠 영역 */
main {
    padding: 20px;
}

/* 카테고리 헤더 */
.category-header {
    text-align: center;
    padding: 20px 0;
    margin-bottom: 20px;
}

.category-title {
    font-size: 32px;
    color: var(--primary-dark);
    font-weight: bold;
    margin-bottom: 10px;
}

.category-description {
    color: var(--dark-gray);
    font-size: 16px;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.5;
}

/* 메인 기사 섹션 */
.main-article-section {
    margin-bottom: 40px;
}

.main-article {
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    cursor: pointer;
    position: relative;
}

.main-article-image-container {
    height: 450px;
    overflow: hidden;
}

.main-article-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.main-article-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
}

.main-article-headline {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 10px;
    line-height: 1.3;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: calc(28px * 1.3 * 2);
}

.main-article-summary {
    font-size: 14px; /* 폰트 크기 축소 */
    -webkit-line-clamp: 2; /* 최대 2줄까지만 표시 */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 42px;
}

/* 그리드 뉴스 섹션 */
.grid-news {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.grid-item {
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: transform 0.3s;
    cursor: pointer;
}

.grid-item:hover {
    transform: translateY(-5px);
}

.grid-item-image-container {
    height: 180px;
    overflow: hidden;
}

.grid-item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.grid-item:hover .grid-item-image {
    transform: scale(1.05);
}

.grid-item-content {
    padding: 15px;
}

.grid-item-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
    line-height: 1.3;
    color: #222;
}

.grid-item:hover .grid-item-title {
    color: var(--primary-color);
}

.article-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 기사 목록 섹션 */
.article-list-section {
    padding-top: 20px;
    border-top: 1px solid var(--medium-gray);
}

.article-list-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-dark);
    margin-bottom: 20px;
    text-align: center;
}

.article-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.article-item {
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: transform 0.3s;
    cursor: pointer;
}

.article-item:hover {
    transform: translateY(-5px);
}

.article-item-image-container {
    height: 200px;
    overflow: hidden;
}

.article-item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.article-item:hover .article-item-image {
    transform: scale(1.05);
}

.article-item-text {
    padding: 15px;
}

.article-item-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
    line-height: 1.3;
    color: #222;
}

.article-item:hover .article-item-title {
    color: var(--primary-color);
}

.article-item-summary {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* 페이지네이션 */
.pagination {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.page-item {
    margin: 0 5px;
}

.page-link {
    display: block;
    padding: 8px 12px;
    background-color: #fff;
    border: 1px solid var(--medium-gray);
    border-radius: 3px;
    color: var(--accent-color);
    text-decoration: none;
    transition: all 0.3s;
}

.page-link:hover {
    background-color: var(--light-gray);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 반응형 디자인 */
@media (max-width: 1200px) {
    .container {
        width: 100%;
    }
}

@media (max-width: 992px) {
    .grid-news {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-news {
        grid-template-columns: 1fr;
    }

    .article-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .main-article-image-container {
        height: 300px;
    }

    .main-article-headline {
        font-size: 24px;
    }
}