/* ==========================================================================
   PERLITE COMPARISON TABLE (THE SOFTWARE DILEMMA)
   ========================================================================== */

.comparison-table-wrapper {
  overflow-x: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  margin-top: 32px;
  position: relative;
  -webkit-overflow-scrolling: touch;
}

.comparison-table {
  width: 100%;
  min-width: 1140px;
  border-collapse: collapse;
  text-align: left;
}

.comparison-table th, .comparison-table td {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.88rem;
  line-height: 1.5;
  vertical-align: top;
}

.comparison-table th {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  background: #0B101D;
  position: sticky;
  top: 0;
  z-index: 2;
}

.comparison-table .col-feature,
.comparison-table .feature-title {
  width: 230px;
  min-width: 230px;
  position: sticky;
  left: 0;
  background: #0E1626;
  z-index: 3;
  box-shadow: 4px 0 12px rgba(0, 0, 0, 0.45);
}

.comparison-table th.col-feature {
  background: #080D1A;
  z-index: 5;
}

.comparison-table .col-traditional,
.comparison-table .col-saas,
.comparison-table .col-lowcode,
.comparison-table .col-aigen {
  width: 180px;
  min-width: 170px;
}

.comparison-table .col-perlite {
  width: 230px;
  min-width: 220px;
}

.comparison-table th.highlight-header {
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.1);
  border-left: 2px solid rgba(16, 185, 129, 0.4);
  border-right: 2px solid rgba(16, 185, 129, 0.4);
  border-top: 2px solid var(--accent-emerald);
}

.perlite-header-inner {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.perlite-pill-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 2px 8px;
  border-radius: 4px;
  width: fit-content;
}

.perlite-col-name {
  font-size: 0.98rem;
  font-weight: 800;
  color: #F8FAFC;
}

.feature-title strong {
  display: block;
  color: var(--text-primary);
  font-size: 0.92rem;
  margin-bottom: 4px;
  line-height: 1.35;
}

.feature-title span {
  display: block;
  font-size: 0.76rem;
  color: var(--text-tertiary);
  line-height: 1.35;
}

.pos-td {
  color: #34D399;
  font-weight: 600;
}

.neg-td {
  color: #F87171;
  font-size: 0.85rem;
}

.neutral-td {
  color: #94A3B8;
  font-size: 0.85rem;
}

.dim-td {
  color: #64748B;
  font-size: 0.85rem;
}

.highlight-cell {
  background: rgba(16, 185, 129, 0.04);
  border-left: 2px solid rgba(16, 185, 129, 0.3);
  border-right: 2px solid rgba(16, 185, 129, 0.3);
  color: #E2E8F0;
  font-size: 0.88rem;
}

/* Scroll hint for mobile screens */
.table-scroll-hint {
  display: none;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-emerald);
  margin-bottom: 12px;
  padding: 0 4px;
}

.table-scroll-hint svg {
  animation: pulseArrow 1.5s infinite ease-in-out;
}

@keyframes pulseArrow {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(4px); }
}

@media (max-width: 768px) {
  .table-scroll-hint {
    display: flex;
  }

  .comparison-table {
    min-width: 880px;
  }

  .comparison-table th, .comparison-table td {
    padding: 14px 10px;
    font-size: 0.80rem;
  }

  .comparison-table .col-feature,
  .comparison-table .feature-title {
    width: 145px;
    min-width: 145px;
    padding: 14px 10px;
  }

  .feature-title strong {
    font-size: 0.82rem;
    margin-bottom: 2px;
  }

  .feature-title span {
    font-size: 0.68rem;
    line-height: 1.3;
  }

  .comparison-table .col-perlite {
    width: 185px;
    min-width: 185px;
    padding: 14px 12px;
  }

  .comparison-table .col-traditional,
  .comparison-table .col-saas,
  .comparison-table .col-lowcode,
  .comparison-table .col-aigen {
    width: 140px;
    min-width: 135px;
  }
}
