/* ============================================================
   Pure Herbs – Blog Styles
   Homepage recent posts + Single post + Archive
   ============================================================ */

/* ── Homepage Blog Section ── */
.ph-blog-section {
  padding: 88px 0 72px;
  background: linear-gradient(180deg, #f4faf6 0%, #fff 100%);
  /* No overflow:hidden — it kills the horizontal scroll container */
}

.ph-blog-section__head {
  text-align: center;
  margin-bottom: 52px;
  padding: 0 24px;
}

.ph-blog-kicker {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #3a7c52;
  background: #e8f5ee;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 14px;
}

.ph-blog-section__head h2 {
  font-size: clamp(1.65rem, 3.5vw, 2.4rem);
  font-weight: 800;
  color: #1a1a1a;
  margin: 0 0 14px;
  line-height: 1.22;
}

.ph-blog-section__head p {
  color: #666;
  font-size: 1rem;
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.7;
}

/* 3D perspective wrapper */
.ph-blog-3d-wrap {
  perspective: 1600px;
  perspective-origin: 50% 30%;
}

/* Horizontal scroll track */
.ph-blog-track-outer {
  position: relative;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: none;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
}

.ph-blog-track-outer:active { cursor: grabbing; }
.ph-blog-track-outer::-webkit-scrollbar { display: none; }

.ph-blog-track {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 24px 40px 48px;
  width: max-content;
  min-width: 100%;
  box-sizing: border-box;
  scroll-snap-type: x mandatory;
}

.ph-blog-track-outer::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 80px;
  background: linear-gradient(to left, #f4faf6 0%, transparent 100%);
  pointer-events: none;
  z-index: 2;
}

/* Individual Blog Card */
.ph-blog-card {
  flex: 0 0 320px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 4px 28px rgba(0,0,0,.07), 0 1px 4px rgba(0,0,0,.04);
  overflow: hidden;
  scroll-snap-align: start;
  transform-style: preserve-3d;
  will-change: transform, opacity;
  transform-origin: 50% 100%;
  transition: box-shadow .35s ease;
  opacity: 0; /* initial hidden — GSAP reveals */
}

.ph-blog-card:hover {
  box-shadow: 0 16px 48px rgba(58,124,82,.16), 0 4px 12px rgba(0,0,0,.06);
}

.ph-blog-card__image {
  display: block;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: linear-gradient(135deg, #e6f3eb 0%, #d4eddc 100%);
}

.ph-blog-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .55s cubic-bezier(.25,.46,.45,.94);
}

.ph-blog-card:hover .ph-blog-card__image img {
  transform: scale(1.07);
}

.ph-blog-card__no-image {
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e6f3eb 0%, #d4eddc 100%);
}

.ph-blog-card__no-image svg { opacity: .35; }

.ph-blog-card__body {
  padding: 22px 24px 26px;
}

.ph-blog-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 11px;
}

.ph-blog-card__cat {
  display: inline-block;
  background: #e8f5ee;
  color: #3a7c52;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .67rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: background .2s, color .2s;
}

.ph-blog-card__cat:hover { background: #3a7c52; color: #fff; }

.ph-blog-card__date {
  font-size: .72rem;
  color: #999;
  font-weight: 500;
}

.ph-blog-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.42;
  margin: 0 0 10px;
  color: #1a1a1a;
}

.ph-blog-card__title a {
  text-decoration: none;
  color: inherit;
  transition: color .2s;
}

.ph-blog-card__title a:hover { color: #3a7c52; }

.ph-blog-card__excerpt {
  font-size: .87rem;
  color: #666;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 18px;
}

.ph-blog-card__read {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .82rem;
  font-weight: 700;
  color: #3a7c52;
  text-decoration: none;
  letter-spacing: .03em;
}

.ph-blog-card__read svg { transition: transform .22s ease; }
.ph-blog-card__read:hover svg { transform: translateX(5px); }

/* View-all CTA */
.ph-blog-section__cta {
  text-align: center;
  margin-top: 12px;
  padding: 0 24px;
}

/* ── Reading Progress Bar ── */
.ph-reading-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #3a7c52 0%, #6abf7b 60%, #a8e6bf 100%);
  z-index: 99999;
  border-radius: 0 2px 2px 0;
  pointer-events: none;
  transition: width .08s linear;
}

/* ── Single Blog Post ── */
.ph-post-hero {
  position: relative;
  width: 100vw;
  left: 50%;
  transform: translateX(-50%);
  height: clamp(260px, 45vw, 500px);
  overflow: hidden;
  margin-bottom: 52px;
  background: #e6f3eb;
}

.ph-post-hero img {
  width: 100%;
  height: 130%; /* extra height for parallax */
  object-fit: cover;
  display: block;
  will-change: transform;
  transform-origin: center top;
}

.ph-post-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,30,15,.55) 0%, rgba(0,0,0,.1) 55%, transparent 100%);
}

/* Single post layout */
.ph-single-blog {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px 100px;
}

.ph-post-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .84rem;
  font-weight: 600;
  color: #3a7c52;
  text-decoration: none;
  margin-bottom: 32px;
  opacity: .75;
  transition: opacity .2s, gap .25s;
}

.ph-post-back:hover { opacity: 1; gap: 13px; }

/* Post header */
.ph-post-header {
  margin-bottom: 40px;
  will-change: transform, opacity;
}

.ph-post-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.ph-post-cat-badge {
  display: inline-block;
  background: #e8f5ee;
  color: #3a7c52;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: .7rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: .07em;
  text-transform: uppercase;
  transition: background .2s, color .2s;
}

.ph-post-cat-badge:hover { background: #3a7c52; color: #fff; }

.ph-post-title {
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  font-weight: 800;
  line-height: 1.22;
  color: #1a1a1a;
  margin: 0 0 22px;
  letter-spacing: -.02em;
}

.ph-post-meta-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: .82rem;
  color: #888;
}

.ph-post-meta-bar__author {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  color: #444;
}

.ph-post-meta-bar__author img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e8f5ee;
}

.ph-post-meta-divider {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ddd;
  flex-shrink: 0;
}

/* Post content body */
.ph-post-content {
  font-size: 1.05rem;
  line-height: 1.85;
  color: #2d2d2d;
}

.ph-post-content > * { will-change: transform, opacity; }

.ph-post-content h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.6rem);
  font-weight: 800;
  margin: 2.2em 0 .7em;
  color: #1a1a1a;
  line-height: 1.3;
}

.ph-post-content h3 {
  font-size: 1.18rem;
  font-weight: 700;
  margin: 1.8em 0 .6em;
  color: #1a1a1a;
}

.ph-post-content p { margin: 0 0 1.5em; }

.ph-post-content img {
  max-width: 100%;
  border-radius: 14px;
  margin: 1.8em 0;
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
}

.ph-post-content a {
  color: #3a7c52;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.ph-post-content a:hover { text-decoration-thickness: 2px; }

.ph-post-content blockquote {
  border-left: 4px solid #3a7c52;
  margin: 2em 0;
  padding: 18px 26px;
  background: #f3faf6;
  border-radius: 0 14px 14px 0;
  font-style: italic;
  color: #444;
  font-size: 1.08rem;
}

.ph-post-content ul,
.ph-post-content ol {
  padding-left: 1.6em;
  margin-bottom: 1.5em;
}

.ph-post-content li { margin-bottom: .55em; }

.ph-post-content hr {
  border: none;
  border-top: 1px solid #eee;
  margin: 2.5em 0;
}

/* Post footer */
.ph-post-footer {
  margin-top: 52px;
  padding-top: 32px;
  border-top: 1px solid #eee;
}

.ph-post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ph-post-tag {
  display: inline-block;
  border: 1.5px solid #e0e0e0;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: .78rem;
  color: #666;
  text-decoration: none;
  transition: border-color .2s, color .2s, background .2s;
}

.ph-post-tag:hover {
  border-color: #3a7c52;
  color: #3a7c52;
  background: #f3faf6;
}

/* Related posts */
.ph-related-posts {
  margin-top: 64px;
}

.ph-related-posts__heading {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 22px;
}

.ph-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.ph-related-card {
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #eee;
  text-decoration: none;
  display: block;
  will-change: transform, opacity;
  opacity: 0;
  transition: transform .28s ease, box-shadow .28s ease;
}

.ph-related-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(58,124,82,.13);
}

.ph-related-card__thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: linear-gradient(135deg, #e6f3eb 0%, #d4eddc 100%);
}

.ph-related-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}

.ph-related-card:hover .ph-related-card__thumb img { transform: scale(1.05); }

.ph-related-card__no-thumb {
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e6f3eb 0%, #d4eddc 100%);
}

.ph-related-card__body {
  padding: 13px 15px 15px;
}

.ph-related-card__title {
  font-size: .88rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.42;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
  transition: color .2s;
}

.ph-related-card:hover .ph-related-card__title { color: #3a7c52; }

.ph-related-card__date {
  font-size: .72rem;
  color: #aaa;
  font-weight: 500;
}

/* ── Blog Archive / Index page ── */
.ph-blog-archive {
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.ph-blog-archive__head {
  margin-bottom: 44px;
}

.ph-blog-archive__head h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  color: #1a1a1a;
  margin-bottom: 10px;
}

.ph-blog-archive__head p {
  color: #666;
  font-size: 1rem;
}

.ph-blog-archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.ph-archive-card {
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 3px 20px rgba(0,0,0,.07);
  overflow: hidden;
  text-decoration: none;
  display: block;
  will-change: transform, opacity;
  opacity: 0;
  transition: transform .3s ease, box-shadow .3s ease;
}

.ph-archive-card:hover {
  transform: translateY(-6px) rotateX(1deg);
  box-shadow: 0 14px 40px rgba(58,124,82,.14);
}

.ph-archive-card__image {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: linear-gradient(135deg, #e6f3eb 0%, #d4eddc 100%);
}

.ph-archive-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.ph-archive-card:hover .ph-archive-card__image img { transform: scale(1.06); }

.ph-archive-card__body { padding: 20px 22px 24px; }

.ph-archive-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.ph-archive-card__cat {
  display: inline-block;
  background: #e8f5ee;
  color: #3a7c52;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.ph-archive-card__date { font-size: .72rem; color: #aaa; font-weight: 500; }

.ph-archive-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.42;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .2s;
}

.ph-archive-card:hover .ph-archive-card__title { color: #3a7c52; }

.ph-archive-card__excerpt {
  font-size: .84rem;
  color: #666;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .ph-blog-archive-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .ph-blog-card { flex: 0 0 275px; }
  .ph-related-grid { grid-template-columns: 1fr 1fr; }
  .ph-blog-section { padding: 60px 0 48px; }
}

@media (max-width: 540px) {
  .ph-blog-card { flex: 0 0 260px; }
  .ph-single-blog { padding: 0 16px 64px; }
  .ph-post-hero { height: 220px; }
  .ph-related-grid { grid-template-columns: 1fr; }
  .ph-blog-archive-grid { grid-template-columns: 1fr; }
  .ph-post-title { font-size: 1.65rem; }
}
