/* ============================================================
   Colonoscopy Cost Guide — style.css
   Palette: Navy #1B3A6B + Orange #E07A2F + Warm Off-White #F8F7F4
   ============================================================ */

/* ── Self-hosted Inter font ── */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/inter-v20-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/inter-v20-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── CSS Custom Properties ── */
:root {
  --primary:    #1B3A6B;
  --accent:     #E07A2F;
  --bg:         #F8F7F4;
  --card-bg:    #FFFFFF;
  --text:       #1A1A2E;
  --text-muted: #5A6478;
  --border:     #E2DDD8;
  --success:    #2D7A4F;
  --radius:     10px;
  --shadow:     0 2px 12px rgba(27, 58, 107, 0.09);
  --max-w:      1160px;
}

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.75;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration: underline;
}

a:hover {
  color: #c0621a;
}

/* ── Container ── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Reading Progress Bar ── */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--accent);
  z-index: 9999;
  width: 0;
  transition: width 0.1s;
}

/* ============================================================
   HEADER
   ============================================================ */

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 8px rgba(27, 58, 107, 0.07);
}

/* 3px orange top strip via pseudo-element */
.site-header::before {
  content: '';
  display: block;
  height: 3px;
  background: var(--accent);
  width: 100%;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  padding-bottom: 10px;
  gap: 16px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-text {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: color 0.15s;
}

.site-nav a:hover {
  color: var(--accent);
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  background: linear-gradient(135deg, #1B3A6B 0%, #2C5282 100%);
  color: #fff;
  padding: 72px 24px;
  text-align: center;
}

.hero-inner {
  max-width: 760px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 18px;
}

.hero-sub {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 32px;
  line-height: 1.65;
}

.hero-sub strong {
  color: var(--accent);
}

/* ── Primary CTA Button ── */
.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 14px 28px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: #c0621a;
  color: #fff;
}

/* ============================================================
   COST SNAPSHOT BAR
   ============================================================ */

.cost-snapshot-section {
  background: var(--bg);
  padding: 36px 0;
  border-bottom: 1px solid var(--border);
}

.cost-snapshot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.snapshot-tile {
  background: var(--card-bg);
  border-radius: var(--radius);
  border-top: 4px solid var(--accent);
  padding: 20px 16px;
  text-align: center;
  box-shadow: var(--shadow);
}

.snapshot-cost {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.2;
  margin-bottom: 6px;
}

.snapshot-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ============================================================
   TRUST BAR
   ============================================================ */

.trust-bar {
  background: #EEF2F9;
  border: 1px solid #D5DEF0;
  border-radius: var(--radius);
  padding: 12px 20px;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--primary);
  margin: 16px 0 28px;
}

.trust-bar span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

/* ============================================================
   SECTION HEADINGS
   ============================================================ */

.section-heading {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 28px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}

/* ============================================================
   GUIDES SECTION / ARTICLE GRID
   ============================================================ */

.guides-section {
  padding: 52px 0 64px;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.article-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-top: 3px solid transparent;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
}

.article-card:hover {
  border-top-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(27, 58, 107, 0.14);
  color: inherit;
  text-decoration: none;
}

.article-card-inner {
  padding: 24px;
}

.article-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
  line-height: 1.35;
}

.article-card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 12px;
}

.article-card-cta {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}

/* ============================================================
   LIST PAGE
   ============================================================ */

.list-page {
  padding-bottom: 64px;
}

.list-hero {
  background: linear-gradient(135deg, #1B3A6B 0%, #2C5282 100%);
  color: #fff;
  padding: 48px 0;
}

.list-hero h1 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
}

.list-desc {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 640px;
}

.list-page .container {
  padding-top: 40px;
}

/* ============================================================
   ARTICLE LAYOUT (single.html)
   ============================================================ */

.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  max-width: var(--max-w);
  margin: 48px auto;
  padding: 0 24px;
  align-items: start;
}

/* ── Article Body ── */
.article-body {
  min-width: 0;
}

.article-body h1 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
  margin-bottom: 16px;
}

.article-body h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
  margin: 36px 0 12px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 6px;
}

.article-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin: 24px 0 8px;
}

.article-body h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 20px 0 6px;
}

.article-body p {
  margin-bottom: 18px;
}

.article-body ul,
.article-body ol {
  padding-left: 24px;
  margin-bottom: 18px;
}

.article-body li {
  margin-bottom: 6px;
}

.article-body a {
  color: var(--accent);
  text-decoration: underline;
}

.article-body a:hover {
  color: #c0621a;
}

.article-body strong {
  font-weight: 700;
  color: var(--text);
}

/* ── Infographic ── */
.infographic {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin-bottom: 28px;
  display: block;
}

/* ── Breadcrumb ── */
.breadcrumb {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ============================================================
   COST TABLE
   ============================================================ */

.cost-table-wrap {
  margin: 28px 0;
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.cost-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.925rem;
}

.cost-table-wrap table thead tr,
.cost-table-wrap table tr:first-child {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}

.cost-table-wrap table thead th,
.cost-table-wrap table tr:first-child td {
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  color: #fff;
}

.cost-table-wrap table tbody tr:nth-child(even),
.cost-table-wrap table tr:nth-child(even):not(:first-child) {
  background: #F8F7F4;
}

.cost-table-wrap table tbody tr:nth-child(odd),
.cost-table-wrap table tr:nth-child(odd):not(:first-child) {
  background: #fff;
}

.cost-table-wrap table td,
.cost-table-wrap table tbody th {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

/* Last row total emphasis */
.cost-table-wrap table tr:last-child td {
  font-weight: 700;
  border-left: 3px solid var(--accent);
}

/* ============================================================
   KEYBOX
   ============================================================ */

.keybox {
  border-left: 4px solid var(--accent);
  background: #FFF8F3;
  padding: 20px 24px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 28px 0;
}

.keybox-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.keybox-body {
  font-size: 0.925rem;
  color: var(--text);
}

.keybox-body p:last-child {
  margin-bottom: 0;
}

/* ============================================================
   WARNBOX
   ============================================================ */

.warnbox {
  border-left: 4px solid #D97706;
  background: #FFFBEB;
  padding: 20px 24px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 28px 0;
}

.warnbox-body {
  font-size: 0.925rem;
  color: var(--text);
}

.warnbox-body p:last-child {
  margin-bottom: 0;
}

/* ============================================================
   SIDEBAR
   ============================================================ */

.sidebar {
  position: sticky;
  top: 80px;
}

.sidebar-widget {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--accent);
}

.sidebar-widget h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}

.sidebar-widget p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.6;
}

.sidebar-widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-widget li {
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
  font-size: 0.875rem;
}

.sidebar-widget li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sidebar-widget a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}

.sidebar-widget a:hover {
  color: var(--accent);
}

/* ============================================================
   DISCLAIMER
   ============================================================ */

.disclaimer {
  background: #F0F4F8;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 40px;
  line-height: 1.6;
}

.disclaimer strong {
  color: var(--text);
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.85);
  padding: 56px 24px 24px;
  margin-top: 64px;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-bottom: 12px;
}

.footer-logo-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.footer-tagline {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
  margin-bottom: 8px;
}

.footer-about {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
}

.footer-col-heading {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 14px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
}

.footer-bottom a:hover {
  color: var(--accent);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
  .article-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer-col--brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .cost-snapshot-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .article-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .article-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .site-nav {
    gap: 14px;
  }

  .site-nav a {
    font-size: 0.8rem;
  }

  .hero {
    padding: 48px 20px;
  }

  .trust-bar {
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .cost-snapshot-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .site-nav {
    flex-wrap: wrap;
  }

  .snapshot-cost {
    font-size: 1.1rem;
  }
}
