/* Section Flow and Transitions */

/* Smooth section transitions */
.section {
  transition: all 0.3s ease-in-out;
  position: relative;
}

/* Section spacing improvements */
.section {
  padding: 4rem 0;
}

.section.alt {
  background: var(--bg-alt);
}

.section.highlight {
  background: linear-gradient(135deg, var(--brand-50) 0%, var(--bg-alt) 100%);
}

/* Enhanced section headers */
.section-head {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-head h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text);
  position: relative;
}

.section-head h2::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(45deg, var(--brand-500), var(--accent));
  border-radius: 2px;
}

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

/* Improved card styling */
.card {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

/* Enhanced button styling */
.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(45deg, var(--brand-500), var(--brand-600));
  color: white;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--brand-500);
  border: 2px solid var(--brand-500);
}

.btn-secondary:hover {
  background: var(--brand-500);
  color: white;
  transform: translateY(-2px);
}

.btn-small {
  padding: 0.625rem 1.5rem;
  font-size: 0.9rem;
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--muted);
}

.btn-ghost:hover {
  background: var(--muted);
  color: white;
}

/* Grid improvements */
.grid {
  display: grid;
  gap: 2rem;
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid.three {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Container improvements */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Responsive improvements */
@media (max-width: 768px) {
  .section {
    padding: 3rem 0;
  }
  
  .section-head h2 {
    font-size: 2rem;
  }
  
  .section-subtitle {
    font-size: 1.1rem;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  .grid.two,
  .grid.three {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 2.5rem 0;
  }
  
  .section-head h2 {
    font-size: 1.75rem;
  }
  
  .card {
    padding: 1.5rem;
  }
}

/* Animation improvements */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section {
  animation: fadeInUp 0.6s ease-out;
}

/* Focus improvements for accessibility */
.btn:focus,
.card:focus {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Success states */
.success {
  color: var(--success);
}

/* Error states */
.error {
  color: var(--danger);
}
