/**
 * article-shell.css — base layout for SmartMowBot blog / article pages
 *
 * Design tokens are SmartMowBot's own, taken from index.html <style id="smb-home">
 * and assets/css/global.css:
 *   #16A34A turf green (primary)   · #15803D deep green (text-on-white, hovers)
 *   #1F2937 ground (ink / dark surface) · #111827 · #0F172A (topbar+footer deep)
 *   #FACC15 CTA yellow (backgrounds on light, text only on dark) · #EAB308 hover
 *   #E2E5DE line · #F5F7F4 wash · #6B7280 muted · #4B5563 body
 *   Archivo (headings, 500-900) + Inter (body, 400-700)
 *
 * Contrast rule for this palette: #FACC15 is 1.6:1 on white — it is NEVER used as
 * text on a light surface here, only as a filled background or as text on #1F2937.
 * Small text on white uses #15803D (4.9:1), not #16A34A (3.2:1).
 */

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

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

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

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

.article-content a:hover {
  color: #16A34A;
}

/* ========== Blog hero (dark ground band + turf glow) ==========
 * Mirrors .smb-hero on index.html: #1F2937 base, green radial wash top-left,
 * slate deepening toward the bottom. Articles may override with their own inline
 * <style>; .has-bg-image adds the overlay needed for text over a photo.
 */
.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-color: #1F2937;
  background-image:
    radial-gradient(120% 70% at 0% 0%, rgba(22, 163, 74, 0.28), transparent 55%),
    linear-gradient(180deg, #1F2937 0%, #111827 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(31, 41, 55, 0.58) 0%, rgba(15, 23, 42, 0.84) 100%);
  z-index: 1;
}

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

.blog-hero h1 {
  font-family: 'Archivo', 'Inter', system-ui, sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.018em;
  color: #F9FAFB;
  margin-bottom: 1rem;
  max-width: 900px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.20);
}
.blog-hero h1 .accent { color: #FDE68A; }

.blog-hero .lead,
.blog-hero p {
  color: #E5E7EB;
  font-size: 1.125rem;
  max-width: 720px;
}

/* Eyebrow chip: yellow on the dark ground band (10:1), never on a light surface */
.blog-hero .article-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(250, 204, 21, 0.16);
  border: 1px solid rgba(250, 204, 21, 0.45);
  color: #FDE68A;
  padding: 0.35rem 0.95rem;
  border-radius: 50px;
  font-family: 'Archivo', 'Inter', system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.blog-hero .breadcrumb { background: transparent; padding: 0; margin: 0 0 1rem; font-size: 0.92rem; }
.blog-hero .breadcrumb a { color: #9CA3AF; text-decoration: none; }
.blog-hero .breadcrumb a:hover { color: #FDE68A; }
.blog-hero .breadcrumb-item.active { color: #E5E7EB; }
.blog-hero .breadcrumb-item + .breadcrumb-item::before { color: rgba(229, 231, 235, 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: #E5E7EB;
}
.blog-hero .article-info { color: #9CA3AF !important; justify-content: center; flex-wrap: wrap; }
.blog-hero .article-info i { color: #FDE68A; margin-right: 0.3rem; }
.blog-hero .article-meta a { color: #fff; text-decoration: none; font-weight: 600; }
.blog-hero .article-meta a:hover { color: #FDE68A; }
.blog-hero .article-meta i { color: #FDE68A; 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;
}

/* On light card surfaces this icon needs the deep green, not the yellow */
.blog-meta-item i,
.blog-meta-item svg {
  color: var(--accent-color, #15803D);
  font-size: 1rem;
}

/* ========== Category badge ========== */
.blog-category-badge {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  background: var(--accent-color, #16A34A);
  color: #fff;
  font-family: 'Archivo', 'Inter', system-ui, sans-serif;
  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: #15803D;
  color: #fff;
  text-decoration: none;
}

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

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

/* Grid children must be allowed to shrink below their min-content width, or a wide
   table inside the article column blows the whole grid out horizontally on mobile. */
.article-layout > * { min-width: 0; }

/* 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;
  }
}
