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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

a {
    text-decoration: none;
    color: #1e40af;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.loading {
    padding: 20px;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Header */
header {
    background-color: #1e40af;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
}

.logo a {
    color: white;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

nav a {
    color: white;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

nav a:hover, nav a.active {
    background-color: rgba(255,255,255,0.2);
}

.mobile-menu-button {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: white;
    border-radius: 3px;
}

/* Hero Section */
.hero-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin: 30px 0;
}

.featured-article {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

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

.featured-article-content {
    padding: 20px;
}

.featured-article h2 {
    font-size: 28px;
    margin-bottom: 10px;
}

.featured-article .category {
    display: inline-block;
    background-color: #3b82f6;
    color: white;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.top-stories {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.top-stories h2 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.top-story {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.top-story:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.top-story img {
    width: 100px;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
}

.top-story-content h3 {
    font-size: 16px;
    margin-bottom: 5px;
}

.top-story .category {
    font-size: 12px;
    color: #3b82f6;
}

/* Content Area */
.content-area {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin: 30px 0;
}

.main-content {
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.main-content h2 {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.article-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.article-card:hover {
    transform: translateY(-5px);
}

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

.article-content {
    padding: 15px;
}

.article-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.article-card .excerpt {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #777;
}

.article-card .category {
    color: #3b82f6;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-widget {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.sidebar-widget h3 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.popular-articles {
    list-style: none;
}

.popular-articles li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.popular-articles a {
    display: flex;
    align-items: center;
    gap: 10px;
}

.popular-articles .count {
    background-color: #1e40af;
    color: white;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 12px;
    flex-shrink: 0;
}

.rankings .ranking-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.rankings .ranking-item:last-child {
    border-bottom: none;
}

.newsletter-form {
    margin-top: 15px;
}

.newsletter-form p {
    margin-bottom: 10px;
    font-size: 14px;
}

.newsletter-form input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.newsletter-form button {
    width: 100%;
    padding: 10px;
    background-color: #1e40af;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.newsletter-form button:hover {
    background-color: #1e3a8a;
}

/* Footer */
footer {
    background-color: #1e40af;
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    margin-bottom: 20px;
    font-size: 18px;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background-color: #3b82f6;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #c7d2fe;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-icon {
    color: white;
    font-size: 14px;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 14px;
    color: #c7d2fe;
}

/* Responsive */
@media (max-width: 992px) {
    .hero-section {
        grid-template-columns: 1fr;
    }
    
    .content-area {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    nav ul {
        display: none;
    }
    
    .mobile-menu-button {
        display: flex;
    }
    
    nav.mobile-active ul {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background-color: #1e40af;
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }
    
    .articles-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 576px) {
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}