/* ===== CSS Variables ===== */
:root {
  --burgundy-dark: #5a1a2a;
  --burgundy: #7a2e3f;
  --burgundy-light: #9b4458;
  --burgundy-muted: #a8697a;
  --cream: #fdf6ee;
  --cream-dark: #f5e6d3;
  --cream-medium: #f9efe3;
  --warm-white: #fffaf5;
  --text-dark: #2d1a1f;
  --text-body: #4a3039;
  --text-muted: #7a5d66;
  --border-color: #e8d5c4;
  --shadow-sm: 0 1px 3px rgba(90, 26, 42, 0.08);
  --shadow-md: 0 4px 12px rgba(90, 26, 42, 0.1);
  --shadow-lg: 0 8px 30px rgba(90, 26, 42, 0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --max-width: 1140px;
  --content-width: 760px;
}

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

html {
  font-size: 17px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Nunito', sans-serif;
  color: var(--text-body);
  background-color: var(--warm-white);
  line-height: 1.75;
}

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

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

a:hover {
  color: var(--burgundy-dark);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Merriweather', serif;
  color: var(--text-dark);
  line-height: 1.35;
  margin-bottom: 0.75em;
}

h1 { font-size: 2.25rem; font-weight: 900; }
h2 { font-size: 1.65rem; font-weight: 700; margin-top: 2.5rem; }
h3 { font-size: 1.3rem; font-weight: 700; margin-top: 2rem; }
h4 { font-size: 1.1rem; font-weight: 700; margin-top: 1.5rem; }

p {
  margin-bottom: 1.25rem;
}

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

li {
  margin-bottom: 0.5rem;
}

blockquote {
  border-left: 4px solid var(--burgundy);
  background: var(--cream-medium);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-dark);
}

blockquote p:last-child {
  margin-bottom: 0;
}

hr {
  border: none;
  border-top: 2px solid var(--border-color);
  margin: 2.5rem 0;
}

strong {
  color: var(--text-dark);
  font-weight: 700;
}

/* ===== Header ===== */
.site-header {
  background: var(--burgundy-dark);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

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

.site-logo {
  font-family: 'Merriweather', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--cream) !important;
  white-space: nowrap;
}

.site-logo:hover {
  color: #fff !important;
}

.site-nav {
  display: flex;
  gap: 0.25rem;
}

.site-nav a {
  color: var(--cream-dark);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease, color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* ===== Mobile Menu Toggle ===== */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.menu-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--cream);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--burgundy-dark) 0%, var(--burgundy) 50%, var(--burgundy-light) 100%);
  color: var(--cream);
  padding: 4rem 0 3.5rem;
  text-align: center;
}

.hero h1 {
  color: #fff;
  font-size: 2.6rem;
  max-width: 750px;
  margin: 0 auto 1rem;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--cream-dark);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ===== Homepage Content ===== */
.homepage-content {
  padding: 3rem 0;
}

.homepage-content .article-content {
  max-width: var(--content-width);
  margin: 0 auto;
}

/* ===== Guides Section (Homepage) ===== */
.guides-section {
  background: var(--cream);
  padding: 3.5rem 0 4rem;
}

.guides-section h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 1.85rem;
}

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

.guide-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.guide-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  color: var(--text-body);
}

.guide-card h3 {
  font-size: 1.15rem;
  margin-top: 0;
  margin-bottom: 0.65rem;
  color: var(--burgundy-dark);
}

.guide-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  flex-grow: 1;
}

.guide-card .read-more {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--burgundy);
  margin-top: 0.75rem;
}

/* ===== Article Page ===== */
.article-page {
  padding: 3rem 0 4rem;
}

.article-header {
  max-width: var(--content-width);
  margin: 0 auto 2.5rem;
  text-align: center;
}

.article-header h1 {
  font-size: 2.35rem;
  margin-bottom: 0.75rem;
}

.article-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto 1rem;
}

.article-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.reading-time::before {
  content: "·";
  margin-right: 0.25rem;
}

/* ===== Article Content ===== */
.article-content {
  max-width: var(--content-width);
  margin: 0 auto;
}

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

.article-content h3 {
  color: var(--burgundy-dark);
}

.article-content a {
  color: var(--burgundy);
  font-weight: 600;
  border-bottom: 1px solid var(--burgundy-muted);
  transition: border-color 0.2s ease;
}

.article-content a:hover {
  border-color: var(--burgundy-dark);
}

.article-content ul li::marker {
  color: var(--burgundy);
}

.article-content ol li::marker {
  color: var(--burgundy);
  font-weight: 700;
}

/* ===== Callout Boxes (via blockquote styling classes) ===== */
.article-content blockquote {
  position: relative;
}

/* ===== Article Footer / Related ===== */
.article-footer {
  max-width: var(--content-width);
  margin: 3rem auto 0;
  border-top: 2px solid var(--border-color);
  padding-top: 2.5rem;
}

.article-footer h2 {
  text-align: center;
  border: none;
  padding-bottom: 0;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.related-card {
  background: var(--cream);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: box-shadow 0.2s ease;
}

.related-card:hover {
  box-shadow: var(--shadow-md);
  color: var(--text-body);
}

.related-card h3 {
  font-size: 1rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--burgundy-dark);
}

.related-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--burgundy-dark);
  color: var(--cream-dark);
  padding: 3rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-grid h3 {
  font-family: 'Merriweather', serif;
  color: #fff;
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

.footer-about p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--cream-dark);
  opacity: 0.85;
}

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

.footer-nav li {
  margin-bottom: 0.5rem;
}

.footer-nav a {
  color: var(--cream-dark);
  font-size: 0.9rem;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.footer-nav a:hover {
  opacity: 1;
  color: #fff;
}

.footer-bottom {
  padding: 1.25rem 0;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8rem;
  opacity: 0.6;
  margin: 0;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  html {
    font-size: 16px;
  }

  .site-header .container {
    height: 60px;
  }

  .site-logo {
    font-size: 0.95rem;
  }

  .menu-toggle {
    display: flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--burgundy-dark);
    flex-direction: column;
    padding: 1rem 1.5rem 1.5rem;
    box-shadow: var(--shadow-lg);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 0.65rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .hero {
    padding: 2.5rem 0 2rem;
  }

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

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

  h1 { font-size: 1.85rem; }
  h2 { font-size: 1.4rem; }
  h3 { font-size: 1.15rem; }

  .guides-grid {
    grid-template-columns: 1fr;
  }

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

  .related-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.55rem;
  }

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

  .article-meta {
    flex-direction: column;
    gap: 0.25rem;
  }
}
