/* ============================================================
   EMPATH EDITORIAL BLOG STYLES — editorial.css
   Covers: blog_glens_grass_case_study.html
           blog_cybersecurity_tips.html
           blog_productivity_boost.html
           blog_world_of_testing.html
           blog_robot_framework.html
           blog_post.html (generic)

   Fonts loaded in layout.html or per-page:
     Playfair Display, JetBrains Mono, Syne / Open Sans
   ============================================================ */

/* ── DESIGN TOKENS ────────────────────────────────────────── */
:root {
  --ed-bg:        #f8fafc;
  --ed-surface:   #ffffff;
  --ed-ink:       #0f172a;
  --ed-accent:    #f59e0b;   /* amber — primary highlight  */
  --ed-accent2:   #14b8a6;   /* teal  — secondary highlight */
  --ed-green:     #059669;   /* success / positive stats   */
  --ed-warn:      #dc2626;   /* warnings / danger          */
  --ed-muted:     #475569;
  --ed-border:    #e2e8f0;
  --ed-code-bg:   #0f172a;
}

/* ── READING PROGRESS ─────────────────────────────────────── */
.reading-progress-container {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: rgba(0,0,0,0.08);
  z-index: 9999;
}
.reading-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--ed-accent), #fbbf24);
  transition: width 0.1s linear;
}

/* ── MASTHEAD ─────────────────────────────────────────────── */
.editorial-masthead {
  background: var(--ed-ink);
  color: var(--ed-bg);
  text-align: center;
  padding: 11px 40px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

/* ── HERO ─────────────────────────────────────────────────── */
.editorial-hero {
  background: var(--ed-surface);
  border-bottom: 2px solid var(--ed-ink);
  padding: 56px 0 40px;
}

.editorial-hero .container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 40px;
}

/* Breadcrumb */
.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  flex-wrap: wrap;
  color: var(--ed-muted);
}
.article-breadcrumb a {
  color: var(--ed-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.article-breadcrumb a:hover { color: var(--ed-accent); }
.breadcrumb-separator { color: var(--ed-border); margin: 0 2px; }
.breadcrumb-current   { color: var(--ed-ink); }

/* Issue / category label above title */
.issue-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ed-accent);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.issue-label::before {
  content: '';
  width: 28px;
  height: 2px;
  background: var(--ed-accent);
  flex-shrink: 0;
}

/* Main title */
.editorial-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--ed-ink);
  margin-bottom: 20px;
}
.editorial-title em {
  font-style: italic;
  color: var(--ed-accent);
  font-weight: 700;
}

/* Hero lead / subtitle */
.lead-paragraph, .hero-lead {
  font-size: 1.12rem;
  font-weight: 500;
  color: var(--ed-muted);
  line-height: 1.7;
  max-width: 720px;
  margin-bottom: 28px;
}

/* Meta bar */
.article-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  border-top: 1px solid var(--ed-border);
  padding-top: 18px;
  margin-top: 4px;
}
.meta-details {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.meta-item {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ed-muted);
}

/* ── ARTICLE LAYOUT ───────────────────────────────────────── */
.editorial-layout {
  background: var(--ed-bg);
  padding: 56px 0 100px;
}
.editorial-layout .container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 40px;
}

/* Layout with share sidebar (glens/cyber/productivity pattern) */
.editorial-layout .container > div[style*="flex"] {
  display: flex !important;
  gap: 40px;
  align-items: flex-start;
}

/* Layout with article-grid (world-of-testing pattern) */
.article-layout { background: var(--ed-bg); padding: 56px 0 100px; }
.article-layout .container { max-width: 960px; margin: 0 auto; padding: 0 40px; }
.article-grid { display: flex; gap: 40px; align-items: flex-start; }

/* ── SHARE SIDEBAR ────────────────────────────────────────── */
.share-sidebar {
  position: sticky;
  top: 100px;
  flex-shrink: 0;
  width: 48px;
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.4s, transform 0.4s;
}
.share-sidebar.sticky-visible { opacity: 1; transform: none; }

.share-sticky {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.share-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ed-muted);
}
.share-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--ed-border);
  background: var(--ed-surface);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  padding: 0;
}
.share-btn svg { width: 16px; height: 16px; }
.share-btn:hover { background: var(--ed-ink); border-color: var(--ed-ink); }
.share-btn:hover svg { color: var(--ed-surface); }
.share-btn.facebook { color: #1877f2; }
.share-btn.twitter  { color: #1da1f2; }
.share-btn.linkedin { color: #0a66c2; }
.share-btn.copy-link { color: var(--ed-muted); }

/* ── ARTICLE BODY ─────────────────────────────────────────── */
.editorial-content,
.article-content-wrapper { flex: 1; min-width: 0; }

.editorial-body,
.article-body {
  font-family: 'Open Sans', 'Syne', sans-serif;
  font-size: 1.05rem;
  line-height: 1.85;
  color: #334155;
}

.editorial-body p,
.article-body p { margin-bottom: 20px; }

/* Highlight stat text */
.highlight-stat { color: var(--ed-accent); font-weight: 700; }

/* ── HEADINGS INSIDE BODY ─────────────────────────────────── */
/* Used by world-of-testing (editorial-heading) */
.editorial-heading {
  font-family: 'Playfair Display', serif;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--ed-ink);
  line-height: 1.15;
  margin: 52px 0 18px;
  scroll-margin-top: 100px;
}

/* Used by glens/cyber/productivity (h2 with section-number span) */
.editorial-body h2,
.article-body h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--ed-ink);
  line-height: 1.15;
  margin: 52px 0 18px;
  scroll-margin-top: 100px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ed-border);
}

/* Used by robot-framework (plain h2 without number) */
.editorial-body h2:not(:has(.section-number)):not(:has(.section-num)) {
  display: block;
  border-bottom: none;
  padding-bottom: 0;
}

.editorial-body h3,
.article-body h3,
.editorial-subheading {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ed-accent2);
  margin: 36px 0 12px;
}

.editorial-body h4,
.article-body h4 {
  font-family: 'Syne', 'Open Sans', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ed-ink);
  margin: 24px 0 8px;
}

/* Section number badge (glens/cyber/productivity) */
.section-number, .section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  background: var(--ed-accent);
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  padding: 0 6px;
}

/* ── LISTS ────────────────────────────────────────────────── */
.editorial-body ul,
.article-body ul {
  list-style: none;
  padding: 0;
  margin: 14px 0 22px;
}
.editorial-body ul li,
.article-body ul li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  color: #334155;
}
.editorial-body ul li::before,
.article-body ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--ed-accent);
  font-weight: 700;
}

/* ── TABLE OF CONTENTS ────────────────────────────────────── */
.table-of-contents {
  background: var(--ed-surface);
  border: 1px solid var(--ed-border);
  border-left: 3px solid var(--ed-accent);
  padding: 22px 26px;
  margin: 36px 0;
}
.table-of-contents h3 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ed-accent);
  margin: 0 0 14px;
  /* override body h3 */
  border: none !important;
  padding: 0 !important;
}
.table-of-contents ul {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc;
}
.table-of-contents li {
  counter-increment: toc;
  margin-bottom: 7px;
  padding-left: 0 !important;
}
.table-of-contents li::before { display: none !important; }
.table-of-contents a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ed-muted);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 4px 6px;
  border-radius: 4px;
  transition: all 0.2s;
}
.table-of-contents a:hover,
.table-of-contents a.active {
  color: var(--ed-ink);
  background: var(--ed-bg);
  font-weight: 600;
}
.toc-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--ed-accent);
  color: #fff;
  border-radius: 50%;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── BLOCKQUOTE / PULL QUOTE ──────────────────────────────── */
/* Both .editorial-quote and .article-quote are used across pages */
.editorial-quote,
.article-quote {
  border-left: 3px solid var(--ed-accent);
  margin: 36px 0;
  padding: 20px 28px;
  background: var(--ed-surface);
  position: relative;
}
.editorial-quote::before,
.article-quote::before {
  content: '"';
  font-family: 'Playfair Display', serif;
  font-size: 5rem;
  color: var(--ed-accent);
  opacity: 0.15;
  position: absolute;
  top: -8px;
  left: 14px;
  line-height: 1;
}
.editorial-quote p,
.article-quote p {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-style: italic;
  color: var(--ed-ink);
  margin: 0;
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

/* ── CALLOUTS (robot-framework uses these) ────────────────── */
.callout {
  background: var(--ed-surface);
  border-left: 3px solid var(--ed-accent);
  padding: 18px 22px;
  border-radius: 0 8px 8px 0;
  margin: 24px 0;
  font-size: 0.93rem;
  color: #334155;
}
.callout.warn  { border-left-color: var(--ed-warn); }
.callout.info  { border-left-color: var(--ed-accent2); }
.callout-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ed-accent);
  margin-bottom: 8px;
  display: block;
}
.callout.warn .callout-label  { color: var(--ed-warn); }
.callout.info .callout-label  { color: var(--ed-accent2); }

/* ── TIP BOX / WARNING BOX ────────────────────────────────── */
/* Used by glens/cyber/productivity */
.tip-box, .warning-box {
  border: 1px solid var(--ed-border);
  border-left: 3px solid var(--ed-accent2);
  background: var(--ed-surface);
  padding: 18px 22px;
  margin: 28px 0;
  font-size: 0.95rem;
}
.tip-box h4, .warning-box h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ed-accent2);
  margin: 0 0 8px;
}
.warning-box { border-left-color: var(--ed-warn); }
.warning-box h4 { color: var(--ed-warn); }

/* ── CTA BOX ──────────────────────────────────────────────── */
.cta-box {
  background: var(--ed-ink);
  color: #fff;
  padding: 36px 32px;
  margin: 48px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-box::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 140px; height: 140px;
  border: 35px solid rgba(245,158,11,0.12);
  border-radius: 50%;
}
.cta-box h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.65rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 10px;
  position: relative;
  z-index: 1;
}
.cta-box p {
  color: rgba(255,255,255,0.75);
  font-size: 0.95rem;
  margin: 0 0 22px;
  position: relative;
  z-index: 1;
}
.cta-box .btn-primary {
  position: relative;
  z-index: 1;
  background: var(--ed-accent) !important;
  color: #fff !important;
}
.cta-box .btn-primary:hover { background: #d97706 !important; }

/* ── CODE BLOCKS (robot-framework) ───────────────────────── */
pre {
  background: var(--ed-code-bg);
  color: #e2e8f0;
  border-radius: 6px;
  padding: 22px;
  overflow-x: auto;
  margin: 24px 0;
  position: relative;
  font-size: 0.82rem;
  line-height: 1.7;
}
pre::before {
  content: attr(data-lang);
  position: absolute;
  top: 10px; right: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #475569;
}
code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
}
pre code { font-size: 0.82rem; color: #a8ffcc; }

/* Inline code */
:not(pre) > code {
  background: rgba(15,23,42,0.07);
  color: var(--ed-ink);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.85em;
}

/* Syntax token classes */
.kw { color: #00e887; }
.cm { color: #4a6e5c; font-style: italic; }
.st { color: #ffd080; }
.va { color: #80d4ff; }
.op { color: #ff9970; }
.fn { color: #c084fc; }

/* ── COMPARISON TABLE (robot-framework) ───────────────────── */
.table-wrap {
  overflow-x: auto;
  margin: 28px 0;
  border: 1px solid var(--ed-border);
  border-radius: 8px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
thead tr {
  background: var(--ed-bg);
  border-bottom: 2px solid var(--ed-border);
}
thead th {
  padding: 12px 18px;
  text-align: left;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ed-muted);
}
tbody tr { border-bottom: 1px solid var(--ed-border); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(245,158,11,0.03); }
tbody td { padding: 12px 18px; color: #475569; vertical-align: top; }

/* Badges in table */
.badge {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
  margin-right: 3px;
  vertical-align: middle;
}
.badge-green { background: rgba(5,150,105,0.1);  color: #059669; border: 1px solid rgba(5,150,105,0.2); }
.badge-red   { background: rgba(220,38,38,0.1);   color: #dc2626; border: 1px solid rgba(220,38,38,0.2); }
.badge-blue  { background: rgba(20,184,166,0.1);   color: #14b8a6; border: 1px solid rgba(20,184,166,0.2); }

/* ── EDITORIAL DIVIDER (world-of-testing) ─────────────────── */
.editorial-divider {
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--ed-border);
  margin: 52px 0;
  user-select: none;
}
.editorial-section { margin-bottom: 60px; }

/* ── VERDICT BOX (robot-framework) ───────────────────────── */
.verdict {
  background: linear-gradient(135deg, rgba(245,158,11,0.06), rgba(20,184,166,0.03));
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: 10px;
  padding: 32px 36px;
  margin: 48px 0;
  position: relative;
  overflow: hidden;
}
.verdict h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--ed-accent);
  margin: 0 0 14px;
  border: none !important;
  padding: 0 !important;
  display: block !important;
}

/* ── RELATED ARTICLES SECTION ─────────────────────────────── */
.related-posts-section { padding: 56px 0; background: var(--ed-bg); }
.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 28px;
}
.related-post {
  background: var(--ed-surface);
  border: 1px solid var(--ed-border);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.25s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.related-post:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.related-post img { width: 100%; height: 160px; object-fit: cover; }
.related-post h3 { font-family: 'Playfair Display', serif; font-size: 1rem; font-weight: 700; margin: 14px 16px 8px; }
.related-post h3 a { color: var(--ed-ink); text-decoration: none; }
.related-post h3 a:hover { color: var(--ed-accent); }
.related-post p { font-size: 0.85rem; color: var(--ed-muted); margin: 0 16px 16px; line-height: 1.55; }

/* Section label used in blog_post.html related section */
.section-rule {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 40px;
}
.section-rule-line { flex: 1; height: 1px; background: var(--ed-border); }
.section-rule-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ed-muted);
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .editorial-hero .container,
  .editorial-layout .container,
  .article-layout .container { padding: 0 32px; }
}

@media (max-width: 900px) {
  /* Stack share sidebar above article on medium screens */
  .editorial-layout .container > div[style*="flex"],
  .article-grid {
    flex-direction: column !important;
    gap: 0 !important;
  }
  .share-sidebar {
    position: static;
    opacity: 1;
    transform: none;
    width: 100%;
    margin-bottom: 20px;
  }
  .share-sticky {
    flex-direction: row;
    justify-content: center;
    gap: 12px;
  }
  .share-label { margin: 0 6px 0 0; }
}

@media (max-width: 768px) {
  .editorial-hero { padding: 40px 0 28px; }
  .editorial-hero .container,
  .editorial-layout .container,
  .article-layout .container { padding: 0 20px; }
  .editorial-title { font-size: clamp(1.8rem, 7vw, 2.8rem); }
  .editorial-masthead { font-size: 8px; padding: 9px 20px; }
  .article-meta-bar { flex-direction: column; align-items: flex-start; gap: 10px; }
  .meta-details { gap: 10px; }
  .editorial-body h2, .article-body h2 { font-size: 1.5rem; }
  .editorial-body, .article-body { font-size: 1rem; }
  .lead-paragraph, .hero-lead { font-size: 1.05rem; }
  pre { padding: 16px; font-size: 0.78rem; }
  .table-wrap { font-size: 0.82rem; }
}

@media (max-width: 480px) {
  .editorial-title { font-size: 1.6rem !important; }
  .editorial-body h2, .article-body h2 { font-size: 1.3rem; }
  .editorial-body, .article-body { font-size: 0.97rem; }
  .editorial-layout, .article-layout { padding: 36px 0 60px; }
  .share-btn { width: 32px; height: 32px; }
  .share-btn svg { width: 13px; height: 13px; }
  .cta-box { padding: 28px 20px; }
  .cta-box h3 { font-size: 1.35rem; }
  .verdict { padding: 24px 20px; }
  .editorial-quote, .article-quote { padding: 16px 18px; }
  .editorial-quote p, .article-quote p { font-size: 1rem; }
  .section-rule { padding: 0 20px; }
}