/* GF Blog Article Template — uses the site's existing design tokens
   (--green / --paper / --radius / --max etc. are already defined globally
   in Additional CSS, so this file only adds article-specific rules). */

/* ---------- Hero header ---------- */
.gf-article-hero {
  max-width: 1260px !important;
  margin: 0 auto !important;
  padding: 56px var(--gutter, 32px) 48px !important;
  box-sizing: border-box;
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 56px;
  background: var(--paper-2, #f4f4ef);
}

.gf-article-hero__copy {
  flex: 1 1 480px;
  min-width: 0;
}

.gf-article-hero__media {
  flex: 1 1 460px;
  max-width: 48%;
}

.gf-article-hero__media img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius, 12px);
  display: block;
}

.gf-article-meta {
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--green, #4a7c4e);
  font-weight: 600;
  margin-bottom: 14px;
}

.gf-article-hero h1 {
  text-align: left;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.15;
  margin: 0 0 18px;
}

.gf-article-lead {
  text-align: left;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-2, #4a5450);
  max-width: 56ch;
  margin: 0 0 24px;
}

.gf-article-author {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-2, #4a5450);
}

.gf-article-author__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.gf-author-name {
  display: block;
  color: var(--text, #14191a);
}

.gf-author-role {
  display: block;
  font-size: 13px;
  color: var(--muted, #7a847e);
}

.gf-article-author-sep {
  color: var(--muted, #7a847e);
}

/* ---------- Layout: content + sticky TOC ---------- */
.gf-article-layout {
  max-width: 1260px !important;
  margin: 0 auto !important;
  padding: 56px var(--gutter, 32px) 24px !important;
  box-sizing: border-box;
  display: flex !important;
  flex-direction: row !important;
  gap: 64px;
  align-items: flex-start !important;
}

.gf-article-content {
  flex: 1 1 780px;
  max-width: 780px;
  min-width: 0;
  text-align: left;
  font-size: 18px;
  line-height: 1.65;
  color: var(--text, #14191a);
}

.gf-article-content > *:first-child {
  margin-top: 0;
}

.gf-article-content h2 {
  text-align: left;
  font-size: 27px;
  line-height: 1.3;
  margin: 44px 0 16px;
  scroll-margin-top: 24px;
}

.gf-article-content h3 {
  text-align: left;
  font-size: 21px;
  line-height: 1.35;
  margin: 32px 0 12px;
  scroll-margin-top: 24px;
}

.gf-article-content p {
  text-align: left;
  margin: 0 0 18px;
}

.gf-article-content ul,
.gf-article-content ol {
  text-align: left;
  margin: 0 0 20px;
  padding-left: 22px;
}

.gf-article-content li {
  margin-bottom: 8px;
}

.gf-article-content strong {
  color: var(--text, #14191a);
}

/* ---------- Table of contents (sticky, desktop) ---------- */
.gf-toc {
  position: sticky !important;
  top: 32px;
  align-self: flex-start !important;
  flex: 0 0 280px;
  width: 280px;
  max-width: 280px;
  height: auto !important;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  background: var(--paper-2, #f4f4ef);
  border-radius: var(--radius, 12px);
  padding: 24px;
  box-sizing: border-box;
}

.gf-toc__title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 14px;
}

.gf-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gf-toc a {
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-2, #4a5450);
  text-decoration: none;
  border-left: 2px solid var(--line, #e6e8e3);
  padding-left: 12px;
  display: block;
}

.gf-toc a:hover,
.gf-toc a.is-active {
  color: var(--green, #4a7c4e);
  border-left-color: var(--green, #4a7c4e);
}

.gf-toc-mobile {
  display: none;
}

/* ---------- Recurring content boxes ---------- */
.gf-box {
  margin: 28px 0;
  padding: 20px 24px;
  border-radius: var(--radius, 12px);
  background: var(--paper-2, #f4f4ef);
  border-left: 4px solid var(--green, #4a7c4e);
}

.gf-box__head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  color: var(--green-deep, #1e3a2b);
  margin-bottom: 10px;
}

.gf-box__icon {
  font-size: 16px;
}

.gf-box__body {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text, #14191a);
}

.gf-box__body p:last-child {
  margin-bottom: 0;
}

.gf-box--mistakes { border-left-color: #b3562f; }
.gf-box--mistakes .gf-box__head { color: #8a3f20; }

.gf-box--science { border-left-color: #3d6a8a; }
.gf-box--science .gf-box__head { color: #2c4d63; }

.gf-box--sources {
  background: var(--paper, #fafaf7);
  border: 1px solid var(--line, #e6e8e3);
  border-left: 4px solid var(--muted, #7a847e);
  font-size: 14px;
  color: var(--text-2, #4a5450);
}
.gf-box--sources .gf-box__head { color: var(--text-2, #4a5450); }

/* ---------- Related articles ---------- */
.gf-related-section {
  max-width: 1260px !important;
  margin: 0 auto !important;
  padding: 0 var(--gutter, 32px) 64px !important;
  box-sizing: border-box;
}

.gf-related-section h2 {
  text-align: left;
  font-size: 22px;
  margin: 0 0 24px;
}

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

.gf-related-card {
  display: block;
  text-decoration: none;
  color: inherit;
}

.gf-related-thumb {
  border-radius: var(--radius, 12px);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  margin-bottom: 14px;
  background: var(--paper-2, #f4f4ef);
}

.gf-related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gf-related-meta {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--green, #4a7c4e);
  font-weight: 600;
  margin-bottom: 8px;
}

.gf-related-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
  color: var(--text, #14191a);
}

.gf-related-link {
  font-size: 14px;
  color: var(--green, #4a7c4e);
  font-weight: 600;
}

/* ---------- Coaching teaser ---------- */
.gf-coaching-teaser {
  max-width: 1260px;
  margin: 0 auto 72px;
  padding: 40px;
  background: var(--paper-2, #f4f4ef);
  border-radius: var(--radius-lg, 20px);
  display: flex;
  align-items: center;
  gap: 48px;
}

.gf-coaching-teaser__text { flex: 1 1 480px; }
.gf-coaching-teaser__img { flex: 0 0 320px; max-width: 40%; }

.gf-coaching-teaser__img img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius, 12px);
  display: block;
}

.gf-coaching-teaser h2 {
  text-align: left;
  font-size: 26px;
  margin: 0 0 12px;
}

.gf-coaching-teaser p {
  text-align: left;
  font-size: 16px;
  color: var(--text-2, #4a5450);
  margin: 0 0 20px;
  max-width: 52ch;
}

.gf-btn-primary {
  display: inline-block;
  background: var(--green, #4a7c4e);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  padding: 14px 26px;
  border-radius: var(--radius-sm, 6px);
  text-decoration: none;
}
.gf-btn-primary:hover { background: var(--green-hover, #3d6841); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .gf-article-layout {
    flex-direction: column !important;
  }

  .gf-article-content {
    flex-basis: auto;
    max-width: 100%;
  }

  .gf-toc {
    display: none;
  }

  .gf-toc-mobile {
    display: block;
    margin-bottom: 32px;
    border: 1px solid var(--line, #e6e8e3);
    border-radius: var(--radius, 12px);
    background: var(--paper-2, #f4f4ef);
    padding: 4px 20px;
  }

  .gf-toc-mobile summary {
    cursor: pointer;
    font-weight: 700;
    font-size: 15px;
    padding: 14px 0;
    list-style: none;
  }
  .gf-toc-mobile summary::-webkit-details-marker { display: none; }
  .gf-toc-mobile summary::after {
    content: '+';
    float: right;
    font-weight: 400;
  }
  .gf-toc-mobile[open] summary::after { content: '–'; }

  .gf-toc-mobile ul {
    list-style: none;
    margin: 0;
    padding: 0 0 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .gf-toc-mobile a {
    text-decoration: none;
    font-size: 14px;
    color: var(--text-2, #4a5450);
  }
}

@media (max-width: 900px) {
  .gf-article-hero {
    flex-direction: column-reverse !important;
    padding: 32px 20px 36px;
    gap: 24px;
  }
  .gf-article-hero__media { max-width: 100%; width: 100%; }
  .gf-article-hero__media img { aspect-ratio: 16/10; }
  .gf-article-hero__copy { width: 100%; }
  .gf-article-hero h1 { font-size: 28px; }
  .gf-article-lead { font-size: 16px; max-width: none; }

  .gf-article-layout { padding: 32px 20px 8px; }
  .gf-article-content { font-size: 16px; }
  .gf-article-content h2 { font-size: 22px; }
  .gf-article-content h3 { font-size: 18px; }

  .gf-related-grid { grid-template-columns: 1fr; gap: 24px; }

  .gf-coaching-teaser { flex-direction: column; padding: 28px 20px; gap: 20px; }
  .gf-coaching-teaser__img { max-width: 100%; width: 100%; }
}

/* ---------- Blog index (category filter + grid) ---------- */
.gf-blog-index {
  max-width: 1260px !important;
  margin: 0 auto !important;
  padding: 56px var(--gutter, 32px) 80px !important;
  box-sizing: border-box;
}

.gf-blog-index h1 {
  text-align: left;
  margin: 0 0 12px;
}

.gf-blog-index__lead {
  font-size: 21px;
  line-height: 1.5;
  color: var(--text-2, #4a5450);
  max-width: 60ch;
  margin: 0 0 32px;
}

.gf-blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 36px;
}

.gf-blog-filter {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--line, #e6e8e3);
  color: var(--text, #14191a);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.gf-blog-filter.is-active,
.gf-blog-filter:hover {
  background: var(--green, #4a7c4e);
  border-color: var(--green, #4a7c4e);
  color: #fff;
}

.gf-blog-empty {
  color: var(--text-2, #4a5450);
  font-size: 16px;
}

@media (max-width: 900px) {
  .gf-blog-index { padding: 32px 20px 56px; }
  .gf-blog-grid { grid-template-columns: 1fr; gap: 24px; }
}
