/* Blog Specific Styles */
.blog-hero {
    height: 50vh;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5));
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.featured-container {
    display: flex;
    max-width: 1100px;
    margin: 50px auto;
    gap: 40px;
    padding: 0 20px;
}

.featured-img { width: 50%; border-radius: 8px; }

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1100px;
    margin: 50px auto;
    padding: 0 20px;
}

.blog-card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.blog-card img { width: 100%; height: 200px; object-fit: cover; }
.card-content { padding: 20px; }

.date { color: var(--primary-blue); font-weight: bold; font-size: 0.9rem; }
.btn-link { color: var(--primary-blue); font-weight: bold; text-decoration: none; }


/* NEW: Wrapper stretches edge-to-edge and holds the background color */
.blog-background-wrapper {
  background-color: #212529; 
  width: 100%;
}

/* UPDATED: Container keeps content centered and constrained */
.blog-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  max-width: 1200px; /* Increase this if you want the text columns wider */
  margin: 0 auto;
  padding: 3rem 2rem; /* slightly increased padding for breathing room */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #e9ecef;
  /* background-color removed from here! */
}

/* Typography elements */
.section-title {
  font-family: "Georgia", serif;
  font-style: italic;
  font-size: 2rem;
  margin-bottom: 1rem;
}

hr {
  border: 0;
  border-top: 1px solid #495057;
  margin-bottom: 2rem;
}

/* Main Post Styles */
.blog-post {
  margin-bottom: 4rem;
}

.blog-post-media {
  margin: 0 0 1.5rem 0;
  padding: 0;
  border-radius: 0.375rem; /* Matches the rounded corners of your sidebar */
  overflow: hidden;        /* Keeps the image contained within the rounded corners */
  background-color: #2b3035; /* Fills empty space if an image fails to load */
}

.blog-post-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover; 
  max-height: 450px; /* Prevents portrait photos from taking up too much vertical space */
  transition: opacity 0.3s ease; /* Subtle load-in effect */
}


.blog-post-title {
  font-family: "Georgia", serif;
  font-size: 2.5rem;
  margin-bottom: 0.25rem;
  font-weight: bold;
}

.blog-post-meta {
  color: #adb5bd;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}

.blog-post p {
  line-height: 1.6;
  margin-bottom: 1rem;
}

.read-more {
  color: #6ea8fe;
  text-decoration: none;
  font-weight: 500;
}

.read-more:hover {
  text-decoration: underline;
}

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

.sidebar-box {
  margin-bottom: 1rem;
}

.about-box {
  background-color: #2b3035;
  padding: 1.5rem;
  border-radius: 0.375rem;
}

.sidebar-title {
  font-family: "Georgia", serif;
  font-style: italic;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* Recent Posts List in Sidebar */
.recent-posts-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.recent-posts-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.post-info {
  display: flex;
  flex-direction: column;
}

.sidebar-thumbnail {
  width: 60px;
  height: 60px;
  object-fit: cover; 
  border-radius: 0.25rem; /* Optional: gives it slightly rounded corners */
  flex-shrink: 0; /* Prevents the Flexbox layout from squishing the image horizontally */
  background-color: #2b3035; /* Fallback color just in case the image still fails */
}

.post-info a {
  color: #e9ecef;
  text-decoration: none;
  font-weight: bold;
  margin-bottom: 0.2rem;
}

.post-info a:hover {
  text-decoration: underline;
}

.post-info span {
  font-size: 0.8rem;
  color: #adb5bd;
}

/* Archive Links */
.archive-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.archive-list li {
  margin-bottom: 0.5rem;
}

.archive-list a {
  color: #6ea8fe;
  text-decoration: none;
}

.archive-list a:hover {
  text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .blog-container {
    grid-template-columns: 1fr;
  }
}
