/* ============================================
   HARA — Blog / Journal (Public)
   ============================================ */

/* --- Filter chips on blog index --- */

.blog-filter {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-2xl);
}

.blog-filter__btn {
  padding: var(--space-xs) var(--space-lg);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.blog-filter__btn:hover {
  color: var(--text-primary);
  border-color: var(--accent);
}

.blog-filter__btn.active {
  background: var(--accent);
  color: var(--ivory);
  border-color: var(--accent);
}

/* --- Articles grid (used on index + doctor + service pages) --- */

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-xl);
}

/* --- Post card --- */

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out), border-color var(--duration-base) var(--ease-out);
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px var(--glass-shadow);
  border-color: var(--accent);
}

.post-card__cover {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: rgba(193, 194, 176, 0.15);
}

.post-card__cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

.post-card:hover .post-card__cover img {
  transform: scale(1.04);
}

.post-card__cover--empty {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(136, 146, 109, 0.15), rgba(193, 194, 176, 0.1));
}

.post-card__body {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  flex: 1;
}

.post-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.post-card__brand {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 2px 10px;
  border-radius: var(--radius-full);
}

.post-card__brand--clinic {
  background: rgba(58, 69, 52, 0.12);
  color: var(--dark);
  border: 1px solid rgba(58, 69, 52, 0.25);
}

[data-brand="clinic"] .post-card__brand--clinic {
  background: rgba(241, 235, 223, 0.1);
  color: var(--ivory);
  border-color: rgba(241, 235, 223, 0.2);
}

.post-card__brand--wellness {
  background: rgba(136, 146, 109, 0.18);
  color: var(--dark);
  border: 1px solid rgba(136, 146, 109, 0.35);
}

[data-brand="clinic"] .post-card__brand--wellness {
  color: var(--ivory);
  background: rgba(136, 146, 109, 0.3);
}

.post-card__date {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  opacity: 0.7;
}

.post-card__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  line-height: 1.25;
  color: var(--text-primary);
  margin: 0;
}

.post-card__excerpt {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Articles section (embedded in doctor / service pages) --- */

.articles-section {
  padding-top: var(--space-2xl);
}

/* --- Hero compact variant for blog index (legacy — kept for any other page using it) --- */

.hero--compact {
  min-height: 40vh;
}

/* --- Journal hero — full-bleed photo with blend-mode wordmark overlay --- */

.hero--journal {
  min-height: 72vh;
  padding: var(--space-5xl) var(--container-padding);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  /* isolate so the wordmark's mix-blend-mode only affects this hero, not the rest of the page */
  isolation: isolate;
}

/* Photo layer — full-bleed, slow Ken Burns drift */
.hero__journal-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center 42%;
  background-repeat: no-repeat;
  animation: journalKenBurns 45s ease-in-out infinite alternate;
  transform-origin: center 42%;
  will-change: transform;
}

/* Scrim — subtle top/bottom gradient for legibility of tagline and subtitle */
.hero__journal-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(20, 25, 18, 0.35) 0%,
    rgba(20, 25, 18, 0.08) 35%,
    rgba(20, 25, 18, 0.12) 65%,
    rgba(20, 25, 18, 0.45) 100%
  );
}

[data-brand="wellness"] .hero__journal-scrim {
  background: linear-gradient(
    to bottom,
    rgba(241, 235, 223, 0.5) 0%,
    rgba(241, 235, 223, 0.18) 35%,
    rgba(241, 235, 223, 0.22) 65%,
    rgba(241, 235, 223, 0.6) 100%
  );
}

.hero__journal-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
}

.hero__journal-tagline {
  margin: 0;
  color: var(--ivory);
  opacity: 0.9;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

[data-brand="wellness"] .hero__journal-tagline {
  color: var(--dark);
  text-shadow: 0 1px 8px rgba(241, 235, 223, 0.5);
}

/* Masthead — solid color, mix-blend-mode tints the photo where text overlaps */
.hero__journal-wordmark {
  font-family: var(--font-display);
  font-size: clamp(3.25rem, 16vw, 13.5rem);
  line-height: 0.92;
  letter-spacing: -0.035em;
  font-weight: 400;
  margin: 0;
  padding: 0;
  white-space: nowrap;
  text-align: center;
  color: var(--ivory);
  mix-blend-mode: overlay;
}

[data-brand="wellness"] .hero__journal-wordmark {
  color: var(--dark);
  mix-blend-mode: multiply;
}

.hero__journal-subtitle {
  margin: 0;
  max-width: 560px;
  color: var(--ivory);
  opacity: 0.92;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
}

[data-brand="wellness"] .hero__journal-subtitle {
  color: var(--dark);
  text-shadow: 0 1px 10px rgba(241, 235, 223, 0.55);
}

/* Grain overlay — analog film texture sits on top of everything */
.hero__journal-grain {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='200' height='200' filter='url(%23n)' opacity='0.5'/></svg>");
  background-size: 200px 200px;
  background-repeat: repeat;
}

@keyframes journalKenBurns {
  from { transform: scale(1); }
  to   { transform: scale(1.06); }
}

@media (prefers-reduced-motion: reduce) {
  .hero__journal-photo {
    animation: none;
  }
}

@media (max-width: 900px) {
  .hero--journal {
    min-height: 56vh;
  }
  .hero__journal-wordmark {
    white-space: normal;
    font-size: clamp(2.75rem, 18vw, 6rem);
    line-height: 0.95;
    letter-spacing: -0.025em;
  }
}

@media (max-width: 540px) {
  .hero__journal-wordmark {
    font-size: clamp(2.25rem, 20vw, 4.75rem);
  }
}

/* --- Blog post detail --- */

.blog-post {
  background: var(--bg-primary);
}

/* Top padding clears the fixed .site-header (position: fixed, z-index 100)
   and matches the breathing room of .hero used elsewhere on the site. */
.blog-post__hero {
  padding-top: var(--space-5xl);
  padding-bottom: var(--space-xl);
}

@media (max-width: 720px) {
  .blog-post__hero {
    padding-top: var(--space-4xl);
  }
}

.blog-post__meta-top {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-lg);
}

.blog-post__date {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

.blog-post__title {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  line-height: 1.1;
  color: var(--text-primary);
  margin: 0 0 var(--space-md);
}

.blog-post__lede {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0 0 var(--space-md);
}

.blog-post__author {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin: 0;
  opacity: 0.7;
}

/* Cover — slightly wider than the reading column, with an offset accent
   pattern bleeding behind for depth (same treatment as doctor-detail photo). */
.blog-post__cover-wrap {
  position: relative;
  max-width: 1040px;
  margin: var(--space-2xl) auto var(--space-3xl);
  padding-inline: var(--container-padding);
}

.blog-post__cover-accent {
  position: absolute;
  top: 24px;
  right: calc(var(--container-padding) - 32px);
  bottom: -32px;
  left: calc(var(--container-padding) + 32px);
  z-index: 0;
  opacity: 0.08;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-post__cover-accent img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.blog-post__cover-frame {
  position: relative;
  z-index: 1;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 24px 64px var(--glass-shadow);
  background: var(--bg-secondary);
}

.blog-post__cover-img {
  display: block;
  width: 100%;
  max-height: 620px;
  object-fit: cover;
  object-position: center;
}

.blog-post__body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--text-primary);
}

.blog-post__body h2,
.blog-post__body h3 {
  font-family: var(--font-display);
  color: var(--text-primary);
  margin: var(--space-2xl) 0 var(--space-md);
  line-height: 1.2;
}

.blog-post__body h2 {
  font-size: var(--text-2xl);
}

.blog-post__body h3 {
  font-size: var(--text-xl);
}

.blog-post__body p {
  margin: 0 0 var(--space-md);
}

.blog-post__body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.blog-post__body a:hover {
  text-decoration-thickness: 2px;
}

.blog-post__body ul,
.blog-post__body ol {
  margin: 0 0 var(--space-md);
  padding-left: var(--space-xl);
}

.blog-post__body li {
  margin-bottom: var(--space-xs);
}

.blog-post__body blockquote {
  border-left: 3px solid var(--accent);
  margin: var(--space-xl) 0;
  padding: var(--space-sm) var(--space-lg);
  color: var(--text-secondary);
  font-style: italic;
}

.blog-post__body img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: var(--space-xl) auto;
}

/* Sub-sections under the article — tighter vertical rhythm than the default
   .section so they read as coherent closers to the post rather than new pages. */
.blog-post__care-team,
.blog-post__services,
.blog-post__related {
  padding-block: var(--space-3xl);
}

.blog-post__related {
  padding-top: var(--space-2xl);
}

/* --- Responsive --- */

@media (max-width: 720px) {
  .articles-grid {
    grid-template-columns: 1fr;
  }

  .blog-post__title {
    font-size: var(--text-3xl);
  }

  .blog-post__cover-wrap {
    margin-top: var(--space-xl);
    margin-bottom: var(--space-2xl);
  }

  .blog-post__cover-accent {
    opacity: 0.04;
    top: 12px;
    bottom: -16px;
  }

  .blog-post__cover-img {
    max-height: 440px;
  }
}
