/**
 * News Styles for ShopLT
 * News cards, news detail, news list, etc.
 */

/* === News Grid === */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

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

/* === News Card === */
.news-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* === News Image === */
.news-image {
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.news-image-placeholder {
    width: 4rem;
    height: 4rem;
    color: white;
}

.news-image-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #667eea;
}

/* === News Content === */
.news-content {
    padding: 1.5rem;
}

.news-date {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.news-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card:hover .news-title {
    color: #667eea;
}

.news-excerpt {
    font-size: 0.95rem;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #667eea;
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
}

.news-read-more:hover {
    color: #764ba2;
}

/* === News Detail Page === */
.news-detail {
    max-width: 900px;
    margin: 2rem auto;
}

.news-detail-header {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    margin-bottom: 2rem;
}

.news-detail-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #6b7280;
}

.news-detail-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.news-detail-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.news-detail-excerpt {
    font-size: 1.125rem;
    color: #6b7280;
    line-height: 1.6;
}

/* === News Featured Image === */
.news-detail-image {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    margin-bottom: 2rem;
}

.news-detail-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* === News Content === */
.news-detail-content {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.news-detail-content h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1f2937;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.news-detail-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.news-detail-content p {
    font-size: 1rem;
    line-height: 1.8;
    color: #4b5563;
    margin-bottom: 1rem;
}

.news-detail-content ul,
.news-detail-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.news-detail-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.news-detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.5rem 0;
}

.news-detail-content blockquote {
    border-left: 4px solid #667eea;
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: #6b7280;
    font-style: italic;
}

.news-detail-content a {
    color: #667eea;
    text-decoration: none;
}

.news-detail-content a:hover {
    text-decoration: underline;
}

/* === News Share === */
.news-detail-share {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.news-share-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.news-share-buttons {
    display: flex;
    gap: 0.5rem;
}

.news-share-btn {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    color: #6b7280;
    transition: all 0.2s;
}

.news-share-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* === News Navigation === */
.news-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
}

.news-nav-link {
    flex: 1;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    color: #4b5563;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.news-nav-link:hover {
    background: #f9fafb;
    border-color: #667eea;
    color: #667eea;
}

.news-nav-link.prev {
    justify-content: flex-start;
}

.news-nav-link.next {
    justify-content: flex-end;
    text-align: right;
}

.news-nav-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.news-nav-title {
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
}

/* === Empty State === */
.news-empty {
    text-align: center;
    padding: 4rem 2rem;
}

.news-empty-icon {
    width: 4rem;
    height: 4rem;
    color: #d1d5db;
    margin: 0 auto 1rem;
}

.news-empty-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.news-empty-text {
    color: #6b7280;
}

/* === Responsive === */
@media (max-width: 768px) {
    .news-detail-title {
        font-size: 1.75rem;
    }
    
    .news-detail-content {
        padding: 1.5rem;
    }
    
    .news-navigation {
        flex-direction: column;
    }
    
    .news-detail-meta {
        flex-wrap: wrap;
    }
}
