/* --- 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: #FDF8E1; /* Creamy off-white */
    --panel-bg-color: #FAF3D9;
    --text-color: #4A443D; /* Dark brown/grey */
    --heading-color: #3D352F;
    --accent-color: #776B5D; /* Sepia/brown */
    --border-color: #D3C5B5;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Merriweather', serif;
    --container-width: 1100px;
    --border-radius: 3px;
}

/* --- 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: 90px;
}

/* --- 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.2rem; }
h3 { font-size: 1.6rem; }
p { margin-bottom: 1.5rem; }

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

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

ul, ol {
    margin-left: 25px;
    margin-bottom: 1.5rem;
    padding-left: 10px;
}
ul li, ol li {
    margin-bottom: 0.75rem;
}


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

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

.content-area {
    background-color: transparent;
}

.panel {
    background-color: var(--panel-bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}


/* --- Header & Navigation --- */
.site-header {
    background-color: rgba(253, 248, 225, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    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: 2rem;
    font-weight: 700;
    color: var(--heading-color);
    border-bottom: none;
}

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

.main-nav a {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-color);
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
    transition: color 0.3s ease, border-color 0.3s ease;
}

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

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

.articles-section h2 {
    text-align: center;
    margin: 2rem 0 3rem 0;
    font-size: 2.8rem;
    position: relative;
}
.articles-section h2::after {
    content: '';
    display: block;
    width: 100px;
    height: 2px;
    background: var(--border-color);
    margin: 1rem auto 0;
}


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

.article-preview {
    background-color: var(--panel-bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    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 15px rgba(0,0,0,0.07);
}

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

.read-more-link {
    display: inline-block;
    margin-top: auto;
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    background-color: var(--accent-color);
    color: #fff;
    border-radius: var(--border-radius);
    text-align: center;
    border-bottom: none;
    transition: background-color 0.3s ease;
}

.read-more-link:hover {
    background-color: var(--heading-color);
    color: #fff;
}


/* --- Article Page --- */
.article-full {
    background-color: var(--panel-bg-color);
    border: 1px solid var(--border-color);
    padding: 3rem;
    border-radius: var(--border-radius);
}
.article-header {
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
}

.article-meta {
    font-size: 0.95rem;
    color: var(--text-color);
    margin-top: 1rem;
}
.article-meta span {
    margin: 0 1rem;
}

/* --- Sidebar --- */
.sidebar .widget {
    background-color: var(--panel-bg-color);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}
.sidebar .widget:last-child {
    margin-bottom: 0;
}

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

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.widget ul li {
    margin-bottom: 1rem;
}

.promo-widget {
    background-color: #f7f0d0;
}

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

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

/* --- Media Queries --- */
@media (max-width: 768px) {
    body { padding-top: 80px; }
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
     body {
        padding-top: 130px;
    }
}


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

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