.page-main {
  padding-top: 100px; /* Adjust depending on your header height */
}

/* === Publications Grid Layout === */
.publication-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  padding: 30px 5%;
  background-color: #ffffff;
}

/* === Individual Publication Card === */
.publication-card {
  flex: 1 1 calc(33.333% - 30px);
  background-color: #f5f5f5;
  padding: 20px;
  border-left: 4px solid #2d4d3a;
  border-radius: 6px;
  box-sizing: border-box;
  max-width: 400px;
  min-width: 250px;
  min-height: 300px; /* reserve vertical space to reduce CLS */
  word-break: break-word;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* === Card Hover Effect === */
.publication-card:hover {
  transform: translateY(-5px);
}

/* === Heading Styling === */
.publication-card h4 {
  min-height: 48px;
  font-size: 1.2rem;
  color: #2d4d3a;
  margin-top: 0;
  margin-bottom: 10px;
  line-height: 1.3;
}

/* === Image Styling (if used) === */
.publication-card img {
  width: 100%;
  aspect-ratio: 3 / 2; /* ensure consistent image height */
  object-fit: cover;
  display: block;
  border-radius: 4px;
  margin-bottom: 12px;
}

/* === Link Styling === */
.publication-card a {
  display: inline-block;
  margin-top: auto;
  color: #2c7a7b;
  font-weight: bold;
  text-decoration: underline;
  word-break: break-word;
}

/* === Responsive Layout === */

/* Medium screens (Tablets) - 2 per row */
@media (max-width: 1024px) {
  .publication-card {
    flex: 1 1 calc(50% - 30px);
  }
}

/* Small screens (Mobile) - 1 per row */
@media (max-width: 768px) {
  .publication-grid {
    padding: 20px 15px;
    gap: 20px;
  }

  .publication-card {
    flex: 1 1 100%;
    max-width: 100%;
    padding: 16px;
    min-height: 280px;
  }

  .publication-card h4 {
    font-size: 1.05rem;
  }

  .publication-card a {
    font-size: 0.95rem;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .publication-card {
    padding: 14px;
  }

  .publication-card h4 {
    font-size: 1rem;
  }

  .publication-card a {
    font-size: 0.9rem;
  }
}
