/* ==========================================================================
   News Page Styles
   ========================================================================== */

.news-controls {
    max-width: 1200px;
    margin: 0 auto 2rem;
    padding: 0 1.5rem;
}

.news-controls .search-filter-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.news-controls .search-input-wrapper {
    position: relative;
    min-width: 280px;
    flex: 1;
}

.news-controls .search-input-wrapper input {
    width: 100%;
    background-color: var(--card-bg-solid);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.7rem 1rem 0.7rem 2.25rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.news-controls .search-input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.news-controls .select-wrapper select {
    appearance: none;
    background-color: var(--card-bg-solid);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.7rem 2rem 0.7rem 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.news-controls .select-wrapper select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.news-grid-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

/* News Card */
.news-card {
    display: flex;
    flex-direction: column;
    background: var(--card-bg-solid, rgba(30, 30, 46, 0.8));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.06));
    border-radius: 16px;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.news-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color, #6366f1), var(--accent-color, #8b5cf6));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.news-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-color, #6366f1);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.15);
}

.news-card:hover::before {
    opacity: 1;
}

.news-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: 0.5rem;
}

.news-source-badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-color, #6366f1);
    white-space: nowrap;
}

/* Source-specific colors */
.news-source-badge.openaiblog { background: rgba(16, 163, 127, 0.15); color: #10a37f; }
.news-source-badge.anthropicblog { background: rgba(204, 119, 51, 0.15); color: #cc7733; }
.news-source-badge.googleaiblog { background: rgba(66, 133, 244, 0.15); color: #4285f4; }
.news-source-badge.metaaiblog { background: rgba(24, 119, 242, 0.15); color: #1877f2; }
.news-source-badge.huggingface { background: rgba(255, 216, 0, 0.15); color: #ffd800; }
.news-source-badge.marktechpost { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.news-source-badge.thedecoder { background: rgba(168, 85, 247, 0.15); color: #a855f7; }
.news-source-badge.venturebeatai { background: rgba(236, 72, 153, 0.15); color: #ec4899; }

.news-date {
    font-size: 0.75rem;
    color: var(--text-tertiary, rgba(255, 255, 255, 0.4));
    white-space: nowrap;
}

.news-card-title {
    font-family: "Outfit", sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.6rem;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-summary {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-secondary);
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1rem;
}

.news-card-footer {
    display: flex;
    justify-content: flex-end;
}

.news-read-more {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-color, #6366f1);
    transition: color 0.2s ease;
}

.news-card:hover .news-read-more {
    color: var(--accent-color, #8b5cf6);
}

/* Load More */
.load-more-section {
    display: flex;
    justify-content: center;
    padding: 2.5rem 1.5rem;
}

.btn-load-more {
    padding: 0.75rem 2rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--card-bg-solid, rgba(30, 30, 46, 0.8));
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-load-more:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
}

/* Footer */
.news-footer {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem 1.5rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.news-footer p {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

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

    .news-controls .search-filter-controls {
        flex-direction: column;
    }
}

/* Weekly Digest */
.digest-section {
    max-width: 1200px;
    margin: 0 auto 2.5rem;
    padding: 0 1.5rem;
}

.digest-content {
    background: var(--card-bg-solid);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 1rem;
}

.digest-content h1,
.digest-content h2,
.digest-content h3,
.digest-content h4 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    margin: 1.25rem 0 0.5rem;
}

.digest-content h2 { font-size: 1.1rem; }
.digest-content h3 { font-size: 1rem; }

.digest-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.digest-content ul {
    padding-left: 1.25rem;
    margin-bottom: 1rem;
}

.digest-content li {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 0.4rem;
}

.digest-content strong {
    color: var(--text-primary);
}

.digest-meta {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}
