/* ==========================================================================
   blog.css — Blog listing / category page
   (sidebar components are reused from blog-post.css — load that too)
   Self-contained, includes its own responsive rules.
   ========================================================================== */

/* ---- Hero ---- */
.tp-bloghero {
  position: relative;
  overflow: hidden;
  background: #fcfbf7;
  padding: 0.5rem 0 1rem;
}
.tp-bloghero__title {
  margin: 0.8rem 0 0;
  font-size: clamp(2rem, 4.6vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--tp-text);
}
.tp-bloghero__title .is-green { color: var(--tp-green); }
.tp-bloghero__text {
  margin: 1rem 0 0;
  font-size: 1.05rem;
  color: var(--tp-muted);
  max-width: 30em;
}
.tp-bloghero__art { width: 100%; height: auto; display: block; }

/* ---- Section heading ---- */
.tp-bloglist__title {
  position: relative;
  margin: 0 0 1.5rem;
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  font-weight: 700;
  color: var(--tp-text);
  padding-bottom: 0.6rem;
}
.tp-bloglist__title::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 46px; height: 3px; border-radius: 3px;
  background: var(--tp-green);
}

/* ---- Article card (horizontal) ---- */
.tp-article {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  background: var(--tp-white);
  border: 1px solid var(--tp-border);
  border-radius: 1rem;
  overflow: hidden;
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.tp-article:hover {
  border-color: rgba(9, 119, 54, 0.35);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.07);
  transform: translateY(-2px);
}
.tp-article__media {
  flex: 0 0 210px;
  overflow: hidden;
}
.tp-article__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.tp-article:hover .tp-article__media img { transform: scale(1.05); }

.tp-article__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 1.2rem 1.3rem 1.2rem 0;
  min-width: 0;
}
.tp-article__cat {
  align-self: flex-start;
  padding: 0.25rem 0.7rem;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--tp-green);
  background: rgba(9, 119, 54, 0.1);
  border-radius: 999px;
}
.tp-article__title {
  margin: 0.65rem 0 0.4rem;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--tp-text);
  transition: color 0.15s ease;
}
.tp-article__title a:hover { color: var(--tp-green); }
.tp-article__excerpt {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--tp-muted);
  flex: 1 1 auto;
}
.tp-article__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--tp-border);
}
.tp-article__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--tp-muted);
}
.tp-article__meta img { width: 15px; height: 15px; }
.tp-article__more {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--tp-green);
}
.tp-article__more img { width: 16px; height: 16px; transition: transform 0.15s ease; }
.tp-article__more:hover img { transform: translateX(3px); }

/* ---- Pagination ---- */
.tp-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 2rem;
}
.tp-pagination a,
.tp-pagination span {
  min-width: 40px;
  height: 40px;
  padding: 0 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--tp-border);
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--tp-text);
  background: var(--tp-white);
  transition: border-color 0.15s ease, color 0.15s ease;
}
.tp-pagination a:hover { border-color: var(--tp-green); color: var(--tp-green); }
.tp-pagination .is-active {
  border: 0;
  color: #fff;
  background-image: var(--tp-green-gradient);
}
.tp-pagination .is-dots { border: 0; background: transparent; }

/* ---- Popular Articles (sidebar) ---- */
.tp-pop { display: grid; gap: 1.1rem; }
.tp-pop__item { display: flex; gap: 0.8rem; align-items: center; }
.tp-pop__thumb {
  flex: 0 0 66px;
  width: 66px; height: 56px;
  border-radius: 0.5rem;
  object-fit: cover;
}
.tp-pop__text { min-width: 0; }
.tp-pop__title {
  margin: 0 0 0.25rem;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--tp-text);
  transition: color 0.15s ease;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tp-pop__item:hover .tp-pop__title { color: var(--tp-green); }
.tp-pop__date { font-size: 0.76rem; color: var(--tp-muted); }

/* ---- Compact newsletter (sidebar) ---- */
.tp-side-news__text {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: var(--tp-muted);
}
.tp-side-news__input {
  width: 100%;
  height: 42px;
  margin-bottom: 0.6rem;
  padding: 0 0.9rem;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--tp-text);
  background: var(--tp-white);
  border: 1px solid var(--tp-border);
  border-radius: 0.55rem;
  outline: none;
}
.tp-side-news__input:focus { border-color: var(--tp-green); }
.tp-side-news__btn { width: 100%; }
.tp-side-news__assure {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  margin-top: 0.85rem;
}
.tp-side-news__assure span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--tp-muted);
}
.tp-side-news__assure img { width: 15px; height: 15px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 991.98px) {
  .tp-bloghero__art { max-width: 460px; margin: 1.5rem auto 0; }
}

@media (max-width: 575.98px) {
  .tp-article { flex-direction: column; }
  .tp-article__media { flex-basis: auto; aspect-ratio: 16 / 9; }
  .tp-article__body { padding: 0 1.2rem 1.2rem; }
}
