@charset "utf-8";
/* 뉴스 포스팅 스타일 추가 CSS */

/* 기본 썸네일 스타일 */
.news-default-thumbnail {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 48px;
    font-weight: 700;
}

/* 로딩 애니메이션 */
.news-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(214, 48, 49, 0.3);
    border-radius: 50%;
    border-top-color: #d63031;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 뉴스 배지 */
.news-badge {
    display: inline-block;
    padding: 3px 8px;
    background: #d63031;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 5px;
}

.news-badge.news-badge-new {
    background: #ff6b6b;
}

.news-badge.news-badge-hot {
    background: #ffa502;
}

.news-badge.news-badge-breaking {
    background: #d63031;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* 더 나은 이미지 로드 효과 */
.news-card-img, .news-headline-img, .news-list-img {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -100% 0; }
    100% { background-position: 100% 0; }
}

.news-card-img[src]:not([src=""]), 
.news-headline-img[src]:not([src=""]), 
.news-list-img[src]:not([src=""]) {
    animation: none;
    background: none;
}

/* 카테고리별 색상 */
.news-card-cat[data-category="정치"],
.news-list-cat[data-category="정치"],
.news-headline-cat[data-category="정치"] {
    background: #3498db;
}

.news-card-cat[data-category="경제"],
.news-list-cat[data-category="경제"],
.news-headline-cat[data-category="경제"] {
    background: #2ecc71;
}

.news-card-cat[data-category="사회"],
.news-list-cat[data-category="사회"],
.news-headline-cat[data-category="사회"] {
    background: #e74c3c;
}

.news-card-cat[data-category="테크"],
.news-list-cat[data-category="테크"],
.news-headline-cat[data-category="테크"] {
    background: #9b59b6;
}

.news-card-cat[data-category="문화"],
.news-list-cat[data-category="문화"],
.news-headline-cat[data-category="문화"] {
    background: #f39c12;
}

.news-card-cat[data-category="스포츠"],
.news-list-cat[data-category="스포츠"],
.news-headline-cat[data-category="스포츠"] {
    background: #e67e22;
}

.news-card-cat[data-category="세계"],
.news-list-cat[data-category="세계"],
.news-headline-cat[data-category="세계"] {
    background: #1abc9c;
}

/* 스크롤 애니메이션 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-card, .news-list-item {
    animation: fadeInUp 0.6s ease forwards;
}

/* 타이포그래피 개선 */
.news-headline-title, .news-card-title, .news-list-title {
    word-break: keep-all;
    overflow-wrap: break-word;
}

/* 접근성 개선 */
.news-card:focus, .news-headline:focus, .news-list-item:focus,
.news-trending-link:focus, .news-more-link:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

/* 프린트 스타일 */
@media print {
    .news-nav, .news-sidebar, .news-search-box {
        display: none;
    }
    
    .news-main-layout {
        grid-template-columns: 1fr;
    }
    
    .news-card, .news-headline {
        break-inside: avoid;
    }
}
