/* 메인 페이지 스타일 */

/* 광고 영역 스타일 */
.ad-container {
    overflow: hidden;
    margin-bottom: 1rem;
}

/* PC용 광고는 768px 이상에서만 표시 */
.ad-pc {
    display: none;
    justify-content: center;
}

/* 모바일용 광고는 768px 미만에서만 표시 */
.ad-mobile {
    display: block;
    justify-content: center;
}

/* 768px 이상에서는 PC용 광고 표시, 모바일 광고 숨김 */
@media (min-width: 768px) {
    .ad-pc {
        display: flex;
    }
    
    .ad-mobile {
        display: none;
    }
}

.news-card {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
}

.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.card-img-top {
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    height: 360px;
    object-fit: cover;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    color: #333;
}

.card-text.small {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.75rem;
}

/* 요약 스타일 */
.news-summary-wrapper {
    position: relative;
}

.news-summary {
    position: relative;
}

.summary-preview {
    text-align: justify;
    line-height: 1.6;
    color: #444;
}

.summary-preview.no-gradient {
    margin-bottom: 0;
}

.summary-full {
    text-align: justify;
    line-height: 1.6;
    color: #444;
}

.summary-full h3 {
    font-size: 1.3rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: #222;
}

.summary-full h4 {
    font-size: 1.1rem;
    margin-top: 1.3rem;
    margin-bottom: 0.8rem;
    color: #333;
}

.summary-full h5 {
    font-size: 1rem;
    margin-top: 1rem;
    margin-bottom: 0.6rem;
    color: #444;
}

/* 그라디언트 오버레이 */
.summary-gradient-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0.95) 50%, rgba(255,255,255,1) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 15px;
    cursor: pointer;
}

.expand-toggle {
    display: flex;
    align-items: center;
    color: #666;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.expand-toggle:hover {
    color: #0d6efd;
}

.expand-text {
    margin-right: 5px;
}

.expand-icon {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.expand-icon.rotated {
    transform: rotate(180deg);
}

/* 투표 버튼 스타일 */
.vote-buttons .btn {
    padding: 0.25rem 0.5rem;
    transition: all 0.2s ease;
}

.vote-buttons .btn[data-voted="true"] {
    color: white;
}

.btn-like[data-voted="true"] {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-dislike[data-voted="true"] {
    background-color: #dc3545;
    border-color: #dc3545;
}

/* 로딩 인디케이터 */
#loadingIndicator {
    padding: 3rem 0;
}

/* 구독 모달 */
#subscribeModal .modal-content {
    border-radius: 10px;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .card-img-top {
        height: 200px;
    }
    
    .card-title {
        font-size: 1.1rem;
    }
    
    .news-actions .btn {
        font-size: 0.9rem;
    }
}

/* 하이라이트 효과 */
@keyframes highlight {
    0% { box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.5); }
    70% { box-shadow: 0 0 0 10px rgba(13, 110, 253, 0); }
    100% { box-shadow: 0 0 0 0 rgba(13, 110, 253, 0); }
}

.highlight-card {
    animation: highlight 2s ease-in-out;
    border: 2px solid #0d6efd;
}

/* 단일 뉴스 모드 추가 스타일 */
.single-news-view .news-card {
    max-width: 100%;
    margin: 0 auto;
}

.single-news-view .card {
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.single-news-view .card-img-top {
    border-radius: 4px 4px 0 0;
    max-height: 450px;
    object-fit: cover;
}

.single-news-view .card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.single-news-view .card-text {
    margin-bottom: 1rem;
}

.single-news-view .news-summary {
    margin-top: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.7;
}

.single-news-view .news-actions {
    margin-top: 2rem;
}

/* 모든 뉴스 보기 버튼 스타일 */
.btn-back-to-list {
    border-radius: 0 !important;
    padding: 12px 24px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-back-to-list:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
