/*==============================================================================
STATSCALAR ENTERPRISE - BLOG / ARTICLE DETAILS PAGE STYLES
Version: 2.0
Page: Blog Details (blog-details.blade.php)
Framework: Laravel Blade + Bootstrap
Author: Balagali
Description: Consolidated styling for the article hero, publication bar,
rich article content, content components (insight box, analyst note,
impact box), and sticky sidebar.

CONSOLIDATION NOTES (please read):
1. `.ss-article-content`, `.ss-publication-grid`, `.ss-article-header` and
   several other selectors were each defined across 4-7 separate locations
   in custom.css (base rule + multiple later "polish" passes). This file
   merges all of them into a single, non-contradictory set of rules - the
   base styling plus every later refinement, with nothing dropped.
2. MISSING CSS FOUND: the blade markup uses `.ss-impact-box` and
   `.ss-impact-grid` (the "Market Impact Areas" chip grid) but NEITHER
   class had ANY corresponding CSS rule anywhere in the 16,308-line
   stylesheet. These two elements were rendering completely unstyled -
   plain text, no card, no border, no chip layout - right next to two
   fully-polished sibling components (.ss-insight-box, .ss-analyst-note).
   New CSS has been authored below, matching the visual language of those
   sibling components and the chip/pill pattern used elsewhere on the site
   (e.g. the blog listing page's topic filters).
3. MISSING BASE VALUE FOUND: `.ss-article-page` (the outermost section
   wrapping the entire page) had NO desktop-level padding rule at all -
   only `@media` overrides at 991px, 576px, and print existed. This is
   the same "base value missing/wrong, only breakpoint overrides present"
   pattern already found on the About page's CTA box and the Privacy
   Policy page's hero/section padding. Fixed with a proper desktop base
   value that the existing breakpoint overrides now correctly scale down
   from (80px -> 60px -> 40px).
==============================================================================*/

/*==============================================================================
01. ARTICLE PAGE WRAPPER
==============================================================================*/
.ss-article-page {
  padding: 40px 0 80px;
}

/*==============================================================================
02. ARTICLE HERO
==============================================================================*/
.ss-article-hero {
  padding: 20px 0 50px;
}

.ss-article-header {
  max-width: 960px;
  margin: auto;
  text-align: center;
}

.ss-article-header h1 {
  margin: 24px 0;
  font-size: 58px;
  line-height: 1.08;
  letter-spacing: -1.6px;
  font-weight: 800;
  color: var(--ss-heading);
}

.ss-article-summary {
  max-width: 760px;
  margin: 0 auto 34px;
  font-size: 20px;
  line-height: 1.9;
  color: var(--ss-muted);
}

.ss-article-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 45px;
}

.ss-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--ss-border);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--ss-heading);
  box-shadow: var(--ss-shadow-sm);
}

.ss-meta-item i {
  color: var(--ss-primary);
}

/* Featured Image */
.ss-featured-image {
  margin-bottom: 50px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--ss-shadow-lg);
  border: 1px solid var(--ss-border);
  background: #f5f7f9;
}

.ss-featured-image img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.6s ease;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.ss-featured-image:hover img {
  transform: scale(1.03);
}

/*==============================================================================
03. PUBLICATION BAR
==============================================================================*/
.ss-publication-bar {
  margin: 0 0 55px;
}

.ss-publication-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  padding: 26px 34px;
  background: #fff;
  border: 1px solid var(--ss-border);
  border-radius: 24px;
  box-shadow: var(--ss-shadow-sm);
}

.ss-publication-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 120px;
}

.ss-publication-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--ss-muted);
}

.ss-publication-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--ss-heading);
}

.ss-publication-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.ss-publication-actions a {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--ss-bg);
  border: 1px solid var(--ss-border);
  color: var(--ss-heading);
  transition: all 0.25s ease;
}

.ss-publication-actions a:hover {
  background: var(--ss-primary);
  border-color: var(--ss-primary);
  color: #fff;
  transform: translateY(-3px);
}

/*==============================================================================
04. ARTICLE CONTENT (Rich Text)
==============================================================================*/
.ss-article-content {
  background: #fff;
  padding: 55px;
  border-radius: 28px;
  border: 1px solid var(--ss-border);
  box-shadow: var(--ss-shadow-sm);
}

.ss-article-content > *:first-child {
  margin-top: 0;
}

.ss-article-content > *:last-child {
  margin-bottom: 0;
}

.ss-article-content p {
  font-size: 18px;
  line-height: 2;
  color: var(--ss-text);
  margin-bottom: 26px;
}

.ss-article-content h2 {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.3;
  margin: 60px 0 24px;
  color: var(--ss-heading);
}

.ss-article-content h3 {
  font-size: 28px;
  margin: 45px 0 20px;
  font-weight: 700;
  color: var(--ss-heading);
}

.ss-article-content strong {
  font-weight: 700;
  color: var(--ss-heading);
}

.ss-article-content em {
  font-style: italic;
  color: var(--ss-muted);
}

.ss-article-content ul {
  margin: 25px 0 35px;
  padding-left: 0;
}

.ss-article-content li {
  position: relative;
  padding-left: 34px;
  margin-bottom: 18px;
  font-size: 17px;
  line-height: 1.9;
  color: var(--ss-text);
}

.ss-article-content li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ss-primary);
}

.ss-article-content img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 40px 0;
  border-radius: 20px;
}

.ss-article-content table {
  width: 100%;
  margin: 40px 0;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 18px;
}

.ss-article-content table th {
  background: var(--ss-primary-light);
  padding: 18px;
  font-weight: 700;
  color: var(--ss-heading);
}

.ss-article-content table td {
  padding: 18px;
  border-bottom: 1px solid var(--ss-border);
}

.ss-article-content blockquote {
  margin: 40px 0;
  padding: 30px 36px;
  background: #F8FAFC;
  border-left: 5px solid var(--ss-primary);
  border-radius: 18px;
  font-size: 22px;
  line-height: 1.8;
  font-weight: 600;
  color: var(--ss-heading);
}

.ss-article-content a {
  color: var(--ss-primary);
  font-weight: 600;
  transition: all 0.25s ease;
}

.ss-article-content a:hover {
  text-decoration: underline;
}

.ss-article-content hr {
  margin: 55px 0;
  border: none;
  height: 1px;
  background: var(--ss-border);
}

@media (min-width: 1400px) {
  .ss-article-content {
    max-width: 820px;
  }

  .ss-article-header {
    max-width: 980px;
  }
}

/*==============================================================================
05. STICKY SIDEBAR
==============================================================================*/
.ss-sidebar-sticky {
  position: sticky;
  top: 110px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.ss-sidebar-card {
  padding: 30px;
  background: #fff;
  border: 1px solid var(--ss-border);
  border-radius: 24px;
  box-shadow: var(--ss-shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.ss-sidebar-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
}

.ss-sidebar-card h3,
.ss-sidebar-card h4 {
  font-size: 22px;
  margin-bottom: 18px;
  color: var(--ss-heading);
}

.ss-sidebar-card p {
  margin-bottom: 22px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ss-muted);
}

.ss-sidebar-card .ss-btn {
  width: 100%;
  justify-content: center;
}

.ss-sidebar-title {
  display: block;
  margin-bottom: 20px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--ss-muted);
}

.ss-sidebar-tag {
  display: inline-flex;
  padding: 8px 14px;
  margin-bottom: 16px;
  background: var(--ss-primary-light);
  color: var(--ss-primary);
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ss-sidebar-highlight {
  background: linear-gradient(135deg, #f8fcfa 0%, #eef9f3 100%);
  border-color: rgba(0, 168, 107, 0.15);
}

/* Table of Contents Navigation */
.ss-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ss-sidebar-nav li {
  list-style: none;
}

.ss-sidebar-nav a {
  display: block;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--ss-bg);
  font-size: 14px;
  font-weight: 600;
  color: var(--ss-heading);
  transition: all 0.25s ease;
}

.ss-sidebar-nav a:hover {
  background: var(--ss-primary-light);
  color: var(--ss-primary);
  padding-left: 22px;
}

/*==============================================================================
06. CONTENT COMPONENTS
==============================================================================*/

/* Research Insight Box */
.ss-insight-box {
  position: relative;
  margin: 40px 0;
  padding: 34px 36px;
  background: linear-gradient(135deg, #f8fcfa 0%, #eef9f3 100%);
  border: 1px solid rgba(0, 168, 107, 0.15);
  border-left: 6px solid var(--ss-primary);
  border-radius: 24px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
}

.ss-insight-label {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  margin-bottom: 18px;
  background: var(--ss-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border-radius: 999px;
}

.ss-insight-box p {
  margin: 0;
  font-size: 18px;
  line-height: 1.9;
  font-weight: 500;
  color: var(--ss-heading);
}

/* Analyst Note */
.ss-analyst-note {
  position: relative;
  overflow: hidden;
  margin: 45px 0;
  padding: 34px;
  background: #fff;
  border: 1px solid var(--ss-border);
  border-radius: 24px;
  box-shadow: var(--ss-shadow-sm);
}

.ss-analyst-note::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 5px;
  height: 100%;
  background: var(--ss-primary);
}

.ss-analyst-note h4 {
  margin: 0 0 16px;
  font-size: 24px;
  font-weight: 700;
  color: var(--ss-heading);
}

.ss-analyst-note p {
  margin: 0;
  font-size: 17px;
  line-height: 1.9;
}

/* Market Impact Box — newly authored (see consolidation note #2). Matches
   the visual language of .ss-insight-box / .ss-analyst-note, with the
   grid styled as a chip/pill layout to suit the short topic labels used
   in the markup (Procurement, Supply Chain, etc.) */
.ss-impact-box {
  margin: 45px 0;
  padding: 34px;
  background: #fff;
  border: 1px solid var(--ss-border);
  border-radius: 24px;
  box-shadow: var(--ss-shadow-sm);
}

.ss-impact-box h3 {
  margin: 0 0 22px;
  font-size: 24px;
  font-weight: 700;
  color: var(--ss-heading);
}

.ss-impact-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.ss-impact-grid span {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  background: var(--ss-primary-light);
  color: var(--ss-primary);
  border: 1px solid rgba(0, 168, 107, 0.18);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}

/* Key Takeaways (available for future content, matches article component set) */
.ss-key-takeaways {
  margin: 50px 0;
  padding: 36px;
  background: #fff;
  border: 1px solid var(--ss-border);
  border-radius: 24px;
}

.ss-key-takeaways h3 {
  margin-bottom: 25px;
  font-size: 28px;
  font-weight: 800;
  color: var(--ss-heading);
}

.ss-key-takeaways ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ss-key-takeaways li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
  font-size: 17px;
  line-height: 1.8;
  color: var(--ss-text);
}

.ss-key-takeaways li::before {
  content: "\2713";
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 168, 107, 0.12);
  color: var(--ss-primary);
  font-weight: 700;
  border-radius: 50%;
}

/*==============================================================================
07. RESPONSIVE DESIGN
==============================================================================*/

@media (max-width: 1200px) {
  .ss-article-header h1 {
    font-size: 50px;
  }

  .ss-publication-grid {
    gap: 22px;
  }
}

@media (max-width: 992px) {
  .ss-article-header h1 {
    font-size: 44px;
  }

  .ss-article-summary {
    font-size: 18px;
  }

  .ss-article-page {
    padding-bottom: 60px;
  }

  .ss-article-content {
    padding: 36px;
  }

  .ss-featured-image {
    margin-bottom: 35px;
  }

  .ss-sidebar-sticky {
    position: relative;
    top: auto;
    margin-top: 40px;
  }

  .ss-sidebar-card {
    padding: 26px;
  }

  .ss-publication-item {
    min-width: calc(50% - 12px);
  }

  .ss-publication-grid {
    padding: 24px;
    gap: 20px;
  }

  .ss-publication-actions {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
    padding-top: 10px;
    border-top: 1px solid var(--ss-border);
  }
}

@media (max-width: 768px) {
  .ss-article-hero {
    padding: 10px 0 35px;
  }

  .ss-article-header {
    text-align: left;
  }

  .ss-article-header h1 {
    font-size: 34px;
    line-height: 1.25;
    letter-spacing: -0.5px;
  }

  .ss-article-summary {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 28px;
  }

  .ss-article-meta {
    justify-content: flex-start;
    gap: 10px;
  }

  .ss-meta-item {
    padding: 8px 14px;
    font-size: 12px;
  }

  .ss-featured-image {
    border-radius: 18px;
  }

  .ss-featured-image img {
    aspect-ratio: 16 / 10;
  }

  .ss-publication-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    padding: 22px;
    border-radius: 20px;
  }

  .ss-publication-item {
    min-width: auto;
  }

  .ss-publication-actions {
    grid-column: 1 / -1;
  }

  .ss-article-content {
    padding: 30px 24px;
    border-radius: 20px;
  }

  .ss-article-content p {
    font-size: 16px;
    line-height: 1.9;
  }

  .ss-article-content h2 {
    font-size: 28px;
    margin: 40px 0 18px;
  }

  .ss-article-content h3 {
    font-size: 24px;
  }

  .ss-article-content blockquote {
    font-size: 18px;
    padding: 24px;
  }

  .ss-insight-box,
  .ss-analyst-note,
  .ss-impact-box,
  .ss-key-takeaways {
    padding: 26px;
    border-radius: 20px;
  }

  .ss-insight-box p,
  .ss-analyst-note p {
    font-size: 16px;
    line-height: 1.8;
  }

  .ss-key-takeaways h3,
  .ss-impact-box h3 {
    font-size: 24px;
  }
}

@media (max-width: 576px) {
  .ss-article-page {
    padding-bottom: 40px;
  }

  .ss-article-content {
    padding: 24px 20px;
    border-radius: 18px;
  }

  .ss-article-content p {
    font-size: 16px;
    line-height: 1.85;
  }

  .ss-article-content h2 {
    font-size: 26px;
    margin: 34px 0 16px;
  }

  .ss-article-content h3 {
    font-size: 22px;
  }

  .ss-publication-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .ss-publication-item {
    min-width: 100%;
  }

  .ss-publication-actions {
    justify-content: flex-start;
    padding-top: 18px;
    margin-top: 8px;
    border-top: 1px solid var(--ss-border);
  }

  .ss-sidebar-card {
    padding: 22px;
    border-radius: 18px;
  }

  .ss-sidebar-nav a {
    padding: 10px 14px;
  }
}

@media (max-width: 480px) {
  .ss-publication-grid {
    grid-template-columns: 1fr;
  }
}

/*==============================================================================
08. GLOBAL PAGE POLISH (anchor offset, selection, print)
==============================================================================*/

/* Ensures TOC anchor jumps (#overview, #market-dynamics, etc.) land below
   the sticky header instead of tight against the top of the viewport */
[id] {
  scroll-margin-top: 120px;
}

::selection {
  background: rgba(0, 168, 107, 0.18);
  color: var(--ss-heading);
}

@media print {
  .ss-header,
  .ss-footer,
  .ss-article-sidebar,
  .ss-publication-actions {
    display: none !important;
  }

  .ss-article-page {
    padding: 0;
    margin: 0;
  }

  .ss-article-content {
    box-shadow: none;
    border: none;
    padding: 0;
    max-width: 100%;
  }
}

/*==============================================================================
09. ACCESSIBILITY & UTILITIES
==============================================================================*/
@media (prefers-reduced-motion: reduce) {
  .ss-featured-image img,
  .ss-sidebar-card,
  .ss-publication-actions a,
  .ss-article-content a,
  .ss-sidebar-nav a {
    transition: none;
  }

  .ss-featured-image:hover img,
  .ss-sidebar-card:hover,
  .ss-publication-actions a:hover {
    transform: none;
  }
}

.ss-sidebar-nav a:focus-visible,
.ss-publication-actions a:focus-visible {
  outline: 3px solid rgba(0, 168, 107, 0.25);
  outline-offset: 3px;
}
