/* CSS Variables */
:root {
    --primary-color: #1a202c;
    --secondary-color: #2d3748;
    --accent-color: #e53e3e;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --background: #ffffff;
    --background-alt: #f7fafc;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --border-radius: 8px;
    --max-width: 1200px;
    --content-width: 800px;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background);
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Merriweather', serif;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.5em;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.5rem); }

p {
    margin-bottom: 1em;
    line-height: 1.7;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.site-header {
    background: var(--background);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo h1 {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.logo h1 a {
    color: var(--primary-color);
    text-decoration: none;
}

.tagline {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
    font-family: 'Inter', sans-serif;
}

/* Navigation */
.main-nav {
    position: relative;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 4px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--accent-color);
    background-color: var(--background-alt);
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--background-alt) 0%, #edf2f7 100%);
    padding: 4rem 0;
    margin-bottom: 3rem;
    border-radius: var(--border-radius);
    margin-top: 2rem;
}

.hero-content {
    text-align: center;
    max-width: var(--content-width);
    margin: 0 auto;
}

.hero-title {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Section Titles */
.section-title {
    color: var(--primary-color);
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--accent-color);
    display: inline-block;
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.article-card {
    background: var(--background);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.article-card.featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.article-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--background-alt);
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-card.featured .article-image {
    height: 300px;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}

.article-content {
    padding: 1.5rem;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.category {
    background: var(--accent-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-content h3 {
    margin-bottom: 0.75rem;
}

.article-content h3 a {
    color: var(--primary-color);
    text-decoration: none;
}

.article-content h3 a:hover {
    color: var(--accent-color);
}

.article-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.author-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: 1rem;
}

.read-time {
    background: var(--background-alt);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

/* News List */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.news-item {
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
    background: var(--background);
}

.news-item:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow);
}

.news-content h3 {
    margin-bottom: 0.5rem;
}

.news-content h3 a {
    color: var(--primary-color);
}

.news-content h3 a:hover {
    color: var(--accent-color);
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.news-content p {
    color: var(--text-secondary);
    margin: 0;
}

/* Load More */
.load-more {
    text-align: center;
    margin: 2rem 0;
}

.btn-load-more {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.btn-load-more:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* Sidebar */
.sidebar {
    margin-top: 3rem;
}

.widget {
    background: var(--background-alt);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.widget h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

/* Newsletter */
.newsletter-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
}

.newsletter-form button {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    white-space: nowrap;
}

.newsletter-form button:hover {
    background: var(--secondary-color);
}

/* Popular Widget */
.popular ul {
    list-style: none;
}

.popular li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.popular li:last-child {
    border-bottom: none;
}

.popular a {
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.4;
}

.popular a:hover {
    color: var(--accent-color);
}

/* Footer */
.site-footer {
    background: var(--primary-color);
    color: white;
    margin-top: 4rem;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: white;
    font-size: 1.125rem;
}

.footer-section p {
    color: #cbd5e0;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #cbd5e0;
    transition: var(--transition);
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid var(--secondary-color);
    padding-top: 2rem;
    text-align: center;
    color: #a0aec0;
    font-size: 0.875rem;
}

.footer-bottom p {
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-toggle {
        display: flex;
        position: absolute;
        top: 1rem;
        right: 1rem;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        background: var(--background);
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius);
        padding: 1rem;
        margin-top: 1rem;
        gap: 0.5rem;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu a {
        padding: 0.75rem;
        border-radius: var(--border-radius);
        display: block;
        text-align: center;
    }
    
    .hero-section {
        padding: 2rem 0;
        margin-top: 1rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .article-card.featured {
        grid-template-columns: 1fr;
    }
    
    .article-card.featured .article-image {
        height: 200px;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .article-card {
        margin: 0 -0.5rem;
    }
    
    .hero-section {
        margin: 1rem -1rem 2rem;
        border-radius: 0;
    }
}

/* Loading Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-card,
.news-item {
    animation: fadeIn 0.6s ease-out;
}

/* Focus States for Accessibility */
button:focus,
input:focus,
a:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .site-header,
    .sidebar,
    .site-footer,
    .nav-toggle {
        display: none;
    }
    
    .main-content {
        margin: 0;
        padding: 0;
    }
    
    .article-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
        margin-bottom: 1rem;
    }
}