/* ==========================================================================
   Peak Fitness Academy - Blog System Stylesheet (blog.css)
   Clean, modern, responsive, high-contrast, ADA compliant
   ========================================================================== */

/* --- Category Navigation Pills --- */
.category-nav-wrap {
  margin: 30px 0 40px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}
.category-pills {
  display: flex;
  align-items: center;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.category-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  background: #ffffff;
  color: #334155;
  border: 1.5px solid #cbd5e1;
  border-radius: 30px;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.category-pill:hover {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  transform: translateY(-1px);
}
.category-pill.is-active {
  background: var(--accent, #ff7350);
  color: #ffffff;
  border-color: var(--accent, #ff7350);
  box-shadow: 0 4px 12px rgba(255, 115, 80, 0.25);
}
.category-pill:focus-visible {
  outline: 2px solid var(--accent, #ff7350);
  outline-offset: 2px;
}

/* --- Featured Article Component --- */
.featured-article-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  margin-bottom: 50px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.featured-article-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.09);
  border-color: rgba(255, 115, 80, 0.4);
}
.featured-media {
  position: relative;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  overflow: hidden;
}
.featured-media-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.featured-article-card:hover .featured-media-img {
  transform: scale(1.03);
}
.featured-badge-overlay {
  position: absolute;
  top: 18px;
  left: 18px;
  background: var(--accent, #ff7350);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 14px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.featured-content {
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.article-category-tag {
  display: inline-block;
  color: var(--accent, #ff7350);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
  text-decoration: none;
}
.article-category-tag:hover {
  text-decoration: underline;
}
.featured-title {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.3;
  color: #0f172a;
  margin: 0 0 16px;
}
.featured-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}
.featured-title a:hover {
  color: var(--accent, #ff7350);
}
.featured-excerpt {
  color: #475569;
  font-size: 1rem;
  line-height: 1.65;
  margin: 0 0 24px;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: #64748b;
  margin-bottom: 24px;
}
.article-meta-author {
  font-weight: 700;
  color: #0f172a;
  text-decoration: none;
}
.article-meta-author:hover {
  color: var(--accent, #ff7350);
}
.article-meta-sep {
  color: #cbd5e1;
}

/* --- Article Grid Layout --- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 50px;
}
.blog-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  border-color: rgba(255, 115, 80, 0.4);
}
.blog-card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0f172a;
  overflow: hidden;
}
.blog-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.blog-card:hover .blog-card-img {
  transform: scale(1.04);
}
.blog-card-body {
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.blog-card-title {
  font-size: 1.28rem;
  font-weight: 800;
  line-height: 1.35;
  color: #0f172a;
  margin: 0 0 12px;
}
.blog-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}
.blog-card-title a:hover {
  color: var(--accent, #ff7350);
}
.blog-card-excerpt {
  color: #475569;
  font-size: 0.94rem;
  line-height: 1.6;
  margin: 0 0 18px;
  flex-grow: 1;
}
.blog-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
  font-size: 0.82rem;
  color: #64748b;
}
.read-more-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent, #ff7350);
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  margin-top: 12px;
  transition: gap 0.2s ease;
}
.read-more-link:hover {
  gap: 10px;
}

/* --- Pagination Component --- */
.pagination-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 40px 0 20px;
}
.pagination-list {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.pagination-item a,
.pagination-item span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  text-decoration: none;
  transition: all 0.2s ease;
}
.pagination-item a:hover {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}
.pagination-item.is-active span {
  background: var(--accent, #ff7350);
  color: #ffffff;
  border-color: var(--accent, #ff7350);
}
.pagination-item.is-disabled span {
  background: #f8fafc;
  color: #94a3b8;
  border-color: #e2e8f0;
  cursor: not-allowed;
}

/* --- Single Blog Post Article Page --- */
.article-header {
  max-width: 860px;
  margin: 0 auto 36px;
  text-align: center;
}
.article-header h1 {
  font-size: 2.45rem;
  font-weight: 900;
  line-height: 1.25;
  color: #0f172a;
  margin: 14px 0 20px;
}
.article-lead {
  font-size: 1.18rem;
  line-height: 1.65;
  color: #475569;
  margin-bottom: 24px;
}
.article-author-byline {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 8px 18px;
  border-radius: 50px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.author-avatar-sm {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ff7350;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}
.byline-text {
  text-align: left;
  font-size: 0.88rem;
}
.byline-author {
  font-weight: 700;
  color: #0f172a;
  text-decoration: none;
}
.byline-author:hover {
  color: var(--accent, #ff7350);
}
.byline-date {
  color: #64748b;
  display: block;
}

/* Featured Media in Article */
.article-featured-image-wrap {
  max-width: 900px;
  margin: 0 auto 40px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}
.article-featured-image {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: cover;
  display: block;
}

/* Inner Article Infographics & Figures */
.article-inner-image-wrap {
  margin: 36px 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.07);
  border: 1px solid #e2e8f0;
  background: #ffffff;
}
.article-inner-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}
.article-image-caption {
  padding: 10px 16px;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.88rem;
  font-style: italic;
  text-align: center;
  border-top: 1px solid #e2e8f0;
  margin: 0;
}

/* Article Body Content Container */
.article-content-wrap {
  max-width: 820px;
  margin: 0 auto;
  font-size: 1.08rem;
  line-height: 1.75;
  color: #1e293b;
}
.article-content-wrap p {
  margin-bottom: 22px;
}
.article-content-wrap h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: #0f172a;
  margin: 44px 0 16px;
  padding-top: 10px;
  line-height: 1.3;
}
.article-content-wrap h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  margin: 32px 0 14px;
  line-height: 1.35;
}
.article-content-wrap ul,
.article-content-wrap ol {
  margin: 0 0 24px 24px;
  padding: 0;
}
.article-content-wrap li {
  margin-bottom: 10px;
  line-height: 1.65;
}

/* Table of Contents */
.toc-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--accent, #ff7350);
  border-radius: 0 12px 12px 0;
  padding: 24px 28px;
  margin: 30px 0 40px;
}
.toc-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toc-list li a {
  color: #334155;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.15s ease;
  display: inline-block;
}
.toc-list li a:hover {
  color: var(--accent, #ff7350);
  transform: translateX(4px);
}

/* Callout Box / Coach Tip Box */
.coach-tip-box {
  background: #fff6f3;
  border: 1px solid rgba(255, 115, 80, 0.3);
  border-left: 4px solid var(--accent, #ff7350);
  border-radius: 0 10px 10px 0;
  padding: 22px 24px;
  margin: 32px 0;
}
.coach-tip-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #9a2c0c;
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Responsive Table in Article */
.article-table-wrap {
  overflow-x: auto;
  margin: 32px 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}
.article-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.96rem;
  min-width: 580px;
}
.article-data-table th {
  background: #0f172a;
  color: #ffffff;
  padding: 14px 16px;
  text-align: left;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}
.article-data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  line-height: 1.5;
}
.article-data-table tr:last-child td {
  border-bottom: none;
}
.article-data-table tr:nth-child(even) {
  background: #f8fafc;
}

/* Author Box at End of Article */
.article-author-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 30px;
  margin: 48px 0 40px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.author-box-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ff7350;
  font-weight: 900;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  border: 3px solid #ffffff;
}
.author-box-content {
  flex-grow: 1;
}
.author-box-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 4px;
}
.author-box-role {
  color: var(--accent, #ff7350);
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 12px;
}
.author-box-bio {
  color: #475569;
  font-size: 0.96rem;
  line-height: 1.6;
  margin: 0 0 14px;
}
.author-box-link {
  font-weight: 700;
  color: #0f172a;
  text-decoration: none;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.author-box-link:hover {
  color: var(--accent, #ff7350);
}

/* Related Articles Section */
.related-posts-section {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 50px 0;
  margin-top: 50px;
}

/* Author Profile Page Styles */
.author-hero-wrap {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.04);
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 36px;
  align-items: center;
  margin-bottom: 40px;
}
.author-hero-avatar {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ff7350;
  font-weight: 900;
  font-size: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  border: 4px solid #ffffff;
  margin: 0 auto;
}
.author-hero-title {
  font-size: 2.2rem;
  font-weight: 900;
  color: #0f172a;
  margin: 0 0 8px;
}
.author-hero-role {
  color: var(--accent, #ff7350);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.author-hero-bio {
  color: #475569;
  font-size: 1.05rem;
  line-height: 1.65;
  margin-bottom: 20px;
}
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 24px 0 40px;
}
.expertise-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 18px 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}
.expertise-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 6px;
}
.expertise-card p {
  font-size: 0.88rem;
  color: #64748b;
  margin: 0;
  line-height: 1.45;
}

/* Responsive Rules */
@media (max-width: 992px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  .featured-article-card {
    grid-template-columns: 1fr;
  }
  .featured-media {
    min-height: 240px;
  }
  .featured-content {
    padding: 30px 24px;
  }
  .author-hero-wrap {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 30px 20px;
  }
}

@media (max-width: 640px) {
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .article-header h1 {
    font-size: 1.85rem;
  }
  .article-content-wrap {
    font-size: 1rem;
  }
  .article-author-box {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 18px;
  }
  .author-hero-avatar {
    width: 120px;
    height: 120px;
    font-size: 2.2rem;
  }
}

/* Checklist Card Component */
.checklist-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #10b981;
  border-radius: 12px;
  padding: 28px 30px;
  margin: 36px 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
}
.checklist-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.checklist-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 1rem;
  color: #334155;
  line-height: 1.5;
}
.checklist-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ecfdf5;
  color: #059669;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

