* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f6f8;
    color: #111;
}


/* =========================
   HEADER
========================= */

.top-header {
    background: white;
    text-align: center;
    padding: 25px 15px;
    border-bottom: 1px solid #eee;
}

.logo {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 5px;
}

.logo span {
    color: #c40000;
}

.logo b {
    color: #0768b5;
}

.top-header p {
    margin: 5px 0;
    color: #777;
    font-size: 17px;
}


/* =========================
   NAVBAR
========================= */

.navbar {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    background: #111;
    padding: 12px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 9px 13px;
    border-radius: 6px;
}

.navbar a:hover {
    background: #c40000;
}


/* =========================
   BREAKING NEWS
========================= */

.breaking-news {
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #111;
    color: white;
    min-height: 48px;
}

.breaking-title {
    background: #c40000;
    padding: 14px 18px;
    font-weight: bold;
    white-space: nowrap;
    z-index: 2;
}

.breaking-text {
    padding-left: 20px;
    white-space: nowrap;
    animation: breakingMove 25s linear infinite;
}

@keyframes breakingMove {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(-100%);
    }
}


/* =========================
   HERO
========================= */

.hero {
    min-height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 50px 20px;

    background:
        linear-gradient(
            rgba(0, 0, 0, .68),
            rgba(0, 0, 0, .68)
        ),
        url("https://images.unsplash.com/photo-1504711434969-e33886168f5c?auto=format&fit=crop&w=1600&q=80");

    background-size: cover;
    background-position: center;

    color: white;
}

.hero-content {
    max-width: 750px;
}

.hero h1 {
    font-size: 52px;
    margin: 0 0 15px;
}

.hero p {
    font-size: 19px;
    line-height: 1.6;
}

.hero-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 13px 22px;
    background: #c40000;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
}

.hero-btn:hover {
    background: #a00000;
}


/* =========================
   SEARCH
========================= */

.search-section {
    padding: 25px 20px;
    background: white;
}

.search-box {
    max-width: 750px;
    margin: auto;
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}

.search-box button {
    border: none;
    padding: 15px 22px;
    border-radius: 8px;
    background: #c40000;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.search-box button:hover {
    background: #a00000;
}


/* =========================
   SECTIONS
========================= */

.section {
    max-width: 1150px;
    margin: auto;
    padding: 45px 20px;
}

.section h2 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 30px;
}


/* =========================
   FEATURED
========================= */

.featured-grid {
    display: grid;
    grid-template-columns:
        repeat(
            auto-fit,
            minmax(280px, 1fr)
        );
    gap: 25px;
}

.featured-card {
    background: white;
    border-radius: 14px;
    overflow: hidden;
    box-shadow:
        0 5px 20px
        rgba(0, 0, 0, .1);
}

.featured-card img {
    width: 100%;
    height: 230px;
    object-fit: cover;
}

.featured-content {
    padding: 20px;
}

.featured-content h3 {
    font-size: 23px;
    line-height: 1.35;
}


/* =========================
   NEWS GRID
========================= */

.news-grid {
    display: grid;
    grid-template-columns:
        repeat(
            auto-fit,
            minmax(280px, 1fr)
        );
    gap: 25px;
}

.news-card {
    background: white;
    border-radius: 14px;
    overflow: hidden;

    box-shadow:
        0 5px 20px
        rgba(0, 0, 0, .08);

    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

.news-card:hover {
    transform: translateY(-4px);

    box-shadow:
        0 10px 25px
        rgba(0, 0, 0, .12);
}

.news-card img {
    width: 100%;
    height: 210px;
    object-fit: cover;
}

.news-content {
    padding: 20px;
}

.news-category {
    color: #c40000;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
}

.news-card h3 {
    font-size: 21px;
    line-height: 1.3;
    margin: 10px 0;
}

.news-card p {
    color: #666;
    line-height: 1.5;

    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;

    overflow: hidden;
}

.read-more {
    display: inline-block;
    margin-top: 10px;
    color: #0768b5;
    font-weight: bold;
    text-decoration: none;
}

.read-more:hover {
    text-decoration: underline;
}


/* =========================
   LOADING
========================= */

.loading {
    text-align: center;
    color: #777;
    padding: 30px;
}


/* =========================
   CATEGORIES
========================= */

.category-grid {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.category-grid button {
    border: none;
    padding: 12px 18px;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;

    box-shadow:
        0 2px 8px
        rgba(0, 0, 0, .08);
}

.category-grid button:hover {
    background: #c40000;
    color: white;
}


/* =========================
   SOCIAL
========================= */

.social-section {
    text-align: center;
    background: white;
    max-width: none;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 25px;
}

.social-links a {
    text-decoration: none;
    color: white;
    background: #111;
    padding: 13px 20px;
    border-radius: 8px;
    font-weight: bold;
}

.social-links a:hover {
    background: #c40000;
}


/* =========================
   FOOTER
========================= */

footer {
    background: #111;
    color: white;
    text-align: center;
    padding: 35px 20px;
}

.footer-logo {
    font-size: 30px;
}


/* =========================
   MOBILE
========================= */

@media (max-width: 600px) {

    .logo {
        font-size: 34px;
    }

    .hero {
        min-height: 320px;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero p {
        font-size: 16px;
    }

    .navbar {
        gap: 4px;
    }

    .navbar a {
        font-size: 13px;
    }

    .breaking-title {
        font-size: 13px;
        padding: 14px 10px;
    }

    .breaking-text {
        font-size: 14px;
    }

    .search-box {
        flex-direction: column;
    }

    .search-box button {
        width: 100%;
    }

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

    .featured-grid {
        grid-template-columns: 1fr;
    }
}