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

/* --- CSS Variables --- */
:root {
    --primary-font: 'Inter', sans-serif;
    --bg-color: #f9fafb;
    --card-bg-color: #ffffff;
    --border-color: #e5e7eb;
    --text-color: #1f2937;
    --text-secondary-color: #6b7280;
    --accent-color: #3b82f6;
    --accent-color-hover: #2563eb;
    --header-footer-bg: #ffffff;
    --container-width: 1100px;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: var(--primary-font);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    margin-bottom: 1rem;
    font-weight: 700;
}

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

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

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

ul {
    list-style-position: inside;
    margin-bottom: 1.25rem;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Layout & Container --- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.main-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 2.5rem 0;
}

/* --- Header & Navigation --- */
.site-header {
    background-color: var(--header-footer-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 0;
    box-shadow: var(--box-shadow);
}

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

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

.site-title a {
    color: inherit;
    text-decoration: none;
}
.site-title a:hover {
    color: var(--accent-color);
}


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

.main-nav a {
    color: var(--text-secondary-color);
    font-weight: 500;
    text-decoration: none;
    padding: 0.5rem 0;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--accent-color);
}

/* --- Hero Section (Homepage) --- */
.hero {
    background-color: var(--card-bg-color);
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    text-align: center;
}

.hero h1 {
    font-size: 2.2rem;
    margin-bottom: 0.75rem;
}

.hero p {
    color: var(--text-secondary-color);
    max-width: 700px;
    margin: 0 auto;
}


/* --- Blog Articles Grid --- */
.articles-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.article-card {
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--box-shadow);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.article-card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-card-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

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

.read-more-btn {
    display: inline-block;
    background-color: var(--accent-color);
    color: #fff;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    align-self: flex-start;
}

.read-more-btn:hover {
    background-color: var(--accent-color-hover);
    color: #fff;
    text-decoration: none;
}

/* --- Sidebar --- */
.sidebar {
    background-color: var(--card-bg-color);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.sidebar-widget {
    margin-bottom: 2rem;
}

.sidebar-widget:last-child {
    margin-bottom: 0;
}

.sidebar-widget h3 {
    font-size: 1.2rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

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

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

.sidebar-widget a {
    color: var(--text-secondary-color);
}

.sidebar-promo {
    background-color: var(--bg-color);
    padding: 1rem;
    border-radius: var(--border-radius);
    text-align: center;
    font-style: italic;
    color: var(--text-secondary-color);
}

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

/* --- Single Article Page --- */
.article-content {
    background-color: var(--card-bg-color);
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

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

.article-header h1 {
    font-size: 2.75rem;
    margin-bottom: 0.5rem;
}

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

.article-body h2 {
    margin-top: 2rem;
}

.article-body h3 {
    margin-top: 1.5rem;
}

.article-body ul {
    list-style-type: disc;
    padding-left: 1.5rem;
}

.cta-box {
    background-color: var(--bg-color);
    border: 2px dashed var(--accent-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    margin: 2rem 0;
}

.cta-box p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* --- Other Pages (About, Contact, etc.) --- */
.page-content {
    background-color: var(--card-bg-color);
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    min-height: 400px;
}

/* --- Responsive Design --- */
@media (min-width: 900px) {
    .main-layout {
        grid-template-columns: 3fr 1fr;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    h1 { font-size: 2rem; }
    .article-header h1 { font-size: 2.25rem; }
}

@media (max-width: 480px) {
    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .hero, .article-content, .page-content {
        padding: 1.5rem;
    }
}
