/* Comparison Table Section */

.comparison-table {
  overflow-x: clip;
  overflow-y: visible;
  position: relative;
}

.comparison-table .container {
  overflow: visible;
}

.comparison-table-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xl);
  max-width: 1180px;
  margin: 0 auto;
  position: relative;
}

/* ============================================
   HEADER
   ============================================ */

.comparison-table__header {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: center;
  text-align: center;
  width: 100%;
}

.comparison-table__header h2 {
  margin: 0;
  line-height: 1.17;
}

/* ============================================
   TABLE WRAPPER (DESKTOP)
   ============================================ */

.comparison-table__table-wrapper {
  width: 100%;
  padding-bottom: var(--space-xl);
  padding-top: var(--space-lg);
  max-width: 900px;
  margin: 0 auto;
}

.comparison-table__table {
  width: 100%;
  margin: 0 auto;
  border-collapse: collapse;
  border-spacing: 0;
  table-layout: fixed;
}

/* Desktop: Equal-width columns for 3 columns */
.comparison-table__col { width: 33.3333%; }

/* When competitor column is hidden - 2 column layout */
.comparison-table__table:has(colgroup > col:nth-child(2):last-child) .comparison-table__col--feature {
  width: 70%;
}

.comparison-table__table:has(colgroup > col:nth-child(2):last-child) .comparison-table__col--ours {
  width: 30%;
}

/* Mobile: Narrower icon columns, wider feature column */
@media (max-width: 1023px) {
  .comparison-table__col--feature { width: 50%; }
  .comparison-table__col--ours,
  .comparison-table__col--theirs { width: 25%; }
  
  /* 2-column layout on mobile */
  .comparison-table__table:has(colgroup > col:nth-child(2):last-child) .comparison-table__col--feature {
    width: 75%;
  }
  
  .comparison-table__table:has(colgroup > col:nth-child(2):last-child) .comparison-table__col--ours {
    width: 25%;
  }
}

/* ============================================
   TABLE HEADER
   ============================================ */

.comparison-table__header-row {
  border: none;
}

.comparison-table__header-cell {
  padding: 0;
  text-align: center;
  vertical-align: bottom;
  border: none;
}

.comparison-table__header-cell--feature {
  text-align: left;
}

.comparison-table__header-cell--ours,
.comparison-table__header-cell--theirs {
  text-align: center;
}

/* Ours column border radius */
.comparison-table__header-cell--ours {
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

.comparison-table__row:last-child .comparison-table__cell--ours {
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}

.comparison-table__product-label {
  margin-bottom: var(--space-xs);
  padding-bottom: 0.58px;
  width: 100%;
  display: flex;
  justify-content: center;
}

.comparison-table__product-label p {
  margin: 0;
  letter-spacing: 1.3px;
  line-height: 1.48;
}

.comparison-table__product-image {
  width: 200px;
  height: 200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.comparison-table__product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ============================================
   TABLE ROWS
   ============================================ */

.comparison-table__row {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.comparison-table__row:last-child {
  border-bottom: none;
}

/* Add subtle hover effect */
.comparison-table__row:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

.comparison-table__cell {
  padding: var(--space-lg) 0;
  vertical-align: middle;
  border: none;
}

.comparison-table__cell--feature {
  text-align: left;
  padding-left: 0;
  padding-right: var(--space-lg);
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

.comparison-table__cell--feature p {
  font-size: 1rem;
  line-height: 1.5;
  letter-spacing: 0;
  text-transform: none;
}

.comparison-table__cell--ours,
.comparison-table__cell--theirs {
  text-align: center;
  padding-left: 0;
  padding-right: 0;
}

.comparison-table__cell p {
  margin: 0;
  line-height: 1.5;
  letter-spacing: 1.3px;
}

/* Mobile adjustments */
@media (max-width: 1023px) {
  .comparison-table__table {
    max-width: 100%;
  }

  .comparison-table__product-label {
    font-size: 10px;
  }

  .comparison-table__product-image {
    width: 160px;
    height: 80px;
  }

  .comparison-table__cell {
    padding: var(--space-sm) 0;
  }

  .comparison-table__cell--feature {
    padding-right: var(--space-xs);
    font-size: 11px;
  }

  .comparison-table__icon--check {
    width: 24px;
    height: 24px;
  }

  .comparison-table__icon--check svg {
    width: 24px;
    height: 24px;
  }

  .comparison-table__icon--cross {
    width: 20px;
    height: 20px;
  }

  .comparison-table__icon--cross svg {
    width: 20px;
    height: 20px;
  }
}

/* ============================================
   ICONS
   ============================================ */

.comparison-table__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.comparison-table__icon svg {
  display: block;
  flex-shrink: 0;
}

.comparison-table__icon--check {
  width: 40px;
  height: 40px;
}

.comparison-table__icon--check svg {
  width: 40px;
  height: 40px;
}

/* Make checkmarks filled with green background */
.comparison-table__icon--check svg circle {
  fill: var(--clr-primary, #00CC3B);
  stroke: var(--clr-primary, #00CC3B);
}

.comparison-table__icon--check svg path {
  stroke: white;
  stroke-width: 2.5;
}

.comparison-table__icon--cross {
  width: 30px;
  height: 30px;
}

.comparison-table__icon--cross svg {
  width: 30px;
  height: 30px;
}

/* ============================================
   BUTTON
   ============================================ */

.comparison-table__button-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
}

.comparison-table__button-wrapper .btn {
  min-width: 300px;
  white-space: nowrap;
}

.comparison-table__button-wrapper .btn:focus {
  outline: 2px solid var(--clr-white);
  outline-offset: 4px;
}

.comparison-table__button-wrapper .btn:focus:not(:focus-visible) {
  outline: none;
}

@media (max-width: 1023px) {
  .comparison-table__button-wrapper .btn {
    width: 100%;
    max-width: 100%;
    min-width: auto;
  }
}


/* ============================================
   DECORATIVE SHADOW
   ============================================ */

.comparison-table-inner::after {
  content: '';
  position: absolute;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  width: 175px;
  height: 525px;
  background-color: var(--clr-white);
  border-radius: 8px;
  box-shadow: 0px 1px 6px 0px rgba(0, 0, 0, 0.25);
  pointer-events: none;
  z-index: -1;
}

@media (max-width: 1023px) {
  .comparison-table-inner::after {
    display: none;
  }
}

.comparison-table__product-image {
  overflow: hidden;
  max-width: 100%;
}

.comparison-table__product-image img {
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: cover;
}

