/* Custom Styles for MindClick Consulting Platform */

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

/* Course Card Hover Effects */
.course-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.course-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.course-card > div:last-child {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.course-card a {
  margin-top: auto;
}

/* Category Card Hover */
.category-card {
  transition: all 0.3s ease;
  cursor: pointer;
}

.category-card:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* Search Results */
.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e5e7eb;
  border-top: none;
  border-radius: 0 0 0.5rem 0.5rem;
  max-height: 400px;
  overflow-y: auto;
  z-index: 50;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.search-result-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.search-result-item:hover {
  background-color: #f9fafb;
}

/* Badge Styles */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-beginner {
  background-color: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.badge-intermediate {
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fde047;
}

.badge-advanced {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.badge-featured {
  background-color: #dbeafe;
  color: #1e40af;
  border: 1px solid #93c5fd;
}

/* Rating Stars */
.rating-stars {
  color: #f59e0b;
}

/* Loading Animation */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Price Display */
.price-original {
  text-decoration: line-through;
  color: #9ca3af;
}

.price-current {
  color: #1e40af;
  font-size: 1.5rem;
  font-weight: 700;
}

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

/* Min Heights for Consistent Card Sizes */
.min-h-\[3\.5rem\] {
  min-height: 3.5rem;
}

.min-h-\[2\.5rem\] {
  min-height: 2.5rem;
}

/* Responsive improvements */
@media (max-width: 768px) {
  .course-card {
    margin-bottom: 1rem;
  }
  
  .search-results {
    max-height: 300px;
  }
}

/* Outline Button Styles */
.btn-outline {
  border: 2px solid currentColor;
  background-color: transparent;
  transition: all 0.3s ease;
}

.btn-outline:hover {
  background-color: currentColor;
  color: white;
}

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

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

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}
