.projects-section {
  background-image: url("../images//bg.5fc709131814.webp");
  padding: 60px 20px;
  background-repeat: repeat;
 
}
.projects-section__filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  position: relative;
  z-index: 1000;
}
.projects-section .main-content-container{
   position: unset;
}
.projects-section__filter-label {
  font-weight: 500;
  color: #43230C;
  margin-right: 8px;
}
.projects-section .dropdown-wrapper{
  display: flex;
  gap:12px;
    flex-wrap: wrap;
}
.filter-button {
  padding: 8px 16px;
  border: 1px solid #43230C;
  border-radius: 4px;
  background-color: transparent;
  color: #43230C;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.3s ease;
  min-width: 160px;
  align-items: center;
  justify-content: center;
}

.filter-button--active {
  background-color: #A34830;
  color: white;
  border-color: #A34830;
}
.filter-tags-wrapper{
  display: flex;
  gap:12px;
  flex-wrap: wrap;
}
.filter-tag {
  background-color: #C8B497;
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 14px;
  color: #43230C;
  height: 40px;
  text-align: center;
  min-width:120px;
}
.dropdown {
  position: relative;
  z-index: 1;
}


.dropdown.open .dropdown-menu {
  display: block;
  max-height: 500px; /* hoặc auto nếu bạn dùng JS */
}

/* Cho li trong thẻ a */
.dropdown-menu a > li {
  padding: 8px 16px;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  list-style: none;
  background: none;
}

/* Đường gạch dưới li */
.dropdown-menu a > li::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 16px;
  width: 80%;
  height: 1px;
  background-color: #43230c47;
}

.dropdown-menu a:last-child > li::after {
  display: none;
}

.dropdown-menu a > li:hover {
  background-color: #f0f0f0;
}

/* Nếu cần xử lý hover toàn bộ a cũng highlight li */
.dropdown-menu a:hover > li {
  background-color: #f0f0f0;
}

.dropdown-menu {
    position: absolute;
    display: none;
  /* Reset mặc định của ul */
  list-style: none;
  padding: 0;
  margin: 0;
  margin-top: 10px;
  background-color: rgb(255, 255, 255);
  border: 1px solid #ccc;
  border-radius: 6px;
  min-width: 160px;
  box-shadow: 0px 4px 8px rgba(0,0,0,0.1);
  z-index: 10000;
  padding: 8px 0;
}


.dropdown-menu a {
  display: block;
  text-decoration: none;
  color: #43230C; /* thay vì none */
}


.projects-section__search-wrapper {
  margin-left: auto;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #43230C;
  padding-bottom: 4px;
   height:30px;
}

.projects-section__search-input {
  border: none;
  outline: none;
  font-size: 14px;
  padding: 4px;
  background: transparent;
  width: 160px;
  color: #43230C;
}
.filter-icon {
  /* Mặc định: màu #43230C */
  filter: brightness(0) saturate(100%) invert(17%) sepia(34%) saturate(749%) hue-rotate(343deg) brightness(95%) contrast(90%);
  transition: filter 0.3s ease;
}

.filter-button--active .filter-icon {
  /* Trắng */
  filter: brightness(0) invert(1);
}

.projects-section__search-wrapper i.icon-search {
  margin-left: 8px;
  color: #43230C;
  font-size: 16px;
}

.projects-section__grid {
  display: grid;
   grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  justify-content: center;
}

.projects-section__item {
  display: flex;
  flex-direction: column;
}

.projects-section__image-wrapper {
  width: 100%;
  height: 240px;
  overflow: hidden;
  border-radius: 8px;
}

.projects-section__image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}



.projects-section__title {
  font-size: 30px;
  font-weight: 500;
  margin: 12px 0 4px;
  color: #43230C;
}

.projects-section__desc {
  font-size: 16px;
  color: #43230C;
  margin-bottom: 8px;
}

.projects-section__link {
  font-size: 16px;
  color: #43230C;
  text-decoration: underline !important;
  font-weight: 500;
}
.projects-section__pagination {
  margin-top: 40px;
  text-align: center;
}

.projects-section__pagination a {
  display: inline-block;
  margin: 0 6px;
  padding: 4px 9px;
  font-size: 14px;
  color: #8C795F;
  text-decoration: none;
  transition: all 0.3s;
}

.projects-section__pagination .projects-section__arrow {
  border: 1px solid #8C795F;
  border-radius: 4px;
}
.projects-section__pagination .projects-section__arrow:hover {
  background-color: #943E32;
  color: white;

}
.projects-section__pagination a.active {
  color: #96422F;
  font-weight: 600;
  text-decoration: underline;
}
@media (max-width: 768px) {

  .projects-section__title {
  font-size: 24px;
}
.filter-button{
  padding: 8px 6px;
  min-width: 140px;
}
.projects-section__filter-bar{
  flex-wrap: nowrap;
  flex-direction: column;
}

.dropdown.open .dropdown-menu {
min-width: 140px;
}
.dropdown.open {
  z-index: 100; /* nổi lên trên khi mở */
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  display: none;
  z-index: 9999;
}

.dropdown.open .dropdown-menu {
  display: block;
}
}
@media (max-width: 768px) {
  .projects-section__grid {
  grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 666px) {
  .projects-section__grid {
  grid-template-columns: repeat(1, 1fr);
  }
}