﻿* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #f4f6fa;
    color: #1a1a1a;
}

/* Header */
.news-header {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: #fff;
    padding: 40px 20px 60px;
    text-align: center;
    position: relative;
}

    .news-header h1 {
        font-size: 2.2rem;
        margin-bottom: 8px;
    }

    .news-header p {
        opacity: 0.85;
        font-size: 1rem;
        margin-bottom: 24px;
    }

/* Search bar */
.search-bar {
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

    .search-bar input {
        width: 100%;
        padding: 14px 44px 14px 18px;
        border: none;
        border-radius: 30px;
        font-size: 1rem;
        outline: none;
        box-shadow: 0 6px 18px rgba(0,0,0,0.15);
    }

.search-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    opacity: 0.6;
}

/* Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    padding: 40px 5%;
    margin-top: -30px;
}

/* Card */
.news-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .news-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 10px 24px rgba(0,0,0,0.12);
    }

.news-img-wrap {
    position: relative;
    width: 100%;
    height: 190px;
    overflow: hidden;
}

    .news-img-wrap img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.source-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.65);
    color: #fff;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.news-content {
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

    .news-content h3 {
        font-size: 1.05rem;
        line-height: 1.4;
        margin-bottom: 8px;
        color: #111;
    }

    .news-content small {
        color: #888;
        font-size: 0.78rem;
        margin-bottom: 10px;
    }

    .news-content p {
        font-size: 0.9rem;
        color: #444;
        line-height: 1.5;
        margin-bottom: 16px;
        flex: 1;
    }

.btn-news {
    align-self: flex-start;
    text-decoration: none;
    color: #fff;
    background: #2a5298;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.2s ease;
}

    .btn-news:hover {
        background: #1e3c72;
    }

.no-results {
    text-align: center;
    padding: 40px;
    color: #888;
    font-size: 1rem;
}

/* Mobile */
@media (max-width: 768px) {
    .news-header h1 {
        font-size: 1.6rem;
    }

    .news-grid {
        grid-template-columns: 1fr;
        padding: 24px 5%;
    }

    .news-img-wrap {
        height: 200px;
    }
}

@media (max-width: 420px) {
    .search-bar input {
        font-size: 0.9rem;
        padding: 12px 40px 12px 14px;
    }
}
