/* WayToHome — story-single.css */

/* Success story single: editorial layout (seed placeholder + real posts). */
.waytohome-single-article .entry-content .waytohome-story-body{
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 4vw, 40px);
}

.waytohome-story-body__split{
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(20px, 3vw, 32px);
  align-items: start;
}

.waytohome-story-body__split--media-start{
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
}

.waytohome-story-body__split--media-end{
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
}

.waytohome-story-body__media{
  margin: 0;
  min-width: 0;
}

.waytohome-story-body__placeholder{
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 20px;
  background: var(--waytohome-surface-card-media, #e8e8e8);
  border: 1px solid var(--waytohome-header-border, #d9d9d9);
}

.waytohome-story-body__copy,
.waytohome-story-body__prose{
  min-width: 0;
  color: var(--waytohome-text-muted);
  font-size: 18px;
  line-height: 1.65;
}

.waytohome-story-body__copy p,
.waytohome-story-body__prose p{
  margin: 0 0 0.85em;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

.waytohome-story-body__copy p:last-child,
.waytohome-story-body__prose p:last-child{
  margin-bottom: 0;
}

.waytohome-story-body__triptych{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2.5vw, 20px);
}

.waytohome-story-body__triptych .waytohome-story-body__placeholder{
  aspect-ratio: 1;
  border-radius: 16px;
}

/* ── Article intro: featured image + title/date/intro side by side on desktop ── */
.waytohome-single-article .waytohome-article-body--has-media{
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(24px, 3vw, 40px);
  align-items: start;
  margin-bottom: clamp(28px, 4vw, 48px);
}

.waytohome-single-article .waytohome-article-body__media{
  min-width: 0;
}

.waytohome-single-article .waytohome-article-body__media .wp-post-image{
  width: 100%;
  height: auto;
  border-radius: 20px;
}

/* Right column: title + date + intro paragraph */
.waytohome-single-article .waytohome-article-body__text{
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.waytohome-single-article .waytohome-article-body__title{
  margin: 0 0 0.35em;
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--waytohome-text);
}

/* ── Article meta bar: author left, stats right ── */
.waytohome-single-article .waytohome-article-body__meta-bar{
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem 1.5rem;
  font-size: 15px;
  color: var(--waytohome-text-muted, #727272);
  margin-top: 2em;
  margin-bottom: 3em;
}

.waytohome-single-article .waytohome-article-body__meta-bar--footer{
  margin-top: 3em;
  margin-bottom: 0;
  padding-top: 1.5em;
  border-top: 1px solid var(--waytohome-border-muted, #d7dae2);
}

/* Mobile-first: short date + book-open icon + "3 хв" by default (<1200px) */
.waytohome-single-article .waytohome-article-body__date-full{
  display: none;
}

.waytohome-single-article .waytohome-article-body__date-short{
  display: inline;
}

.waytohome-single-article .waytohome-article-body__reading-time-text{
  display: none;
}

.waytohome-single-article .waytohome-article-body__reading-time-icon{
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
}

/* Desktop (≥1200px / xl): full date + reading time text */
@media (min-width: 1200px){
  .waytohome-single-article .waytohome-article-body__date-full{
    display: inline;
  }

  .waytohome-single-article .waytohome-article-body__date-short{
    display: none;
  }

  .waytohome-single-article .waytohome-article-body__reading-time-text{
    display: inline;
  }

  .waytohome-single-article .waytohome-article-body__reading-time-icon{
    display: none;
  }
}

/* Author block (left side) — now a link to /about-us/ */
.waytohome-single-article .waytohome-article-body__meta-author{
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1 1 auto;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}
.waytohome-single-article .waytohome-article-body__meta-author:hover{
  opacity: 0.8;
}

.waytohome-single-article .waytohome-article-body__author-avatar{
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.waytohome-single-article .waytohome-article-body__author-info{
  min-width: 0;
}

.waytohome-single-article .waytohome-article-body__author-name{
  display: inline-block;
  font-weight: 700;
  font-size: 1rem;
  color: var(--waytohome-text, #1a1a1a);
  line-height: 1.3;
}

.waytohome-single-article .waytohome-article-body__author-bio{
  margin-top: 0.15rem;
  font-size: 0.85rem;
  color: var(--waytohome-text-muted, #727272);
  line-height: 1.35;
}

/* Stats block (right side) */
.waytohome-single-article .waytohome-article-body__meta-stats{
  flex: 0 0 auto;
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.waytohome-single-article .waytohome-article-body__meta-primary{
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65em;
  text-align: right;
}

.waytohome-single-article .waytohome-article-body__meta-actions{
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1em;
  font-size: 18px;
}

.waytohome-single-article .waytohome-article-body__meta-bar .waytohome-article-body__date,
.waytohome-single-article .waytohome-article-body__meta-bar .waytohome-article-body__reading-time,
.waytohome-single-article .waytohome-article-body__meta-bar .waytohome-article-body__stat{
  color: inherit;
}

.waytohome-single-article .waytohome-article-body__meta-bar .waytohome-article-body__sep{
  color: var(--waytohome-border-muted, #d7dae2);
  user-select: none;
}

.waytohome-single-article .waytohome-article-body__meta-bar .waytohome-article-body__stat{
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  line-height: 1.2;
  text-decoration: none;
}

.waytohome-single-article .waytohome-article-body__meta-bar .waytohome-article-body__stat i{
  font-size: 1.25em;
  color: inherit;
}

.waytohome-single-article .waytohome-article-body__meta-bar .wth-like-btn{
  padding: 0;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  cursor: pointer;
}

.waytohome-single-article .waytohome-article-body__meta-bar .wth-like-btn:hover i,
.waytohome-single-article .waytohome-article-body__meta-bar .wth-like-btn:focus i,
.waytohome-single-article .waytohome-article-body__meta-bar .wth-like-btn.is-liked i{
  color: #e74c3c;
}

.waytohome-single-article .waytohome-article-body__meta-bar .wth-like-btn.is-loading{
  opacity: 0.6;
  pointer-events: none;
}

/* ── Share dropdown ── */
.waytohome-share{
  position: relative;
  display: inline-flex;
}

.waytohome-share__toggle{
  padding: 0;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  cursor: pointer;
}

.waytohome-share__toggle i{
  color: inherit;
}

.waytohome-share.is-open .waytohome-share__toggle i,
.waytohome-share__toggle:hover i,
.waytohome-share__toggle:focus i{
  color: var(--waytohome-green, #034c39);
}

.waytohome-share__menu{
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 20;
  min-width: 11.5rem;
  padding: 0.35rem 0;
  margin: 0;
  list-style: none;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1);
}

.waytohome-share__item{
  margin: 0;
}

.waytohome-share__link{
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.85rem;
  color: #494949;
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.3;
}

.waytohome-share__link i{
  width: 1.1rem;
  text-align: center;
  color: #494949;
  font-size: 1rem;
}

.waytohome-share__link:hover,
.waytohome-share__link:focus{
  color: var(--waytohome-green, #034c39);
  background: #fafafa;
  text-decoration: none !important;
}

.waytohome-share__link:hover i,
.waytohome-share__link:focus i{
  color: var(--waytohome-green, #034c39);
}

.waytohome-share__link.is-copied span::after{
  content: ' ✓';
}

.waytohome-share-toast{
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  z-index: 1080;
  max-width: min(22rem, calc(100vw - 2rem));
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: rgba(33, 37, 41, 0.94);
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.35;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 0.5rem);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.waytohome-share-toast.is-visible{
  opacity: 1;
  transform: translate(-50%, 0);
}

.waytohome-single-article .waytohome-article-body__intro{
  min-width: 0;
}

/* Links inside article text content — underlined for readability */
.waytohome-single-article .entry-content a{
  text-decoration: underline;
}

/* Rest of the content flows full-width below the intro grid */
.waytohome-single-article .waytohome-article-body__rest{
  /* full-width, no grid */
}

@media (min-width: 992px){
  .waytohome-single-article .waytohome-article-body--has-media{
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

/* ── Blockquote: container-width card with light background and rounded corners ── */
.waytohome-single-article .entry-content blockquote{
  /* Container width (no breakout) */
  width: 100%;
  /* Visual: light surface + subtle border */
  padding: clamp(24px, 3vw, 40px) clamp(20px, 3vw, 36px);
  border: 1px solid var(--waytohome-border-muted, #d7dae2);
  border-radius: 20px;
  background: var(--waytohome-surface-muted, #f2f5f6);
  color: var(--waytohome-text);
  /* Typography — same size as body text, slightly emphasized */
  font-size: inherit;
  line-height: 1.65;
  /* Spacing from surrounding content */
  margin-block: clamp(28px, 4vw, 48px);
}

/* Inner text paragraphs inside blockquote */
.waytohome-single-article .entry-content blockquote p{
  margin: 0;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

/* Attribution line after the quote (— Автор) */
.waytohome-single-article .entry-content blockquote cite,
.waytohome-single-article .entry-content blockquote .quote-attribution{
  display: block;
  margin-top: 1em;
  font-size: 0.85em;
  font-weight: 400;
  font-style: normal;
  color: var(--waytohome-text-muted, #727272);
}

/* Responsive: slightly smaller radius on narrow screens */
@media (max-width: 575.98px){
  .waytohome-single-article .entry-content blockquote{
    border-radius: 16px;
    padding: clamp(20px, 4vw, 28px);
    margin-block: clamp(20px, 3vw, 32px);
  }
}

/* ── Support CTA: brand banner after article content (like home green blocks) ── */
.waytohome-support-cta{
  background: var(--waytohome-green, #034c39);
  color: var(--waytohome-text-on-brand, #fff);
}

.waytohome-support-cta__inner{
  padding-top: var(--waytohome-home-section-inner-y);
  padding-bottom: var(--waytohome-home-section-inner-y);
  text-align: center;
}

.waytohome-support-cta__title{
  margin: 0 0 0.5em;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  line-height: 1.2;
  color: inherit;
}

.waytohome-support-cta__text{
  margin: 0 0 1.5em;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.6;
  color: inherit;
  opacity: 0.9;
}

.waytohome-support-cta .waytohome-btn--primary{
  background: #fff;
  border-color: #fff;
  color: var(--waytohome-green, #034c39);
}

.waytohome-support-cta .waytohome-btn--primary:hover,
.waytohome-support-cta .waytohome-btn--primary:focus{
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.9);
  color: var(--waytohome-green-dark, #023528);
}

@media (min-width: 992px){
  .waytohome-story-body__split{
    grid-template-columns: minmax(0, 1fr);
  }

  .waytohome-story-body__split--media-end .waytohome-story-body__media{
    display: none;
  }

  .waytohome-story-body__split--media-start .waytohome-story-body__media{
    order: 1;
  }

  .waytohome-story-body__split--media-start .waytohome-story-body__copy{
    order: 2;
  }
}
