/**
 * Article Shell - Base layout for blog/article pages
 * Inherits runcyclingapparel.com design tokens (brand #1EB7E6 / #004E89, Inter)
 */

/* ========== Page container ========== */
.article-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ========== Article body ========== */
.article-content {
  max-width: 780px;
  margin: 0 auto;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--text-primary, #333);
  word-wrap: break-word;
}

.article-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.75rem auto;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.article-content a {
  color: var(--brand-primary, #2A4A30);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.25s ease;
}

.article-content a:hover {
  color: var(--brand-secondary, #5BA862);
}

/* ========== Blog Hero (default — DARK theme with brand green accent) ==========
 * Articles can override .blog-hero with their own inline <style> for a light theme.
 * No ::before overlay is applied unless .blog-hero.has-bg-image is added (only then
 * is a dark overlay needed to keep text readable over an image).
 */
.blog-hero {
  position: relative;
  min-height: 320px;
  padding: 5rem 1.25rem 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: linear-gradient(135deg, #1A1A1A 0%, #2d2d2d 55%, #2A4A30 100%);
  background-size: cover;
  background-position: center;
  color: #fff;
  overflow: hidden;
  margin-bottom: 2.5rem;
}

.blog-hero.has-bg-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 15, 15, 0.55) 0%, rgba(15, 15, 15, 0.78) 100%);
  z-index: 1;
}

.blog-hero > * {
  position: relative;
  z-index: 2;
}

.blog-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
  margin-bottom: 1rem;
  max-width: 900px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}
.blog-hero h1 .accent { color: #7BC67E; }

.blog-hero .lead,
.blog-hero p {
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.125rem;
  max-width: 720px;
}

.blog-hero .article-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(123, 198, 126, 0.18);
  border: 1px solid rgba(123, 198, 126, 0.45);
  color: #b6e7b9;
  padding: 0.35rem 0.95rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}

.blog-hero .breadcrumb { background: transparent; padding: 0; margin: 0 0 1rem; font-size: 0.92rem; }
.blog-hero .breadcrumb a { color: rgba(255, 255, 255, 0.78); text-decoration: none; }
.blog-hero .breadcrumb a:hover { color: #7BC67E; }
.blog-hero .breadcrumb-item.active { color: rgba(255, 255, 255, 0.95); }
.blog-hero .breadcrumb-item + .breadcrumb-item::before { color: rgba(255, 255, 255, 0.4); }

/* ========== Meta row (author / date / reading time) ========== */
.blog-meta,
.article-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem 1.5rem;
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.88);
}
.blog-hero .article-meta a { color: #fff; text-decoration: none; font-weight: 600; }
.blog-hero .article-meta a:hover { color: #7BC67E; }
.blog-hero .article-meta i { color: #7BC67E; margin-right: 0.3rem; }

.blog-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
}

.blog-meta-item i,
.blog-meta-item svg {
  color: var(--brand-primary, #1EB7E6);
  font-size: 1rem;
}

/* ========== Category badge ========== */
.blog-category-badge {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  background: var(--brand-primary, #1EB7E6);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 999px;
  margin-bottom: 1rem;
  text-decoration: none;
}

.blog-category-badge:hover {
  background: var(--brand-secondary, #004E89);
  color: #fff;
  text-decoration: none;
}

/* ========== Layout grid (article + sidebar) ========== */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

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

/* Ready class set by article-shell.js */
.article-shell-ready .article-content {
  opacity: 1;
}

@media (max-width: 767.98px) {
  .article-page {
    padding: 1rem 0.75rem 3rem;
  }
  .blog-hero {
    min-height: 280px;
    padding: 3.5rem 1rem 3rem;
  }
  .article-content {
    font-size: 1rem;
    line-height: 1.7;
  }
}
