/* Modern CSS Reset & Variables */
:root {
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --text-primary: #1a1a2e;
    --text-secondary: #555;
    --text-light: #777;
    --accent: #e63946;
    --accent-dark: #c1121f;
    --accent-hover: #bc4749;
    --border: #e0e0e0;
    --shadow-sm: 0 4px 12px rgba(0,0,0,0.05);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 36px rgba(0,0,0,0.12);
    --shadow-hover: 0 20px 40px rgba(0,0,0,0.15);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 16px;
    scroll-behavior: smooth;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

h1 { font-size: 3rem; margin-bottom: 1rem; }
h2 { font-size: 2rem; margin: 1.5rem 0 1rem; }
h3 { font-size: 1.5rem; margin: 1.25rem 0 0.75rem; }

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Header */
.header {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo h1 {
    font-size: 1.8rem;
    margin: 0;
    background: linear-gradient(135deg, var(--accent) 0%, #2a9d8f 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav {
    display: flex;
    gap: 32px;
}

.nav a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

.nav a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 80px 40px;
    margin: 0 -40px 60px -40px;
    border-radius: 0 0 40px 40px;
    text-align: center;
    color: white;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    animation: fadeInUp 0.6s ease;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease;
}

/* Grid Layouts */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 32px;
    margin: 48px 0;
}

/* Article Cards */
.article-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    display: block;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.card-image img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: var(--transition);
}

.article-card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 24px;
}

.card-content h3 {
    margin: 0 0 12px 0;
    font-size: 1.4rem;
}

.card-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Article Page Layout */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 48px;
    margin: 60px 0;
}

.article-main {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 48px;
    box-shadow: var(--shadow-sm);
}

.article-featured-image {
    margin: 32px 0;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.article-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.article-content h1 {
    margin-top: 0;
    color: var(--text-primary);
}

.article-content h2 {
    color: var(--text-primary);
    border-left: 4px solid var(--accent);
    padding-left: 16px;
}

.article-content h3 {
    color: var(--text-primary);
}

.article-content p {
    margin: 1.2em 0;
    color: var(--text-secondary);
}

.article-content ul, 
.article-content ol {
    margin: 1.2em 0;
    padding-left: 1.5em;
    color: var(--text-secondary);
}

.article-content li {
    margin: 0.5em 0;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-widget {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 28px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
}

.sidebar-widget h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.3rem;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 10px;
}

.related-articles {
    list-style: none;
    padding: 0;
}

.related-articles li {
    margin-bottom: 16px;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.related-articles li:hover {
    transform: translateX(4px);
    background: #e9ecef;
}

.related-articles a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    display: block;
}

.ad-block {
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    border-radius: var(--radius-md);
    padding: 40px 20px;
    text-align: center;
    margin: 24px 0;
}

.ad-block p {
    color: var(--text-light);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Footer */
.footer {
    background: #1a1a2e;
    color: white;
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 48px;
    margin-bottom: 48px;
}

.footer-section h4 {
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-section p {
    color: #aaa;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    color: #aaa;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--accent);
    padding-left: 8px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    text-align: center;
    color: #aaa;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .article-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .sidebar {
        position: static;
    }
    
    .container {
        padding: 0 24px;
    }
    
    .hero {
        padding: 60px 24px;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    
    .hero h1 { font-size: 2rem; }
    
    .grid-3 {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .article-main {
        padding: 24px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 16px;
    }
    
    .nav {
        gap: 24px;
    }
    
    .container {
        padding: 0 16px;
    }
}

@media (max-width: 480px) {
    .nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utility Classes */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin: 32px 0;
}

.image-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius-md);
}

/* Breadcrumbs */
.breadcrumbs {
    margin-bottom: 24px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.breadcrumbs a {
    color: var(--accent);
    text-decoration: none;
}