/* Base Styles */
:root {
    --primary-color: #ff6b6b;
    --secondary-color: #4ecdc4;
    --accent-color: #ffe66d;
    --text-color: #2d3436;
    --bg-color: #f9f9f9;
    --card-bg: #ffffff;
    --header-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    height: var(--header-height);
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
}

.nav-links li {
    margin: 0 15px;
}

.nav-links a {
    font-weight: 500;
    padding: 5px 0;
    position: relative;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.nav-links a.active,
.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.search-container {
    display: flex;
    align-items: center;
}

.search-form {
    display: flex;
    align-items: center;
}

.search-input {
    padding: 8px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 20px 0 0 20px;
    outline: none;
    width: 200px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    border-color: var(--primary-color);
}

.search-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 0 20px 20px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-btn:hover {
    background-color: #ff5252;
}

/* Banner Section */
.banner {
    height: 500px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.2;
}

.banner-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 0 20px;
}

.banner h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.banner p {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

/* Top News */
.top-news {
    padding: 40px 0;
}

.news-card {
    display: flex;
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 30px;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.news-img-container {
    flex: 0 0 40%;
    overflow: hidden;
}

.news-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-img {
    transform: scale(1.05);
}

.news-content {
    flex: 0 0 60%;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.news-category {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--text-color);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.news-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--text-color);
    line-height: 1.3;
}

.news-excerpt {
    color: #666;
    margin-bottom: 15px;
    flex-grow: 1;
    font-size: 1.1rem;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    color: #888;
    font-size: 0.9rem;
}

/* Featured News */
.featured {
    margin-bottom: 40px;
}

/* News Grid */
.news-grid {
    padding: 40px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: var(--text-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 4px;
    background-color: var(--primary-color);
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 40px;
}

/* Footer */
footer {
    background-color: #2d3436;
    color: white;
    padding: 30px 5%;
    margin-top: 60px;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-link {
    color: #ddd;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--accent-color);
}

.copyright {
    margin-top: 20px;
    font-size: 1rem;
    color: #aaa;
    font-weight: 500;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 30px;
    }
}

@media (max-width: 992px) {
    .news-card {
        flex-direction: column;
    }

    .news-img-container, .news-content {
        flex: auto;
    }

    .news-img-container {
        height: 300px;
    }

    .banner {
        height: 400px;
    }

    .banner h1 {
        font-size: 3rem;
    }

    .banner p {
        font-size: 1.2rem;
    }

    .news-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        height: auto;
        padding: 15px 5%;
    }

    .logo {
        margin-bottom: 15px;
    }

    .nav-links {
        margin: 15px 0;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-links li {
        margin: 5px 10px;
    }

    .search-container {
        width: 100%;
        margin-top: 15px;
    }

    .search-input {
        width: 100%;
    }

    .banner {
        height: 300px;
    }

    .banner h1 {
        font-size: 2rem;
    }

    .banner p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }
}