/* ============================================================
   Gymatrix — Blog Stylesheet
   ============================================================ */

/* ── FIX: article link styles bleeding into buttons ── */
/* Base:  .article-body a          → (0,1,1) sets color:orange
   Hover: .article-body a:hover    → (0,2,1) sets color:orange-dark
   Fix base  uses (0,2,1), fix hover uses (0,3,1) — both beat the above. */
.article-body a.btn                  { text-decoration: none; }
.article-body a.btn-primary          { color: #fff; }
.article-body a.btn-teal             { color: #fff; }
.article-body a.btn-dark             { color: #fff; }
.article-body a.btn-white            { color: var(--navy); }
.article-body a.btn-outline-white    { color: rgba(255,255,255,0.75); }
.article-body a.btn-outline          { color: var(--dark); }

.article-body a.btn:hover            { text-decoration: none; }
.article-body a.btn-primary:hover    { color: #fff; }
.article-body a.btn-teal:hover       { color: #fff; }
.article-body a.btn-dark:hover       { color: #fff; }
.article-body a.btn-white:hover      { color: var(--navy); }
.article-body a.btn-outline-white:hover { color: rgba(255,255,255,0.75); }
.article-body a.btn-outline:hover    { color: var(--orange); }

/* ── BLOG LIST PAGE ── */
.blog-hero { background: var(--navy); padding: 80px 0 72px; position: relative; overflow: hidden; }
.blog-hero::before { content: ''; position: absolute; top: -120px; right: -120px; width: 500px; height: 500px; background: radial-gradient(circle, rgba(255,107,43,0.1) 0%, transparent 65%); pointer-events: none; }
.blog-hero::after  { content: ''; position: absolute; bottom: -80px; left: -80px; width: 360px; height: 360px; background: radial-gradient(circle, rgba(0,180,160,0.08) 0%, transparent 65%); pointer-events: none; }
.blog-hero-inner { max-width: 700px; position: relative; z-index: 1; }
.blog-hero h1 { color: #fff; margin-bottom: 16px; }
.blog-hero p  { color: rgba(255,255,255,0.55); font-size: 18px; max-width: 540px; }

.blog-categories { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 48px; }
.cat-btn { padding: 8px 18px; border-radius: 100px; font-size: 13px; font-weight: 600; border: 1.5px solid var(--border); background: var(--white); color: var(--muted); cursor: pointer; transition: all 0.18s; text-decoration: none; }
.cat-btn:hover, .cat-btn.active { background: var(--orange); border-color: var(--orange); color: #fff; }

/* ── BLOG GRID ── */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.blog-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: all 0.25s; display: flex; flex-direction: column; }
.blog-card:hover { border-color: var(--orange); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.blog-card-img { height: 196px; background: var(--navy-2); display: flex; align-items: center; justify-content: center; font-size: 48px; flex-shrink: 0; position: relative; overflow: hidden; }
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; }
.blog-card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.blog-card-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.blog-cat { font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--orange); background: var(--orange-light); padding: 3px 10px; border-radius: 100px; }
.blog-date { font-size: 12px; color: var(--muted); }
.blog-card h3 { font-size: 17px; color: var(--dark); margin-bottom: 10px; line-height: 1.4; font-weight: 700; }
.blog-card p  { font-size: 14px; color: var(--muted); line-height: 1.68; flex: 1; }
.blog-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.read-time { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.read-more { font-size: 13px; font-weight: 700; color: var(--orange); text-decoration: none; }
.read-more:hover { text-decoration: underline; }

/* Featured post */
.blog-featured { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; display: grid; grid-template-columns: 1.2fr 1fr; gap: 0; margin-bottom: 48px; transition: all 0.25s; }
.blog-featured:hover { border-color: var(--orange); box-shadow: var(--shadow-lg); }
.blog-featured-img { background: var(--navy-2); display: flex; align-items: center; justify-content: center; font-size: 80px; min-height: 300px; overflow: hidden; }
.blog-featured-img img { width: 100%; height: 100%; object-fit: cover; min-height: 300px; display: block; }
.blog-featured-body { padding: 40px; display: flex; flex-direction: column; justify-content: center; }
.blog-featured .featured-label { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--teal); background: var(--teal-light); padding: 4px 12px; border-radius: 100px; margin-bottom: 16px; }
.blog-featured h2 { font-size: clamp(20px, 2.5vw, 27px); color: var(--dark); margin-bottom: 12px; line-height: 1.35; }
.blog-featured p  { font-size: 15px; color: var(--muted); line-height: 1.72; margin-bottom: 24px; }
.blog-featured .read-time { font-size: 13px; color: var(--muted); margin-bottom: 20px; }

/* ── ARTICLE PAGE ── */
.article-wrap { display: grid; grid-template-columns: 1fr 340px; gap: 56px; align-items: start; padding: 64px 0 96px; }

/* Article body */
.article-body { min-width: 0; }
.article-body h1 { font-size: clamp(26px, 4vw, 38px); color: var(--dark); line-height: 1.25; margin-bottom: 20px; }
.article-body h2 { font-size: clamp(20px, 2.8vw, 26px); color: var(--dark); margin: 44px 0 16px; padding-top: 8px; border-top: 2px solid var(--border); }
.article-body h3 { font-size: clamp(17px, 2vw, 20px); color: var(--dark); margin: 28px 0 12px; }
.article-body h4 { font-size: 16px; color: var(--dark); margin: 20px 0 10px; }
.article-body p  { font-size: 16px; color: #374151; line-height: 1.8; margin-bottom: 20px; }
.article-body ul,
.article-body ol { padding-left: 24px; margin-bottom: 20px; display: flex; flex-direction: column; gap: 10px; }
.article-body li { font-size: 16px; color: #374151; line-height: 1.75; }
.article-body strong { color: var(--dark); font-weight: 700; }
.article-body a { color: var(--orange); text-decoration: underline; text-underline-offset: 3px; }
.article-body a:hover { color: var(--orange-dark); }
.article-body blockquote { border-left: 4px solid var(--orange); padding: 16px 20px; background: var(--orange-light); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 28px 0; }
.article-body blockquote p { color: #92400E; font-size: 15.5px; margin-bottom: 0; font-style: italic; }
.article-body hr { border: none; border-top: 1px solid var(--border); margin: 36px 0; }
.article-body table { width: 100%; border-collapse: collapse; margin-bottom: 28px; font-size: 14.5px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); }
.article-body thead { background: var(--navy); }
.article-body thead th { color: #fff; padding: 12px 16px; text-align: left; font-size: 13px; font-weight: 700; letter-spacing: 0.5px; }
.article-body tbody tr:nth-child(even) { background: var(--light); }
.article-body tbody td { padding: 12px 16px; color: var(--text); border-bottom: 1px solid var(--border); }

/* Article meta */
.article-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.article-meta .blog-cat { font-size: 11px; }
.meta-date, .meta-read { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 5px; }

/* TOC */
.toc { background: var(--light); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 28px; margin-bottom: 36px; }
.toc-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px; color: var(--dark); margin-bottom: 14px; }
.toc ol { padding-left: 18px; display: flex; flex-direction: column; gap: 8px; }
.toc li { font-size: 14px; color: var(--muted); }
.toc a  { color: var(--orange); text-decoration: none; font-weight: 500; }
.toc a:hover { text-decoration: underline; }

/* Inline CTA box */
.article-cta-box { background: var(--navy); border-radius: var(--radius); padding: 28px 32px; margin: 36px 0; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.article-cta-box .cta-text h4 { color: #fff; font-size: 18px; margin-bottom: 6px; }
.article-cta-box .cta-text p  { color: rgba(255,255,255,0.55); font-size: 14px; margin: 0; }
.article-cta-box .btn { flex-shrink: 0; }

/* Key takeaway box */
.key-box { background: var(--teal-light); border: 1px solid rgba(0,180,160,0.3); border-radius: var(--radius); padding: 20px 24px; margin: 28px 0; }
.key-box p { color: #065F46; font-size: 15px; margin: 0; }
.key-box strong { color: #064E3B; }

/* Numbered steps in article */
.article-steps { display: flex; flex-direction: column; gap: 20px; margin: 24px 0; }
.article-step { display: flex; gap: 18px; align-items: flex-start; }
.article-step-num { width: 36px; height: 36px; background: var(--orange); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 900; color: #fff; flex-shrink: 0; margin-top: 2px; }
.article-step-content h4 { font-size: 16px; color: var(--dark); margin-bottom: 6px; font-weight: 700; }
.article-step-content p  { font-size: 14.5px; color: var(--muted); line-height: 1.72; margin: 0; }

/* Stat highlights */
.article-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 28px 0; }
.article-stat { background: var(--light); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 20px; text-align: center; }
.article-stat strong { display: block; font-size: 28px; font-weight: 900; color: var(--orange); margin-bottom: 4px; }
.article-stat span { font-size: 12px; color: var(--muted); line-height: 1.4; display: block; }

/* ── SIDEBAR ── */
.article-sidebar { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 24px; }
.sidebar-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.sidebar-card h4 { font-size: 15px; color: var(--dark); margin-bottom: 16px; font-weight: 700; }
.sidebar-cta { background: var(--navy); border-color: transparent; }
.sidebar-cta h4 { color: #fff; }
.sidebar-cta p  { color: rgba(255,255,255,0.55); font-size: 13.5px; margin-bottom: 18px; }
.sidebar-cta .btn { width: 100%; justify-content: center; margin-bottom: 10px; }

.related-list { display: flex; flex-direction: column; gap: 16px; }
.related-item { display: flex; gap: 12px; align-items: flex-start; text-decoration: none; }
.related-item-img { width: 60px; height: 52px; background: var(--light-2); border-radius: 8px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 20px; overflow: hidden; }
.related-item-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; display: block; }
.related-item-text span { font-size: 11px; color: var(--orange); font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; display: block; margin-bottom: 3px; }
.related-item-text p { font-size: 13px; color: var(--dark); font-weight: 600; line-height: 1.4; margin: 0; }
.related-item:hover .related-item-text p { color: var(--orange); }

/* Feature checklist in sidebar */
.sidebar-features { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.sidebar-features li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); }
.sidebar-features li::before { content: '✓'; width: 20px; height: 20px; background: var(--teal-light); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--teal); flex-shrink: 0; font-weight: 700; }

/* ── AUTHOR BOX ── */
.author-box { background: var(--light); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 28px; margin-top: 48px; display: flex; gap: 20px; align-items: flex-start; }
.author-avatar-lg { width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(135deg, var(--orange), var(--orange-dark)); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800; color: #fff; flex-shrink: 0; }
.author-details h5 { font-size: 15px; color: var(--dark); margin-bottom: 2px; }
.author-details .author-role { font-size: 12px; color: var(--orange); font-weight: 600; margin-bottom: 8px; display: block; }
.author-details p { font-size: 13.5px; color: var(--muted); margin: 0; line-height: 1.65; }

/* ── RELATED POSTS SECTION ── */
.related-posts-section { padding: 64px 0; background: var(--light); }
.related-posts-section h2 { font-size: 26px; margin-bottom: 32px; }

/* ── CTA BANNER ── */
.cta-banner { background: linear-gradient(135deg, var(--navy), var(--navy-3)); border-radius: var(--radius-xl); padding: 56px 64px; text-align: center; position: relative; overflow: hidden; }
.cta-banner::before { content: ''; position: absolute; top: -100px; right: -100px; width: 350px; height: 350px; background: radial-gradient(circle, rgba(255,107,43,0.15) 0%, transparent 65%); pointer-events: none; }
.cta-banner h2 { color: #fff; font-size: clamp(24px, 3.5vw, 36px); margin-bottom: 14px; }
.cta-banner p  { color: rgba(255,255,255,0.55); font-size: 16px; max-width: 580px; margin: 0 auto 32px; }
.btn-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.cta-footnote { font-size: 13px; color: rgba(255,255,255,0.35); margin-top: 20px; }

/* ── PAGINATION ── */
.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 56px; }
.page-btn { width: 40px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; color: var(--muted); background: var(--white); border: 1.5px solid var(--border); cursor: pointer; text-decoration: none; transition: all 0.18s; }
.page-btn:hover, .page-btn.active { background: var(--orange); border-color: var(--orange); color: #fff; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .article-wrap { grid-template-columns: 1fr; gap: 40px; }
  .article-sidebar { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-featured { grid-template-columns: 1fr; }
  .blog-featured-img { min-height: 200px; }
  .blog-featured-body { padding: 28px; }
  .article-sidebar { grid-template-columns: 1fr; }
  .article-stats { grid-template-columns: 1fr 1fr; }
  .article-cta-box { flex-direction: column; gap: 16px; }
  .article-body h2 { font-size: 20px; }
  .cta-banner { padding: 40px 28px; }
  .author-box { flex-direction: column; gap: 16px; }
}

@media (max-width: 480px) {
  .article-stats { grid-template-columns: 1fr; }
  .blog-hero { padding: 56px 0 48px; }
  .article-wrap { padding: 40px 0 64px; }
}
