/* ======================================================
   PHASE 3: NON-INDEX PAGES CSS FIX
   Covers: vs-* pages, cases, content sections, migration
   Guard: PHASE3-PAGES-FIX
   ====================================================== */

/* --- VS COMPARISON PAGES --- */

/* Comparison section container */
.comparison-section {
  padding: 60px 0;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.comparison-section h2 {
  font-size: 2rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 12px;
}

/* Comparison table */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 30px 0;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.comparison-table .table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.comparison-table table {
  width: 100%;
  border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.95rem;
}

.comparison-table th {
  background: #0f172a;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.comparison-table tr:hover td {
  background: #f8fafc;
}

.comparison-table .rb-office-cell {
  font-weight: 600;
  color: #1e40af;
}

.comparison-table .feature-name {
  font-weight: 600;
  color: #334155;
}

.comparison-table .category-header td {
  background: #f1f5f9;
  font-weight: 700;
  color: #0f172a;
  font-size: 1rem;
  padding-top: 18px;
}

.checkmark {
  color: #16a34a;
  font-weight: 700;
  font-size: 1.2rem;
}

.crossmark {
  color: #dc2626;
  font-weight: 700;
  font-size: 1.2rem;
}

/* Differentiators grid */
.differentiators-section {
  padding: 60px 0;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.differentiators-section h2 {
  font-size: 2rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 30px;
}

.differentiators-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.differentiator-card {
  background: #fff;
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border: 1px solid #e2e8f0;
  transition: transform 0.2s, box-shadow 0.2s;
}

.differentiator-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.differentiator-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e40af;
  margin-bottom: 10px;
}

.differentiator-card p {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.6;
}

/* Migration section */
.migration-section {
  padding: 60px 0;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.migration-section h2 {
  font-size: 2rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 30px;
}

.migration-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  counter-reset: step;
}

.migration-step {
  background: #fff;
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border: 1px solid #e2e8f0;
  text-align: center;
  position: relative;
}

.migration-step .step-number,
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  color: #fff;
  border-radius: 50%;
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.migration-step h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.migration-step p {
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.5;
}

/* Verdict section */
.verdict-section {
  padding: 60px 0;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.verdict-section h2 {
  font-size: 2rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 30px;
}

.verdict-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.verdict-card {
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border: 1px solid #e2e8f0;
}

.verdict-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1e40af;
  margin-bottom: 12px;
}

.verdict-card p,
.verdict-card li {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.6;
}

/* Pricing section in VS pages */
.pricing-section {
  padding: 60px 0;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.pricing-section h2 {
  font-size: 2rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 30px;
  text-align: center;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.pricing-card {
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border: 1px solid #e2e8f0;
  text-align: center;
}

.pricing-card .price-value {
  font-size: 2rem;
  font-weight: 800;
  color: #1e40af;
  margin: 12px 0 4px;
}

.pricing-card .price-period {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 16px;
}

.pricing-benefits {
  list-style: none;
  padding: 0;
  margin: 16px 0;
  text-align: left;
}

.pricing-benefits li {
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
  font-size: 0.9rem;
  color: #475569;
  border-bottom: 1px solid #f1f5f9;
}

.pricing-benefits li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: #16a34a;
  font-weight: 700;
}

/* --- CASES PAGE --- */

.cases-stats,
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
  text-align: center;
}

.stat-item,
.stats-item {
  padding: 24px;
}

.stat-item .stat-number,
.stats-item .stat-number,
.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: #1e40af;
  display: block;
  margin-bottom: 4px;
}

.stat-item .stat-label,
.stats-item .stat-label,
.stat-label {
  font-size: 0.9rem;
  color: #64748b;
}

/* Case cards */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

.case-card {
  background: #fff;
  border-radius: 16px;
  padding: 36px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid #e2e8f0;
}

.case-card .case-industry,
.case-industry {
  display: inline-block;
  background: #eff6ff;
  color: #1e40af;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.case-card h3 {
  font-size: 1.4rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 10px;
}

.case-card .case-company,
.case-company {
  font-size: 0.9rem;
  color: #64748b;
  margin-bottom: 16px;
}

.case-card h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #334155;
  margin: 16px 0 8px;
}

.case-card p {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.6;
}

.case-results,
.case-card .case-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 16px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
  text-align: center;
}

.case-results .result-value,
.result-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1e40af;
  display: block;
}

.case-results .result-label,
.result-label {
  font-size: 0.8rem;
  color: #64748b;
}

/* --- CONTENT SECTIONS (generic) --- */

.content-section {
  padding: 60px 0;
  max-width: 1000px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.content-section h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 20px;
}

.content-section h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #334155;
  margin: 24px 0 10px;
}

.content-section p {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.7;
  margin-bottom: 12px;
}

.content-section ul,
.content-section ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.content-section li {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.7;
  margin-bottom: 6px;
}

/* --- CTA Section --- */
.cta-section {
  padding: 60px 20px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.cta-section h2 {
  font-size: 2rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 16px;
}

.cta-section p {
  font-size: 1.05rem;
  color: #64748b;
  margin-bottom: 24px;
}

.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .comparison-section,
  .differentiators-section,
  .migration-section,
  .verdict-section,
  .pricing-section {
    padding: 40px 16px;
  }

  .comparison-section h2,
  .differentiators-section h2,
  .migration-section h2,
  .verdict-section h2,
  .pricing-section h2 {
    font-size: 1.5rem;
  }

  .differentiators-grid,
  .verdict-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .migration-steps {
    grid-template-columns: 1fr;
  }

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

  .cases-stats,
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-number {
    font-size: 2rem;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 10px 12px;
    font-size: 0.85rem;
  }
}
/* ======================================================
   PHASE 3B: SPECIFICITY FIX FOR VS PAGES
   Guard: PHASE3B-SPECIFICITY-FIX
   ====================================================== */

/* Fix: rb-office.css sets .comparison-table as grid (for index cards).
   On vs-* pages, .comparison-table is the actual <table> element.
   Use element+class selector for higher specificity. */

table.comparison-table {
  display: table !important;
  grid-template-columns: none !important;
  gap: 0 !important;
  align-items: initial !important;
  width: 100%;
  border-collapse: collapse;
  margin: 30px 0;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

table.comparison-table th,
table.comparison-table td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.95rem;
}

table.comparison-table th {
  background: #0f172a !important;
  color: #fff !important;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

table.comparison-table tr:hover td {
  background: #f8fafc;
}

table.comparison-table .rb-office-cell {
  font-weight: 600;
  color: #1e40af;
}

table.comparison-table .feature-name {
  font-weight: 600;
  color: #334155;
}

table.comparison-table .category-header td {
  background: #f1f5f9;
  font-weight: 700;
  color: #0f172a;
  font-size: 1rem;
  padding-top: 18px;
}

/* Also fix .comparison-section that may inherit unwanted styles */
.comparison-section > .container > h2,
section.comparison-section h2 {
  font-size: 2rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 12px;
}

/* Fix differentiator/migration/verdict/pricing on vs pages - add !important for key props */
.differentiators-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
}

.migration-steps {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
}

.verdict-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
}

.pricing-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
}

/* Cases page fixes with specificity */
.cases-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)) !important;
}

.cases-stats,
.stats-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
}

@media (max-width: 768px) {
  table.comparison-table th,
  table.comparison-table td {
    padding: 10px 12px;
    font-size: 0.85rem;
  }
  .differentiators-grid,
  .verdict-grid,
  .pricing-grid,
  .cases-grid {
    grid-template-columns: 1fr !important;
  }
  .migration-steps {
    grid-template-columns: 1fr !important;
  }
}
