/* General container for the view-more page */
.view-more-container {
  width: 80%;
  margin: 20px auto;
  padding: 20px;
}

@media (max-width: 1023px) {
  .view-more-container {
    width: 95%;
  }
}

@media (max-width: 767px) {
  .view-more-container {
    padding: 10px;
  }
}

/* Page title style */
#page-title {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 24px;
  color: #333;
  border-bottom: 3px solid #62c5ff;
  padding-bottom: 10px;
}

/* Filter controls container */
.filter-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px;
  background-color: #f9f9f9;
  border-radius: 12px;
}

#sort-buttons {
  display: flex;
  gap: 10px;
}

.filter-btn {
  padding: 8px 16px;
  font-size: 1rem;
  font-family: 'IBM Plex Sans Thai', sans-serif;
  border: 1px solid #ddd;
  background-color: #fff;
  color: #555;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  background-color: #e9e9e9;
  border-color: #ccc;
}

.filter-btn.active {
  background-color: #62c5ff;
  color: white;
  border-color: #62c5ff;
  font-weight: 500;
}

.category-select {
  padding: 8px 12px;
  font-size: 1rem;
  font-family: 'IBM Plex Sans Thai', sans-serif;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: white;
  min-width: 200px;
}

/* Grid for displaying articles or UGC */
.content-grid {
  display: grid;
  gap: 20px;
  /* Default to 4 columns for PC and larger screens */
  grid-template-columns: repeat(4, 1fr);
}

/* Tablet: 3 columns */
@media (max-width: 1023px) {
  .content-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Mobile: 2 columns */
@media (max-width: 767px) {
  .content-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
}

/* Re-using article-item and ugc-card styles from style.css */
/* but ensuring they fit well in the new grid */
.content-grid .article-item,
.content-grid .ugc-card {
  width: 100%;
  /* Override fixed width to be responsive in the grid */
}