/* Performance Optimized CSS - Critical CSS First */

/* System font stack for faster loading */
:root {
  --primary: #3498db;
  --primary-dark: #2980b9;
  --secondary: #8e44ad;
  --success: #27ae60;
  --danger: #e74c3c;
  --warning: #f39c12;
  --dark: #2c3e50;
  --light: #ecf0f1;
  --bg-gradient: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  --hero-gradient: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
}

/* Critical CSS - Above the fold styles */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-gradient);
  color: var(--dark);
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

/* Optimized Glassmorphism - reduced blur for performance */
.glass-panel {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
}

/* Hero Section - optimized */
.hero-section {
  background: var(--hero-gradient);
  color: white;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

/* Remove pattern overlay for better performance */
/* .hero-section::after removed */

/* Navbar - optimized */
.navbar-custom {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-custom .navbar-brand {
  color: #3498db !important;
  -webkit-text-fill-color: #3498db !important;
  font-weight: 800;
  font-size: 1.5rem;
  background: none !important;
}

.navbar-custom .nav-link {
  color: var(--dark) !important;
  font-weight: 500;
}

.fitconnect-brand, .navbar-brand {
  color: #3498db !important;
  -webkit-text-fill-color: #3498db !important;
  font-weight: 800 !important;
  font-size: 1.5rem !important;
  background: none !important;
}

.navbar-custom .nav-link:hover {
  color: var(--primary) !important;
}

/* Modern Button - optimized */
.btn-modern {
  background: #3498db;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-modern:hover {
  background: #2980b9;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.45);
}

/* Form Controls - optimized */
.form-control-modern {
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 15px;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.9);
}

.form-control-modern:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
  outline: none;
}

/* Card Components - optimized */
.trainer-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1px solid #f0f0f0;
}

.trainer-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* Animations - optimized for performance */
.animate-fade-up {
  animation: fadeUp 0.5s ease-out;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Performance optimizations */
* {
  box-sizing: border-box;
}

/* Reduce paint on scroll */
.will-change-transform {
  will-change: transform;
}

/* Optimize images */
img {
  max-width: 100%;
  height: auto;
  loading: lazy;
}

/* Responsive optimizations */
@media (max-width: 768px) {
  .hero-section {
    padding: 60px 0;
  }
  
  .glass-panel {
    margin: 10px;
  }
  
  .trainer-card {
    margin-bottom: 20px;
  }
}

/* Utility classes for performance */
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.bg-primary { background: var(--primary) !important; }
.bg-success { background: var(--success) !important; }
.bg-danger { background: var(--danger) !important; }

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

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus styles for accessibility */
.btn:focus,
.form-control:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

