/* Blog Specific Styles */

/* Styling for regular links in blog post text */
.post-text a {
  color: var(--color-fern);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: all 0.2s ease;
}

.post-text a:hover {
  color: var(--color-forest);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

/* Fix for navbar obscuring anchored content */
:target {
  scroll-margin-top: 4rem; /* Slightly more than the navbar height to add some spacing */
  animation: highlight 2s ease;
}

/* Additionally, let's enhance the target highlight */
@keyframes highlight {
  0% { background-color: rgb(99 140 62 / 20%); }
  100% { background-color: transparent; }
}

/* Blog Header */
.blog-header {
  background-color: var(--color-fern-light);
  padding: 3rem 1rem;
  text-align: center;
}

.blog-title {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--color-forest);
}

.blog-description {
  font-size: 1.25rem;
  max-width: 800px;
  margin: 0 auto;
  color: var(--color-forest);
}

/* Blog Posts Section */
.blog-posts {
  padding: 4rem 1rem;
}

.blog-post {
  margin-bottom: 5rem;
  border-bottom: 1px solid var(--color-fern-light);
  padding-bottom: 4rem;
}

.blog-post:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.post-header {
  margin-bottom: 1.5rem;
}

.post-title {
  font-size: 2.25rem;
  color: var(--color-forest);
  margin-bottom: 0.5rem;
}

.post-meta {
  color: #666;
  font-size: 1rem;
}

.post-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.post-image-container {
  width: 100%;
  max-height: 500px;
  overflow: hidden;
  border-radius: 0.5rem;
}

.post-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.3s;
}

.post-image:hover {
  transform: scale(1.02);
}

.post-text {
  font-size: 1.125rem;
  line-height: 1.7;
}

.post-text p {
  margin-bottom: 1.5rem;
}

.post-text p:last-child {
  margin-bottom: 0;
}

.post-text ul {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.post-text ul li {
  margin-bottom: 0.75rem;
  list-style-position: outside;
}

.post-text h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--color-forest);
  font-size: 1.5rem;
}

/* Media Queries for Responsive Design */
@media (width >= 768px) {
  .post-content {
    flex-direction: row;
    align-items: flex-start;
  }

  .post-image-container {
    width: 40%;
  }

  .post-text {
    width: 60%;
  }
}

@media (width <= 767px) {
  .blog-title {
    font-size: 2.5rem;
  }

  .post-title {
    font-size: 1.75rem;
  }
}