/* General Body & Font Styling */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  background-color: #f9f9f9;
  color: #333;
}

/* Overall Page Layout */
.page-grid {
  display: grid;
  grid-template-rows: auto 1fr auto; /* Header, Body (stretches), Footer */
  min-height: 100vh;
}

.page-body {
  display: flex;
  flex-direction: column; /* Mobile First: Stack main content on top of sidebar */
  width: 90%;
  max-width: 1200px;
  margin: 2rem auto; /* Centering and spacing */
  gap: 2rem;
}

.main-content {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  flex: 1; /* Allows the main content to grow */
}

.sidebar {
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.post-header-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto 2rem auto;
  border-radius: 8px;
}

/* =================================
   RESPONSIVE NAVIGATION BAR
================================= */
.navbar {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border-bottom: 3px solid #6e9c3e; /* Green from your original logo */
  position: sticky;
  top: 0;
  z-index: 999;
}

.nav-container {
  max-width: 1200px;
  width: 90%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.nav-logo {
  font-weight: bold;
  font-size: 1.5rem;
  color: #2c5b32; /* A dark green from your logo */
  text-decoration: none;
}

.nav-logo img {
  max-height: 70px; /* You can adjust this value */
  display: block;
}

/* Mobile Menu Styles (Default) */
.nav-menu {
  position: absolute;
  top: 63px; /* 60px navbar height + 3px border */
  left: 0;
  width: 100%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transform: translateY(-150%);
  transition: transform 0.3s ease-in-out;
  z-index: -1;
}

.nav-menu.is-active {
  transform: translateY(0);
}

.nav-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.nav-menu li {
  width: 100%;
}

.nav-menu a {
  display: block;
  padding: 1rem;
  text-align: center;
  text-decoration: none;
  color: #333;
  width: 100%;
}

.nav-menu a:hover {
  background: #f4f4f4;
}

/* Hamburger Toggle Styles */
.nav-toggle {
  display: block; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.hamburger {
  display: block;
  width: 25px;
  height: 3px;
  background: #333;
  position: relative;
  transition: background 0.2s ease-in-out;
}

.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 3px;
  background: #333;
  left: 0;
  transition: transform 0.2s ease-in-out;
}

.hamburger::before {
  top: -8px;
}
.hamburger::after {
  bottom: -8px;
}

/* Hamburger animation to 'X' */
.nav-toggle.is-active .hamburger {
  background: transparent;
}
.nav-toggle.is-active .hamburger::before {
  transform: rotate(45deg) translate(5px, 6px);
}
.nav-toggle.is-active .hamburger::after {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* ===================
   Article Typography
=================== */

/* This targets the main title in your post layout */
.post-title {
  font-size: 2.5rem; /* Explicitly sets the font size for H1 */
  margin-bottom: 1rem;
}

/* This targets headings inside your Markdown content */
.post-content h2,
.post-content h3,
.post-content h4 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.post-content h2 {
  font-size: 2rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.5rem;
}

.post-content h3 {
  font-size: 1.5rem;
}

.post-content h4 {
  font-size: 1.25rem;
}

/* =================================
   RESPONSIVE FOOTER
================================= */
.footer {
  background-color: #31451c; /* Your brand green */
  color: #fefefe; /* A dark, near-black for high contrast */
  font-weight: 600;
  text-align: center;
  padding: 2rem 1rem;
}

.footer a {
  color: #fff; /* Make sure links are also dark */
  text-decoration: none;
}

.footer-container {
  max-width: 1200px;
  width: 90%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* =================================
   CARD & FORM STYLES
================================= */
/* Card Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
  padding: 0;
  list-style-type: none;
}

.card {
  background: #ffffff;
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

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

.card h3 {
  margin-top: 1rem;
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.card p {
  color: #555;
  line-height: 1.6;
}

/* Contact Form */
.contact-form {
  max-width: 600px;
}
.form-group {
  margin-bottom: 1.5rem;
}
.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-family: inherit;
  font-size: 1rem;
}
.button {
  display: inline-block;
  background-color: #0f4461; /* Blue from logo */
  color: #fff;
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 5px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s;
}
.button:hover {
  background-color: #6e9c3e; /* Green from logo */
}

/* =================================
   DESKTOP & LARGER SCREEN STYLES
================================= */
@media (min-width: 768px) {
  /* Page Layout */
  .page-body {
    flex-direction: row;
  }

  .sidebar {
    flex-basis: 25%;
  }

  /* Desktop Navigation */
  .nav-toggle {
    display: none;
  }

  .nav-menu {
    position: static;
    transform: translateY(0);
    width: auto;
    background: none;
    box-shadow: none;
    z-index: 1;
  }

  .nav-menu ul {
    flex-direction: row;
  }

  .nav-menu a {
    padding: 1rem;
    color: #0f4461; /* Your original blue */
    text-decoration: none;
    font-weight: 600; /* Bolder text */
    transition: color 0.2s ease-in-out;
  }

  .nav-menu a:hover {
    background: none;
    color: #31451c; /* Your original green hover color */
  }

  /* =================================
   RESPONSIVE FOOTER
================================= */
  .footer {
    background-color: #31451c; /* Your brand green */
    color: #fefefe; /* A dark, near-black for high contrast */
    font-weight: 600;
    text-align: center;
    padding: 2rem 1rem;
  }

  .footer a {
    color: #fff; /* Make sure links are also dark */
    text-decoration: none;
  }
}
