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

/* --- CSS Variables --- */
:root {
    --bg-color: #fdf6e3; /* Creamy background */
    --text-color: #5a463a; /* Dark sepia for text */
    --heading-color: #3b2f2f; /* Darker brown for headings */
    --accent-color: #a56d54; /* Muted accent for links */
    --border-color: #e8dcc3; /* Lighter border color */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Merriweather', serif;
    --container-width: 1100px;
    --border-radius: 4px;
}

/* --- General Resets & Body --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.8;
    font-size: 17px;
    padding-top: 80px;
}

/* --- Typography --- */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--heading-color);
    margin-bottom: 1.5rem;
    line-height: 1.3;
    font-weight: 700;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.4rem; text-align: center; margin-bottom: 3rem; }
h3 { font-size: 1.8rem; }
p { margin-bottom: 1.5rem; }

a {
    color: var(--accent-color);
    text-decoration: none;
    border-bottom: 1px dotted var(--accent-color);
    transition: color 0.3s ease, border-bottom-color 0.3s ease;
}

a:hover {
    color: var(--heading-color);
    border-bottom-color: var(--heading-color);
}

ul, ol {
    margin-left: 20px;
    margin-bottom: 1.5rem;
    padding-left: 15px;
}

ul li, ol li {
    margin-bottom: 0.75rem;
}
ul li::marker {
    color: var(--accent-color);
}

/* --- Layout & Containers --- */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 2rem 0;
}

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

/* --- Header & Navigation --- */
.site-header {
    background: rgba(253, 246, 227, 0.9);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-bottom: 2px solid var(--border-color);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.header-content {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title a {
    font-family: var(--font-heading);
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--heading-color);
    border-bottom: none;
}
.site-title a:hover {
    color: var(--accent-color);
}

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

.main-nav a {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-color);
    border-bottom: none;
    position: relative;
    padding-bottom: 5px;
}
.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

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

/* --- Homepage Specific --- */
.intro-section {
    text-align: center;
    padding: 2rem 0;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 2rem;
}
.intro-section h1 {
    font-size: 3.5rem;
}

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

.article-preview {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.article-preview h3 a {
    border-bottom: none;
    color: var(--heading-color);
}
.article-preview:hover h3 a {
    color: var(--accent-color);
}

.read-more-link {
    display: inline-block;
    margin-top: auto;
    font-weight: 700;
    align-self: flex-start;
}

/* --- Article & Page Content --- */
.content-area, .article-full {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 3rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.article-header {
    text-align: center;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
}
.article-header h1 {
    font-size: 2.8rem;
}
.article-meta {
    font-size: 0.9rem;
    color: var(--text-color);
    margin-top: 1rem;
    font-style: italic;
}
.article-meta span {
    margin: 0 1rem;
}

/* --- Sidebar --- */
.sidebar .widget {
    background-color: #fff;
    border: 1px solid var(--border-color);
    padding: 2rem;
    margin-bottom: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}
.sidebar .widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
    color: var(--heading-color);
}

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.widget ul li {
    margin-bottom: 1rem;
}
.widget ul li a {
    font-weight: 700;
    font-size: 1rem;
}

.promo-widget p {
    font-size: 0.95rem;
    line-height: 1.6;
}

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

.footer-links {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding: 0;
}
.footer-links a {
    font-weight: 700;
    border-bottom: none;
}

/* --- Media Queries --- */
@media (max-width: 900px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
     body {
        padding-top: 125px; /* Adjust based on new header height */
    }
}


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

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

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