/* Container */
.smart-filter-wrapper {
  width: 100%;
  margin: 0 auto;
  font-family: "Montserrat", Sans-serif;
  color: #222;
}

/* Search */
.search-bar {
  text-align: center;
  margin-bottom: 38px;
}
.search-bar input {
  width: 100%;
  max-width: 520px;
  padding: 16px 24px;
  font-size: 15px;
  border-radius: 18px;
  border: 0;
  background-color: #fbf4ee;
  outline: none;
}
.search-bar input:focus {
  border-color: #888;
}

/* Top row (Category & Sort By) */
.smart-filter-top {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 8px;
}

.dropdown-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 6px 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #9f908d;
}
.dropdown-btn .arrow {
  transition: transform 0.5s ease;
  display: inline-block;
}
.dropdown-btn.active .arrow {
  transform: rotate(180deg);
}

/* Panels (expand below the top row, full width) */
.filter-panel {
display: none;
  width: 100%;
  text-align: center;
  padding-top: 24px;
  box-sizing: border-box;
  animation: sf-slide-down 500ms ease;
}
.filter-panel.active {
display: block;
}

/* Buttons inside panels */
.filter-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.filter-btn {
  background: #efefef;
  border: none;
  padding: 10px 16px;
  font-size: 15px;
  cursor: pointer;
  border-radius: 8px;
  color: #9f908d;
}
.filter-btn:hover {
  background: #14213D;
  color: #fff;
}
.filter-btn.active {
  background: #14213D;
  color: #fff;
}

/* Posts grid */
.posts-grid {
  display: grid;
  gap: 70px !important;
  margin-top: 80px;
  grid-template-columns: repeat(3,1fr);
  grid-row-gap: 35px;
  grid-column-gap: 30px;
}
.post-card h3 {
  font-family: "Montserrat", Sans-serif;
  font-size: 16px;
  margin: 20px 0 0 0;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;   /* limit to 2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.post-card p {
  font-family: "Montserrat", Sans-serif;
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;   /* limit to 3 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 4px;
}
.post-card img {
  width: 100%;
  aspect-ratio: 1.32 !important;
  object-fit: cover; /* crop to fill while keeping proportions */
  display: block;
  border-radius: 30px !important;
  transform: scale(1);
  transition: transform 0.5s ease-in-out;
}
.post-card img:hover {
  transform: scale(0.95);
}
.post-card h3,
.post-card p {
	padding: 0px 30px;
}

/* See more */
.see-more {
	opacity: 0;
	color: #0D3276 !important;
	transform: translateY(10px);
	transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}
.post-card:hover .see-more {
	opacity: 1;
	transform: translateY(0); 
}

/* slide animation */
@keyframes sf-slide-down {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* responsive tweaks */
@media (max-width: 560px) {
  .search-bar input { width: 92%; }
  .smart-filter-top { gap: 12px; }
}

/* Mobile (<=768px) */
@media (max-width: 768px) {
  .posts-grid {
    grid-template-columns: 1fr;
	  gap: 0px !important;
	  grid-row-gap: 0px !important;
  }
	.post-card h3, .post-card p {
		padding: 0px 20px;
	}
}
