body {
  background-color: var(--light-bg);
  position: static;
}

/* Page Header Wrapper */
.page-header {
  background: var(--gradient);
  padding: 60px 0 40px;
  margin-bottom: 40px;
  text-align: center;
  color: white;
}

.page-header h2 {
  font-weight: 800;
  font-size: 2.5rem;
  margin-bottom: 10px;
}

/* --- GRID LAYOUT CONTAINER --- */
.container-post {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  min-height: 60vh;

  /* Desktop: 3 Column Grid */
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  justify-content: center;
}

/* Individual Post Card */
.post {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);

  /* Card layout */
  display: flex;
  flex-direction: column; /* Stack image on top of text */
  height: 100%; /* Equal height cards */
}

.post:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(220, 38, 38, 0.2);
}

/* Post Image */
.post img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

/* Post Content Area */
.content {
  padding: 25px;
  flex: 1;
  display: flex;
  flex-direction: column;
  /* Default: Left aligned for desktop readability */
  text-align: left;
  align-items: flex-start;
}

/* Category Label */
.category {
  display: inline-block;
  background: rgba(220, 38, 38, 0.1);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 50px;
  margin-bottom: 12px;
}

/* Title Button */
.post-title-btn {
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  font-family: "Jost", sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--dark);
  cursor: pointer;
  line-height: 1.3;
  margin-bottom: 10px;
  transition: color 0.3s ease;
}

.post-title-btn:hover {
  color: var(--primary);
}

/* Description Text */
.post p {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

/* Read More Button */
.read-more {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 8px 20px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.85rem;
}

.read-more:hover {
  background: var(--primary);
  color: white;
}

/* --- DETAIL PAGE (Not Grid) --- */
.container-detail {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

.post-detail-wrapper {
  background: white;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.feature-img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: 15px;
  margin-bottom: 30px;
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
  .page-header {
    padding: 40px 16px;
    margin-bottom: 20px;
  }

  .page-header h2 {
    font-size: 1.8rem;
  }

  .container-post {
    grid-template-columns: 1fr;
    padding: 12px;
    gap: 16px;
  }

  .post {
    max-width: 100%;
    text-align: center;
  }

  .post img {
    height: 180px;
  }

  .content {
    padding: 18px;
    align-items: center;
    text-align: center;
  }

  .post-title-btn {
    text-align: center;
    font-size: 1.1rem;
  }

  .post-detail-wrapper {
    padding: 20px;
    text-align: center;
  }

  .post-text {
    text-align: left;
  }

  .container-detail {
    padding: 12px;
    margin-top: 100px !important;
  }
}

@media (max-width: 480px) {
  .page-header {
    padding: 30px 12px;
    margin-top: 70px !important;
  }

  .page-header h2 {
    font-size: 1.5rem;
  }

  .post img {
    height: 160px;
  }

  .content {
    padding: 14px;
  }

  .post-title-btn {
    font-size: 1rem;
  }
}
