/*
  Theme: Retro / Vintage
  Font: Merriweather (Serif)
  Tone: Friendly & Casual
  Language: English (US)
*/

@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700&display=swap');

:root {
  --bg-primary: #fdf6e3; /* A warm, creamy off-white */
  --bg-secondary: #f0eada; /* A slightly darker paper color */
  --text-primary: #585149; /* Dark, desaturated brown */
  --text-secondary: #7d736a; /* Lighter brown for secondary text */
  --accent-primary: #268bd2; /* A classic, muted blue */
  --accent-secondary: #cb4b16; /* A warm, rusty orange */
  --border-color: #d8c8b8; /* Faded brown for borders */
  --font-family: 'Merriweather', serif;
  --shadow-color: rgba(0, 0, 0, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

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

.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

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

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

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

h1, h2, h3, h4 {
  color: var(--text-primary);
  margin-bottom: 0.8em;
  line-height: 1.3;
  font-weight: 700;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.6rem; }

p {
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

/* --- Header & Navigation --- */
.site-header {
  background-color: var(--bg-secondary);
  padding: 1.5rem 0;
  border-bottom: 2px solid var(--border-color);
}

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

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

.logo span {
  color: var(--accent-secondary);
}

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

.main-nav a {
  font-weight: 700;
  padding-bottom: 0.5rem;
  color: var(--text-secondary);
  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(--text-primary);
    border-bottom-color: var(--accent-secondary);
}

/* --- Main Content Layout --- */
.main-layout {
  display: grid;
  gap: 2.5rem;
  padding: 3rem 0;
}

/* --- Hero Section (Homepage) --- */
.hero {
    text-align: center;
    padding: 4rem 1rem;
    background-color: transparent;
    border-bottom: 1px solid var(--border-color);
}

.hero h1 {
    font-size: 3.2rem;
}

.hero p {
    font-size: 1.25rem;
    max-width: 750px;
    margin: 1rem auto 0;
}

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

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

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

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

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px var(--shadow-color);
}

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

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

.card-content p {
  font-size: 1rem;
  flex-grow: 1;
}

.read-more-btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background-color: var(--accent-primary);
  color: #fff;
  border-radius: 4px;
  font-weight: 700;
  text-align: center;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

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

/* --- Sidebar --- */
.sidebar-widget {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  border-radius: 4px;
  margin-bottom: 2rem;
}

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

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

.sidebar-widget ul li {
  margin-bottom: 0.75rem;
  padding-left: 1.2rem;
  position: relative;
}

.sidebar-widget ul li::before {
    content: '»';
    position: absolute;
    left: 0;
    color: var(--accent-secondary);
    font-weight: bold;
}


/* --- Single Article Page --- */
.article-header {
    text-align: center;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
}

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

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

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

.article-content a {
    text-decoration: underline;
    font-weight: 700;
}

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

.cta-section {
    background-color: var(--bg-secondary);
    border-top: 2px solid var(--accent-secondary);
    border-bottom: 2px solid var(--accent-secondary);
    padding: 2.5rem;
    text-align: center;
    margin: 3rem 0;
}

/* --- Static Pages (About, Contact, etc.) --- */
.page-header {
    padding: 3rem 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}
.page-content {
    padding: 3rem 0;
    max-width: 800px;
    margin: 0 auto;
}

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

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

@media (max-width: 767px) {
    .header-container {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .main-nav ul {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1.5rem;
    }

    body { font-size: 16px; }
    h1 { font-size: 2.2rem; }
    .hero h1 { font-size: 2.5rem; }
    .article-header h1 { font-size: 2.4rem; }
}