/* Wrapper for the Articles page */
.articles-page {
  display: flex;
  flex-direction: column;
  max-width: 900px;   /* Limit width on desktop/laptop */
  margin: 0 auto;     /* Center align */
  padding: 0 1rem;    /* Small side padding */
}

/* Filter section (search + categories) */
.articles-page .articles-filter {
  margin-bottom: 2rem;
  text-align: center;
}

/* Search form wrapper */
.articles-filter .search-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

/* Search box container */
.search-box {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 50px;
  padding: 0.5rem 1rem;
  background: #fff;
  width: 100%;
}

/* Search icon inside the search box */
.search-box .search-icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-right: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
}

.search-box .search-icon svg path {
  stroke: #666 !important;
}

/* Input field inside the search box */
.search-box input[type="text"] {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  font-family: inherit;   /* Inherit body font */
  color: inherit;         /* Inherit body text color */
  background: transparent;
  width: 100%;
}

/* Placeholder text styling */
.search-box input::placeholder {
  color: #aaa;
}

/* Category chips container */
.articles-page .category-chips {
  margin-top: 1rem;
}

/* Category chip item */
.articles-page .chip {
  color: #333;
  display: inline-block;
  margin: 0.3rem;
  padding: 0.4rem 1rem;
  border-radius: 1rem;
  border: 1px solid #ddd;
  background: #f5f5f5;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 400;
}

/* Active or hover state for chip */
.articles-page .chip.active,
.articles-page .chip:hover {
  background: #000;
  color: #fff;
  border-color: #000;
}

/* Post list wrapper */
.articles-page .post-list {
  display: flex;
  flex-direction: column;
  gap: 2rem; /* spacing between posts */
}

/* Pagination wrapper */
.articles-page .pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  margin: 3rem 0 1rem;
  font-family: 'Merriweather', serif;
}

/* Pagination links */
.articles-page .pagination a,
.articles-page .pagination span {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 0.75rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 400;
  color: #333;
  text-decoration: none;
  border: 1px solid #e0e0e0;
  background: #fafafa;
  transition: all 0.2s ease;
}

/* Hover state */
.articles-page .pagination a:hover {
  background: #f0f0f0;
  border-color: #d0d0d0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Active/current page */
.articles-page .pagination .current {
  background: #000;
  color: #fff;
  border-color: #000;
  font-weight: 500;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Disabled or dots (… ) */
.articles-page .pagination .dots,
.articles-page .pagination .disabled {
  color: #aaa;
  background: transparent;
  border: none;
  box-shadow: none;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .articles-page {
    max-width: 100%; /* Full width on small screens */
    padding: 0;
  }

  .articles-filter .search-form {
    flex-direction: column;   /* Stack vertically on small screens */
    align-items: stretch;
  }

  .search-box {
    margin-right: 0;
    width: 100%; /* Make search box full width */
  }

  .articles-page .category-chips {
    justify-content: center; /* Center align categories */
    flex-wrap: wrap;         /* Allow wrapping on smaller screens */
  }
}
