.search-bar {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
  gap: 0.5rem;
}

.search-bar input {
  padding: 0.5rem 1rem;
  width: 300px;
  max-width: 90%;
  border: 1px solid #ccc;
  border-radius: 5px;
  color: #000;
}

.search-bar button {
  background: #2575fc;
  color: white;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}


.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.5rem auto 2rem;
  justify-content: center;
}

.filter-bar select,
.filter-bar button {
  padding: 0.5rem 1rem;
  border-radius: 5px;
  border: 1px solid #ccc;
}

.filter-bar button {
  background: #2575fc;
  color: white;
  border: none;
  cursor: pointer;
}

/* Style the select dropdown */
.filter-bar select {
  background-color: #fff;          /* Light background */
  color: #000;                     /* Dark text for visibility */
  padding: 0.5rem 1rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;

  appearance: auto;
  -webkit-appearance: auto;
  -moz-appearance: auto;

  /* Optional: smooth hover/focus experience */
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-bar select:focus {
  outline: none;
  border-color: #2563eb;          /* Highlight color */
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

/* Ensure option text is also black */
select option {
  color: #000;
  background-color: #fff;
}


  
#all-posts {
  background-color: rgba(0, 0, 0, 0.85); /* semi-transparent fallback */
  background-image: url("/static/Blog/images/nature.0033b34046e4.jpg");/* ✅ your image path here */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  padding: 2rem;
  border-radius: 10px;
  width: 80rem;
  margin: 1rem auto;
  box-shadow: 1px 1px 12px rgba(0, 0, 0, 0.4);

  color: white; /* optional, if your content is hard to read */
  backdrop-filter: blur(3px); /* optional soft blur effect */
}

#all-posts::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(
    rgba(0, 0, 0, 0.6), 
    rgba(0, 0, 0, 0.4)
  );
  z-index: 1;
}

/* Optional: wrap content in a glass-effect container */
#all-posts .glass {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 2rem;
  border-radius: 10px;
  color: white;
}

#all-posts h2 {
  text-align: center;
  font-size: 2rem;
  color: #0b3b52;
  margin: 3rem 0;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 1.5rem;
}

#all-posts ul{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 2rem;
  padding: 2rem;
  justify-content: center;
}


.articles-header {
  text-align: center;
  margin: 3rem auto 2rem;
  max-width: 800px;
}

.articles-header h2 {
  font-size: 2.2rem;
  color: #1f2937;
  margin-bottom: 0.5rem;
  font-weight: 700;
  border-bottom: 3px solid #2563eb;
  display: inline-block;
  padding-bottom: 0.4rem;
}

.articles-header p {
  font-size: 1rem;
  color: #e2e6ef;
  margin-top: 0.2rem;
}


/* pagination.css */

.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 2rem;
  font-family: sans-serif;
}

.pagination-container a {
  padding: 8px 14px;
  background-color: rgb(197, 227, 226);
  color: #333;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.pagination-container a:hover {
  background-color: #a8d6d3;
  color: #000;
}

.pagination-info {
  padding: 8px 14px;
  font-size: 15px;
  color: #444;
  background-color: #f2f2f2;
  border-radius: 6px;
}

/* Responsive styles for all viewports */
@media (max-width: 1200px) {
  #all-posts {
    width: 98vw;
    padding: 1.5rem 0.5rem;
  }
  #all-posts ul {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    padding: 1rem 0.5rem;
    gap: 1.2rem;
  }
}

@media (max-width: 900px) {
  #all-posts {
    padding: 1rem 0.2rem;
  }
  #all-posts .glass {
    padding: 1rem 0.2rem;
  }
  .articles-header {
    margin: 2rem auto 1rem;
  }
  .articles-header h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 700px) {
  #all-posts {
    width: 100vw;
    border-radius: 0;
    margin: 0;
    padding: 0.5rem 0;
  }
  #all-posts .glass {
    border-radius: 0;
    padding: 0.5rem 0.1rem;
  }
  #all-posts ul {
    grid-template-columns: 1fr;
    padding: 0.5rem 0;
    gap: 1rem;
  }
  .search-bar input {
    width: 100%;
    min-width: 0;
  }
  .filter-bar {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0 0.2rem;
  }
}

@media (max-width: 480px) {
  .search-bar {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0 0.1rem;
  }
  .search-bar input {
    font-size: 1rem;
    padding: 0.4rem 0.7rem;
  }
  .filter-bar select, .filter-bar button {
    font-size: 1rem;
    padding: 0.4rem 0.7rem;
  }
  .pagination-container {
    gap: 6px;
    font-size: 0.95rem;
    flex-direction: column;
  }
  .pagination-info {
    font-size: 0.95rem;
    padding: 6px 10px;
  }
  .articles-header h2 {
    font-size: 1.1rem;
    padding-bottom: 0.2rem;
  }
}

@media (max-width: 350px) {
  .articles-header h2 {
    font-size: 0.95rem;
  }
  .pagination-info {
    font-size: 0.8rem;
  }
}

