.comparison-table {
  padding: 0;
}

.comparison-table__header {
  margin-bottom: 3rem;
}

.comparison-table__heading {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 600;
  color: rgb(var(--color-foreground));
  margin: 0 0 1rem 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.comparison-table__subheading {
  font-size: 1.15rem;
  line-height: 1.75;
  color: rgba(var(--color-foreground), 0.6);
  margin: 0;
  max-width: 44rem;
}

/* Table Container */
.comparison-table__wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.comparison-table__table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: rgba(var(--color-foreground), 0.03);
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(var(--color-foreground), 0.06);
  min-width: 600px;
}

/* Table Header */
.comparison-table__table thead th {
  padding: 1.8rem 2rem;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(var(--color-foreground), 0.5);
  background: rgba(var(--color-foreground), 0.04);
  border-bottom: 1px solid rgba(var(--color-foreground), 0.08);
}

.comparison-table__table thead th:not(:last-child) {
  border-right: 1px solid rgba(var(--color-foreground), 0.06);
}

/* Table Body */
.comparison-table__table tbody tr {
  border-bottom: 1px solid rgba(var(--color-foreground), 0.06);
  transition: background 0.3s ease;
  cursor: default;
}

.comparison-table__table tbody tr:last-child {
  border-bottom: none;
}

.comparison-table__table tbody tr:hover {
  background: rgba(var(--color-foreground), 0.04);
}

.comparison-table__table tbody td {
  padding: 1.8rem 2rem;
  vertical-align: top;
  font-size: 1.05rem;
  line-height: 1.65;
  transition: color 0.3s ease;
}

.comparison-table__table tbody td:not(:last-child) {
  border-right: 1px solid rgba(var(--color-foreground), 0.06);
}

/* Column-specific styles */
.comparison-table__table td:first-child {
  font-size: 1.1rem;
  font-weight: 600;
  color: rgb(var(--color-foreground));
  min-width: 160px;
}

.comparison-table__table td:nth-child(2) {
  color: rgba(var(--color-foreground), 0.5);
}

.comparison-table__table tbody tr:hover td:nth-child(2) {
  color: rgba(var(--color-foreground), 0.65);
}

.comparison-table__table td:nth-child(3) {
  color: rgb(var(--color-foreground));
  font-weight: 500;
}

/* Column widths */
.comparison-table__table th:first-child,
.comparison-table__table td:first-child {
  width: 22%;
}

.comparison-table__table th:nth-child(2),
.comparison-table__table td:nth-child(2) {
  width: 39%;
}

.comparison-table__table th:nth-child(3),
.comparison-table__table td:nth-child(3) {
  width: 39%;
}

/* Mobile adjustments */
@media screen and (max-width: 749px) {
  .comparison-table__table thead th {
    padding: 1.4rem 1.25rem;
    font-size: 0.8rem;
  }

  .comparison-table__table tbody td {
    padding: 1.4rem 1.25rem;
    font-size: 0.95rem;
  }
}

/* Animation support */
.comparison-table__header.scroll-trigger.animate--slide-in,
.comparison-table__wrapper.scroll-trigger.animate--slide-in {
  opacity: 0;
}

.comparison-table__header.scroll-trigger.animate--slide-in.scroll-trigger--animate,
.comparison-table__wrapper.scroll-trigger.animate--slide-in.scroll-trigger--animate {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .comparison-table__table tbody tr {
    transition: none;
  }

  .comparison-table__table tbody td {
    transition: none;
  }
}
