/* ============================================================
   Packagly — blog/listing.css   (blog index page)
   Depends on: common.css, shared/page.css
   ============================================================ */
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 36px;
}
.blog-filter {
  font-size: 13px;
  font-weight: 600;
  color: #46544b;
  background: #fff;
  border: 1px solid #e3e8e3;
  border-radius: 22px;
  padding: 9px 18px;
  transition: all 0.2s ease;
}
.blog-filter:hover {
  border-color: var(--green);
  color: var(--green);
}
.blog-filter.is-active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.blog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 30px;
  align-items: start;
}

/* featured article */
.feat-overline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 16px;
}
.feat-overline::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--green);
}
.feat-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #fff;
  border: 1px solid #e7ebe7;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 30px;
}
.feat-card .ph {
  border: none;
  border-radius: 0;
  min-height: 260px;
}
.feat-body {
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.feat-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.post-cat {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--green);
}
.post-date {
  font-size: 12px;
  color: #8a988e;
}
.feat-title {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.25;
  color: #16241c;
}
.feat-title a:hover {
  color: var(--green);
}
.feat-excerpt {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.65;
  color: #5d6b62;
}
.read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--green);
  transition: gap 0.2s ease;
}
.read-more img {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
}
.read-more:hover {
  color: var(--green);
  gap: 12px;
}

/* post grid */
.post-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.post-card {
  background: #fff;
  border: 1px solid #e7ebe7;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
}
.post-card:hover {
  box-shadow: 0 14px 30px rgba(20, 36, 27, 0.1);
  transform: translateY(-3px);
}
.post-thumb {
  position: relative;
}
.post-thumb .ph {
  border: none;
  border-radius: 0;
  min-height: 190px;
}
.post-thumb .pill {
  position: absolute;
  top: 14px;
  left: 14px;
}
.post-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}
.post-body .post-cat {
  display: inline-block;
  margin-bottom: 6px;
}
.post-card .post-date {
  margin-left: 8px;
}
.post-title {
  margin: 0 0 8px;
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.35;
  color: #16241c;
}
.post-title a:hover {
  color: var(--green);
}
.post-excerpt {
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.6;
  color: #5d6b62;
}
.post-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
}
.post-author {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.post-ava {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.post-author-name {
  font-size: 12.5px;
  font-weight: 600;
  color: #46544b;
}
.post-readtime {
  margin-left: auto;
  font-size: 11.5px;
  color: #8a988e;
  background: #f1f4f1;
  padding: 4px 10px;
  border-radius: 12px;
}

/* sidebar */
.blog-side {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.side-box {
  background: #fff;
  border: 1px solid #e7ebe7;
  border-radius: 14px;
  padding: 20px;
}
.side-title {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #15241b;
}
.search-box {
  display: flex;
  gap: 8px;
}
.search-box input {
  flex: 1 1 auto;
  min-width: 0;
  font: inherit;
  font-size: 13.5px;
  padding: 11px 14px;
  border: 1px solid #e3e8e3;
  border-radius: 10px;
  background: #f4f6f4;
}
.search-box input:focus {
  outline: none;
  border-color: var(--green);
  background: #fff;
}
.search-box button {
  flex: 0 0 auto;
  width: 44px;
  border-radius: 10px;
  background: var(--green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.search-box button img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
}

.subscribe-card {
  background: radial-gradient(ellipse at 30% 0%, #0d2a18 0%, #061a11 80%);
  border: 1px solid rgba(112, 174, 19, 0.25);
  color: #fff;
}
.subscribe-card .side-title {
  color: #fff;
}
.subscribe-card .side-title .accent {
  color: var(--green);
}
.subscribe-sub {
  margin: -8px 0 14px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--white-70);
}
.subscribe-card input {
  width: 100%;
  font: inherit;
  font-size: 13.5px;
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  margin-bottom: 10px;
}
.subscribe-card input::placeholder {
  color: var(--white-50);
}
.subscribe-card input:focus {
  outline: none;
  border-color: var(--green);
}
.subscribe-card .btn-g {
  width: 100%;
  justify-content: center;
  padding: 12px;
}

.cat-list,
.recent-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.cat-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #eef1ee;
  font-size: 13.5px;
  color: #46544b;
}
.cat-list li:last-child {
  border-bottom: none;
}
.cat-list a:hover {
  color: var(--green);
}
.cat-count {
  font-size: 11.5px;
  font-weight: 700;
  color: #8a988e;
  background: #f1f4f1;
  padding: 2px 9px;
  border-radius: 10px;
}
.recent-list li {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #eef1ee;
}
.recent-list li:last-child {
  border-bottom: none;
}
.recent-thumb {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: #eef5e3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.recent-thumb img {
  width: 20px;
  height: 20px;
}
.recent-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: #16241c;
}
.recent-title a:hover {
  color: var(--green);
}
.recent-date {
  font-size: 11.5px;
  color: #8a988e;
}
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag {
  font-size: 12px;
  font-weight: 600;
  color: #46544b;
  background: #f4f6f4;
  border: 1px solid #e3e8e3;
  border-radius: 6px;
  padding: 6px 11px;
  transition: all 0.2s ease;
}
.tag:hover {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

/* pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}
.page-btn {
  min-width: 40px;
  height: 40px;
  border-radius: 9px;
  border: 1px solid #e3e8e3;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #46544b;
  padding: 0 10px;
  transition: all 0.2s ease;
}
.page-btn:hover {
  border-color: var(--green);
  color: var(--green);
}
.page-btn.is-active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

/* load more */
.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}
#loadMoreBtn {
  cursor: pointer;
}
#loadMoreBtn:disabled {
  opacity: 0.65;
  cursor: default;
}
.blog-empty {
  margin: 10px 0 0;
  font-size: 14px;
  color: #8a988e;
}

/* search suggestions */
.search-wrap {
  position: relative;
}
.search-suggest {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e3e8e3;
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  z-index: 40;
}
.search-suggest a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid #f0f3f0;
}
.search-suggest a:last-child {
  border-bottom: 0;
}
.search-suggest a:hover {
  background: #f4f6f4;
}
.search-suggest img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
  background: #eef1ee;
  flex: 0 0 auto;
}
.search-suggest .ss-title {
  font-size: 13px;
  font-weight: 600;
  color: #1d2b22;
  line-height: 1.3;
}
.search-suggest .ss-empty {
  padding: 13px 14px;
  font-size: 13px;
  color: #8a988e;
}

@media (max-width: 991.98px) {
  .blog-layout {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 767.98px) {
  .feat-card {
    grid-template-columns: 1fr;
  }
  .post-grid {
    grid-template-columns: 1fr;
  }
}
