/* ========== Blog ========== */
.blog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 2.25rem;
}

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.blog-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.15rem;
  border-radius: 999px;
  border: 1.5px solid rgba(23, 49, 32, 0.15);
  background: var(--white);
  color: var(--forest);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition-base), color var(--transition-base), border-color var(--transition-base);
}

.blog-filter span {
  font-size: 0.75rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: rgba(23, 49, 32, 0.08);
}

.blog-filter:hover { border-color: var(--forest); }

.blog-filter.active {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--mint);
}

.blog-filter.active span { background: rgba(96, 255, 150, 0.18); }

.blog-search {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 260px;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  border: 1.5px solid rgba(23, 49, 32, 0.15);
  background: var(--white);
  color: var(--gray-500);
}

.blog-search:focus-within { border-color: var(--forest); }

.blog-search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: none;
  font: inherit;
  font-size: 0.95rem;
  color: var(--forest);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 55px -30px rgba(23, 49, 32, 0.38);
}

.post-card[hidden] { display: none; }

.post-card-media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--forest);
}

.post-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.post-card:hover .post-card-media img { transform: scale(1.05); }

.post-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.5rem 1.6rem 1.9rem;
}

.post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  font-size: 0.8rem;
  color: var(--gray-500);
}

.post-meta time { margin-left: auto; }

.post-chip {
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(96, 255, 150, 0.2);
  color: var(--leaf);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.post-card h3 {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--forest);
  margin-bottom: 0.6rem;
}

.post-card h3 a:hover { color: var(--leaf); }

.post-card p {
  color: var(--gray-600);
  font-size: 0.93rem;
  line-height: 1.65;
  margin-bottom: 1.1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-more {
  margin-top: auto;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--leaf);
}

.post-more:hover { color: var(--forest); }

.post-ext {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--gray-500);
}

/* Featured (latest) post */
.post-card-featured {
  grid-column: 1 / -1;
  flex-direction: row;
}

.post-card-featured .post-card-media {
  flex: 0 0 55%;
  aspect-ratio: auto;
  min-height: 320px;
}

.post-card-featured .post-card-body {
  justify-content: center;
  padding: 2.5rem 2.75rem;
}

.post-card-featured h3 { font-size: 1.9rem; }
.post-card-featured p { -webkit-line-clamp: 5; font-size: 1.02rem; }

.blog-grid.is-filtered .post-card-featured {
  grid-column: auto;
  flex-direction: column;
}

.blog-grid.is-filtered .post-card-featured .post-card-media {
  flex: none;
  aspect-ratio: 16 / 9;
  min-height: 0;
}

.blog-grid.is-filtered .post-card-featured .post-card-body { padding: 1.5rem 1.6rem 1.9rem; }
.blog-grid.is-filtered .post-card-featured h3 { font-size: 1.2rem; }
.blog-grid.is-filtered .post-card-featured p { -webkit-line-clamp: 3; font-size: 0.93rem; }

.blog-empty {
  text-align: center;
  padding: 3rem 0;
  color: var(--gray-600);
}

/* ---------- Single post ---------- */
.post-hero { padding-bottom: 4.5rem; }

.post-hero h1 {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

.post-meta-hero {
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0;
}

.post-meta-hero time { margin-left: 0.5rem; }

.post-meta-hero .post-chip {
  background: rgba(96, 255, 150, 0.16);
  color: var(--mint);
}

.post-article {
  max-width: 780px;
  margin: 0 auto;
}

.post-figure {
  margin: -6.5rem 0 2.5rem;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow-lift);
  background: var(--forest);
  position: relative;
}

.post-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.post-prose h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--forest);
  margin: 2.5rem 0 0.9rem;
  line-height: 1.25;
}

.post-prose h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--forest);
  margin: 1.9rem 0 0.7rem;
}

.post-prose p {
  color: var(--gray-700);
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 1.2rem;
}

.post-prose ul {
  list-style: disc;
  padding-left: 1.4rem;
  margin: 0 0 1.4rem;
}

.post-prose li {
  color: var(--gray-700);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 0.5rem;
}

.post-prose a {
  color: var(--leaf);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-foot {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

@media (max-width: 1024px) {
  .blog-grid { grid-template-columns: 1fr 1fr; }
  .post-card-featured { flex-direction: column; }
  .post-card-featured .post-card-media { flex: none; aspect-ratio: 16 / 9; min-height: 0; }
  .post-card-featured .post-card-body { padding: 1.75rem; }
  .post-card-featured h3 { font-size: 1.5rem; }
}

@media (max-width: 640px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-search { width: 100%; min-width: 0; }
  .post-figure { margin-top: -5rem; border-radius: 20px; }
  .post-hero h1 { font-size: 1.9rem; }
}

/* ---------- Added: article content, no-image posts, load more ---------- */
.post-prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.6rem 0;
  border-radius: 16px;
}

.post-prose h4 { font-size: 1.05rem; font-weight: 800; color: var(--forest); margin: 1.5rem 0 0.5rem; }

.post-prose ol { list-style: decimal; padding-left: 1.4rem; margin: 0 0 1.4rem; }

.post-prose blockquote {
  margin: 1.6rem 0;
  padding: 0.4rem 0 0.4rem 1.3rem;
  border-left: 4px solid var(--mint);
  color: var(--gray-700);
  font-style: italic;
}

.post-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6rem 0;
  font-size: 0.95rem;
  display: block;
  overflow-x: auto;
}

.post-prose th, .post-prose td {
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
  text-align: left;
  color: var(--gray-700);
}

.post-prose th { background: var(--tint); color: var(--forest); font-weight: 800; }

.post-hero-noimg { padding-bottom: 3.5rem; }

.blog-more-wrap { text-align: center; margin-top: 2.5rem; }
.blog-more-wrap [hidden] { display: none; }

.legal-updated { color: var(--gray-500); font-size: 0.9rem; margin-bottom: 1.5rem; }

/* ---------- Single post: two-column layout with sticky "Recent Blogs" sidebar ---------- */
.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 3rem;
  align-items: start;
  max-width: 1160px;
  margin: 0 auto;
}

.post-layout .post-article {
  max-width: none;
  margin: 0;
  min-width: 0;
}

.post-sidebar {
  position: sticky;
  top: calc(var(--header-height, 80px) + 1.5rem);
  align-self: start;
}

.side-card {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - var(--header-height, 80px) - 3rem);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-card);
  padding: 1.4rem 1.25rem 1rem;
}

.post-sidebar .side-title {
  flex: none;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--forest);
  line-height: 1.3;
  letter-spacing: 0;
  margin: 0 0 1rem;
  padding: 0 0.25rem 0.8rem;
  border-bottom: 1px solid var(--line);
}

.side-list {
  list-style: none;
  margin: 0;
  padding: 0 0.25rem 0 0;
  overflow-y: auto;
  scrollbar-width: thin;
}

.side-list li { margin: 0 0 0.9rem; }
.side-list li:last-child { margin-bottom: 0; }

.side-post {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  text-decoration: none;
  color: var(--forest);
}

.side-post-media {
  flex: 0 0 92px;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  background: var(--forest);
}

.side-post-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.side-post:hover .side-post-media img { transform: scale(1.06); }

.side-post-body { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }

.side-post-title {
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.side-post:hover .side-post-title { color: var(--leaf); }

.side-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.6rem;
  font-size: 0.74rem;
  color: var(--gray-500);
}

.side-post-meta span { color: var(--leaf); font-weight: 700; }

@media (max-width: 1024px) {
  .post-layout { grid-template-columns: 1fr; max-width: 780px; gap: 2.5rem; }
  .post-sidebar { position: static; }
  .side-card { max-height: none; }
  .side-list { overflow: visible; }
}
