:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #64748b;
    --dark: #0f172a;
    --light: #f8fafc;
    --text: #334155;
    --border: #e2e8f0;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --font-ui: 'Inter', system-ui, sans-serif;
    --font-article: 'Merriweather', serif;
}

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

body {
    font-family: var(--font-ui);
    line-height: 1.6;
    color: var(--text);
    background-color: var(--light);
    -webkit-font-smoothing: antialiased;
}

/* Header */
header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}

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

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--dark);
    letter-spacing: -0.025em;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto; /* Scroll on mobile */
    padding-bottom: 2px; /* For scrollbar spacing */
}

.nav-links a {
    text-decoration: none;
    color: var(--secondary);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 0.25rem;
    transition: color 0.15s ease;
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

/* Main Layout */
main {
    padding: 3rem 0;
    min-height: 80vh;
}

.page-title {
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.page-title h1 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.025em;
    text-transform: capitalize;
}

/* Hero Section */
.hero-section {
    margin-bottom: 3rem;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.hero-link {
    display: block;
    text-decoration: none;
    position: relative;
    color: white;
}

.hero-image-wrapper {
    width: 100%;
    height: 480px;
    position: relative;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8; /* Darken for text readability */
    transition: opacity 0.3s;
}

.hero-link:hover .hero-image {
    opacity: 0.6;
}

.hero-fallback {
    width: 100%;
    height: 100%;
    background: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
}

.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem;
    background: linear-gradient(to top, rgba(0,0,0,0.95), rgba(0,0,0,0.6), transparent);
}

.hero-meta {
    margin-bottom: 0.5rem;
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255,255,255,0.9);
}

.source-tag {
    background: var(--primary);
    padding: 2px 8px;
    border-radius: 4px;
    color: white;
}

.hero-title {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    max-width: 900px;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-excerpt {
    font-size: 1.125rem;
    color: rgba(255,255,255,0.9);
    max-width: 800px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.news-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.news-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #e2e8f0;
}

.news-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-meta {
    font-size: 0.8rem;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
}

.news-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    font-weight: 700;
    color: var(--dark);
}

.news-title a {
    text-decoration: none;
    color: inherit;
}

.news-excerpt {
    font-size: 0.95rem;
    color: var(--secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.read-more {
    display: inline-flex;
    align-items: center;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: auto;
}

.read-more:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Article Page - Professional Look */
.article-view {
    max-width: 740px; /* Optimal reading width */
    margin: 0 auto;
    background: transparent;
}

.article-header {
    text-align: center;
    margin-bottom: 2rem;
}

.article-header h1 {
    font-family: var(--font-article); /* Serif for headlines */
    font-size: 2.75rem;
    line-height: 1.25;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 1rem;
}

.article-meta {
    color: var(--secondary);
    font-size: 0.95rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    font-family: var(--font-ui);
}

.article-cover {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 3rem;
}

.article-body {
    font-family: var(--font-article);
    font-size: 1.15rem; /* Larger text */
    line-height: 1.8; /* More breathing room */
    color: #1a202c; /* Softer black */
}

.article-body p {
    margin-bottom: 1.5rem;
}

.article-body h2 {
    font-family: var(--font-ui);
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

/* Footer */
footer {
    background: white;
    border-top: 1px solid var(--border);
    padding: 3rem 0;
    margin-top: 5rem;
    text-align: center;
    color: var(--secondary);
}

/* Pagination */
.pagination a:hover {
    background: var(--primary-dark) !important;
}

/* Responsive */
@media (max-width: 768px) {
    .article-header h1 {
        font-size: 2rem;
    }
    .hero-image-wrapper { height: 350px; }
    .hero-title { font-size: 1.75rem; }
    .hero-content { padding: 1.5rem; }
    .hero-excerpt { display: none; }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        display: none; 
    }
    
    nav {
        flex-direction: column;
        height: auto;
        padding: 1rem 0;
        gap: 1rem;
    }
    .nav-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
}
