/* News Aggregator Public Styles */

/* News Hub Container */
.news-aggregator-hub {
    margin: 20px 0;
}

.news-hub-header {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.news-hub-title {
    margin: 0 0 20px 0;
    font-size: 28px;
    font-weight: 600;
    color: #2c3e50;
}

/* Search Form */
.news-search-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.news-search-input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 25px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.news-search-input:focus {
    outline: none;
    border-color: #007cba;
}

.news-search-btn {
    padding: 10px 20px;
    border-radius: 25px;
    border: none;
    background: #007cba;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.news-search-btn:hover {
    background: #005a87;
}

/* Filter Tabs */
.news-filter-tabs {
    margin-top: 20px;
}

.news-filter-tabs .nav-tabs {
    border-bottom: 2px solid #e1e5e9;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.news-filter-tabs .nav-item {
    margin-bottom: -2px;
}

.news-filter-tabs .nav-link {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #6c757d;
    border: 2px solid transparent;
    border-radius: 8px 8px 0 0;
    transition: all 0.3s ease;
    font-weight: 500;
}

.news-filter-tabs .nav-link:hover {
    color: #007cba;
    background: #f8f9fa;
}

.news-filter-tabs .nav-link.active {
    color: #007cba;
    background: white;
    border-color: #e1e5e9 #e1e5e9 white;
}

.news-filter-tabs .badge {
    background: #6c757d;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    margin-left: 8px;
}

.news-filter-tabs .nav-link.active .badge {
    background: #007cba;
}

/* Articles Grid */
.news-articles-container {
    margin-top: 30px;
}

.news-articles-grid {
    display: grid;
    gap: 25px;
    margin-bottom: 30px;
}

.news-articles-grid.layout-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.news-articles-grid.layout-list {
    grid-template-columns: 1fr;
}

.news-articles-grid.layout-masonry {
    columns: 3;
    column-gap: 25px;
}

/* Article Card */
.news-article-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    break-inside: avoid;
    margin-bottom: 25px;
}

.news-article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.news-article-thumbnail {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.news-article-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.news-source-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 124, 186, 0.9);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.news-article-content {
    padding: 20px;
}

.news-article-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    color: #2c3e50;
}

.news-article-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-article-title a:hover {
    color: #007cba;
}

.news-article-excerpt {
    margin: 0 0 15px 0;
    color: #6c757d;
    line-height: 1.6;
    font-size: 14px;
}

.news-article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #e1e5e9;
    font-size: 13px;
    color: #6c757d;
}

.news-article-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-article-actions {
    display: flex;
    gap: 10px;
}

.news-read-original {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    background: #007cba;
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.news-read-original:hover {
    background: #005a87;
    color: white;
}

/* List Layout */
.layout-list .news-article-card {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 20px;
    height: auto;
}

.layout-list .news-article-thumbnail {
    height: 150px;
}

.layout-list .news-article-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Latest News Widget */
.news-latest-widget {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.news-latest-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #e1e5e9;
}

.news-latest-item:last-child {
    border-bottom: none;
}

.news-latest-thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
}

.news-latest-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-latest-content {
    flex: 1;
}

.news-latest-title {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

.news-latest-title a {
    color: #2c3e50;
    text-decoration: none;
}

.news-latest-title a:hover {
    color: #007cba;
}

.news-latest-meta {
    font-size: 12px;
    color: #6c757d;
}

/* Pagination */
.news-pagination {
    margin-top: 40px;
    text-align: center;
}

.news-pagination .page-numbers {
    display: inline-flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 5px;
}

.news-pagination .page-numbers li {
    margin: 0;
}

.news-pagination .page-numbers a,
.news-pagination .page-numbers span {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #6c757d;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.news-pagination .page-numbers a:hover,
.news-pagination .page-numbers .current {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

/* Loading States */
.news-loading {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e1e5e9;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* No Articles */
.news-no-articles {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.news-no-articles p {
    font-size: 16px;
    margin: 0;
}

/* External Link Notice */
.news-external-notice {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.news-external-notice p {
    margin: 0 0 15px 0;
    color: #0066cc;
}

/* Responsive Design */
@media (max-width: 768px) {
    .news-hub-header {
        padding: 15px;
    }
    
    .news-hub-header .row {
        flex-direction: column;
        gap: 15px;
    }
    
    .news-articles-grid.layout-grid {
        grid-template-columns: 1fr;
    }
    
    .news-articles-grid.layout-masonry {
        columns: 1;
    }
    
    .layout-list .news-article-card {
        grid-template-columns: 1fr;
    }
    
    .layout-list .news-article-thumbnail {
        height: 200px;
    }
    
    .news-filter-tabs .nav-tabs {
        flex-direction: column;
    }
    
    .news-search-form {
        flex-direction: column;
    }
    
    .news-search-input {
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .news-article-card {
        margin-bottom: 20px;
    }
    
    .news-article-content {
        padding: 15px;
    }
    
    .news-article-title {
        font-size: 16px;
    }
    
    .news-hub-title {
        font-size: 24px;
    }
}
