
/* --- SilentBlog Theme --- */
/* --- By Gemini --- */

/* --- CSS Variables --- */
:root {
    --primary-color: #2c3e50; /* Midnight Blue */
    --secondary-color: #3498db; /* Peter River Blue */
    --background-color: #ecf0f1; /* Clouds */
    --surface-color: #ffffff; /* White */
    --text-color: #34495e; /* Wet Asphalt */
    --light-text-color: #7f8c8d; /* Asbestos */
    --border-color: #bdc3c7; /* Silver */
    --accent-color: #e74c3c; /* Alizarin Red */
    --font-family: 'Inter', sans-serif;
    --header-height: 70px;
    --border-radius: 8px;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.7;
    padding-top: var(--header-height); /* Prevent content from hiding behind fixed header */
}

h1, h2, h3, h4, h5, h6 {
    color: var(--primary-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.25rem;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

ul, ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

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

/* --- Main Layout --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.main-content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

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

/* --- Header & Navigation --- */
.site-header {
    background-color: var(--surface-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: var(--header-height);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.site-title a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.site-title a:hover {
    text-decoration: none;
}

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

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

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

.main-nav a:hover::after,
.main-nav .active a::after {
    width: 100%;
}

/* --- Hero Section (Homepage) --- */
.hero {
    background: var(--primary-color);
    color: var(--surface-color);
    padding: 3rem 1.5rem;
    text-align: center;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.hero h1 {
    color: var(--surface-color);
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
}

.hero p {
    font-size: 1.1rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

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

.article-card {
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

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

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

.card-content h3 a:hover {
    text-decoration: none;
}

.card-content p {
    font-size: 0.95rem;
    color: var(--light-text-color);
    flex-grow: 1;
}

.read-more-btn {
    display: inline-block;
    margin-top: 1rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.read-more-btn:hover {
    text-decoration: underline;
}

/* --- Sidebar --- */
.sidebar .widget {
    background-color: var(--surface-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    box-shadow: var(--box-shadow);
}

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

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

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

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

.widget ul a:hover {
    color: var(--secondary-color);
}

.widget p {
    font-size: 0.9rem;
    color: var(--light-text-color);
}

/* --- Footer --- */
.site-footer {
    background-color: var(--primary-color);
    color: var(--background-color);
    padding: 3rem 1.5rem;
    text-align: center;
    margin-top: 2rem;
}

.footer-content p {
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--background-color);
    opacity: 0.8;
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* --- Article Page Specifics --- */
.article-header {
    margin-bottom: 2rem;
}

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

.article-meta {
    font-size: 0.9rem;
    color: var(--light-text-color);
    margin-bottom: 1.5rem;
}

.article-header-image {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.article-content {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.article-content a {
    font-weight: 600;
}

.article-content blockquote {
    border-left: 4px solid var(--secondary-color);
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--light-text-color);
}

.cta-section {
    background-color: #e8f4fd;
    border-left: 5px solid var(--secondary-color);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: var(--border-radius);
}

.cta-section h3 {
    color: var(--primary-color);
}


/* --- Static Page Styles (About, Contact, etc.) --- */
.page-header {
    text-align: center;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.page-content {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    max-width: 800px;
    margin: 0 auto;
}

.sitemap-list {
    list-style-type: none;
    padding-left: 0;
}
.sitemap-list ul {
    list-style-type: none;
    padding-left: 2rem;
}
.sitemap-list li {
    margin-bottom: 0.5rem;
}

/* --- Back to Top Button --- */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--secondary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s, transform 0.3s;
    z-index: 999;
}

.back-to-top:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
    color: white;
}


/* --- Responsive Design --- */
@media (max-width: 768px) {
    .main-nav {
        display: none; /* Simplification for this static build, could be replaced with a hamburger menu in a JS version */
    }
    .header-container {
        justify-content: center;
    }
    .hero h1 {
        font-size: 2.2rem;
    }
    .container {
        padding: 1.5rem 1rem;
    }
    .article-content, .page-content {
        padding: 1.5rem;
    }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
}

@media (max-width: 480px) {
    .articles-grid {
        grid-template-columns: 1fr;
    }
    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }
}
