/* Rathbones-inspired Insights Page Styling */

.insights-page-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 20px;
  background-color: #fff; /* Ensure white background */
}

.insights-container {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  background-color: #fff; /* Ensure white background */
}

.insights-main-content {
  flex: 1;
  width: 100%;
  background-color: #fff; /* Ensure white background */
}

.insights-title {
  font-family: "Noto Sans KR", sans-serif;
  font-weight: 700;
  font-size: 2.4rem;
  line-height: 1.2;
  margin-bottom: 25px;
  color: #444; /* Grey color as requested */
}

.insights-intro {
  margin-bottom: 35px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #333;
  font-weight: 400;
}

.insights-posts-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr); /* 5 per row for desktop */
  gap: 20px;
  margin-top: 30px;
  margin-bottom: 40px; /* Added space before pagination section */
  background-color: #fff; /* Ensure white background */
}

.insights-post {
  background-color: #fff;
  border: none; /* Remove border to eliminate box */
  display: flex;
  flex-direction: column;
  height: 400px; /* Fixed height for all posts */
  box-shadow: none;
  transition: none;
}

.insights-post:hover {
  transform: none;
  box-shadow: none;
}

.insights-post-image {
  overflow: hidden;
  position: relative;
  height: 180px; /* Fixed height for images */
}

.insights-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: none;
}

.insights-post-content {
  padding: 20px 0; /* Remove horizontal padding, keep vertical */
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.insights-post-title {
  font-size: 1rem;
  line-height: 1.3;
  margin-bottom: 10px;
  font-weight: 700;
  height: 2.6em; /* Fixed height for titles */
  overflow: hidden;
}

.insights-post-title a {
  color: #041640;
  text-decoration: none;
  font-weight: 700;
}

.insights-post-title a:hover {
  color: #0019c8;
}

.insights-post-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 12px;
  /* font-weight: 600; */
}

.insights-post-excerpt {
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 15px;
  flex-grow: 1;
  color: #333;
  height: 4.2em; /* Fixed height for excerpts */
  overflow: hidden;
}

.insights-post-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: #0019c8;
  text-decoration: none;
  border-bottom: 1px solid #0019c8;
  align-self: flex-start;
  padding-bottom: 2px;
}

.insights-post-link:hover {
  color: #041640;
  border-color: #041640;
}

/* Pagination section */
.pagination-section {
  width: 100%;
  padding: 20px 0;
  background-color: #fff;
  text-align: center;
  margin-bottom: 40px;
}

.insights-pagination {
  margin: 0;
  display: inline-block;
}

.insights-pagination .page-numbers {
  padding: 8px 12px;
  margin: 0 5px;
  border: 1px solid #e5e5e5;
  text-decoration: none;
  color: #041640;
  font-weight: 600;
  font-size: 0.9rem;
}

.insights-pagination .page-numbers.current {
  background-color: #041640;
  color: #fff;
  border-color: #041640;
}

.no-posts-found {
  text-align: center;
  padding: 40px 0;
  font-size: 1.1rem;
  color: #666;
}

/* Responsive styles */
@media (max-width: 1680px) {
  /* Laptop */
  .insights-posts-container {
    grid-template-columns: repeat(4, 1fr); /* 4 per row for laptop */
  }
}

@media (max-width: 1200px) {
  /* Tablet */
  .insights-posts-container {
    grid-template-columns: repeat(3, 1fr); /* 3 per row for tablet */
  }
  
  .insights-title {
    font-size: 2.2rem;
  }
  
  .insights-intro {
    font-size: 0.9rem;
  }
}

@media (max-width: 768px) {
  /* Small tablet */
  .insights-posts-container {
    grid-template-columns: repeat(2, 1fr); /* 2 per row for small tablet */
  }
  
  .insights-title {
    font-size: 2rem;
  }
  
  .insights-post-title {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  /* Mobile */
  .insights-posts-container {
    grid-template-columns: 1fr; /* 1 per row for mobile */
  }
  
  .insights-page-wrapper {
    padding: 30px 15px;
  }
  
  .insights-title {
    font-size: 1.8rem;
  }
  
  .insights-post-content {
    padding: 15px 0;
  }
}
