/* ── Tokens ──────────────────────────────────────────── */
:root {
  --green:    #3a8c6e;
  --green-d:  #2a6b54;
  --green-l:  #eef6f2;
  --green-m:  #c8e8da;
  --blue:     #2a6ea6;
  --blue-l:   #eef3fa;
  --ink:      #1a2520;
  --ink-m:    #3d4f47;
  --muted:    #6b7f76;
  --border:   #d5e5de;
  --border-l: #eaf3ed;
  --white:    #f8faf9;
  --card:     #ffffff;
  --r:        10px;
  --r-lg:     16px;
  --font-h:   'Cormorant Garamond', Georgia, serif;
  --font-b:   'DM Sans', system-ui, sans-serif;
  --ease:     cubic-bezier(.25,.46,.45,.94);
}

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-b); background: var(--white); color: var(--ink); font-size: 15px; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: var(--font-b); border: none; background: none; }

/* ── Nav ──────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 200;
  background: rgba(248,250,249,.93);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex; align-items: center; gap: 2rem;
  height: 60px;
}
.nav-logo { font-family: var(--font-h); font-size: 1.3rem; font-weight: 600; color: var(--green); white-space: nowrap; }
.nav-logo span { color: var(--ink); font-weight: 400; font-style: italic; }
.nav-links { display: flex; gap: 1.5rem; margin-left: auto; }
.nav-links a { font-size: 14px; color: var(--ink-m); transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--green); }
.nav-cta {
  background: var(--green); color: #fff; border-radius: 999px;
  padding: .45rem 1.1rem; font-size: 13px; font-weight: 500;
  transition: background .2s; white-space: nowrap; cursor: pointer;
}
.nav-cta:hover { background: var(--green-d); }

/* ── Page header ──────────────────────────────────────── */
.page-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 2rem 0;
}
.page-header-inner { max-width: 1140px; margin: 0 auto; }
.breadcrumb {
  display: flex; align-items: center; gap: .4rem;
  font-size: 13px; color: var(--muted); margin-bottom: .9rem;
}
.breadcrumb a { color: var(--green); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { color: var(--border); }
.ph-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.ph-title { font-family: var(--font-h); font-size: clamp(1.8rem,3vw,2.6rem); font-weight: 600; line-height: 1.1; }
.ph-title em { color: var(--green); font-style: italic; }
.ph-count { font-size: 13px; color: var(--muted); white-space: nowrap; padding-bottom: .3rem; }

/* ── Filter / search bar ──────────────────────────────── */
.filter-bar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: .9rem 2rem;
  display: flex; gap: .75rem; align-items: center; flex-wrap: wrap;
  position: sticky; top: 60px; z-index: 100;
}
.filter-bar-inner { max-width: 1140px; margin: 0 auto; width: 100%; display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.search-wrap {
  display: flex; align-items: center; gap: .5rem;
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: 999px; padding: .35rem .9rem;
  transition: border-color .2s; flex: 1; min-width: 180px; max-width: 280px;
}
.search-wrap:focus-within { border-color: var(--green); }
.search-wrap svg { flex-shrink: 0; color: var(--muted); }
.search-wrap input {
  border: none; outline: none; background: transparent;
  font-family: var(--font-b); font-size: 13px; color: var(--ink);
  width: 100%;
}
.search-wrap input::placeholder { color: var(--muted); }

.pills { display: flex; gap: .45rem; flex-wrap: wrap; }
.pill {
  font-size: 12px; font-weight: 500;
  border: 1.5px solid var(--border); border-radius: 999px;
  padding: .3rem .85rem; color: var(--ink-m);
  transition: all .18s var(--ease); white-space: nowrap;
  background: var(--card);
}
.pill:hover { border-color: var(--green); color: var(--green); }
.pill.active { background: var(--green); color: #fff; border-color: var(--green); }
.pill[data-cat="massage"].active  { background: #3a8c6e; border-color: #3a8c6e; }
.pill[data-cat="fitness"].active  { background: #2a6ea6; border-color: #2a6ea6; }
.pill[data-cat="skincare"].active { background: #7b4fa6; border-color: #7b4fa6; }
.pill[data-cat="nutrition"].active{ background: #c07d1a; border-color: #c07d1a; }
.pill[data-cat="herbs"].active    { background: #2d7a2d; border-color: #2d7a2d; }

.sort-wrap { margin-left: auto; }
.sort-select {
  border: 1.5px solid var(--border); border-radius: 999px;
  padding: .3rem .85rem; font-size: 12px; font-family: var(--font-b);
  color: var(--ink-m); background: var(--card); outline: none;
  cursor: pointer; transition: border-color .2s;
}
.sort-select:focus { border-color: var(--green); }

/* ── Layout ───────────────────────────────────────────── */
.page-wrap { max-width: 1140px; margin: 0 auto; padding: 2rem 2rem 4rem; }
.content-grid { display: grid; grid-template-columns: 1fr 280px; gap: 2rem; align-items: start; }

/* ── Post grid ────────────────────────────────────────── */
.posts-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.2rem;
}
.posts-header-label { font-size: 13px; color: var(--muted); }
.view-toggle { display: flex; gap: .3rem; }
.view-btn {
  width: 30px; height: 30px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--border); color: var(--muted);
  transition: all .18s;
}
.view-btn.active, .view-btn:hover { border-color: var(--green); color: var(--green); background: var(--green-l); }

.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem;
  transition: opacity .2s;
}
.posts-grid.list-view { grid-template-columns: 1fr; }

/* ── Post card ────────────────────────────────────────── */
.post-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s;
  cursor: pointer;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 36px rgba(26,37,32,.12);
  border-color: var(--green-m);
}
.post-card:hover .card-title { color: var(--green); }

/* List view card */
.list-view .post-card {
  flex-direction: row;
  min-height: 130px;
}
.list-view .card-thumb { width: 160px; flex-shrink: 0; aspect-ratio: unset; min-height: 130px; }
.list-view .card-body { padding: 1rem 1.1rem; }
.list-view .card-excerpt { display: block; }

.card-thumb {
  aspect-ratio: 16/9; width: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; position: relative; overflow: hidden;
  background: var(--green-l);
  flex-shrink: 0;
}
.card-cat-badge {
  position: absolute; bottom: .6rem; left: .6rem;
  font-size: 10px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; padding: .2rem .6rem;
  border-radius: 999px; color: #fff;
}
.cat-massage   { background: #3a8c6e; }
.cat-fitness   { background: #2a6ea6; }
.cat-skincare  { background: #7b4fa6; }
.cat-nutrition { background: #c07d1a; }
.cat-herbs     { background: #2d7a2d; }

.card-body { padding: .9rem 1rem 1rem; flex: 1; display: flex; flex-direction: column; }
.card-meta { font-size: 11px; color: var(--muted); margin-bottom: .4rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.card-meta .dot { color: var(--border); }
.card-title {
  font-family: var(--font-h); font-size: 1.1rem; font-weight: 600; line-height: 1.25;
  color: var(--ink); margin-bottom: .4rem; transition: color .2s;
}
.card-excerpt {
  font-size: 13px; color: var(--muted); line-height: 1.55; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-footer {
  display: flex; align-items: center; gap: .5rem;
  margin-top: .75rem; padding-top: .65rem;
  border-top: 1px solid var(--border-l);
}
.mini-avatar {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 600;
}
.card-author-name { font-size: 12px; color: var(--ink-m); font-weight: 500; }
.card-read { font-size: 11px; color: var(--muted); margin-left: auto; }
.card-bookmark {
  width: 26px; height: 26px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); transition: all .18s; flex-shrink: 0;
}
.card-bookmark:hover { background: var(--green-l); color: var(--green); }
.card-bookmark.saved { color: var(--green); }

/* ── Load more ────────────────────────────────────────── */
.load-more-wrap { text-align: center; margin-top: 2rem; }
.load-more {
  background: var(--card); border: 1.5px solid var(--border);
  border-radius: 999px; padding: .65rem 2rem;
  font-size: 14px; font-weight: 500; color: var(--ink-m);
  transition: all .2s;
}
.load-more:hover { border-color: var(--green); color: var(--green); background: var(--green-l); }

/* ── Empty state ──────────────────────────────────────── */
.empty-state {
  grid-column: 1/-1; text-align: center;
  padding: 4rem 2rem; display: none;
}
.empty-state.show { display: block; }
.empty-icon { font-size: 3rem; margin-bottom: .75rem; }
.empty-state h3 { font-family: var(--font-h); font-size: 1.4rem; margin-bottom: .4rem; }
.empty-state p { color: var(--muted); font-size: 14px; }

/* ── Sidebar ──────────────────────────────────────────── */
.sidebar { display: flex; flex-direction: column; gap: 1.5rem; }
.sidebar-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 1.25rem;
}
.sidebar-title {
  font-family: var(--font-h); font-size: 1.1rem; font-weight: 600;
  margin-bottom: 1rem; padding-bottom: .6rem;
  border-bottom: 1px solid var(--border-l);
}

/* Trending */
.trending-item {
  display: flex; gap: .75rem; align-items: flex-start;
  padding: .6rem 0; border-bottom: 1px solid var(--border-l);
  cursor: pointer; transition: all .18s;
}
.trending-item:last-child { border-bottom: none; padding-bottom: 0; }
.trending-item:hover .ti-title { color: var(--green); }
.trending-num {
  font-family: var(--font-h); font-size: 1.3rem; font-weight: 600;
  color: var(--green-m); line-height: 1; flex-shrink: 0; min-width: 24px;
}
.ti-title { font-size: 13px; font-weight: 500; color: var(--ink); line-height: 1.4; transition: color .2s; }
.ti-meta { font-size: 11px; color: var(--muted); margin-top: .2rem; }

/* Tags cloud */
.tags-cloud { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag-chip {
  font-size: 12px; padding: .25rem .7rem;
  background: var(--white); border: 1px solid var(--border);
  border-radius: 999px; color: var(--ink-m);
  cursor: pointer; transition: all .18s;
}
.tag-chip:hover { background: var(--green-l); border-color: var(--green); color: var(--green); }

/* Contributors */
.contributor-row {
  display: flex; align-items: center; gap: .75rem;
  padding: .55rem 0; border-bottom: 1px solid var(--border-l);
  cursor: pointer;
}
.contributor-row:last-child { border-bottom: none; }
.contrib-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
}
.contrib-name { font-size: 13px; font-weight: 500; color: var(--ink); }
.contrib-posts { font-size: 11px; color: var(--muted); }
.contrib-arrow { margin-left: auto; color: var(--muted); font-size: 12px; }

/* Newsletter mini */
.nl-mini { background: linear-gradient(135deg, var(--ink) 0%, #253d32 100%); border-radius: var(--r); padding: 1.25rem; }
.nl-mini h4 { font-family: var(--font-h); font-size: 1.1rem; color: #fff; margin-bottom: .3rem; }
.nl-mini h4 em { color: #8ec9b2; font-style: italic; }
.nl-mini p { font-size: 12px; color: #8ba89f; margin-bottom: .85rem; line-height: 1.5; }
.nl-input { width: 100%; border: none; border-radius: 6px; padding: .55rem .8rem; font-size: 13px; font-family: var(--font-b); outline: none; margin-bottom: .5rem; }
.nl-btn { width: 100%; background: var(--green); color: #fff; border-radius: 6px; padding: .55rem; font-size: 13px; font-weight: 500; transition: background .2s; }
.nl-btn:hover { background: var(--green-d); }

/* ── Reading progress bar ─────────────────────────────── */
.progress-bar {
  position: fixed; top: 0; left: 0; z-index: 999;
  height: 3px; width: 0%; background: var(--green);
  transition: width .1s linear;
}

/* ── Back to top ──────────────────────────────────────── */
.back-top {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 300;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(58,140,110,.35);
  opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s;
  transform: translateY(8px);
}
.back-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-top:hover { background: var(--green-d); }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 900px) {
  .content-grid { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .posts-grid { grid-template-columns: 1fr; }
  .list-view .post-card { flex-direction: column; }
  .list-view .card-thumb { width: 100%; min-height: unset; aspect-ratio: 16/9; }
  .nav-links { display: none; }
}
@media (max-width: 600px) {
  .page-wrap { padding: 1.25rem 1rem 3rem; }
  .filter-bar { padding: .75rem 1rem; }
  .ph-title { font-size: 1.6rem; }
}

/* ── Skeleton loader ──────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--border-l) 25%, var(--green-l) 50%, var(--border-l) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.skel-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.skel-img { height: 140px; }
.skel-body { padding: .9rem 1rem; }
.skel-line { height: 12px; margin-bottom: 8px; }
.skel-line.short { width: 60%; }
.skel-line.long { width: 90%; }
.skel-line.med { width: 75%; }

/* ── Fade-in animation ────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.post-card { animation: fadeUp .35s var(--ease) both; }