/* News Detail Page Styles */

* {
  font-family: var(--font-family-poppins) !important;
}

.news-detail-page {
    background: #ffffff;
}

.article-content img {
    width: 100%;
}

/* Article Section */
.article-section {
    padding: 120px 0 80px 0;
}

.article-container {
    /* max-width: 600px; - Removed */
    /* margin: 0 auto; - Removed */
    /* padding: 0 20px; - Removed - section__container handles this */
}

/* Article Header */
.article-header {
    margin-bottom: 60px;
    max-width: 800px; /* Content readability constraint */
    margin-left: auto;
    margin-right: auto;
}

.article-category {
    margin-bottom: 32px;
    color: #666666;
}

.article-title {
    margin: 0 0 32px 0;
    color: #000000;
    line-height: 1.3;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
    color: #999999;
}

.article-divider {
    width: 100%;
    height: 1px;
    background-color: #E5E5E5;
    margin-bottom: 40px;
}

/* Article Content */
.article-content {
    margin-bottom: 80px;
    max-width: 800px; /* Content readability constraint */
    margin-left: auto;
    margin-right: auto;
}

.article-body {
    color: #333333;
    line-height: 1.8;
    text-align: left;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.article-body p {
    margin-bottom: 20px;
}

.article-body h2 {
    font-size: 24px;
    font-weight: 600;
    color: #000;
    margin: 40px 0 20px 0;
}

.article-body h3 {
    font-size: 20px;
    font-weight: 600;
    color: #000;
    margin: 32px 0 16px 0;
}

.article-body ul,
.article-body ol {
    margin: 20px 0;
    padding-left: 20px;
    text-align: left;
    display: inline-block;
}

.article-body li {
    margin-bottom: 8px;
}

.article-body blockquote {
    margin: 32px 0;
    padding: 20px;
    background: #f8f9fa;
    font-style: italic;
}

.article-body a {
    color: #84b51b;
    text-decoration: underline;
}

.article-body a:hover {
    text-decoration: none;
}

/* 이미지 및 미디어 요소 반응형 처리 */
.article-body img,
.article-body figure,
.article-body video,
.article-body iframe,
.article-body table {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    overflow-x: auto;
    display: block;
    white-space: nowrap;
}

.article-body table th,
.article-body table td {
    padding: 8px 12px;
    border: 1px solid #ddd;
    text-align: left;
    white-space: normal;
}

.article-body table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* 긴 URL이나 텍스트 처리 */
.article-body pre,
.article-body code {
    max-width: 100%;
    overflow-x: auto;
    word-wrap: break-word;
    white-space: pre-wrap;
}

/* Article Footer */
.article-footer {
    margin-top: 60px;
    text-align: center;
    max-width: 800px; /* Content readability constraint */
    margin-left: auto;
    margin-right: auto;
}

/* Old back-to-list styles - now using global btn classes */
/*
.back-to-list {
    display: inline-block;
    padding: 14px 32px;
    border: 1px solid #CCCCCC;
    border-radius: 25px;
    color: #333333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.back-to-list:hover {
    background: #f5f5f5;
    border-color: #999;
}
*/

/* Related Articles Section */
.related-section {
    background: #f8f9fa;
    padding: 80px 0;
}

.related-section .section-title {
    font-size: 32px;
    font-weight: 600;
    color: #000;
    margin-bottom: 48px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.related-item {
    background: white;
    padding: 32px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.related-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.related-title {
    font-size: 18px;
    font-weight: 500;
    color: #333;
    margin: 0;
    flex: 1;
    line-height: 1.4;
}

.related-arrow {
    font-size: 24px;
    color: #999;
    margin-left: 16px;
}

/* Responsive Design */

/* PC/Desktop */
@media (min-width: 769px) {
    .article-section {
        padding: 140px 0 100px 0;
    }
    
    .article-body ul,
    .article-body ol {
        text-align: left;
        display: block;
        padding-left: 32px;
    }
}

/* Large Desktop */
@media (min-width: 1200px) {
    .related-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablet */
@media (max-width: 1200px) and (min-width: 769px) {
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .article-section {
        padding: 100px 0 80px 0;
    }
    
    .article-header,
    .article-content,
    .article-footer {
        padding: 0 16px;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .article-body {
        font-size: 16px;
        line-height: 1.7;
    }
    
    .article-body h2 {
        font-size: 20px;
        margin: 32px 0 16px 0;
    }
    
    .article-body h3 {
        font-size: 18px;
        margin: 24px 0 12px 0;
    }
    
    /* 모바일에서 테이블 스크롤 처리 */
    .article-body table {
        font-size: 14px;
        margin: 16px 0;
    }
    
    .article-body table th,
    .article-body table td {
        padding: 6px 8px;
        font-size: 12px;
    }
    
    /* 모바일에서 이미지 여백 조정 */
    .article-body img,
    .article-body figure {
        margin: 16px auto;
    }
    
    /* Old back-to-list mobile styles - now using global btn classes */
    /*
    .back-to-list {
        padding: 12px 28px;
    }
    */
    
    .related-section {
        padding: 60px 0;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .related-item {
        padding: 24px;
    }
    
    .related-title {
        font-size: 16px;
    }
}