/* Case Studies Page Styles */

.page-hero {
  padding: calc(120px + var(--spacing-4xl)) 0 var(--spacing-5xl) 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-top: 0;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 150%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent 70%);
  animation: float 15s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-30px, 30px) rotate(5deg); }
}

.page-hero-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--spacing-lg);
  line-height: 1.1;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-hero p {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  opacity: 0.95;
  line-height: 1.7;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.case-studies-section {
  padding: var(--spacing-5xl) 0;
  background: linear-gradient(180deg, #fafbfc 0%, #f8fafc 50%, white 100%);
}

.case-studies-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-4xl);
  margin-bottom: var(--spacing-4xl);
}

.case-study-card {
  background: white;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  position: relative;
}

.case-study-card.featured {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
}

.case-study-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.15);
  border-color: rgba(102, 126, 234, 0.3);
}

.case-badge {
  position: absolute;
  top: var(--spacing-md);
  right: var(--spacing-md);
  padding: var(--spacing-xs) var(--spacing-md);
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 1;
}

.case-image {
  width: 100%;
  height: 240px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.case-study-card.featured .case-image {
  width: 400px;
  height: 100%;
  min-height: 400px;
}

.placeholder-img {
  font-size: 4rem;
  opacity: 0.6;
}

.case-content {
  padding: var(--spacing-3xl);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  flex-grow: 1;
}

.case-content h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: var(--font-weight-bold);
  color: var(--primary-blue);
  line-height: 1.3;
}

.case-meta {
  font-size: var(--text-sm);
  color: #667eea;
  font-weight: var(--font-weight-semibold);
}

.case-excerpt {
  color: #475569;
  line-height: 1.7;
  flex-grow: 1;
}

.case-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: var(--spacing-lg);
  padding: var(--spacing-lg) 0;
  margin: var(--spacing-md) 0;
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  text-align: center;
}

.stat-value {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: var(--font-weight-bold);
  color: #667eea;
}

.stat-label {
  font-size: var(--text-xs);
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cta-section {
  padding: var(--spacing-5xl) 0;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  margin-top: var(--spacing-5xl);
}

.cta-box {
  background: white;
  border-radius: var(--radius-2xl);
  padding: var(--spacing-4xl) var(--spacing-3xl);
  text-align: center;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
}

.cta-box h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: var(--font-weight-bold);
  color: var(--primary-blue);
  margin-bottom: var(--spacing-md);
}

.cta-box p {
  font-size: var(--text-lg);
  color: #64748b;
  margin-bottom: var(--spacing-2xl);
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

/* Responsive */

@media (max-width: 1024px) {
  .case-studies-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-2xl);
  }

  .case-study-card.featured {
    flex-direction: column;
  }

  .case-study-card.featured .case-image {
    width: 100%;
    height: 300px;
    min-height: auto;
  }
}

@media (max-width: 768px) {
  .page-hero {
    padding: calc(var(--spacing-4xl) + 100px) 0 var(--spacing-3xl) 0;
  }

  .case-studies-section {
    padding: var(--spacing-4xl) 0;
  }

  .case-content {
    padding: var(--spacing-xl);
  }

  .case-image {
    height: 200px;
  }

  .cta-box {
    padding: var(--spacing-3xl) var(--spacing-xl);
  }

  .cta-buttons {
    flex-direction: column;
    align-items: stretch;
  }
}
