/* Enhanced Problems Section Layout */

.problems {
  padding: 120px 0;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  position: relative;
  overflow: hidden;
  animation: fadeIn 1s ease-out;
}

.problems::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.05) 0%, transparent 70%);
  animation: rotate 25s linear infinite;
  z-index: 0;
}

.problems .container {
  position: relative;
  z-index: 1;
}

.section-header {
  text-align: center;
  width: 100%;
  margin-bottom: 4rem;
}

.section-title {
  width: 100%;
  text-align: center;
  color: #1e293b;
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
  position: relative;
  display: inline-block;
}

.section-subheading,
h3.section-subheading {
  width: 100%;
  text-align: center;
  color: #334155 !important;
  font-size: 2rem;
  font-weight: 700 !important;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  border-radius: 2px;
}

.section-subtitle {
  width: 100%;
  text-align: center;
  color: #64748b;
  font-size: 1.25rem;
  max-width: 100%;
  margin: 0 !important;
  line-height: 1.6;
  box-sizing: border-box;
  display: block;
  padding-left: 0;
  padding-right: 0;
}

.problems .section-header .section-subtitle {
  max-width: none;
  width: 100%;
}

.problems-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 3rem;
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.4s;
}

section.animate-in .problems-grid {
  opacity: 1;
  transform: translateY(0);
}

.problem-card {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.8);
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  height: 100%;
  cursor: pointer;
  will-change: transform, box-shadow;
}

section.animate-in .problem-card {
  opacity: 1;
  transform: translateY(0);
}

.problem-card:nth-child(1) { transition-delay: 0.1s; }
.problem-card:nth-child(2) { transition-delay: 0.2s; }
.problem-card:nth-child(3) { transition-delay: 0.3s; }
.problem-card:nth-child(4) { transition-delay: 0.4s; }
.problem-card:nth-child(5) { transition-delay: 0.5s; }
.problem-card:nth-child(6) { transition-delay: 0.6s; }
.problem-card:nth-child(7) { transition-delay: 0.7s; }
.problem-card:nth-child(8) { transition-delay: 0.8s; }

.problem-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #3b82f6, #60a5fa, #93c5fd);
  opacity: 1;
}

.problem-card:hover {
  transform: translateY(-15px) scale(1.03);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
  border-color: #3b82f6;
  background: #f8fafc;
  animation: borderGlow 2s ease-in-out infinite alternate;
}

.problem-card:active {
  transform: translateY(-10px) scale(1.01);
  transition: all 0.2s ease;
}

@keyframes borderGlow {
  from {
    border-color: #3b82f6;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12), 0 0 0 0 rgba(59, 130, 246, 0.2);
  }
  to {
    border-color: #60a5fa;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12), 0 0 20px 5px rgba(59, 130, 246, 0.15);
  }
}

.problem-card:hover::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), transparent);
  z-index: -1;
}

.problem-icon {
  width: 70px;
  height: 70px;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.75rem;
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.25);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.problem-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.problem-card:hover .problem-icon::after {
  width: 200px;
  height: 200px;
}

.problem-card:hover .problem-icon {
  transform: scale(1.15) rotate(-8deg);
  box-shadow: 0 15px 35px rgba(59, 130, 246, 0.35);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1.15) rotate(-8deg);
  }
  50% {
    transform: scale(1.2) rotate(-5deg);
  }
  100% {
    transform: scale(1.15) rotate(-8deg);
  }
}

.problem-card .problem-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a !important;
  margin-bottom: 1.25rem;
  line-height: 1.4;
  letter-spacing: -0.02em;
  transition: all 0.3s ease;
  position: relative;
  display: inline-block;
  text-shadow: none !important;
}

.problem-card:hover .problem-title {
  color: #3b82f6;
  transform: scale(1.05);
}

.problem-title::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 3px;
  background: #3b82f6;
  transition: width 0.3s ease;
  border-radius: 2px;
}

.problem-card:hover .problem-title::after {
  width: 100%;
}

.problem-description {
  font-size: 1.1rem;
  color: #475569 !important;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-weight: 400;
  flex-grow: 1;
  transition: color 0.3s ease;
}

.problem-card:hover .problem-description {
  color: #475569;
}

/* 添加卡片进入动画 */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

section.animate-in .problem-card {
  animation: slideInUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.problem-stat {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(37, 99, 235, 0.08));
  border-radius: 16px;
  border-left: 5px solid #3b82f6;
  transition: all 0.4s ease;
  margin-top: auto;
  width: 100%;
}

.problem-card:hover .problem-stat {
  transform: translateX(8px);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(37, 99, 235, 0.12));
}

.problem-stat .stat-number {
  font-size: 2.25rem;
  font-weight: 800;
  color: #93c5fd;
  text-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.problem-stat .stat-label {
  font-size: 1.1rem;
  color: #e2e8f0;
  line-height: 1.5;
  font-weight: 500;
}

/* Responsive Design */

/* Large Desktop Styles */
@media (max-width: 1440px) {
  .problems-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.75rem;
  }
  
  .problem-card {
    padding: 1.75rem;
  }
  
  .problem-icon {
    width: 65px;
    height: 65px;
    font-size: 1.6rem;
  }
  
  .problem-title {
    font-size: 1.4rem;
  }
  
  .problem-description {
    font-size: 1rem;
  }
  
  .problem-stat .stat-number {
    font-size: 2rem;
  }
  
  .problem-stat .stat-label {
    font-size: 1rem;
  }
}

/* Large Tablet Styles */
@media (max-width: 1024px) {
  .problems {
    padding: 100px 2rem;
  }
  
  .section-title {
    font-size: 2.25rem;
  }
  
  .section-subtitle {
    font-size: 1.1rem;
  }
  
  .problems-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
  
  .problem-card {
    padding: 2rem;
  }
  
  .problem-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
  
  .problem-title {
    font-size: 1.35rem;
  }
  
  .problem-description {
    font-size: 1rem;
  }
  
  .problem-stat .stat-number {
    font-size: 2rem;
  }
  
  .problem-stat .stat-label {
    font-size: 1rem;
  }
}

/* Tablet Styles */
@media (max-width: 768px) {
  .problems {
    padding: 80px 1.5rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .section-subtitle {
    font-size: 1rem;
    max-width: 100%;
  }
  
  .problems-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
  
  .problem-card {
    padding: 1.75rem;
  }
  
  .problem-icon {
    width: 55px;
    height: 55px;
    font-size: 1.35rem;
    margin-bottom: 1.25rem;
  }
  
  .problem-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }
  
  .problem-description {
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
  }
  
  .problem-stat {
    padding: 1rem;
    gap: 1rem;
  }
  
  .problem-stat .stat-number {
    font-size: 1.75rem;
  }
  
  .problem-stat .stat-label {
    font-size: 0.9rem;
  }
}

/* Mobile Styles */
@media (max-width: 576px) {
  .problems {
    padding: 60px 1rem;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
  
  .section-subtitle {
    font-size: 0.9rem;
  }
  
  .problems-grid {
    gap: 1.5rem;
  }
  
  .problem-card {
    padding: 1.5rem;
    border-radius: 16px;
  }
  
  .problem-icon {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    border-radius: 14px;
  }
  
  .problem-title {
    font-size: 1.15rem;
    margin-bottom: 0.875rem;
  }
  
  .problem-description {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }
  
  .problem-stat {
    padding: 0.875rem;
    gap: 0.875rem;
    border-radius: 12px;
  }
  
  .problem-stat .stat-number {
    font-size: 1.5rem;
  }
  
  .problem-stat .stat-label {
    font-size: 0.85rem;
  }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
  .problems {
    padding: 50px 0.75rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .section-subtitle {
    font-size: 0.85rem;
  }
  
  .problem-card {
    padding: 1.25rem;
  }
  
  .problem-icon {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }
  
  .problem-title {
    font-size: 1.1rem;
  }
  
  .problem-description {
    font-size: 0.85rem;
  }
  
  .problem-stat .stat-number {
    font-size: 1.35rem;
  }
  
  .problem-stat .stat-label {
    font-size: 0.8rem;
  }
}

/* Ultra Small Mobile Styles */
@media (max-width: 360px) {
  .problems {
    padding: 40px 0.5rem;
  }
  
  .section-title {
    font-size: 1.35rem;
  }
  
  .section-subtitle {
    font-size: 0.8rem;
  }
  
  .problem-card {
    padding: 1rem;
  }
  
  .problem-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .problem-title {
    font-size: 1rem;
  }
  
  .problem-description {
    font-size: 0.8rem;
  }
  
  .problem-stat {
    padding: 0.75rem;
    gap: 0.75rem;
  }
  
  .problem-stat .stat-number {
    font-size: 1.25rem;
  }
  
  .problem-stat .stat-label {
    font-size: 0.75rem;
  }
}