/* Blog Styles - Kegel King */
/* Shared across all blog pages: articles + listing */

/* ── Article Layout ── */
.blog-article {
  max-width: 720px;
  margin: 0 auto;
  padding: 120px 24px 60px;
}

.blog-header {
  margin-bottom: 40px;
}

.blog-header h1 {
  font-family: 'Figtree', sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 5vw, 38px);
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 16px;
}

.blog-meta {
  font-size: 14px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
}

.meta-sep {
  color: var(--gold-dim);
}

/* ── Article Body Typography ── */
.blog-body {
  font-family: 'Figtree', sans-serif;
  font-size: 17px;
  color: rgba(232,230,225,0.7);
  line-height: 1.8;
}

.blog-body h2 {
  font-family: 'Figtree', sans-serif;
  font-weight: 600;
  font-size: clamp(22px, 3.5vw, 26px);
  color: var(--text);
  margin: 48px 0 16px;
  padding-left: 16px;
  border-left: 3px solid var(--gold);
  line-height: 1.3;
}

.blog-body h3 {
  font-family: 'Figtree', sans-serif;
  font-weight: 600;
  font-size: clamp(18px, 2.5vw, 20px);
  color: var(--text);
  margin: 32px 0 12px;
  line-height: 1.3;
}

.blog-body p {
  margin-bottom: 20px;
}

.blog-body a {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 184, 0, 0.3);
  transition: border-color 0.3s;
}

.blog-body a:hover {
  border-bottom-color: var(--gold);
}

.blog-body strong {
  color: var(--text);
  font-weight: 600;
}

.blog-body em {
  font-style: italic;
}

/* ── Lists ── */
.blog-body ul,
.blog-body ol {
  margin: 16px 0 24px;
  padding-left: 24px;
}

.blog-body li {
  margin-bottom: 10px;
  padding-left: 4px;
}

.blog-body ul li::marker {
  color: var(--gold);
}

.blog-body ol li::marker {
  color: var(--gold);
  font-weight: 600;
}

/* ── Tables ── */
.table-wrap {
  overflow-x: auto;
  margin: 24px 0;
  border-radius: 12px;
  border: 1px solid var(--border);
  -webkit-overflow-scrolling: touch;
}

.blog-body table {
  width: 100%;
  border-collapse: collapse;
  min-width: 400px;
  font-size: 15px;
}

.blog-body thead th {
  background: var(--gold-bg);
  color: var(--gold);
  font-weight: 600;
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.blog-body tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  vertical-align: top;
}

.blog-body tbody tr:last-child td {
  border-bottom: none;
}

.blog-body tbody tr:hover {
  background: rgba(255, 184, 0, 0.02);
}

/* ── Blockquotes ── */
.blog-body blockquote {
  border-left: 3px solid var(--gold);
  padding: 16px 20px;
  margin: 24px 0;
  background: var(--card);
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--text-muted);
}

.blog-body blockquote p {
  margin-bottom: 0;
}

/* ── FAQ Section ── */
.faq-section {
  margin: 48px 0 32px;
}

.faq-item {
  padding: 24px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.faq-item:first-child {
  padding-top: 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  font-weight: 600;
  color: var(--text);
  font-size: 17px;
  margin-bottom: 10px;
  line-height: 1.4;
}

.faq-answer {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.7;
}

/* ── CTA Section ── */
.blog-cta {
  text-align: center;
  padding: 48px 0 32px;
}

.blog-cta .cta-btn {
  display: inline-block;
  background: var(--gold);
  color: var(--bg);
  padding: 16px 48px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  transition: transform 0.2s;
  font-family: 'Figtree', sans-serif;
}

.blog-cta .cta-btn:hover {
  transform: scale(1.03);
}

/* ── Mobile Fixed Bottom CTA Bar ── */
.mobile-cta-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--gold);
  padding: 12px 24px;
  text-align: center;
  z-index: 90;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.3);
}

.mobile-cta-bar a {
  color: var(--bg);
  font-family: 'Figtree', sans-serif;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}

/* ── Medical Disclaimer ── */
.blog-disclaimer {
  padding: 32px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  margin-top: 16px;
}

.blog-disclaimer p {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.7;
  font-style: italic;
  opacity: 0.8;
}

/* ── Blog Listing Page ── */
.blog-listing {
  max-width: 820px;
  margin: 0 auto;
  padding: 120px 24px 60px;
  overflow-x: clip;
}

.blog-listing-header {
  text-align: center;
  margin-bottom: 48px;
}

.blog-listing-header h1 {
  font-family: 'Regal Muscle', 'Righteous', sans-serif;
  font-size: clamp(32px, 5vw, 44px);
  color: var(--text);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.blog-listing-header p {
  font-size: 16px;
  color: var(--text-muted);
}

/* ── Filter Dropdown ── */
.blog-filter-select {
  display: block;
  margin: 0 auto 24px;
  font-family: 'Figtree', sans-serif;
  font-size: 15px;
  color: var(--gold);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 40px 10px 16px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23FFB800' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
  transition: border-color 0.2s;
}

.blog-filter-select:focus {
  outline: none;
  border-color: var(--gold);
}

.blog-filter-select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.blog-filter-select option {
  background: var(--bg);
  color: var(--text);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.blog-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  transition: border-color 0.3s, transform 0.2s;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-2px);
}

.blog-card-title {
  font-family: 'Figtree', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 12px;
}

.blog-card-excerpt {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
}

.blog-card-meta {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.blog-card-link {
  font-size: 14px;
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.3s;
}

.blog-card-link:hover {
  opacity: 0.8;
}

/* ── Category Tags (Listing) ── */
.blog-card-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 100px;
  margin-bottom: 10px;
}

.tag-pe { background: rgba(230, 126, 34, 0.15); color: #E67E22; }
.tag-ed { background: rgba(74, 144, 217, 0.15); color: #4A90D9; }
.tag-general { background: rgba(255, 255, 255, 0.08); color: var(--text-muted); }
.tag-surgery { background: rgba(46, 204, 113, 0.15); color: #2ECC71; }
.tag-comparison { background: rgba(155, 89, 182, 0.15); color: #9B59B6; }

/* ── Helpful Counter ── */
.helpful-top {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-dim);
}

.helpful-btn {
  cursor: pointer;
  background: none;
  border: none;
  font-size: 16px;
  padding: 2px 4px;
  transition: transform 0.2s, color 0.2s;
  color: var(--text-dim);
}

.helpful-btn:hover { color: var(--gold); }
.helpful-btn.voted { color: var(--gold); cursor: default; }

.helpful-bottom {
  text-align: center;
  padding: 20px 0 8px;
  color: var(--text-muted);
  font-size: 15px;
}

.helpful-bottom .helpful-btn {
  font-size: 20px;
  vertical-align: middle;
}

/* ── Mid-Article CTA ── */
.mid-cta {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 0 12px 12px 0;
  padding: 24px;
  margin: 36px 0;
}

.mid-cta p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.mid-cta .cta-btn {
  display: inline-block;
  background: var(--gold);
  color: var(--bg);
  padding: 12px 28px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  font-family: 'Figtree', sans-serif;
  transition: transform 0.2s;
}

.mid-cta .cta-btn:hover { transform: scale(1.03); }

/* ── Focus States ── */
.blog-body a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.blog-card:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-color: var(--border-bright);
}

.blog-cta .cta-btn:focus-visible,
.blog-card-link:focus-visible,
.mid-cta .cta-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

.mobile-cta-bar a:focus-visible {
  outline: 2px solid var(--bg);
  outline-offset: 2px;
}

.helpful-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .blog-article {
    padding: 100px 20px 100px;
  }

  .blog-header h1 {
    font-size: 26px;
  }

  .blog-body {
    font-size: 16px;
  }

  .blog-body h2 {
    font-size: 20px;
  }

  .blog-body h3 {
    font-size: 18px;
  }

  /* Tables: stacked card layout */
  .table-wrap {
    overflow-x: visible;
    border: none;
    border-radius: 0;
  }

  .blog-body table {
    min-width: unset;
    font-size: 14px;
  }

  .blog-body thead {
    display: none;
  }

  .blog-body tbody tr {
    display: block;
    margin-bottom: 12px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
  }

  .blog-body tbody tr:hover {
    background: var(--card);
  }

  .blog-body tbody td {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    gap: 12px;
  }

  .blog-body tbody td:last-child {
    border-bottom: none;
  }

  .blog-body tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--gold);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
  }

  /* Mobile CTA: floating pill */
  .mobile-cta-bar {
    display: block;
    bottom: 16px;
    left: 16px;
    right: 16px;
    width: auto;
    border-radius: 100px;
    padding: 14px 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-listing {
    padding: 100px 20px 80px;
  }

  .blog-cta {
    padding-bottom: 80px;
  }

  .mid-cta {
    padding: 20px;
    margin: 28px 0;
  }
}

@media (max-width: 480px) {
  .blog-header h1 {
    font-size: 24px;
  }

  .blog-body {
    font-size: 15px;
  }

  .blog-article {
    padding-bottom: 110px;
  }
}
