/* ===== SEÇÃO ANTES E DEPOIS MODERNA ===== */

.antes-depois-section {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  position: relative;
  overflow: hidden;
  padding: 5rem 0;
}

.antes-depois-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(109, 163, 233, 0.05) 0%, transparent 70%);
  animation: rotate 20s linear infinite;
  z-index: 1;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.antes-depois-section .container {
  position: relative;
  z-index: 2;
}

/* Grid de comparação moderna */
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
  max-width: 100%;
  overflow: hidden;
}

.comparison-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.comparison-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.comparison-container {
  position: relative;
  height: 300px;
  overflow: hidden;
}

.comparison-image {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.6s ease;
}

.image-antes {
  left: 0;
  clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
}

.image-depois {
  right: 0;
  clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
}

/* Slider interativo */
.comparison-slider {
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, #6da3e9, #4a90e2);
  cursor: col-resize;
  z-index: 10;
  transform: translateX(-50%);
  transition: transform 0.2s ease;
  user-select: none;
}

.comparison-slider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  background: white;
  border: 3px solid #6da3e9;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  cursor: col-resize;
}

.comparison-slider::after {
  content: '⟷';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #6da3e9;
  font-size: 16px;
  font-weight: bold;
  z-index: 1;
  cursor: col-resize;
  pointer-events: none;
}

.comparison-slider:hover::before {
  transform: translate(-50%, -50%) scale(1.2);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.comparison-slider:active::before {
  transform: translate(-50%, -50%) scale(1.1);
  background: #f0f0f0;
}

/* Labels modernos */
.comparison-labels {
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 5;
}

.label-antes,
.label-depois {
  padding: 8px 16px;
  border-radius: 25px;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.label-antes {
  background: rgba(239, 68, 68, 0.9);
  color: white;
}

.label-depois {
  background: rgba(34, 197, 94, 0.9);
  color: white;
}

/* Informações do card */
.comparison-info {
  padding: 1.5rem;
  text-align: center;
}

.comparison-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0.5rem;
}

.comparison-description {
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Efeito de hover nas imagens */
.comparison-card:hover .comparison-image {
  transform: scale(1.05);
}

/* Animação de entrada */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.comparison-card {
  animation: fadeInUp 0.6s ease-out forwards;
}

.comparison-card:nth-child(2) {
  animation-delay: 0.2s;
}

.comparison-card:nth-child(3) {
  animation-delay: 0.4s;
}

/* Responsividade */
@media (max-width: 768px) {
  .comparison-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 100%;
    padding: 0 1rem;
  }
  
  .comparison-container {
    height: 250px;
  }
  
  .comparison-labels {
    padding: 0 15px;
    top: 15px;
  }
  
  .label-antes,
  .label-depois {
    padding: 6px 12px;
    font-size: 10px;
  }
  
  .comparison-info {
    padding: 1rem;
  }
  
  .comparison-title {
    font-size: 1.1rem;
  }
  
  .comparison-description {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .comparison-grid {
    padding: 0 0.5rem;
    max-width: 100%;
    overflow: hidden;
  }
  
  .comparison-container {
    height: 200px;
  }
  
  .comparison-slider::before {
    width: 30px;
    height: 30px;
  }
  
  .comparison-slider::after {
    font-size: 12px;
  }
}

/* Efeito de brilho sutil */
.comparison-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.6s ease;
  z-index: 1;
}

.comparison-card:hover::before {
  left: 100%;
}

