/* =============================================================================
   static-pages.css
   Shared layout styles for OnlineMeds static pages
   Layout A: Marketing pages (About, Certifications)
   Layout B: Policy pages (5 policy pages)
   All classes prefixed sp- to avoid collision with Woodmart / Elementor
   ============================================================================= */

/* ---------------------------------------------------------------------------
   Local design tokens
   --------------------------------------------------------------------------- */
:root {
  --sp-gutter: 50px;
  --sp-maxw: 1320px;
}

/* =============================================================================
   LAYOUT A — MARKETING PAGES
   ============================================================================= */

/* ---------------------------------------------------------------------------
   Hero band
   --------------------------------------------------------------------------- */
.sp-hero {
  position: relative;
  background-color: var(--om-navy);
  overflow: hidden;
}

.sp-hero::before,
.sp-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  opacity: 0.06;
  background: #ffffff;
  pointer-events: none;
}

.sp-hero::before {
  width: 520px;
  height: 520px;
  top: -180px;
  right: -120px;
}

.sp-hero::after {
  width: 320px;
  height: 320px;
  bottom: -140px;
  left: -80px;
}

.sp-hero-inner {
  position: relative;
  max-width: var(--sp-maxw);
  margin: 0 auto;
  padding: 72px var(--sp-gutter) 76px;
}

/* ---------------------------------------------------------------------------
   Breadcrumb in hero
   --------------------------------------------------------------------------- */
.sp-crumb-line {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 16px;
}

.sp-crumb-line a {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
}

.sp-crumb-line a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* ---------------------------------------------------------------------------
   Eyebrow label
   --------------------------------------------------------------------------- */
.sp-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}

.sp-hero .sp-eyebrow {
  color: var(--om-teal);
}

.sp-doc-head .sp-eyebrow {
  color: var(--om-blue);
}

/* ---------------------------------------------------------------------------
   Hero heading
   --------------------------------------------------------------------------- */
.sp-hero h1 {
  font-size: 54px;
  font-weight: 800;
  line-height: var(--om-lh-tight);
  max-width: 16ch;
  color: #ffffff;
  margin: 0 0 20px;
}

/* ---------------------------------------------------------------------------
   Accent (italic + yellow)
   --------------------------------------------------------------------------- */
.sp-accent {
  font-style: italic;
  font-weight: 700;
  color: var(--om-yellow);
}

/* ---------------------------------------------------------------------------
   Lead paragraph
   --------------------------------------------------------------------------- */
.sp-hero .sp-lead {
  font-size: 18px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.78);
  max-width: 52ch;
  margin: 0;
}

/* ---------------------------------------------------------------------------
   Stats band
   --------------------------------------------------------------------------- */
.sp-stats {
  background-color: #ffffff;
  border-bottom: 1px solid var(--om-line);
}

.sp-stats-inner {
  max-width: var(--sp-maxw);
  margin: 0 auto;
  padding: 48px var(--sp-gutter);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.sp-stat {
  text-align: center;
}

.sp-stat-num {
  display: block;
  font-size: 38px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--om-navy);
}

.sp-stat-lbl {
  display: block;
  font-size: 14px;
  color: var(--om-ink-3);
  margin-top: 6px;
}

/* ---------------------------------------------------------------------------
   Sections
   --------------------------------------------------------------------------- */
.sp-section {
  background-color: #ffffff;
  padding: 72px 0;
}

.sp-section.sp-alt {
  background-color: var(--om-bg);
}

.sp-section-inner {
  max-width: var(--sp-maxw);
  margin: 0 auto;
  padding: 0 var(--sp-gutter);
}

.sp-section-narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 var(--sp-gutter);
}

.sp-section-head {
  margin-bottom: 40px;
}

.sp-section-head h2 {
  font-size: 34px;
  font-weight: 800;
  line-height: var(--om-lh-snug);
  color: var(--om-navy);
  margin: 0 0 12px;
}

.sp-section-body p {
  font-size: 16px;
  line-height: 1.75;
  color: var(--om-ink-2);
}

/* ---------------------------------------------------------------------------
   Values grid (4-col)
   --------------------------------------------------------------------------- */
.sp-vgrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 0;
}

.sp-vcard {
  border: 1px solid var(--om-line);
  border-radius: var(--om-r-xl);
  padding: 28px;
  background: #ffffff;
}

.sp-vcard-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--om-r-md);
  background-color: var(--om-success-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--om-blue);
  margin-bottom: 16px;
}

.sp-vcard h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--om-navy);
  margin: 0 0 8px;
}

.sp-vcard p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--om-ink-3);
  margin: 0;
}

/* ---------------------------------------------------------------------------
   CTA band
   --------------------------------------------------------------------------- */
.sp-cta {
  background-color: var(--om-navy);
  padding: 64px 0;
}

.sp-cta-inner {
  max-width: var(--sp-maxw);
  margin: 0 auto;
  padding: 0 var(--sp-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.sp-cta h2 {
  font-size: 28px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 8px;
}

.sp-cta p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.72);
  margin: 0;
}

.sp-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--om-blue);
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: var(--om-r-md);
  text-decoration: none;
  white-space: nowrap;
  border: 2px solid var(--om-blue);
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.sp-btn:hover,
.sp-btn:focus {
  background: #fff;
  color: var(--om-navy);
  border-color: #ffffff;
  text-decoration: none;
}

/* ---------------------------------------------------------------------------
   Certification grid (2-col)
   --------------------------------------------------------------------------- */
.sp-cert-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.sp-cert-card {
  border: 1px solid var(--om-line);
  border-radius: var(--om-r-xl);
  padding: 28px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
}

.sp-cert-top {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.sp-cert-badge {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: var(--om-r-md);
}

.sp-cert-top h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--om-navy);
  margin: 0 0 4px;
}

.sp-cert-id {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--om-ink-3);
  font-family: monospace;
  background: var(--om-bg);
  padding: 2px 8px;
  border-radius: var(--om-r-sm);
  margin-top: auto;
}

.sp-cert-card ul {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.sp-cert-card li {
  font-size: 14px;
  line-height: 1.6;
  color: var(--om-ink-2);
  padding: 3px 0 3px 20px;
  position: relative;
}

.sp-cert-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--om-success);
  font-weight: 700;
}

/* ---------------------------------------------------------------------------
   Mini grid (3-col) with tag pills
   --------------------------------------------------------------------------- */
.sp-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.sp-mini-card {
  border: 1px solid var(--om-line);
  border-radius: var(--om-r-lg);
  padding: 20px;
  background: #ffffff;
}

.sp-mini-card h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--om-navy);
  margin: 0 0 6px;
}

.sp-mini-card p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--om-ink-3);
  margin: 0;
}

.sp-mini-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--om-bg);
  color: var(--om-blue);
  padding: 3px 10px;
  border-radius: var(--om-r-pill);
  margin-bottom: 10px;
}

/* ---------------------------------------------------------------------------
   Quality list (2-col with hollow ring markers)
   --------------------------------------------------------------------------- */
.sp-quality-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.sp-quality-list li {
  font-size: 15px;
  line-height: 1.6;
  color: var(--om-ink-2);
  padding-left: 24px;
  position: relative;
}

.sp-quality-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--om-blue);
}

/* ---------------------------------------------------------------------------
   Audit list (8px blue dot markers)
   --------------------------------------------------------------------------- */
.sp-audit-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sp-audit-list li {
  font-size: 15px;
  line-height: 1.65;
  color: var(--om-ink-2);
  padding: 6px 0 6px 22px;
  position: relative;
  border-bottom: 1px solid var(--om-line);
}

.sp-audit-list li:last-child {
  border-bottom: none;
}

.sp-audit-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--om-blue);
}

/* ---------------------------------------------------------------------------
   Callout cards (left-accent)
   --------------------------------------------------------------------------- */
.sp-callout {
  border-left: 4px solid var(--om-line);
  border-radius: 0 var(--om-r-md) var(--om-r-md) 0;
  background: var(--om-bg);
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--om-ink-2);
}

.sp-callout.sp-warn {
  border-left-color: var(--om-warning);
  background: #FFFBEB;
}

.sp-callout.sp-ok {
  border-left-color: var(--om-success);
  background: var(--om-success-bg);
}

/* ---------------------------------------------------------------------------
   "Added" highlight tag & block
   --------------------------------------------------------------------------- */
.sp-added-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--om-teal);
  color: #ffffff;
  padding: 2px 8px;
  border-radius: var(--om-r-sm);
  vertical-align: middle;
  margin-left: 6px;
}

.sp-added-block {
  border-left: 4px solid var(--om-teal);
  background: #F0FDFB;
  border-radius: 0 var(--om-r-md) var(--om-r-md) 0;
  padding: 14px 18px;
  margin: 16px 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--om-ink-2);
}

/* =============================================================================
   LAYOUT B — POLICY PAGES
   ============================================================================= */

/* ---------------------------------------------------------------------------
   Document breadcrumb bar (white)
   --------------------------------------------------------------------------- */
.sp-doc-crumb {
  background: #ffffff;
  border-bottom: 1px solid var(--om-line);
}

.sp-doc-crumb-inner {
  max-width: var(--sp-maxw);
  margin: 0 auto;
  padding: 12px var(--sp-gutter);
  font-size: 13px;
  color: var(--om-ink-3);
}

.sp-doc-crumb-inner a {
  color: var(--om-ink-3);
  text-decoration: none;
}

.sp-doc-crumb-inner a:hover {
  color: var(--om-blue);
  text-decoration: underline;
}

/* ---------------------------------------------------------------------------
   Document head (white band)
   --------------------------------------------------------------------------- */
.sp-doc-head {
  background: #ffffff;
  border-bottom: 1px solid var(--om-line);
}

.sp-doc-head-inner {
  max-width: var(--sp-maxw);
  margin: 0 auto;
  padding: 56px 48px;
}

.sp-doc-head h1 {
  font-size: 44px;
  font-weight: 800;
  line-height: var(--om-lh-tight);
  max-width: 18ch;
  color: var(--om-navy);
  margin: 0 0 16px;
}

.sp-doc-head .sp-lead {
  font-size: 18px;
  line-height: 1.65;
  color: var(--om-ink-2);
  max-width: 54ch;
  margin: 0 0 20px;
}

/* ---------------------------------------------------------------------------
   Document meta row (pill with dot)
   --------------------------------------------------------------------------- */
.sp-doc-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: var(--om-ink-3);
}

.sp-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--om-bg);
  border: 1px solid var(--om-line);
  border-radius: var(--om-r-pill);
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--om-ink-2);
}

.sp-pill .sp-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--om-teal);
  flex-shrink: 0;
}

/* ---------------------------------------------------------------------------
   Document wrapper + two-column layout
   --------------------------------------------------------------------------- */
.sp-doc-wrap {
  max-width: var(--sp-maxw);
  margin: 0 auto;
  padding: 48px var(--sp-gutter) 80px;
}

.sp-doc-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 64px;
  align-items: start;
}

/* ---------------------------------------------------------------------------
   Table of contents (sticky sidebar)
   --------------------------------------------------------------------------- */
.sp-toc {
  position: sticky;
  top: 96px;
}

.sp-toc-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--om-ink-3);
  margin-bottom: 12px;
}

.sp-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--om-line);
}

.sp-toc ol li {
  margin: 0;
  padding: 0;
}

.sp-toc a {
  display: block;
  font-size: 13px;
  line-height: 1.5;
  color: var(--om-ink-3);
  padding: 6px 0 6px 14px;
  text-decoration: none;
  border-left: 2px solid transparent;
  margin-left: -2px;
  transition: color 0.15s, border-color 0.15s;
}

.sp-toc a:hover {
  color: var(--om-navy);
}

.sp-toc a.active {
  color: var(--om-navy);
  font-weight: 600;
  border-left-color: var(--om-blue);
}

/* ---------------------------------------------------------------------------
   Prose content area
   --------------------------------------------------------------------------- */
.sp-prose {
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--om-ink-2);
}

.sp-prose h2 {
  font-size: 25px;
  font-weight: 700;
  color: var(--om-navy);
  margin: 48px 0 16px;
  padding-top: 16px;
}

.sp-prose h2 .sp-num {
  display: inline-block;
  margin-right: 8px;
}

.sp-prose h2 .sp-num span {
  color: var(--om-blue);
}

.sp-prose h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--om-navy);
  margin: 28px 0 10px;
}

.sp-prose h4 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--om-ink-2);
  margin: 20px 0 8px;
}

.sp-prose p {
  max-width: 70ch;
  margin: 0 0 16px;
}

.sp-prose ul {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.sp-prose ul li {
  padding: 4px 0 4px 20px;
  position: relative;
}

.sp-prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--om-blue);
}

.sp-prose ol {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  counter-reset: sp-ol;
}

.sp-prose ol li {
  padding: 4px 0 4px 36px;
  position: relative;
  counter-increment: sp-ol;
}

.sp-prose ol li::before {
  content: counter(sp-ol);
  position: absolute;
  left: 0;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--om-blue);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sp-prose a {
  color: var(--om-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sp-prose a:hover {
  color: var(--om-blue-hover);
}

.sp-prose strong {
  font-weight: 700;
  color: var(--om-navy);
}

.sp-prose code {
  font-family: "Courier New", Courier, monospace;
  font-size: 13px;
  background: var(--om-bg);
  border: 1px solid var(--om-line);
  border-radius: var(--om-r-sm);
  padding: 1px 6px;
}

.sp-prose hr {
  border: none;
  border-top: 1px solid var(--om-line);
  margin: 40px 0;
}

/* ---------------------------------------------------------------------------
   Data table
   --------------------------------------------------------------------------- */
.sp-table-wrap {
  overflow-x: auto;
  margin: 24px 0;
  border-radius: var(--om-r-md);
  border: 1px solid var(--om-line);
}

.sp-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.sp-table-wrap thead th {
  background-color: var(--om-navy);
  color: #ffffff;
  font-weight: 600;
  font-size: 13px;
  text-align: left;
  padding: 12px 16px;
  white-space: nowrap;
}

.sp-table-wrap tbody td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--om-line);
  color: var(--om-ink-2);
  vertical-align: top;
}

.sp-table-wrap tbody tr:last-child td {
  border-bottom: none;
}

.sp-table-wrap tbody tr:nth-child(even) td {
  background-color: var(--om-surface-2);
}

/* ---------------------------------------------------------------------------
   Back-to-top button (fixed, bottom-right)
   --------------------------------------------------------------------------- */
.sp-totop {
  position: fixed;
  bottom: 32px;
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--om-navy);
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
  z-index: 999;
  text-decoration: none;
}

.sp-totop.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sp-totop:hover {
  background-color: var(--om-blue);
  color: #ffffff;
  text-decoration: none;
}

/* =============================================================================
   RESPONSIVE — 980px and below
   ============================================================================= */
@media (max-width: 980px) {
  :root {
    --sp-gutter: 20px;
  }

  /* Hero */
  .sp-hero h1 {
    font-size: 38px;
    max-width: none;
  }

  /* Stats: 4-col → 2-col */
  .sp-stats-inner {
    grid-template-columns: repeat(2, 1fr);
    padding: 36px var(--sp-gutter);
  }

  /* Values grid: 4-col → 2-col */
  .sp-vgrid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Cert grid: 2-col → 1-col */
  .sp-cert-grid {
    grid-template-columns: 1fr;
  }

  /* Mini grid: 3-col → 1-col */
  .sp-mini-grid {
    grid-template-columns: 1fr;
  }

  /* Quality list: 2-col → 1-col */
  .sp-quality-list {
    grid-template-columns: 1fr;
  }

  /* CTA: flex → column */
  .sp-cta-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  /* Policy doc head */
  .sp-doc-head-inner {
    padding: 40px var(--sp-gutter);
  }

  .sp-doc-head h1 {
    font-size: 34px;
    max-width: none;
  }

  /* Doc layout: 2-col → 1-col */
  .sp-doc-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .sp-doc-wrap {
    padding: 32px var(--sp-gutter) 60px;
  }

  /* TOC: unstick, move above prose */
  .sp-toc {
    position: static;
    top: auto;
  }

  .sp-toc ol {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border-left: none;
    gap: 0;
  }

  .sp-toc ol li {
    border-left: 2px solid var(--om-line);
    margin-bottom: 4px;
  }

  /* Section hero inner padding */
  .sp-hero-inner {
    padding: 52px var(--sp-gutter);
  }

  .sp-section {
    padding: 52px 0;
  }
}

/* =============================================================================
   RESPONSIVE — 560px and below
   ============================================================================= */
@media (max-width: 560px) {
  /* Values grid: 2-col → 1-col */
  .sp-vgrid {
    grid-template-columns: 1fr;
  }

  /* Section heading */
  .sp-section-head h2 {
    font-size: 26px;
  }

  /* TOC: 2-col → 1-col */
  .sp-toc ol {
    grid-template-columns: 1fr;
  }

  /* Doc head title */
  .sp-doc-head h1 {
    font-size: 28px;
  }

  /* Hero title */
  .sp-hero h1 {
    font-size: 32px;
  }

  /* Stats: keep 2-col but reduce padding */
  .sp-stats-inner {
    gap: 16px;
  }

  .sp-stat-num {
    font-size: 30px;
  }

  /* Hero */
  .sp-hero-inner {
    padding: 40px var(--sp-gutter);
  }

  /* Policy doc */
  .sp-doc-head-inner {
    padding: 32px var(--sp-gutter);
  }

  .sp-doc-head .sp-lead {
    font-size: 16px;
  }

  /* CTA btn full-width */
  .sp-btn {
    width: 100%;
    justify-content: center;
  }
}
