body {
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 20px;
  background-color: #f7faff;
  color: #333;
}

h1 {
  text-align: center;
  margin-bottom: 40px;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  padding: 24px;
  margin-top: 60px;
}

.post-tile {
  background:  rgba(251, 251, 255, 1);
  /* border: 1px solid #ddd; */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-height: 380px;
}

.post-tile:hover {
  transform: translateY(-5px);
}

.post-tile img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.post-tile-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 16px;
}

.post-tile-title {
  font-size: 1.2rem;
  font-weight: bold;
  margin: 0 0 8px;
}

.post-tile-excerpt {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
  line-height: 1.4;
}

.post-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.2s ease;
}

.post-card:hover {
  transform: translateY(-4px);
}

.post-link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.post-cover {
  width: 100%;
  height: 200px;
  background-size: cover;
  background-position: center;
  
}

.post-cover-image {
  display: none; /* hidden by default */
  height: 300px;
  background-size: cover;
  background-position: center;
  margin-bottom: 24px;
}

.post-image {
  width: 100%;
  margin-top: 10px;
  max-height: 300px;
  object-fit: contain; /* or try 'cover' for zoom effect */
  object-position: center;
  display: block;
}



.post-container {
  max-width: 700px;
  margin: 40px auto;
  padding: 0 20px;
}

.post-tile-content .post-tile-meta {
  color: #666;
  font-size: 12px;
  margin-bottom: 4px;
  margin-top: auto;
  text-align: right;
  display: block;
}


.post-content > *:first-child {
  margin-top: 0; /* Removes top gap from first paragraph/image */
}

.post-content p {
  line-height: 1.7;
  margin: 1em 0;
}

.post-content h2 {
  margin-top: 2em;
}

.post-content h3 {
  margin-top: 1.5em;
}



ul {
  margin: 1em 0;
  padding-left: 1.5em;
  line-height: 1.6;
}

ul li {
  margin-bottom: 0.5em;
}

.back-button {
  position: absolute;
  top: 44px;
  left: 32px;
  font-size: 14px;
  color: #7e7e7e;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  transition: color 0.3s, background-color 0.3s;
  background-color: transparent;
  font-weight: 500;
  border: none;
}

.back-button:hover {
  color: #7315FF;
  background-color: #efecf4;
}

.blog-header {
  display: flex;
  align-items: left; /* Aligns back button and title vertically */
  margin-left: 94px;
}

.post-meta {
  color: #666;
  font-size: 12px;
  text-align: center;
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: fit-content;
  margin-bottom: 40px;
}