/* === VintagePress Theme | risij.uk Blog === */

/* --- Variables and Reset --- */
:root {
    --primary-color: #8B4513; /* Saddle Brown */
    --primary-color-dark: #65320d;
    --background-color: #F5F5DC; /* Beige */
    --card-background-color: #FAF0E6; /* Linen */
    --header-footer-bg: #F0EAD6; /* A slightly darker linen */
    --text-color: #5D4037; /* Dark Brown */
    --heading-color: #3E2723; /* Very Dark Brown */
    --border-color: #D2B48C; /* Tan */
    --font-family-heading: 'Playfair Display', serif;
    --font-family-body: 'Lato', sans-serif;
    --container-width: 1100px;
    --border-radius: 5px;
    --box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

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

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-body);
    line-height: 1.8;
    color: var(--text-color);
    background-color: var(--background-color);
    font-weight: 400;
}

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

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

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

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

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.6rem; }
p { margin-bottom: 1.5rem; }

/* --- Utility Classes --- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
}

.btn {
    display: inline-block;
    padding: 0.7rem 1.4rem;
    background-color: var(--primary-color);
    color: #FFFFFF;
    border-radius: var(--border-radius);
    font-weight: 700;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: none;
    font-family: var(--font-family-body);
    text-decoration: none;
}

.btn:hover {
    background-color: var(--primary-color-dark);
    transform: translateY(-2px);
    text-decoration: none;
    color: #FFFFFF;
}

/* --- Header & Navigation --- */
.site-header {
    background-color: var(--header-footer-bg);
    border-bottom: 2px solid var(--border-color);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo a {
    font-family: var(--font-family-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--heading-color);
}

.logo a:hover {
    text-decoration: none;
    color: var(--primary-color);
}

.logo a span {
    font-family: var(--font-family-body);
    font-weight: 400;
    color: var(--primary-color);
    font-size: 1.2rem;
}

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

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

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

/* --- Main Layout --- */
.main-content-area {
    padding: 4rem 0;
}

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

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

/* --- Hero Section (Homepage) --- */
.hero {
    text-align: center;
    margin-bottom: 4rem;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.3rem;
    max-width: 800px;
    margin: 0 auto;
    color: var(--text-color);
    line-height: 1.7;
}

/* --- Articles Grid --- */
.articles-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    position: relative;
    padding-bottom: 1rem;
}

.articles-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--border-color);
}

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

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

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

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

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

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

.article-card-content h3 {
    margin-bottom: 0.75rem;
    font-size: 1.4rem;
    color: var(--heading-color);
}

.article-card-content p {
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

/* --- Sidebar --- */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.widget {
    background-color: var(--card-background-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

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

.widget ul {
    list-style: none;
}

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

.widget ul li a {
    font-weight: 700;
}

.widget p {
    margin-bottom: 0;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
        text-align: left;
    }
}

.footer-logo a {
    color: var(--heading-color);
    font-family: var(--font-family-heading);
    font-size: 1.8rem;
    font-weight: 700;
}
.footer-logo a:hover {
    text-decoration: none;
    color: var(--primary-color);
}

.footer-widget h4 {
    color: var(--heading-color);
    font-family: var(--font-family-heading);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

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

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

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

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

.copyright {
    text-align: center;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: #888;
}

/* --- Article Page Specifics --- */
.article-full {
    background-color: var(--card-background-color);
    padding: 3rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

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

.article-header h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.article-meta {
    font-size: 1rem;
    color: var(--text-color);
    font-family: var(--font-family-body);
}

.article-meta span {
    margin: 0 1rem;
}

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

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

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

.article-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 2rem;
    margin: 2.5rem 0;
    font-style: italic;
    font-size: 1.2rem;
    color: var(--heading-color);
}

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

/* --- Sub-pages (About, Contact) --- */
.page-content {
    background-color: var(--card-background-color);
    padding: 3rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.page-content h1 {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}
