/* ==========================================
   COMPARAÇÃO DE PLANOS - ESTILO FILMORA REAL
   ========================================== */

.filmora-compare-section {
  padding: 4rem 0 8rem 0;
  position: relative;
  overflow: visible;
  clip-path: polygon(0 5%, 100% 0%, 100% 95%, 0% 100%);
  margin-top: -10rem;
  margin-bottom: -2rem;
  padding-top: calc(4rem + 10rem);
  padding-bottom: calc(8rem + 2rem);
}

/* Reconstruir fundo do zero - estender para preencher espaço triangular */
.filmora-compare-section::before {
  content: '';
  position: absolute;
  top: -10rem;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: calc(100% + 10rem);
  background: 
    /* Padrão de grade técnica */
    repeating-linear-gradient(0deg, transparent 0px, transparent 49px, rgba(0, 110, 127, 0.05) 49px, rgba(0, 110, 127, 0.05) 50px),
    repeating-linear-gradient(90deg, transparent 0px, transparent 49px, rgba(0, 110, 127, 0.05) 49px, rgba(0, 110, 127, 0.05) 50px),
    /* Base escura */
    linear-gradient(180deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
  clip-path: polygon(0 5%, 100% 0%, 100% 95%, 0% 100%);
  z-index: 0;
  pointer-events: none;
}

.filmora-compare-section::after {
  content: '';
  position: absolute;
  top: -10rem;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: calc(100% + 10rem);
  background: transparent;
  clip-path: polygon(0 5%, 100% 0%, 100% 95%, 0% 100%);
  z-index: 0;
  pointer-events: none;
}

.filmora-compare-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

.filmora-compare-header {
  text-align: center;
  margin-bottom: 3rem;
}

.filmora-compare-title {
  font-size: 2.5rem;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

/* ==========================================
   TABELA DE COMPARAÇÃO
   ========================================== */

.filmora-comparison-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  position: relative;
  /* IMPORTANTE: overflow-x não impede sticky vertical, mas precisamos garantir que funcione */
  overflow-y: visible;
  margin-bottom: 4rem;
}

.filmora-table-scroll-container {
  position: relative;
  min-width: 900px;
}

.filmora-comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
  position: relative;
}

/* Coluna de características (primeira coluna) - Apenas sticky horizontal */
.filmora-table-feature-col {
  width: 30%;
  text-align: left;
  padding: 1.25rem 1.5rem;
  background: #f8fafc;
  font-weight: 600;
  color: #334155;
  font-size: 0.9375rem;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  left: 0;
  z-index: 5; /* Apenas para scroll horizontal */
}

/* Colunas dos planos */
.filmora-table-plan-col {
  width: 17.5%;
  text-align: center;
  padding: 0;
  border-bottom: 1px solid #e2e8f0;
  border-left: 1px solid #e2e8f0;
  vertical-align: top;
}

.filmora-plan-header-cell {
  padding: 1.5rem 1rem;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  min-height: 180px;
  position: relative;
}

/* Sticky headers - Serão fixados via JavaScript quando chegarem ao topo */
.filmora-sticky-header {
  position: relative; /* JavaScript vai mudar para fixed quando necessário */
  z-index: 1000;
  background: #ffffff;
}

/* Quando a seção está sendo rolada, os headers serão fixados via JavaScript */

/* Sombra será aplicada via JavaScript quando fixo */
.filmora-sticky-header .filmora-plan-header-cell {
  background: #ffffff;
}

.filmora-plan-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1a202c;
  margin: 0;
}

.filmora-plan-price {
  font-size: 1.875rem;
  font-weight: 700;
  color: #1a202c;
  line-height: 1.2;
}

.filmora-price-period {
  font-size: 1rem;
  font-weight: 500;
  color: #64748b;
}

.filmora-plan-button {
  width: 100%;
  max-width: 200px;
  padding: 0.75rem 1.5rem;
  background: #ffffff;
  border: 2px solid #006E7F;
  border-radius: 6px;
  color: #006E7F;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: auto;
}

.filmora-plan-button:hover {
  background: #006E7F;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 110, 127, 0.2);
}

.filmora-plan-button-primary {
  background: #006E7F;
  color: #ffffff;
  border-color: #006E7F;
}

.filmora-plan-button-primary:hover {
  background: #005a68;
  border-color: #005a68;
}

.filmora-plan-badge {
  background: #006E7F;
  color: #ffffff;
  padding: 0.375rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.filmora-plan-popular {
  border-left: 3px solid #006E7F !important;
}

.filmora-plan-popular .filmora-plan-header-cell {
  background: #f8fafc;
}

/* Células do corpo da tabela */
.filmora-comparison-table tbody td {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.9375rem;
  color: #334155;
  text-align: center;
}

.filmora-table-feature {
  text-align: left !important;
  font-weight: 500;
  color: #1a202c;
  background: #f8fafc;
  position: sticky;
  left: 0;
  z-index: 3;
}

.filmora-table-check {
  text-align: center;
  padding: 1.25rem 1.5rem;
}

.filmora-check-icon {
  width: 20px;
  height: 20px;
  color: #10b981;
  display: inline-block;
}

.filmora-table-text {
  text-align: center;
  color: #334155;
  font-weight: 500;
}

.filmora-table-empty {
  text-align: center;
  color: #cbd5e1;
  font-size: 1.25rem;
}

/* Linhas alternadas */
.filmora-comparison-table tbody tr:nth-child(even) .filmora-table-feature {
  background: #f1f5f9;
}

.filmora-comparison-table tbody tr:hover .filmora-table-feature {
  background: #e2e8f0;
}

/* ==========================================
   RESPONSIVIDADE
   ========================================== */

@media (max-width: 768px) {
  .filmora-compare-section {
    padding: 3rem 0;
  }
  
  .filmora-compare-title {
    font-size: 1.75rem;
  }
  
  .filmora-compare-container {
    padding: 0 1rem;
  }
  
  .filmora-plan-header-cell {
    padding: 1rem 0.75rem;
    min-height: 160px;
  }
  
  .filmora-plan-name {
    font-size: 1rem;
  }
  
  .filmora-plan-price {
    font-size: 1.5rem;
  }
  
  .filmora-plan-button {
    font-size: 0.875rem;
    padding: 0.625rem 1.25rem;
  }
  
  .filmora-comparison-table tbody td,
  .filmora-table-feature-col {
    padding: 1rem 1rem;
    font-size: 0.875rem;
  }
}

@media (max-width: 480px) {
  .filmora-compare-title {
    font-size: 1.5rem;
  }
  
  .filmora-plan-header-cell {
    min-height: 140px;
    gap: 0.5rem;
  }
  
  .filmora-plan-price {
    font-size: 1.25rem;
  }
}
