/* Modern Reset & Base Styles */
:root {
    --primary-color: #0f172a; /* Slate 900 */
    --secondary-color: #334155; /* Slate 700 */
    --accent-color: #2563eb; /* Blue 600 */
    --background-color: #f8fafc; /* Slate 50 */
    --surface-color: #ffffff;
    --text-color: #1e293b; /* Slate 800 */
    --text-light: #64748b; /* Slate 500 */
    --border-color: #e2e8f0; /* Slate 200 */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 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);
    --radius: 0.5rem;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #1d4ed8; /* Blue 700 */
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p { margin-bottom: 1rem; }

/* Header & Navigation */
.site-header {
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4.5rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.025em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--secondary-color);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-color);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    background-color: var(--primary-color); /* Dark fallback */
    background: linear-gradient(rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.8)), url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 6rem 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.25rem;
    color: #cbd5e1; /* Slate 300 */
    margin-bottom: 2rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
}

/* Blog Grid */
.featured-section {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-light);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.post-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.post-image {
    height: 200px;
    background-color: #e2e8f0;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.post-card:hover .post-image img {
    transform: scale(1.05);
}

.post-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-category {
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.post-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.post-excerpt {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Content Page Layout */
.page-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 3rem 0;
}

@media (min-width: 900px) {
    .page-layout {
        grid-template-columns: 2fr 1fr;
    }
}

.sidebar {
    position: sticky;
    top: 6rem;
    height: fit-content;
}

.sidebar-widget {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.sidebar-widget h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.popular-posts li {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}
.popular-posts li:last-child { border: 0; margin: 0; padding: 0; }

.popular-posts a {
    color: var(--primary-color);
    font-weight: 500;
    display: block;
}

.popular-posts span {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Article Styling */
.article-content {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.article-header {
    margin-bottom: 2rem;
    text-align: center;
}

.article-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.article-meta {
    color: var(--text-light);
    font-style: italic;
}

.article-content img {
    border-radius: var(--radius);
    margin: 2rem 0;
    width: 100%;
}

.article-content p {
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
}

.article-content h2 {
    margin-top: 2.5rem;
    font-size: 1.75rem;
    color: var(--primary-color);
}

.article-content h3 {
    margin-top: 2rem;
    color: var(--primary-color);
}

/* Footer */
.site-footer {
    background-color: var(--primary-color);
    color: #cbd5e1;
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    color: white;
    margin-bottom: 1.5rem;
}

.footer-links li { margin-bottom: 0.75rem; }
.footer-links a { color: #cbd5e1; }
.footer-links a:hover { color: white; }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.875rem;
}

.disclaimer-box {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: var(--radius);
    font-size: 0.8rem;
    margin-top: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Contact Form */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* Mobile menu logic in JS */
        position: absolute;
        top: 4.5rem;
        left: 0;
        right: 0;
        background: var(--surface-color);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-md);
        gap: 0;
    }
    
    .nav-links.open { display: flex; }
    
    .nav-links a {
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
    }
    
    .mobile-menu-btn { display: block; }

    .hero h1 { font-size: 2.25rem; }
}
