.comparison {
  position: relative;
  padding: 100px 0;
  background-color: white;
}

.comparison__headline {
  text-align: center;
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  color: var(--color-dark);
  margin-bottom: 12px;
}

.comparison__subhead {
  text-align: center;
  font-size: var(--fs-body);
  color: var(--color-gray);
  margin-bottom: 48px;
}

.comparison__table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
}

.comparison__table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

.comparison__table th,
.comparison__table td {
  padding: 14px 16px;
  text-align: center;
  font-size: var(--fs-small);
  border-bottom: 1px solid var(--color-border);
}

.comparison__table th:first-child,
.comparison__table td:first-child {
  text-align: left;
  font-weight: var(--fw-medium);
  min-width: 200px;
}

.comparison__table thead th {
  background-color: var(--color-navy);
  color: white;
  font-weight: var(--fw-semibold);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.comparison__table thead th:first-child {
  border-top-left-radius: var(--radius-md);
}

.comparison__table thead th:last-child {
  border-top-right-radius: var(--radius-md);
}

.comparison__table td:nth-child(2) {
  background-color: var(--teal-8);
  font-weight: var(--fw-medium);
}

.comparison__table thead th:nth-child(2) {
  background-color: #1A4A6E;
}

.comparison__table tbody tr:nth-child(even) td {
  background-color: var(--color-bg-alt);
}

.comparison__table tbody tr:nth-child(even) td:nth-child(2) {
  background-color: var(--teal-8);
}

.comparison__table tbody tr:hover td {
  background-color: var(--color-bg-alt);
}

.comparison__table tbody tr:hover td:nth-child(2) {
  background-color: var(--teal-12);
}

.comparison__hidden-rows {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
}

.comparison__hidden-rows--visible {
  max-height: 1000px;
}

.comparison__toggle-wrapper {
  text-align: center;
  margin-top: 24px;
}

.comparison__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 28px;
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  color: var(--color-navy);
  background: transparent;
  border: 2px solid var(--color-navy);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-default);
}

.comparison__toggle:hover {
  background-color: var(--color-navy);
  color: white;
}

.comparison__legend {
  text-align: center;
  margin-top: 16px;
  font-size: var(--fs-small);
  color: var(--color-gray);
}

@media (max-width: 768px) {
  .comparison {
    padding: 60px 0;
  }
}

.comparison__table {
    table-layout: fixed;
    width: 100%;
}

.comparison__table th:nth-child(1),
.comparison__table td:nth-child(1) {
    width: 24%;
}

.comparison__table th:nth-child(2),
.comparison__table td:nth-child(2) {
    width: 20%;
}

.comparison__table th:nth-child(3),
.comparison__table td:nth-child(3) {
    width: 14%;
}

.comparison__table th:nth-child(4),
.comparison__table td:nth-child(4) {
    width: 14%;
}

.comparison__table th:nth-child(5),
.comparison__table td:nth-child(5) {
    width: 14%;
}

.comparison__table th:nth-child(6),
.comparison__table td:nth-child(6) {
    width: 14%;
}

@media (max-width: 768px) {
  .comparison__table-wrapper {
    position: relative;
  }

  .comparison__table-wrapper::after {
    content: 'Scroll to see more →';
    display: block;
    text-align: center;
    font-size: 12px;
    color: var(--color-gray);
    padding: 8px 0 4px;
    opacity: 1;
    transition: opacity 0.3s ease;
  }

  .comparison__table-wrapper.is-scrolled::after {
    opacity: 0;
  }
}