/*
Theme Name:   Astra Child - TrendReport
Theme URI:    https://trendreport.world
Description:  TrendReport 전문 뉴스 블로그 - 가독성 최적화 디자인
Author:       TrendReport
Author URI:   https://trendreport.world
Template:     astra
Version:      2.2.0
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  astra-child
*/

/* ==========================================================================
   가독성 최적화 뉴스 블로그 디자인
   ========================================================================== */

/* 색상 변수 - 다크 테마 가독성 최적화 */
:root {
    --primary-color: #c62828;
    --text-dark: #ffffff;
    --text-medium: #f5f5f5;
    --text-light: #cccccc;
    --bg-white: #1a1a1a;
    --bg-light: #0f0f0f;
    --border-color: #333333;
    --hover-color: #d32f2f;
}

/* 전체 레이아웃 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans KR", sans-serif;
    line-height: 1.7;
    color: var(--text-dark) !important;
    background: var(--bg-light) !important;
    font-size: 16px;
    margin: 0;
    padding: 0;
}

/* 다크 테마 전체 적용 */
body *,
body h1,
body h2,
body h3,
body h4,
body h5,
body h6,
body p,
body span,
body div {
    color: inherit;
}

/* 헤더 - 다크 테마 (AI Builder 충돌 방지 - 더 구체적인 선택자) */
body .site-header,
body .main-header-bar,
body .main-header-bar-wrap,
.site .site-header,
.site .main-header-bar {
    background: var(--bg-white) !important;
    border-bottom: 2px solid var(--border-color) !important;
    box-shadow: 0 1px 3px rgba(255,255,255,0.08) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
}

body .site-title a,
.site .site-title a {
    color: var(--text-dark) !important;
    font-weight: 800 !important;
    font-size: 28px !important;
    text-decoration: none !important;
    letter-spacing: -0.5px !important;
}

body .site-title a:hover,
.site .site-title a:hover {
    color: var(--primary-color) !important;
}

body .site-description,
.site .site-description {
    color: var(--text-light) !important;
    font-size: 14px !important;
}

/* 네비게이션 메뉴 - 가독성 개선 (AI Builder 충돌 방지) */
body .main-navigation,
body .main-header-menu,
.site .main-navigation,
.site .main-header-menu {
    background: transparent !important;
}

body .main-navigation a,
body .main-header-menu a,
.site .main-navigation a,
.site .main-header-menu a {
    color: var(--text-medium) !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    padding: 12px 16px !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    letter-spacing: 0.3px !important;
}

body .main-navigation a:hover,
body .main-header-menu a:hover,
.site .main-navigation a:hover,
.site .main-header-menu a:hover {
    color: var(--primary-color) !important;
    background: transparent !important;
}

body .main-navigation .current-menu-item > a,
body .main-header-menu .current-menu-item > a,
.site .main-navigation .current-menu-item > a,
.site .main-header-menu .current-menu-item > a {
    color: var(--primary-color) !important;
    border-bottom: 2px solid var(--primary-color) !important;
}

/* 메인 컨테이너 (AI Builder 충돌 방지) */
body .ast-container,
.site .ast-container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 40px 20px !important;
    background: transparent !important;
}

/* 블로그 레이아웃 */
body .blog-layout-1,
.site .blog-layout-1 {
    display: block !important;
}

/* 그리드 레이아웃 - 깨짐 방지 (AI Builder 충돌 방지) */
body .ast-grid-common-col,
.site .ast-grid-common-col {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
    gap: 30px !important;
    margin-bottom: 0 !important;
}

/* 홈페이지에서 최신글 4-6개 표시를 위한 그리드 조정 */
body.home .ast-grid-common-col,
body.home .ast-grid-common-col,
.site.home .ast-grid-common-col {
    grid-template-columns: repeat(3, 1fr) !important;
}

@media (max-width: 1024px) {
    body.home .ast-grid-common-col,
    .site.home .ast-grid-common-col {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    body.home .ast-grid-common-col,
    .site.home .ast-grid-common-col {
        grid-template-columns: 1fr !important;
    }
}

/* AI Builder 제공서비스 영역 숨기기 - 홈페이지에서만 */
body.home .ast-builder-layout-element[data-section*="service"],
body.home .ast-builder-layout-element[data-section*="Service"],
body.home .ast-builder-layout-element[data-section*="제공서비스"],
body.home .ast-builder-section[data-section*="service"],
body.home .ast-builder-section[data-section*="Service"],
body.home .ast-builder-section[data-section*="제공서비스"],
.site.home .ast-builder-layout-element[data-section*="service"],
.site.home .ast-builder-layout-element[data-section*="Service"],
.site.home .ast-builder-layout-element[data-section*="제공서비스"] {
    display: none !important;
}

/* 제공서비스 관련 텍스트가 포함된 섹션 숨기기 (JavaScript로 처리) */
body.home .ast-builder-section:has([class*="service"]),
body.home .ast-builder-section:has([id*="service"]) {
    display: none !important;
}

/* 최신글 섹션 스타일 - 다크 테마 */
.astra-child-latest-posts-section {
    margin-top: 60px !important;
    padding: 40px 20px !important;
    background: var(--bg-light) !important;
}

.astra-child-latest-posts-section h2 {
    font-size: 32px !important;
    font-weight: 800 !important;
    margin-bottom: 40px !important;
    text-align: center !important;
    color: #ffffff !important;
}

/* 최신글 섹션 내 모든 텍스트 흰색 */
.astra-child-latest-posts-section .ast-article-post {
    background: var(--bg-white) !important;
    border-color: var(--border-color) !important;
}

.astra-child-latest-posts-section .entry-title,
.astra-child-latest-posts-section .entry-title a {
    color: #ffffff !important;
}

.astra-child-latest-posts-section .entry-title a:hover {
    color: #c62828 !important;
}

.astra-child-latest-posts-section .entry-meta,
.astra-child-latest-posts-section .entry-meta a {
    color: #cccccc !important;
}

.astra-child-latest-posts-section .entry-content,
.astra-child-latest-posts-section .entry-content p {
    color: #f5f5f5 !important;
}

.astra-child-latest-posts-section .entry-content a:not(.more-link) {
    color: #ffffff !important;
}

.astra-child-latest-posts-section .more-link {
    color: #ffffff !important;
    background: #c62828 !important;
}

/* 최신글 섹션 카테고리 라벨 텍스트 흰색 */
.astra-child-latest-posts-section .cat-links a {
    color: #ffffff !important;
    background: #c62828 !important;
}

.astra-child-latest-posts-section .cat-links a:hover {
    color: #ffffff !important;
    background: #d32f2f !important;
}

.astra-child-latest-posts-section .ast-grid-common-col {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 30px !important;
}

@media (max-width: 1024px) {
    .astra-child-latest-posts-section .ast-grid-common-col {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .astra-child-latest-posts-section {
        padding: 30px 15px !important;
    }
    
    .astra-child-latest-posts-section h2 {
        font-size: 24px !important;
        margin-bottom: 30px !important;
    }
    
    .astra-child-latest-posts-section .ast-grid-common-col {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}

/* UAGB 제공서비스 컨테이너는 JavaScript로 숨김 처리됨 */

/* 게시물 카드 - 깔끔한 디자인 (AI Builder 충돌 방지) */
body .ast-article-post,
.site .ast-article-post {
    background: var(--bg-white) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 4px !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
}

body .ast-article-post:hover,
.site .ast-article-post:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
    transform: translateY(-2px) !important;
    border-color: var(--primary-color) !important;
}

/* 게시물 내부 */
.ast-article-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 썸네일 영역 - 다크 테마 */
.post-content {
    position: relative;
    overflow: hidden;
    background: #000000;
    width: 100%;
}

.post-content a {
    display: block;
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-top: 56.25%; /* 16:9 비율 */
    background: #000000;
}

.post-content img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

/* 썸네일 이미지 영역 배경 - 모든 곳에 적용 */
.post-thumb-img-content {
    background: #000000 !important;
}

.post-thumb-img-content a {
    background: #000000 !important;
}

.ast-article-post:hover .post-content img {
    transform: scale(1.05);
}

/* 카테고리 배지 - 가독성 개선 */
.post-content .cat-links,
.entry-header .cat-links {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
}

.post-content .cat-links a,
.entry-header .cat-links a {
    display: inline-block;
    padding: 6px 12px;
    background: var(--primary-color);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.5px;
    margin-right: 5px;
    margin-bottom: 5px;
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.post-content .cat-links a:hover,
.entry-header .cat-links a:hover {
    background: var(--hover-color);
}

/* 엔트리 헤더 */
.entry-header {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* 게시물 제목 - 가독성 개선 */
.entry-title {
    font-size: 20px;
    line-height: 1.4;
    margin: 0 0 12px;
    font-weight: 700;
    flex-grow: 1;
    color: var(--text-dark);
}

.entry-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.2s ease;
    display: block;
}

.entry-title a:hover {
    color: var(--primary-color);
}

/* 메타 정보 - 가독성 개선 */
.entry-meta {
    font-size: 13px;
    color: var(--text-light);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    font-weight: 400;
}

.entry-meta a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

.entry-meta a:hover {
    color: var(--primary-color);
}

.entry-meta .posted-on {
    margin-right: 12px;
}

.entry-meta .byline {
    margin-right: 12px;
}

/* 엔트리 컨텐츠 - 가독성 개선 */
.entry-content {
    padding: 0 20px 20px;
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-medium);
    margin: 0;
}

.entry-content p {
    margin-bottom: 1.2em;
    color: var(--text-medium);
}

.entry-content .more-link {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 16px;
    background: var(--primary-color);
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    border-radius: 2px;
}

.entry-content .more-link:hover {
    background: var(--hover-color);
    transform: translateX(3px);
}

/* 사이드바 위젯 - 가독성 개선 */
.widget {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.widget-title {
    background: var(--bg-light);
    color: var(--text-dark);
    font-size: 18px;
    font-weight: 700;
    padding: 16px 20px;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--primary-color);
}

.widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget ul li {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul li:hover {
    background: var(--bg-light);
}

.widget ul li a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.5;
    display: block;
    transition: color 0.2s ease;
}

.widget ul li a:hover {
    color: var(--primary-color);
}

/* 인기글/최신글 위젯 */
.popular-posts-widget ul li,
.recent-posts-widget ul li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.popular-posts-widget .post-thumbnail,
.recent-posts-widget .post-thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    overflow: hidden;
    border-radius: 2px;
    background: var(--bg-light);
}

.popular-posts-widget .post-thumbnail img,
.recent-posts-widget .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.popular-posts-widget ul li:hover .post-thumbnail img,
.recent-posts-widget ul li:hover .post-thumbnail img {
    transform: scale(1.1);
}

.popular-posts-widget .post-title,
.recent-posts-widget .post-title {
    flex-grow: 1;
    font-size: 14px;
    line-height: 1.4;
}

.popular-posts-widget .post-date,
.recent-posts-widget .post-date {
    display: block;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 6px;
}

/* 광고 영역 */
.ad-space {
    background: var(--bg-light);
    border: 2px dashed var(--border-color);
    padding: 30px;
    text-align: center;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

/* 푸터 - 다크 테마 */
.site-footer {
    background: var(--bg-white) !important;
    color: var(--text-medium) !important;
    padding: 50px 0 30px;
    margin-top: 60px;
    border-top: 2px solid var(--border-color);
}

.site-footer a {
    color: var(--text-medium);
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-footer a:hover {
    color: var(--primary-color);
}

/* 단일 게시물 페이지 - 가독성 개선 */
.single .entry-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.single .entry-title {
    font-size: 36px;
    line-height: 1.3;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.single .entry-meta {
    font-size: 14px;
    margin-bottom: 20px;
    color: var(--text-light);
}

.single .entry-content {
    font-size: 18px;
    line-height: 1.9;
    color: var(--text-dark);
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
}

.single .entry-content p {
    margin-bottom: 1.8em;
    color: var(--text-dark);
}

.single .entry-content h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin-top: 40px;
    margin-bottom: 20px;
    line-height: 1.3;
    border-left: 4px solid var(--primary-color);
    padding-left: 15px;
}

.single .entry-content h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-top: 30px;
    margin-bottom: 15px;
    line-height: 1.4;
}

.single .entry-content img {
    width: 100%;
    height: auto;
    margin: 30px 0;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 페이지네이션 - 가독성 개선 */
.pagination {
    margin: 50px 0;
    text-align: center;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 10px 16px;
    margin: 0 4px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    border-radius: 2px;
}

.pagination a:hover {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

.pagination .current {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

/* 링크 스타일 */
a {
    color: var(--primary-color);
    transition: color 0.2s ease;
}

a:hover {
    color: var(--hover-color);
}

/* 반응형 디자인 - 태블릿 */
@media (max-width: 1024px) {
    .ast-grid-common-col {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 25px;
    }
    
    .ast-container {
        padding: 30px 15px;
    }
    
    .site-title a {
        font-size: 24px;
    }
    
    .entry-title {
        font-size: 18px;
    }
    
    .single .entry-title {
        font-size: 30px;
    }
}

/* 반응형 디자인 - 모바일 */
@media (max-width: 768px) {
    .ast-grid-common-col {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .ast-container {
        padding: 20px 10px;
    }
    
    .site-title a {
        font-size: 22px;
    }
    
    .main-navigation ul,
    .main-header-menu ul {
        flex-direction: column;
    }
    
    .main-navigation a,
    .main-header-menu a {
        display: block;
        padding: 12px 15px;
        border-bottom: 1px solid var(--border-color);
    }
    
    .entry-title {
        font-size: 18px;
    }
    
    .entry-content {
        font-size: 14px;
    }
    
    .single .entry-title {
        font-size: 24px;
    }
    
    .single .entry-content {
        font-size: 16px;
    }
    
    .single .entry-content h2 {
        font-size: 20px;
        margin-top: 25px;
    }
    
    .single .entry-content h3 {
        font-size: 18px;
        margin-top: 20px;
    }
    
    .widget-title {
        font-size: 16px;
        padding: 14px 15px;
    }
    
    .widget ul li {
        padding: 12px 15px;
    }
    
    .popular-posts-widget ul li,
    .recent-posts-widget ul li {
        flex-direction: column;
    }
    
    .popular-posts-widget .post-thumbnail,
    .recent-posts-widget .post-thumbnail {
        width: 100%;
        height: 180px;
    }
    
    .pagination a,
    .pagination span {
        padding: 8px 12px;
        font-size: 14px;
        margin: 0 2px;
    }
}

/* 작은 모바일 */
@media (max-width: 480px) {
    .site-title a {
        font-size: 20px;
    }
    
    .entry-title {
        font-size: 16px;
    }
    
    .single .entry-title {
        font-size: 20px;
    }
    
    .single .entry-content {
        font-size: 15px;
    }
    
    .cat-links a {
        padding: 4px 8px;
        font-size: 10px;
    }
}

/* 접근성 */
a:focus,
button:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* 선택 텍스트 */
::selection {
    background: var(--primary-color);
    color: #ffffff;
}

::-moz-selection {
    background: var(--primary-color);
    color: #ffffff;
}

/* 스크롤바 스타일 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--text-light);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* 인쇄 스타일 */
@media print {
    .site-header,
    .site-footer,
    .widget,
    .pagination {
        display: none;
    }
    
    .entry-content {
        font-size: 12pt;
        line-height: 1.6;
    }
}

/* 추가: 깨짐 방지 */
.ast-article-post * {
    box-sizing: border-box;
}

.post-content {
    width: 100%;
    max-width: 100%;
}

.entry-content img {
    max-width: 100%;
    height: auto;
}

/* 컨테이너 배경 - 다크 테마 */
.ast-container,
.site-content {
    background: transparent !important;
}

/* 전체 사이트 다크 테마 배경 */
#page,
.site,
.ast-separate-container,
.ast-separate-container .ast-article-single,
.ast-separate-container .ast-article-post {
    background: var(--bg-light) !important;
}

/* 본문 텍스트 강제 흰색 */
.entry-content,
.entry-content p,
.entry-content li,
.entry-content td,
.entry-content th,
.entry-content blockquote {
    color: var(--text-dark) !important;
}

/* 링크 텍스트 */
.entry-content a {
    color: #4da6ff !important;
}

.entry-content a:hover {
    color: #80c0ff !important;
}

/* Related Posts - 썸네일 없을 때 레이아웃 수정 */
.ast-related-post .entry-header {
    position: relative !important;
    padding-top: 0 !important;
}

/* 썸네일이 없을 때 카테고리 배지 위치 조정 */
.ast-related-post:not(.post-has-thumb) .cat-links,
.ast-related-post .entry-header .cat-links {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    margin-bottom: 12px !important;
    display: block !important;
}

/* 썸네일이 있을 때 카테고리 배지는 absolute로 */
.ast-related-post.post-has-thumb .post-thumb-img-content .cat-links {
    position: absolute !important;
    top: 12px !important;
    left: 12px !important;
    margin-bottom: 0 !important;
}

/* Related Posts 제목 마진 조정 */
.ast-related-post .entry-title,
.ast-related-post-title {
    margin-top: 0 !important;
    clear: both !important;
}

/* Related Posts 전체 카드 최소 높이 설정 */
.ast-related-post {
    min-height: 120px !important;
    display: flex !important;
    flex-direction: column !important;
}

.ast-related-post-content {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
}

/* 댓글 영역 완전히 숨기기 */
#comments,
.comments-area,
.comment-respond,
.comments-title,
.comment-form,
.ast-comment-list,
#respond {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 글쓴이 정보 숨기기 (날짜는 유지) */
.byline,
.author,
.posted-by,
.entry-author,
.ast-author-meta,
.author-name,
.by-author,
span.author.vcard,
.entry-meta .byline,
.ast-author-details,
.entry-meta .author-link,
.posted-by-author,
.ast-author-box,
.author-info,
.entry-meta span:has(.author),
.ast-single-author-box {
    display: none !important;
}

/* "글쓴이", "by" 등의 텍스트 포함 요소 숨기기 */
.entry-meta > *:not(.posted-on):not(.cat-links):not(.tags-links):not(.comments-link) {
    display: none !important;
}

/* Astra 테마 작성자 정보 숨기기 */
.single-post .entry-meta .byline,
.single .entry-meta .byline,
body.single-post .byline,
body.single .ast-author-meta {
    display: none !important;
    visibility: hidden !important;
}

/* 카테고리/아카이브 페이지 그리드 정렬 */
body.archive .ast-row,
body.category .ast-row,
body.tag .ast-row,
body.blog .ast-row,
.ast-blog-layout-4-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
}

body.archive .ast-col-sm-12,
body.category .ast-col-sm-12,
body.tag .ast-col-sm-12,
body.blog .ast-col-sm-12 {
    display: flex !important;
    flex-direction: column !important;
}

/* 그리드 레이아웃 4 - 카드 높이 완전 통일 */
.ast-blog-layout-4-grid .ast-article-post {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-height: 100% !important;
    padding: 0 !important;
}

.ast-blog-layout-4-grid .ast-article-inner {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    flex: 1 1 auto !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* 카테고리/아카이브 페이지 ast-article-post 패딩 완전 제거 */
body.category .ast-article-post,
body.archive .ast-article-post,
body.category .ast-article-inner,
body.archive .ast-article-inner,
.ast-separate-container .ast-blog-layout-4-grid .ast-article-post,
body.archive .ast-separate-container .ast-blog-layout-4-grid .ast-article-post,
body.category .ast-separate-container .ast-blog-layout-4-grid .ast-article-post,
.ast-separate-container.ast-blog-layout-4-grid .ast-article-post,
body.category .ast-blog-layout-4-grid .ast-article-inner,
body.archive .ast-blog-layout-4-grid .ast-article-inner {
    padding: 0 !important;
    margin-bottom: 0 !important;
}

/* 썸네일 영역 - 홈페이지와 동일하게 16:9 비율 */
.ast-blog-layout-4-grid .post-thumb-img-content {
    flex-shrink: 0 !important;
}

.ast-blog-layout-4-grid .post-thumb-img-content img,
body.category .post-thumb-img-content img,
body.archive .post-thumb-img-content img,
.ast-article-post .post-thumb-img-content img,
.ast-separate-container .ast-article-post .post-thumb-img-content img,
body.category .ast-article-post .post-thumb-img-content img,
body.archive .ast-article-post .post-thumb-img-content img {
    aspect-ratio: 16 / 9 !important;
    width: 100% !important;
    height: auto !important;
    object-fit: cover !important;
}

/* 카테고리/아카이브 페이지 스타일 - 메인 페이지와 동일하게 */
body.archive .ast-article-post,
body.category .ast-article-post,
body.tag .ast-article-post,
body.blog .ast-article-post,
body.archive article.ast-article-post,
body.category article.ast-article-post,
body.tag article.ast-article-post,
body.blog article.ast-article-post,
.ast-separate-container.archive .ast-article-post,
.ast-separate-container.category .ast-article-post {
    background: #1a1a1a !important;
    border: 1px solid #333333 !important;
    border-radius: 4px !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 1px 3px rgba(255,255,255,0.05) !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    padding: 0 !important;
}

/* article-inner와 article-post 패딩 제거 - 더 구체적으로 */
body.category .ast-article-inner,
body.archive .ast-article-inner,
.ast-separate-container .ast-article-inner,
.ast-separate-container .ast-blog-layout-4-grid .ast-article-post,
body.category .ast-separate-container .ast-blog-layout-4-grid .ast-article-post,
body.archive .ast-separate-container .ast-blog-layout-4-grid .ast-article-post {
    padding: 0 !important;
}

.archive .ast-article-post:hover,
.category .ast-article-post:hover,
.tag .ast-article-post:hover,
.blog .ast-article-post:hover {
    box-shadow: 0 4px 12px rgba(255,255,255,0.1) !important;
    transform: translateY(-2px) !important;
    border-color: #c62828 !important;
}

/* 썸네일 배경 */
.archive .post-content,
.category .post-content,
.tag .post-content,
.blog .post-content,
.archive .post-thumb-img-content,
.category .post-thumb-img-content,
.tag .post-thumb-img-content,
.blog .post-thumb-img-content {
    background: #000000 !important;
}

/* 카테고리/아카이브 페이지 제목 흰색 */
body.archive .entry-title,
body.archive .entry-title a,
body.category .entry-title,
body.category .entry-title a,
body.tag .entry-title,
body.tag .entry-title a,
body.blog .entry-title,
body.blog .entry-title a,
body.archive h2.entry-title a,
body.category h2.entry-title a,
body.tag h2.entry-title a,
body.blog h2.entry-title a,
body.archive .ast-article-post .entry-title a,
body.category .ast-article-post .entry-title a {
    color: #ffffff !important;
    text-decoration: none !important;
}

.archive .entry-title a:hover,
.category .entry-title a:hover,
.tag .entry-title a:hover,
.blog .entry-title a:hover {
    color: #c62828 !important;
}

/* 카테고리/아카이브 페이지 헤더 영역 - 메인 페이지와 동일 */
body.archive .entry-header,
body.category .entry-header,
body.tag .entry-header,
body.blog .entry-header,
body.archive .ast-article-post .entry-header,
body.category .ast-article-post .entry-header,
.ast-blog-layout-4-grid .entry-header {
    padding: 20px !important;
    flex-grow: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

/* 제목 스타일 - 메인 페이지와 완전 동일 (20px) */
body.archive .entry-title,
body.category .entry-title,
body.tag .entry-title,
body.blog .entry-title,
body.archive .ast-article-post .entry-title,
body.category .ast-article-post .entry-title,
body.archive h2.entry-title,
body.category h2.entry-title,
body.archive .ast-article-post h2.entry-title,
body.category .ast-article-post h2.entry-title,
.ast-blog-layout-4-grid .entry-title,
.ast-blog-layout-4-grid h2.entry-title,
.ast-blog-layout-4-grid .ast-article-post .entry-title,
body.category .ast-blog-layout-4-grid .entry-title h2 {
    font-size: 20px !important;
    line-height: 1.4 !important;
    margin: 0 0 12px !important;
    font-weight: 700 !important;
    flex-grow: 1 !important;
    padding: 0 !important;
}

/* 제목 링크도 동일한 크기 */
body.category .entry-title a,
body.archive .entry-title a,
.ast-blog-layout-4-grid .entry-title a,
body.category .ast-separate-container .ast-article-post .entry-title,
body.category .ast-separate-container .ast-article-post h2.entry-title,
.ast-separate-container .ast-article-post .entry-title {
    font-size: 20px !important;
}

/* Astra의 기본 타이틀 크기 강제 오버라이드 */
body.category .entry-title,
body.archive .entry-title,
.ast-separate-container .entry-title,
.ast-blog-layout-4-grid .ast-article-post .entry-title,
body.category .ast-separate-container .entry-title,
body.archive .ast-separate-container .entry-title {
    font-size: 20px !important;
    line-height: 1.4 !important;
}

/* 메타 정보 - 메인 페이지와 동일 */
body.archive .entry-meta,
body.category .entry-meta,
body.tag .entry-meta,
body.blog .entry-meta,
body.archive .ast-article-post .entry-meta,
body.category .ast-article-post .entry-meta,
.ast-blog-layout-4-grid .entry-meta {
    font-size: 13px !important;
    color: #cccccc !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.6 !important;
}

/* 카테고리/아카이브 페이지에서 "더 읽기" 링크와 entry-content 완전 제거 */
body.archive .ast-read-more-container,
body.category .ast-read-more-container,
body.tag .ast-read-more-container,
body.blog .ast-read-more-container,
body.archive .ast-article-post .entry-content,
body.category .ast-article-post .entry-content,
body.tag .ast-article-post .entry-content,
body.blog .ast-article-post .entry-content,
body.archive .entry-content.clear,
body.category .entry-content.clear,
body.tag .entry-content.clear,
body.blog .entry-content.clear {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* 카테고리/아카이브 페이지 메타 정보 링크 색상 */
body.archive .entry-meta a,
body.archive .entry-meta span,
body.category .entry-meta a,
body.category .entry-meta span,
body.tag .entry-meta a,
body.tag .entry-meta span,
body.blog .entry-meta a,
body.blog .entry-meta span {
    color: #cccccc !important;
}

/* 카테고리/아카이브 페이지에서는 본문을 숨기므로 스타일 불필요 */

/* 카테고리/아카이브 페이지 카테고리 라벨 */
.archive .cat-links a,
.category .cat-links a,
.tag .cat-links a,
.blog .cat-links a {
    color: #ffffff !important;
    background: #c62828 !important;
    display: inline-block !important;
    padding: 6px 12px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    letter-spacing: 0.5px !important;
    border-radius: 2px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
}

.archive .cat-links a:hover,
.category .cat-links a:hover,
.tag .cat-links a:hover,
.blog .cat-links a:hover {
    background: #d32f2f !important;
}

/* 페이지 제목 (아카이브 타이틀) */
.archive .page-title,
.category .page-title,
.tag .page-title,
.archive-title,
.page-header .page-title {
    color: #ffffff !important;
}
