/* posts.css */
@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@100..900&display=swap');

/* Featured Posts Grid */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.featured-post {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

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

.featured-post-image {
  height: 200px;
  background-color: var(--medium-gray);
  background-size: cover;
  background-position: center;
}

.featured-post-content {
  padding: 1rem;
}

.featured-post-title {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
  font-family: var(--font-heebo);
}

.featured-post-meta {
  font-size: 0.9rem;
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
}

/* Posts Grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* Post Card */
.post-card {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

.post-card-image {
  height: 180px;
  background-color: var(--medium-gray);
  background-size: cover;
  background-position: center;
}

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

.post-card-title {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
  font-family: var(--font-heebo);
}

.post-card-meta {
  font-size: 0.85rem;
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
}

.post-card-excerpt {
  font-size: 0.9rem;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.post-card-link {
  align-self: flex-start;
  margin-top: auto;
  font-weight: 500;
}

/* Single Post Styles */
.post-header {
  margin-bottom: 2rem;
}

.post-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 900;
  font-family: var(--font-heebo);
  line-height: 1.2;
}

.post-meta {
  font-size: 1rem;
  color: var(--secondary-color);
  margin-bottom: 1.5rem;
}

.post-meta > span {
  margin-left: 1rem;
}

.post-feature-image {
  margin-bottom: 2rem;
  border-radius: var(--border-radius);
  overflow: hidden;
  max-height: 500px;
  width: 100%; /* Ensure it doesn't exceed container width */
}

.post-feature-image img {
  width: 100%;
  height: auto;
  display: block; /* Remove default inline spacing */
  object-fit: cover; /* Maintain aspect ratio */
}

.post-body {
  font-size: 1.2rem;
  line-height: 1.8;
  margin-bottom: 2rem;
  font-family: var(--font-heebo);
  font-weight: 400;
}

.post-body p,
.post-body ul,
.post-body ol,
.post-body blockquote {
  margin-bottom: 1.5rem;
}

.post-body h2,
.post-body h3,
.post-body h4 {
  margin: 2rem 0 1rem;
  font-weight: 700;
  font-family: var(--font-heebo);
}

.post-body blockquote {
  border-right: 4px solid var(--primary-color);
  padding-right: 1rem;
  font-style: italic;
  color: var(--secondary-color);
  background-color: var(--light-gray);
  padding: 1rem 1.5rem;
  border-radius: 0 4px 4px 0;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.post-tag {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background-color: var(--light-gray);
  border-radius: 50px;
  margin-left: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  transition: var(--transition);
}

.post-tag:hover {
  background-color: var(--primary-color);
  color: var(--background-color);
}