/* ==========================================================================
   Master Listicle Template Styles (listicle-v2.css)
   BikesKnowledge Premium Editorial Listicle Architecture
   ========================================================================== */

:root {
  --bk-bg: #f8fafc;
  --bk-card-bg: #ffffff;
  --bk-card-border: #e2e8f0;
  --bk-card-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.02);
  --bk-text-main: #0f172a;
  --bk-text-muted: #64748b;
  --bk-blue: #2563eb;
  --bk-blue-light: #eff6ff;
  --bk-green: #16a34a;
  --bk-green-bg: #f0fdf4;
  --bk-green-border: #dcfce7;
  --bk-red: #dc2626;
  --bk-red-bg: #fef2f2;
  --bk-red-border: #fee2e2;
  --bk-radius-card: 20px;
  --bk-radius-sm: 14px;
}

body.listicle-article-page {
  background-color: var(--bk-bg);
  color: var(--bk-text-main);
  font-family: 'Inter Tight', system-ui, -apple-system, sans-serif;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

/* 1. Page Shell Layout */
.listicle-page-shell {
  display: flex;
  max-width: 1360px;
  margin: 0 auto;
  gap: 28px;
  padding: 24px 20px 80px 20px;
  position: relative;
}

/* 2. Left Telemetry & Rank Jump Sidebar */
.telemetry-sidebar {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 36px;
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.06);
  width: 68px;
  z-index: 90;
  align-self: flex-start;
  flex-shrink: 0;
}

.telemetry-sidebar .sidebar-logo-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: #0f172a;
  border-radius: 14px;
  color: #ffffff;
  margin-bottom: 4px;
  text-decoration: none;
}

.sidebar-rank-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 800;
  transition: all 0.2s ease;
}

.sidebar-rank-btn:hover {
  background: #eff6ff;
  color: #2563eb;
  border-color: #bfdbfe;
}

.sidebar-rank-btn.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* 3. Main Workspace */
.listicle-main-workspace {
  flex: 1;
  min-width: 0;
}

.listicle-breadcrumbs {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 12px;
}

.listicle-breadcrumbs a {
  color: #64748b;
  text-decoration: none;
  font-weight: 500;
}

.listicle-breadcrumbs a:hover {
  color: #2563eb;
}

.listicle-breadcrumbs .sep {
  margin: 0 8px;
  color: #cbd5e1;
}

.listicle-cat-pill {
  display: inline-block;
  background: #eff6ff;
  color: #2563eb;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid #dbeafe;
  margin-bottom: 14px;
}

.listicle-hero-title {
  font-size: 2.6rem;
  font-weight: 900;
  line-height: 1.15;
  color: #0f172a;
  margin: 0 0 16px 0;
  letter-spacing: -0.02em;
}

.listicle-hero-summary {
  font-size: 1.1rem;
  line-height: 1.65;
  color: #475569;
  margin-bottom: 20px;
}

.listicle-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-size: 0.88rem;
  color: #64748b;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e2e8f0;
}

.byline-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.listicle-hero-img-box {
  position: relative;
  width: 100%;
  border-radius: var(--bk-radius-card);
  overflow: hidden;
  margin-bottom: 40px;
  box-shadow: var(--bk-card-shadow);
  border: 1px solid #e2e8f0;
}

.listicle-hero-img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: cover;
  display: block;
}

/* 4. Quick Comparison Matrix Table */
.comparison-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--bk-radius-card);
  padding: 28px;
  margin-bottom: 40px;
  box-shadow: var(--bk-card-shadow);
}

.card-heading {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 20px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.quick-compare-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.quick-compare-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 800;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 14px 16px;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}

.quick-compare-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  white-space: nowrap;
}

.quick-compare-table tr:hover td {
  background: #f8fafc;
}

.quick-compare-table .rank-num {
  font-weight: 900;
  color: #2563eb;
}

.quick-compare-table .model-name {
  font-weight: 700;
  color: #0f172a;
  text-decoration: none;
}

.quick-compare-table .model-name:hover {
  color: #2563eb;
}

.quick-compare-table .badge-award {
  display: inline-block;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
}

/* 5. Bike Rank Card (#1 to #5) */
.bike-rank-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--bk-radius-card);
  padding: 32px;
  margin-bottom: 40px;
  box-shadow: var(--bk-card-shadow);
  scroll-margin-top: 100px;
}

.bike-card-header {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  margin-bottom: 28px;
}

.bike-media-frame {
  position: relative;
  width: 100%;
  border-radius: var(--bk-radius-sm);
  overflow: hidden;
  background: #f1f5f9;
  aspect-ratio: 4 / 3;
  border: 1px solid #e2e8f0;
}

.bike-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-badge-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 900;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.bike-meta-body {
  display: flex;
  flex-direction: column;
}

.award-tag {
  display: inline-block;
  color: #2563eb;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.bike-title {
  font-size: 1.75rem;
  font-weight: 900;
  color: #0f172a;
  margin: 0 0 10px 0;
  line-height: 1.2;
}

.price-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.price-tag {
  font-size: 1.4rem;
  font-weight: 900;
  color: #16a34a;
}

.msrp-tag {
  font-size: 0.85rem;
  color: #94a3b8;
  text-decoration: line-through;
}

.bike-prose-summary {
  font-size: 1rem;
  line-height: 1.6;
  color: #475569;
  margin-bottom: 20px;
}

/* 4-Box Key Specs Grid */
.specs-4grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.spec-tile {
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 14px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.tile-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tile-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tile-lbl {
  font-size: 0.68rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
}

.tile-val {
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Dual Pros Cons */
.pros-cons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.pc-box {
  border-radius: 16px;
  padding: 18px 20px;
}

.pc-box.pros {
  background: #f0fdf4;
  border: 1px solid #dcfce7;
}

.pc-box.cons {
  background: #fef2f2;
  border: 1px solid #fee2e2;
}

.pc-title {
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pc-box.pros .pc-title { color: #16a34a; }
.pc-box.cons .pc-title { color: #dc2626; }

.pc-ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pc-ul li {
  font-size: 0.88rem;
  color: #334155;
  line-height: 1.5;
  margin-bottom: 6px;
  position: relative;
  padding-left: 16px;
}

.pc-box.pros .pc-ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #16a34a;
  font-weight: 800;
}

.pc-box.cons .pc-ul li::before {
  content: "✕";
  position: absolute;
  left: 0;
  color: #dc2626;
  font-weight: 800;
}

.card-action-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-primary-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #2563eb;
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-primary-action:hover {
  background: #1d4ed8;
}

.btn-secondary-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f1f5f9;
  color: #334155;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-secondary-action:hover {
  background: #e2e8f0;
}

/* 6. Right Table of Contents Sidebar */
.right-nav-sidebar {
  position: sticky;
  top: 90px;
  width: 240px;
  flex-shrink: 0;
  align-self: flex-start;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--bk-radius-card);
  padding: 20px;
  box-shadow: var(--bk-card-shadow);
}

.toc-heading {
  font-size: 0.78rem;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toc-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #475569;
  text-decoration: none;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.toc-link:hover, .toc-link.active {
  background: #eff6ff;
  color: #2563eb;
}

/* 7. Bottom Mobile Sticky Navigation Bar */
.mobile-sticky-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  padding: 12px 16px;
  z-index: 999;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.mobile-sticky-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 600px;
  margin: 0 auto;
}

.mobile-sticky-info {
  display: flex;
  flex-direction: column;
}

.mobile-sticky-title {
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 800;
}

.mobile-sticky-sub {
  color: #94a3b8;
  font-size: 0.72rem;
}

.mobile-sticky-btn {
  background: #2563eb;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: 20px;
  text-decoration: none;
}

/* 8. Media Queries & Multi-Device Responsiveness */
@media (max-width: 1200px) {
  .right-nav-sidebar {
    display: none;
  }
}

@media (max-width: 900px) {
  .telemetry-sidebar {
    display: none;
  }
  .bike-card-header {
    grid-template-columns: 1fr;
  }
  .specs-4grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pros-cons-grid {
    grid-template-columns: 1fr;
  }
  .listicle-hero-title {
    font-size: 2.1rem;
  }
  .mobile-sticky-bar {
    display: block;
  }
  .listicle-page-shell {
    padding-bottom: 90px;
  }
}

@media (max-width: 480px) {
  .specs-4grid {
    grid-template-columns: 1fr;
  }
  .listicle-hero-title {
    font-size: 1.75rem;
  }
  .bike-rank-card {
    padding: 20px;
  }
}
