* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1565c0;
    --dark: #151515;
    --text: #333;
    --muted: #777;
    --light: #f5f5f5;
    --border: #e5e5e5;
    --white: #fff;
}

body {
    font-family: "Vazirmatn", sans-serif;
    background: #f7f7f7;
    color: var(--text);
    line-height: 1.8;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    width: 100%;
    display: block;
    object-fit: cover;
}

.container {
    width: min(1200px, 92%);
    margin: auto;
}


/* =========================
   Header
========================= */

.header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
}

.header-top {
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.logo {
    font-size: 32px;
    font-weight: 800;
    color: var(--dark);
    white-space: nowrap;
}

.logo span {
    color: var(--primary);
}

.search {
    display: flex;
    width: 400px;
    height: 42px;
}

.search input {
    flex: 1;
    border: 1px solid var(--border);
    border-left: 0;
    padding: 0 15px;
    font-family: inherit;
    outline: none;
    background: #fafafa;
}

.search button {
    width: 50px;
    border: none;
    background: var(--primary);
    color: white;
    cursor: pointer;
    font-size: 18px;
}

.date {
    color: var(--muted);
    font-size: 14px;
}

.account-links {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--primary);
    font-size: 14px;
    white-space: nowrap;
}

.account-links a:hover {
    text-decoration: underline;
}


/* =========================
   Navbar
========================= */

.navbar {
    background: var(--dark);
    color: white;
}

.nav-content {
    display: flex;
    align-items: center;
    overflow-x: auto;
}

.nav-content a {
    padding: 13px 20px;
    font-size: 14px;
    white-space: nowrap;
    transition: 0.2s;
}

.nav-content a:hover,
.nav-content a.active {
    background: var(--primary);
}


/* =========================
   Breaking News
========================= */

.breaking-news {
    margin: 25px 0;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--border);
}

.breaking-title {
    background: var(--primary);
    color: white;
    padding: 10px 20px;
    font-weight: 600;
    white-space: nowrap;
}

.breaking-text {
    padding: 10px 20px;
    color: #555;
}


/* =========================
   Main News
========================= */

.main-news {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 35px;
}

.main-story {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.main-story img {
    height: 380px;
}

.story-content {
    padding: 20px;
}

.category {
    display: inline-block;
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 5px;
}

.story-content h1 {
    font-size: 25px;
    line-height: 1.7;
    margin-bottom: 10px;
}

.story-content p {
    color: var(--muted);
    font-size: 14px;
}

.time,
small {
    color: #999;
    font-size: 12px;
}


/* =========================
   Side News
========================= */

.side-news {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.small-news {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 130px 1fr;
    min-height: 135px;
}

.small-news img {
    height: 100%;
}

.small-news > div {
    padding: 12px;
}

.small-news h3 {
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 8px;
}


/* =========================
   Content Layout
========================= */

.content-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 25px;
    margin-bottom: 40px;
}

.news-section {
    min-width: 0;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-title h2 {
    font-size: 22px;
    border-right: 5px solid var(--primary);
    padding-right: 10px;
}

.section-title a {
    color: var(--primary);
    font-size: 13px;
}


/* =========================
   News Cards
========================= */

.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.news-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: 0.25s;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.news-card img {
    height: 210px;
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    font-size: 17px;
    line-height: 1.7;
    margin-bottom: 8px;
}

.card-body p {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 10px;
}


/* =========================
   Sidebar
========================= */

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-box {
    background: white;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid var(--border);
}

.sidebar-box > h2 {
    font-size: 18px;
    margin-bottom: 15px;
    border-right: 4px solid var(--primary);
    padding-right: 8px;
}

.popular {
    display: flex;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
}

.popular:last-child {
    border-bottom: none;
}

.popular > span {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
}

.popular h3 {
    font-size: 14px;
    line-height: 1.6;
}


/* =========================
   Weather
========================= */

.weather-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.weather-icon {
    font-size: 40px;
}

.weather-info strong {
    font-size: 18px;
}

.weather-info p {
    color: var(--muted);
    font-size: 13px;
}


/* =========================
   Footer
========================= */

.footer {
    background: var(--dark);
    color: white;
    margin-top: 50px;
}

.footer-content {
    padding: 45px 0;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}

.footer .logo {
    color: white;
    margin-bottom: 10px;
}

.footer p {
    color: #aaa;
}

.footer h3 {
    margin-bottom: 15px;
    font-size: 16px;
}

.footer a {
    display: block;
    color: #aaa;
    font-size: 13px;
    margin-bottom: 7px;
}

.footer a:hover {
    color: white;
}

.copyright {
    border-top: 1px solid #333;
    text-align: center;
    padding: 15px;
    color: #888;
    font-size: 12px;
}


/* =========================
   Responsive
========================= */

@media (max-width: 900px) {

    .header-top {
        height: auto;
        padding: 20px 0;
        flex-wrap: wrap;
    }

    .search {
        order: 3;
        width: 100%;
    }

    .account-links {
        margin-right: auto;
    }

    .date {
        display: none;
    }

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

    .content-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}


@media (max-width: 600px) {

    .logo {
        font-size: 27px;
    }

    .breaking-news {
        flex-direction: column;
        align-items: stretch;
    }

    .breaking-title {
        text-align: center;
    }

    .main-story img {
        height: 240px;
    }

    .story-content h1 {
        font-size: 20px;
    }

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

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

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

    .footer-content {
        grid-template-columns: 1fr;
    }

}
