/* Exercise Index Page Styles */

.hero-background {
  background-image: url('https://images.unsplash.com/photo-1571019613454-1cb2f99b2d8b?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(40px);
  transform: scale(1.1);
}

.hero-overlay {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.7) 100%);
}

.blur-background {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Fixed Custom Checkbox Styling */
.custom-checkbox {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.custom-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  width: 0;
  height: 0;
}

.custom-checkbox .checkmark {
  position: relative;
  height: 20px;
  width: 20px;
  background-color: #fff;
  border: 2px solid #d1d5db;
  border-radius: 4px;
  transition: all 0.2s ease;
  margin-right: 12px;
  flex-shrink: 0;
}

.custom-checkbox:hover .checkmark {
  border-color: #889a8c;
}

.custom-checkbox input:checked ~ .checkmark {
  background-color: #889a8c;
  border-color: #889a8c;
}

.custom-checkbox .checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 6px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.custom-checkbox input:checked ~ .checkmark:after {
  display: block;
}

/* Unselect option styling */
.unselect-option {
  z-index: 10;
  color: #3d513d;
}

.unselect-option:hover {
  transform: scale(1.1);
}

.filter-tag .unselect-option {
  z-index: 20;
}

/* Ensure icon color is applied */
.unselect-option i {
  color: inherit !important;
}

/* Radio Button Styling */
.custom-radio {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.custom-radio input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  width: 0;
  height: 0;
}

.custom-radio .radiomark {
  position: relative;
  height: 18px;
  width: 18px;
  background-color: #fff;
  border: 2px solid #d1d5db;
  border-radius: 50%;
  transition: all 0.2s ease;
  margin-right: 12px;
  flex-shrink: 0;
}

.custom-radio:hover .radiomark {
  border-color: #889a8c;
}

.custom-radio input:checked ~ .radiomark {
  border-color: #889a8c;
}

.custom-radio .radiomark:after {
  content: "";
  position: absolute;
  display: none;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #889a8c;
  transform: translate(-50%, -50%);
}

.custom-radio input:checked ~ .radiomark:after {
  display: block;
}

/* Tag Filter Styling */
.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background-color: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.filter-tag:hover {
  background-color: #e5e7eb;
  border-color: #9ca3af;
}

.filter-tag.active {
  background-color: #889a8c;
  border-color: #889a8c;
  color: white;
}

.filter-tag.active:hover {
  background-color: #7a8a7e;
  border-color: #7a8a7e;
}

/* Slider Filter Styling */
.filter-slider {
  margin-top: 12px;
}

.slider-container {
  position: relative;
  padding: 0 8px;
}

.slider-track {
  height: 4px;
  background-color: #e5e7eb;
  border-radius: 2px;
  position: relative;
}

.slider-fill {
  height: 100%;
  background-color: #889a8c;
  border-radius: 2px;
  position: absolute;
  top: 0;
  left: 0;
  transition: all 0.2s ease;
}

.slider-thumb {
  width: 16px;
  height: 16px;
  background-color: #889a8c;
  border: 2px solid white;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.slider-thumb:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transform: translate(-50%, -50%) scale(1.1);
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 11px;
  color: #6b7280;
  position: relative;
}

.slider-labels span {
  flex: 1;
  text-align: center;
  margin-right: 10px;
  font-weight: 500;
}

.slider-labels span:empty {
  flex: 0.5;
}

.slider-tooltip {
  position: fixed;
  background: #1f2937;
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.slider-tooltip.show {
  opacity: 1;
}

.slider-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: #1f2937;
}

/* Category Filter Styling - Professional Design */
.category-filter {
  margin-bottom: 24px;
  background-color: #889a8c;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
}

.category-filter-title {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.category-tag:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.category-tag.active {
  background: #313a37;
  border-color: #313a37;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(49, 58, 55, 0.2);
}

.category-tag.active:hover {
  background: #2a312e;
  border-color: #2a312e;
  box-shadow: 0 4px 8px rgba(49, 58, 55, 0.3);
}

.category-tag.all {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #374151;
}

.category-tag.all.active {
  background: #1f2937;
  border-color: #1f2937;
  color: white;
}

.category-tag.strength {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.category-tag.strength.active {
  background: #dc2626;
  border-color: #dc2626;
  color: white;
}

.category-tag.cardio {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.category-tag.cardio.active {
  background: #16a34a;
  border-color: #16a34a;
  color: white;
}

.category-tag.flexibility {
  background: #faf5ff;
  border-color: #e9d5ff;
  color: #7c3aed;
}

.category-tag.flexibility.active {
  background: #9333ea;
  border-color: #9333ea;
  color: white;
}

.category-tag.mobility {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}

.category-tag.mobility.active {
  background: #2563eb;
  border-color: #2563eb;
  color: white;
}

/* Exercise card hover effects */
.exercise-card {
  transition: all 0.3s ease;
}

.exercise-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Enhanced Exercise Card Design */
.exercise-card {
  position: relative;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.exercise-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #889a8c 0%, #47674b 100%);
  opacity: 1;
  transition: opacity 0.3s ease;
}

.exercise-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-color: rgba(136, 154, 140, 0.3);
}

.exercise-card:hover::before {
  opacity: 1;
}

/* Card Content Styling */
.exercise-card .p-6 {
  position: relative;
  z-index: 1;
}

/* Exercise Title Enhancement */
.exercise-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.4;
  color: #1f2937;
  margin-bottom: 0.75rem;
  transition: color 0.2s ease;
}

.exercise-card h3 a {
  color: inherit;
  text-decoration: none;
  display: block;
  transition: color 0.2s ease;
}

.exercise-card h3 a:hover {
  color: #47674b;
}

/* Description Enhancement */
.exercise-card p {
  color: #6b7280;
  line-height: 1.6;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

/* Enhanced Tag Styling */
.exercise-card .inline-flex {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #374151;
  transition: all 0.2s ease;
}

.exercise-card .inline-flex:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-color: rgba(0, 0, 0, 0.2);
}

/* Exercise Type Specific Styling */
.exercise-card[data-category="strength"] .inline-flex {
  border-color: #889a8c;
  color: #47674b;
}

.exercise-card[data-category="cardio"] .inline-flex {
  border-color: #889a8c;
  color: #47674b;
}

.exercise-card[data-category="flexibility"] .inline-flex {
  border-color: #889a8c;
  color: #47674b;
}

.exercise-card[data-category="mobility"] .inline-flex {
  border-color: #889a8c;
  color: #47674b;
}

/* Difficulty Level Styling */
.exercise-card[data-difficulty="1"] .inline-flex {
  border-color: #889a8c;
  color: #47674b;
}

.exercise-card[data-difficulty="2"] .inline-flex {
  border-color: #889a8c;
  color: #47674b;
}

.exercise-card[data-difficulty="3"] .inline-flex {
  border-color: #889a8c;
  color: #47674b;
}

.exercise-card[data-difficulty="4"] .inline-flex {
  border-color: #889a8c;
  color: #47674b;
}

/* Card Footer Enhancement */
.exercise-card .border-t {
  border-color: rgba(0, 0, 0, 0.06);
  padding-top: 1rem;
  margin-top: auto;
}

/* Usage Count Styling */
.exercise-card .text-sm {
  color: #9ca3af;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.exercise-card .fas.fa-eye {
  color: #d1d5db;
  font-size: 0.75rem;
}

/* View Details Button Enhancement */
.exercise-card a[href*="details"] {
  background: linear-gradient(135deg, #47674b 0%, #3a5a3e 100%);
  color: white;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(71, 103, 75, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.exercise-card a[href*="details"]:hover {
  background: linear-gradient(135deg, #3a5a3e 0%, #2d4a31 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(71, 103, 75, 0.3);
}

.exercise-card a[href*="details"]::after {
  content: '→';
  transition: transform 0.2s ease;
}

.exercise-card a[href*="details"]:hover::after {
  transform: translateX(2px);
}

/* Card Grid Enhancement */
#exerciseGrid {
  gap: 1.5rem;
}

/* Empty State Enhancement */
.exercise-card:empty::before {
  content: 'No exercises found';
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: #9ca3af;
  font-style: italic;
}

/* Loading State */
.exercise-card.loading {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Responsive Card Design */
@media (max-width: 768px) {
  .exercise-card {
    border-radius: 16px;
  }
  
  .exercise-card:hover {
    transform: translateY(-4px) scale(1.01);
  }
  
  .exercise-card h3 {
    font-size: 1rem;
  }
}

/* Card Animation on Load */
.exercise-card {
  animation: cardFadeIn 0.6s ease-out;
}

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

/* Staggered Animation */
.exercise-card:nth-child(1) { animation-delay: 0.1s; }
.exercise-card:nth-child(2) { animation-delay: 0.2s; }
.exercise-card:nth-child(3) { animation-delay: 0.3s; }
.exercise-card:nth-child(4) { animation-delay: 0.4s; }
.exercise-card:nth-child(5) { animation-delay: 0.5s; }
.exercise-card:nth-child(6) { animation-delay: 0.6s; }

/* Tag Icons */
.exercise-card .inline-flex .fas {
  color: #47674b;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

/* Difficulty Indicator Dots */
.exercise-card .w-1\.5 {
  transition: all 0.2s ease;
}

.exercise-card:hover .w-1\.5 {
  transform: scale(1.2);
}

/* Usage Count Indicator */
.exercise-card .animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: .5;
  }
}

/* Enhanced Button Hover Effects */
.exercise-card .group:hover .fa-arrow-right {
  transform: translateX(4px);
}

/* Card Background Patterns */
.exercise-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, rgba(136, 154, 140, 0.05) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.exercise-card:hover::after {
  opacity: 1;
}

/* Card Content Spacing */
.exercise-card .p-6 {
  padding: 1.5rem;
}

/* Tag Container Enhancement */
.exercise-card .flex.flex-wrap.gap-2 {
  margin-bottom: 1.25rem;
}

/* Description Enhancement */
.exercise-card p.text-gray-600 {
  color: #6b7280;
  line-height: 1.6;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Line clamp for descriptions */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Filter section styling */
.filter-section {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.filter-title {
  color: #1f2937;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.filter-category {
  margin-bottom: 24px;
}

.filter-category-title {
  color: #374151;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.filter-option {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.2s ease;
}

.filter-option:hover {
  color: #1f2937;
}

.filter-checkbox {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  border: 2px solid #d1d5db;
  border-radius: 3px;
  position: relative;
  transition: all 0.2s ease;
}

.filter-option:hover .filter-checkbox {
  border-color: #889a8c;
}

.filter-option input:checked + .filter-checkbox {
  background-color: #889a8c;
  border-color: #889a8c;
}

.filter-option input:checked + .filter-checkbox::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 10px;
  font-weight: bold;
}

/* Exercise tags */
.exercise-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  margin: 2px;
}

.exercise-tag.strength {
  background-color: #889a8c;
  color: #ffffff;
  border: 1px solid #889a8c;
}

.exercise-tag.cardio {
  background-color: #889a8c;
  color: #ffffff;
  border: 1px solid #889a8c;
}

.exercise-tag.flexibility {
  background-color: #889a8c;
  color: #ffffff;
  border: 1px solid #889a8c;
}

.exercise-tag.mobility {
  background-color: #889a8c;
  color: #ffffff;
  border: 1px solid #889a8c;
}

.exercise-tag.balance {
  background-color: #889a8c;
  color: #ffffff;
  border: 1px solid #889a8c;
}

.exercise-tag.plyometric {
  background-color: #889a8c;
  color: #ffffff;
  border: 1px solid #889a8c;
}

.exercise-tag.beginner {
  background-color: #889a8c;
  color: #ffffff;
  border: 1px solid #889a8c;
}

.exercise-tag.intermediate {
  background-color: #889a8c;
  color: #ffffff;
  border: 1px solid #889a8c;
}

.exercise-tag.advanced {
  background-color: #889a8c;
  color: #ffffff;
  border: 1px solid #889a8c;
}

.exercise-tag.expert {
  background-color: #889a8c;
  color: #ffffff;
  border: 1px solid #889a8c;
}

.exercise-tag.equipment {
  background-color: #889a8c;
  color: #ffffff;
  border: 1px solid #889a8c;
}

/* Search input styling */
.search-input {
  width: 100%;
  padding: 16px 16px 16px 48px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  color: white;
  font-size: 16px;
  transition: all 0.2s ease;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.search-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.7);
  pointer-events: none;
}

/* Sort dropdown styling */
.sort-select {
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 8px 16px;
  color: #374151;
  font-size: 14px;
  transition: all 0.2s ease;
}

.sort-select:focus {
  outline: none;
  border-color: #889a8c;
  box-shadow: 0 0 0 2px rgba(136, 154, 140, 0.1);
}

/* Pagination styling */
.pagination {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination-link {
  padding: 8px 16px;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  color: #374151;
  text-decoration: none;
  transition: all 0.2s ease;
}

.pagination-link:hover {
  background-color: #f9fafb;
}

.pagination-current {
  background-color: #889a8c;
  color: white;
  border-color: #889a8c;
}

/* Applied Filter Tags Styling */
.applied-filter-tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: default;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: relative;
  color: #000000 !important;
  background: #ffffff;
}

.applied-filter-tag:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.applied-filter-tag .remove-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  cursor: pointer;
  margin-left: 8px;
  color: #000000;
}

.applied-filter-tag .remove-filter:hover {
  background: rgba(0, 0, 0, 0.2);
  transform: scale(1.1);
}

.applied-filter-tag .remove-filter i {
  font-size: 8px;
}

/* Clear all filters button */
#clearAllFiltersBtn {
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

#clearAllFiltersBtn:hover {
  background-color: rgba(239, 68, 68, 0.1);
}

/* Responsive design */
@media (max-width: 768px) {
  .exercise-grid {
    grid-template-columns: 1fr;
  }
  
  .filter-section {
    margin-bottom: 24px;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-description {
    font-size: 1rem;
  }
  
  .category-tags {
    flex-direction: column;
  }
  
  .applied-filter-tag {
    font-size: 12px;
    padding: 6px 10px;
  }
  
  .applied-filter-tag .remove-filter {
    width: 14px;
    height: 14px;
  }
}

@media (max-width: 1024px) {
  .exercise-grid {
    grid-template-columns: repeat(2, 1fr);
  }
} 