/* news.css - News Page with External Feeds */

/* ===== HERO SECTION ===== */
.news-hero {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    padding: 60px 0;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
    margin-bottom: 40px;
}

.news-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveBackground 30s linear infinite;
}

@keyframes moveBackground {
    0% { transform: rotate(45deg) translate(0, 0); }
    100% { transform: rotate(45deg) translate(50px, 50px); }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-badge {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 10px 25px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 15px;
}

.hero-content p {
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.95;
}

/* ===== FILTER BAR ===== */
.filter-bar {
    background: white;
    border-radius: 60px;
    padding: 8px;
    margin-bottom: 40px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.search-wrapper {
    flex: 1;
    position: relative;
    min-width: 220px;
}

.search-wrapper i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-color);
}

.search-wrapper input {
    width: 100%;
    padding: 14px 20px 14px 48px;
    border: 2px solid #e9ecef;
    border-radius: 50px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(59, 157, 179, 0.1);
}

.filter-select {
    padding: 14px 28px;
    border: 2px solid #e9ecef;
    border-radius: 50px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    min-width: 180px;
    font-weight: 500;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* ===== NEWS GRID ===== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* News Card */
.news-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(59, 157, 179, 0.15);
}

/* News Image */
.news-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #f0f2f5;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    color: white;
    font-size: 48px;
}

.news-source {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 600;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(5px);
}

/* News Content */
.news-content {
    padding: 20px;
}

.news-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
}

.news-title a {
    color: var(--dark-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-title a:hover {
    color: var(--primary-color);
}

.news-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.news-date {
    font-size: 12px;
    color: #999;
}

.news-date i {
    margin-right: 5px;
    color: var(--primary-color);
}

.read-more {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.read-more:hover {
    gap: 10px;
    color: var(--primary-dark);
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 40px 0;
}

.page-btn {
    padding: 10px 25px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.page-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 157, 179, 0.3);
    color: white;
}

.page-info {
    font-size: 14px;
    color: #666;
}

/* ===== SOURCES SECTION ===== */
.sources-section {
    background: white;
    border-radius: 24px;
    padding: 30px;
    margin: 40px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.sources-section h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--dark-color);
}

.sources-section h3 i {
    color: var(--primary-color);
    margin-right: 10px;
}

.sources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.source-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 16px;
    transition: all 0.3s ease;
    border-left: 4px solid;
}

.source-card:hover {
    transform: translateX(5px);
    background: #e9ecef;
}

.source-icon {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.source-info h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--dark-color);
}

.source-info p {
    font-size: 11px;
    color: #666;
    margin: 0;
}

/* ===== REFRESH SECTION ===== */
.refresh-section {
    text-align: center;
    margin: 40px 0 60px;
}

.refresh-btn {
    padding: 14px 35px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.refresh-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(59, 157, 179, 0.3);
}

.refresh-note {
    margin-top: 15px;
    font-size: 12px;
    color: #999;
}

.refresh-note i {
    color: var(--primary-color);
    margin-right: 5px;
}

/* ===== NO NEWS ===== */
.no-news {
    text-align: center;
    padding: 60px;
    background: white;
    border-radius: 24px;
    grid-column: 1 / -1;
}

.no-news i {
    font-size: 60px;
    color: var(--primary-color);
    opacity: 0.5;
    margin-bottom: 20px;
}

.no-news h3 {
    font-size: 22px;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.no-news p {
    color: #666;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 38px;
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .news-hero {
        padding: 50px 0;
    }
    
    .hero-content h1 {
        font-size: 32px;
    }
    
    .hero-content p {
        font-size: 16px;
    }
    
    .filter-bar {
        flex-direction: column;
        border-radius: 25px;
        padding: 15px;
    }
    
    .search-wrapper {
        width: 100%;
    }
    
    .filter-select {
        width: 100%;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
    
    .sources-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 28px;
    }
    
    .hero-badge {
        font-size: 12px;
        padding: 8px 18px;
    }
    
    .news-title {
        font-size: 16px;
    }
    
    .news-description {
        font-size: 13px;
    }
    
    .news-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .refresh-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-card {
    animation: fadeInUp 0.5s ease-out;
}