/* Problem & Solution Section Styling */

.problem-section {
  position: relative;
  padding: var(--spacing-4xl) 0;
  margin-top: 20px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  overflow: hidden;
}

.problem-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.3), transparent);
}

.problem-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-2xl);
  position: relative;
  z-index: 1;
}

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.section-eyebrow {
  display: inline-block;
  padding: var(--spacing-xs) var(--spacing-lg);
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary-blue);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: var(--spacing-lg);
}

.section-header h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: var(--font-weight-bold);
  color: var(--primary-blue);
  margin-bottom: var(--spacing-md);
  line-height: 1.2;
}

.section-description {
  font-size: var(--text-base);
  color: #475569;
  line-height: 1.7;
  max-width: 640px;
  margin: 0 auto;
}

.problem-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-lg);
  margin-top: var(--spacing-lg);
}

.metric-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--spacing-lg);
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.8);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.metric-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.metric-icon-wrapper {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(79, 70, 229, 0.1));
  border-radius: var(--radius-lg);
  color: var(--primary-blue);
  margin-bottom: var(--spacing-sm);
}

.metric-icon-wrapper svg {
  width: 24px;
  height: 24px;
}

.metric-content {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.metric-value {
  font-size: clamp(1.5rem, 2.5vw, 1.875rem);
  font-weight: var(--font-weight-bold);
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.metric-label {
  font-size: var(--text-xs);
  color: #1e293b;
  font-weight: var(--font-weight-bold);
  line-height: 1.4;
}

.problem-solution-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-xl);
}

.problem-column,
.solution-column {
  padding: var(--spacing-xl);
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(226, 232, 240, 0.8);
  transition: box-shadow 0.3s ease;
}

.problem-column:hover,
.solution-column:hover {
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
}

.problem-column h3,
.solution-column h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: var(--font-weight-bold);
  color: #1e293b;
  margin-bottom: var(--spacing-lg);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.problem-column h3::before {
  content: '';
  width: 4px;
  height: 24px;
  background: linear-gradient(180deg, #ef4444, #dc2626);
  border-radius: var(--radius-full);
}

.solution-column h3::before {
  content: '';
  width: 4px;
  height: 24px;
  background: linear-gradient(180deg, #10b981, #059669);
  border-radius: var(--radius-full);
}

.problem-list,
.solution-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  margin: 0;
  padding: 0;
  list-style: none;
}

.problem-list li,
.solution-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
  font-size: var(--text-sm);
  line-height: 1.6;
  color: #475569;
  padding-left: 0;
}

.problem-list li::before {
  content: '✕';
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: bold;
  margin-top: 2px;
}

.solution-list li::before {
  content: '✓';
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: bold;
  margin-top: 2px;
}

.problem-stat {
  margin-top: var(--spacing-lg);
  padding: var(--spacing-md);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(239, 68, 68, 0.02));
  border: 2px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.problem-stat__value {
  font-size: clamp(1.5rem, 2.5vw, 1.875rem);
  font-weight: var(--font-weight-bold);
  color: #dc2626;
  line-height: 1;
}

.problem-stat__label {
  font-size: var(--text-xs);
  color: #64748b;
  line-height: 1.4;
}

.solution-actions {
  margin-top: var(--spacing-lg);
}

.solution-actions .btn {
  font-weight: var(--font-weight-semibold);
  border: 2px solid #10b981;
  color: #059669;
  background: white;
  transition: all 0.3s ease;
}

.solution-actions .btn:hover {
  background: #10b981;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(16, 185, 129, 0.2);
}

.problem-visual {
  margin-top: 0;
  padding: var(--spacing-xl);
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.comparison-container {
  position: relative;
}

.comparison-label {
  position: absolute;
  top: 16px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 2px solid;
}

.comparison-label-before {
  left: 16px;
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.3);
}

.comparison-label-after {
  right: 16px;
  color: #059669;
  border-color: rgba(5, 150, 105, 0.3);
}

.comparison-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  aspect-ratio: 18 / 7;
  max-height: 450px;
  width: 100%;
  cursor: ew-resize;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}

.comparison-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: clip-path 0.15s ease;
}

.comparison-image--before {
  clip-path: inset(0 50% 0 0);
}

.comparison-image--after {
  clip-path: inset(0 0 0 50%);
}

.comparison-slider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: white;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  transition: left 0.15s ease;
}

.comparison-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: white;
  border: 2px solid var(--primary-blue);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-blue);
  font-size: 20px;
  font-weight: bold;
  pointer-events: none;
  transition: left 0.15s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.comparison-wrapper:hover .comparison-handle {
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.25);
}

.comparison-wrapper.is-dragging {
  cursor: grabbing;
}

.comparison-wrapper.is-dragging .comparison-handle {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.3);
}

/* Responsive */

@media (max-width: 1024px) {
  .problem-section {
    padding: var(--spacing-2xl) 0;
  }

  .problem-container {
    gap: var(--spacing-xl);
  }

  .problem-metrics {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
  }

  .metric-card {
    padding: var(--spacing-md);
  }

  .problem-solution-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  .problem-column,
  .solution-column {
    padding: var(--spacing-lg);
  }

  .problem-visual {
    padding: var(--spacing-lg);
  }
}

@media (max-width: 768px) {
  .problem-section {
    padding: var(--spacing-2xl) 0;
  }

  .problem-container {
    gap: var(--spacing-xl);
  }

  .section-header h2 {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }

  .section-description {
    font-size: var(--text-sm);
  }

  .problem-metrics {
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
  }

  .metric-card {
    padding: var(--spacing-md);
    flex-direction: row;
    text-align: left;
    gap: var(--spacing-sm);
  }

  .metric-icon-wrapper {
    margin-bottom: 0;
  }

  .problem-column,
  .solution-column {
    padding: var(--spacing-lg);
  }

  .problem-visual {
    padding: var(--spacing-lg);
  }

  .comparison-handle {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
}
