/* ===== CTA Section ===== */
.cta-section {
  padding: 80px 0 150px;
  background: var(--surface-0);
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="ctaPattern" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1.5" fill="%23dee2e6" opacity="0.3"/></pattern></defs><rect width="100" height="100" fill="url(%23ctaPattern)"/></svg>');
  opacity: 0.5;
}

.cta-header {
  text-align: center;
  margin-bottom: 60px;
  position: relative;
  z-index: 2;
}

.cta-title {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 20px;
  position: relative;
}

.cta-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 2px;
}

.cta-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.cta-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
}

.cta-grid > .cta-card {
  flex: 0 1 calc(20% - 16px);
  min-width: 200px;
}

.cta-card {
  background: var(--surface-1);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 25px 20px;
  border: 2px solid var(--border-color-light);
  box-shadow: 0 8px 32px rgba(var(--black-rgb), 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  cursor: pointer;
  overflow: hidden;
  min-height: 220px;
  display: flex;
  align-items: center;
  flex-direction: column;
}

.cta-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  opacity: 0;
  transition: all 0.3s ease;
}

.cta-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 40px rgba(var(--black-rgb), 0.12);
  border-color: var(--primary-color);
  background: var(--surface-0);
  backdrop-filter: blur(15px);
}

.cta-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.2);
  flex-shrink: 0;
}

.cta-card:hover .cta-icon {
  transform: scale(1.15) rotate(8deg);
  box-shadow: 0 8px 25px rgba(var(--primary-color-rgb), 0.3);
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

.cta-icon i {
  font-size: 1.6rem;
  color: var(--text-white);
  z-index: 1;
  position: relative;
}

.cta-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.cta-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
  text-align: center;
  transition: all 0.3s ease;
  line-height: 1.3;
}

.cta-card:hover .cta-content h3 {
  color: var(--primary-color);
  transform: translateX(5px);
}

.cta-content p {
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 12px;
  flex: 1;
  transition: all 0.3s ease;
}

.cta-card:hover .cta-content p {
  color: var(--text-primary);
  transform: translateX(3px);
}

.cta-stats {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 5px;
  margin-top: auto;
}

.cta-stats .stat-number {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary-color);
  line-height: 1;
  transition: all 0.3s ease;
}

.cta-card:hover .cta-stats .stat-number {
  transform: scale(1.05);
  color: var(--secondary-color);
}

.cta-stats .stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
  transition: all 0.3s ease;
}

.cta-card:hover .cta-stats .stat-label {
  color: var(--text-primary);
  transform: translateX(3px);
}

.cta-arrow {
  position: absolute;
  bottom: 15px;
  right: 15px;
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: all 0.3s ease;
  z-index: 1;
  box-shadow: 0 2px 8px rgba(var(--primary-color-rgb), 0.2);
}

.cta-card:hover .cta-arrow {
  transform: translateX(-5px) scale(1.1);
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
  opacity: 1;
  box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.3);
}

.cta-arrow i {
  font-size: 0.9rem;
  color: var(--text-white);
  transition: all 0.3s ease;
}

.cta-card:hover .cta-arrow i {
  transform: scale(1.1) rotate(5deg);
}

/* Responsive Design for CTA */
@media (max-width: 1200px) {
  .cta-grid > .cta-card {
    flex: 0 1 calc(33.333% - 14px);
  }
  .cta-grid {
    gap: 18px;
  }
}

@media (max-width: 1024px) {
  .cta-grid > .cta-card {
    flex: 0 1 calc(50% - 10px);
  }
}

@media (max-width: 768px) {
  /* مساحة سفلية للزر الثابت «ارتق إلى القمة» + حلقات النبض (لا تُلغى بـ padding متساوٍ) */
  .cta-section {
    padding: 60px 0 calc(9.25rem + env(safe-area-inset-bottom, 0px));
  }
  
  .cta-title {
    font-size: 2.2rem;
  }
  
  .cta-subtitle {
    font-size: 1.1rem;
  }
  
  .cta-grid > .cta-card {
    flex: 0 1 calc(50% - 10px);
  }
  
  .cta-card {
    padding: 25px 20px;
  }
  
  .cta-icon {
    width: 60px;
    height: 60px;
  }
  
  .cta-icon i {
    font-size: 1.5rem;
  }
  
  .cta-content h3 {
    font-size: 1.2rem;
  }
  
  .cta-content p {
    font-size: 0.9rem;
  }
  
  .cta-stats .stat-number {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .cta-section {
    padding-bottom: calc(10.75rem + env(safe-area-inset-bottom, 0px));
  }

  .cta-grid {
    gap: 15px;
  }
  .cta-grid > .cta-card {
    flex: 0 1 100%;
  }
  
  .cta-card {
    padding: 25px 20px;
  }
  
  .cta-content h3 {
    font-size: 1.3rem;
  }
  
  .cta-content p {
    font-size: 0.95rem;
  }
  
  .cta-stats .stat-number {
    font-size: 1.8rem;
  }
}
