/* --- Global Styles & Variables --- */
:root {
  --primary-color: #2E7D32; /* A deep, trustworthy green */
  --accent-color: #4CAF50; /* A brighter green for hovers and accents */
  --cta-color: #FFC107; /* A contrasting yellow/gold for calls to action */
  --background-color: #F8F9F8; /* A very light, clean green/grey */
  --surface-color: #ffffff;
  --text-color: #333333;
  --secondary-text-color: #555555;
  --heading-font: 'Poppins', sans-serif;
  --body-font: 'Lato', sans-serif;
  --border-radius: 8px;
  --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--body-font);
  line-height: 1.7;
  background-color: var(--background-color);
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 0;
}

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

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

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

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

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

ul {
    list-style-position: inside;
    margin-bottom: 1.5rem;
    padding-left: 10px;
}

li {
    margin-bottom: 0.5rem;
}

/* --- Header & Navigation --- */
.site-header {
  background-color: var(--surface-color);
  box-shadow: var(--box-shadow);
  padding: 1rem 0;
  border-bottom: 4px solid var(--primary-color);
}

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

.site-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0;
}

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

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}

.main-nav a {
  font-weight: 600;
  padding: 10px 15px;
  border-radius: var(--border-radius);
  transition: background-color 0.3s, color 0.3s;
}

.main-nav a:hover, .main-nav .active {
  background-color: var(--primary-color);
  color: #fff;
  text-decoration: none;
}

/* --- Main Layout --- */
.main-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-top: 40px;
  flex: 1;
}

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

main {
  background-color: var(--surface-color);
  padding: 2.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

/* --- Blog Post Cards (Homepage) --- */
.blog-posts h2 {
    margin-top: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.blog-posts {
  display: grid;
  gap: 30px;
}

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

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

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

.post-card-content h3 {
    color: var(--primary-color);
}
.post-card-content p {
    flex-grow: 1;
}

.read-more {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 700;
  color: var(--primary-color);
}

/* --- Sidebar --- */
.sidebar {
  height: fit-content;
}

.widget {
  background-color: var(--surface-color);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-bottom: 2rem;
}

.widget-title {
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.widget ul {
  list-style: none;
  padding-left: 0;
}

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

.widget a {
    display: block;
    padding: 8px;
    border-radius: 4px;
    font-weight: bold;
}
.widget a:hover {
    background-color: #f1f1f1;
    text-decoration: none;
}

.promo-widget {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #fff;
    padding: 2rem;
    text-align: center;
}
.promo-widget .widget-title {
    border-bottom-color: rgba(255, 255, 255, 0.5);
}
.promo-widget p {
    color: #fff;
}
.promo-widget a {
    color: #333;
}


/* --- Article Page --- */
.article-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

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

.article-content h2 {
    margin-top: 2.5rem;
    color: var(--primary-color);
}
.article-content h3 {
    margin-top: 2rem;
}

.cta-section {
    background-color: #E8F5E9; /* Light green background */
    padding: 2.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    margin-top: 3rem;
    border: 2px dashed var(--primary-color);
}
.cta-section h2 {
    margin-bottom: 1rem;
}
.cta-button {
    background-color: var(--accent-color);
    color: #fff;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 700;
    display: inline-block;
    transition: background-color 0.3s, transform 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.cta-button:hover {
    background-color: var(--primary-color);
    text-decoration: none;
    transform: translateY(-3px);
}


/* --- Footer --- */
.site-footer {
  background-color: #263238; /* Dark slate grey */
  color: #CFD8DC; /* Light grey text */
  text-align: center;
  padding: 2.5rem 0;
  margin-top: auto;
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-links ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 25px;
  flex-wrap: wrap;
  padding: 0;
  margin: 0;
}

.footer-links a {
  color: #fff;
  font-weight: bold;
}
.footer-links a:hover {
  text-decoration: underline;
  color: var(--cta-color);
}

/* --- Responsive Adjustments --- */
@media (max-width: 767px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }

  .site-header .container {
    flex-direction: column;
    gap: 1.5rem;
  }
  .main-nav ul {
    justify-content: center;
  }
  main {
      padding: 1.5rem;
  }
}