@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg-color: #f8f9fa;
    --primary-color: #ffffff;
    --border-color: #dee2e6;
    --text-color: #212529;
    --text-secondary-color: #6c757d;
    --accent-color: #007bff;
    --accent-hover-color: #0056b3;
    --font-family: 'Inter', sans-serif;
    --border-radius: 8px;
    --container-width: 1200px;
}

/* Reset and Global Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: var(--accent-hover-color);
    text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family);
    color: var(--text-color);
    line-height: 1.3;
    margin-bottom: 1rem;
    font-weight: 600;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
p { margin-bottom: 1.5rem; }

/* Header and Navigation */
.site-header {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.site-title {
    font-size: 1.5rem;
    margin: 0;
    color: var(--text-color);
    font-weight: 700;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.main-nav a {
    font-weight: 500;
    color: var(--text-secondary-color);
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
    text-decoration: none;
}

/* Main Layout */
.main-container {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

@media (min-width: 992px) {
    .main-container {
        grid-template-columns: 1fr 300px;
    }
    
    .article-container {
        grid-template-columns: 300px 1fr;
    }

    .article-content {
        order: 2;
    }

    .sidebar {
        order: 1;
    }
}

.main-content, .article-content {
    background-color: var(--primary-color);
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    border-radius: var(--border-radius);
}

/* Article Grid on Homepage */
.article-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .article-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.article-card {
    background-color: var(--primary-color);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.article-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.article-card h3 {
    margin-top: 0;
    color: var(--text-color);
}

.article-card p {
    color: var(--text-secondary-color);
    flex-grow: 1;
}

.read-more {
    align-self: flex-start;
    font-weight: 600;
}

/* Sidebar */
.sidebar .sidebar-widget {
    background-color: var(--primary-color);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
}

.sidebar-widget h3 {
    margin-top: 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

.sidebar-widget ul {
    list-style: none;
}

.sidebar-widget ul li {
    margin-bottom: 0.5rem;
}

.promo-widget p {
    font-style: normal;
    color: var(--text-secondary-color);
    margin-bottom: 0;
    text-align: left;
    border-left: 3px solid var(--border-color);
    padding-left: 1rem;
    font-size: 0.95rem;
}


/* Article Page */
.article-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
}

.article-title {
    font-size: 2.8rem;
    line-height: 1.2;
    font-weight: 700;
}

.article-meta {
    color: var(--text-secondary-color);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.article-content h2 {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-top: 2.5rem;
}

.article-content h3 {
    margin-top: 2rem;
}

.article-content ul,
.article-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    padding-left: 0.5rem;
}

.cta-section {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-top: 2.5rem;
    text-align: center;
}

.cta-section p {
    margin-bottom: 1rem;
}

.cta-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.cta-button:hover {
    background-color: var(--accent-hover-color);
    color: #fff;
    text-decoration: none;
}


/* Form Styles (Contact Page) */
.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 1rem;
    background-color: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-color);
    font-family: var(--font-family);
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.btn-submit {
    display: inline-block;
    padding: 0.75rem 2rem;
    background-color: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-submit:hover {
    background-color: var(--accent-hover-color);
}

/* Footer */
.site-footer {
    background-color: var(--primary-color);
    border-top: 1px solid var(--border-color);
    padding: 2.5rem 0;
    margin-top: 2.5rem;
    text-align: center;
    color: var(--text-secondary-color);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .site-header .container {
        flex-direction: column;
        gap: 1rem;
    }
    .main-nav ul {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    h1 { font-size: 2rem; }
    .article-title { font-size: 2.2rem; }
}