/* Enhanced Course Section Typography and Visual Hierarchy */
.courses-section {
  background: #ffffff;
  position: relative;
  overflow: hidden;
}

.courses-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #007bff, transparent);
}

/* Enhanced Section Title */
.courses-section .section-title {
  font-size: 3rem !important;
  font-weight: 900 !important;
  background: linear-gradient(135deg, #007bff 0%, #6c757d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem !important;
  text-align: center;
  letter-spacing: -0.03em;
  position: relative;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.courses-section .section-title::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 5px;
  background: linear-gradient(90deg, #007bff, #6c757d);
  border-radius: 3px;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.courses-section .section-subtitle {
  font-size: 1.2rem;
  color: #6b7280;
  text-align: center;
  margin-bottom: 3rem;
  font-weight: 400;
  line-height: 1.6;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Enhanced Filter Buttons */
.category-filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
  padding: 0 1rem;
}

.filter-btn {
  padding: 15px 30px !important;
  border: none !important;
  border-radius: 50px !important;
  background: #ffffff !important;
  color: #6b7280 !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 2px solid #e5e7eb !important;
  position: relative;
  overflow: hidden;
}

.filter-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.6s ease;
}

.filter-btn:hover::before {
  left: 100%;
}

.filter-btn i {
  font-size: 1.2rem !important;
  transition: transform 0.3s ease;
}

.filter-btn:hover i {
  transform: scale(1.2);
}

.filter-btn:hover, .filter-btn.active {
  background: linear-gradient(135deg, #007bff, #6c757d) !important;
  color: white !important;
  transform: translateY(-3px) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
  border-color: transparent !important;
}

.filter-btn.active {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(0, 123, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 123, 255, 0); }
}

/* Enhanced Course Cards */
.upcoming-course-card {
  background: #ffffff !important;
  border-radius: 20px !important;
  overflow: hidden !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative;
  border: 1px solid #e5e7eb;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.upcoming-course-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #007bff, #6c757d);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.upcoming-course-card:hover::before {
  transform: scaleX(1);
}

.upcoming-course-card:hover {
  transform: translateY(-12px) !important;
  box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1) !important;
  border-color: #007bff !important;
}

/* Enhanced Course Image */
.course-image-wrapper {
  position: relative !important;
  padding-top: 65% !important;
  overflow: hidden !important;
  background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
}

.course-image {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
  filter: brightness(0.9);
}

.upcoming-course-card:hover .course-image {
  transform: scale(1.15) !important;
  filter: brightness(1.1);
}

/* Enhanced Course Overlay */
.course-overlay {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: linear-gradient(135deg, rgba(0, 123, 255, 0.9), rgba(108, 117, 125, 0.9)) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  opacity: 0 !important;
  transition: opacity 0.4s ease !important;
  backdrop-filter: blur(8px);
}

.upcoming-course-card:hover .course-overlay {
  opacity: 1 !important;
}

.course-date {
  color: white;
  font-weight: 600;
  font-size: 1.1rem;
  text-align: center;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.course-date i {
  margin-right: 8px;
  font-size: 1.2rem;
}

.course-price {
  background: rgba(255,255,255,0.95);
  color: #28a745;
  padding: 12px 24px;
  border-radius: 25px;
  font-weight: 700;
  font-size: 1.3rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  backdrop-filter: blur(10px);
}

/* Enhanced Category Badge */
.course-category {
  position: absolute !important;
  top: 15px !important;
  right: 15px !important;
  z-index: 10;
}

.category-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 10px 18px !important;
  background: rgba(0, 123, 255, 0.95) !important;
  color: white !important;
  border-radius: 25px !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.category-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.category-badge i {
  font-size: 1rem !important;
}

/* Enhanced Course Content */
.course-content {
  padding: 2rem !important;
  flex-grow: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  background: #ffffff;
}

/* Enhanced Course Title */
.course-title {
  font-size: 1.4rem !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
  color: #1f2937 !important;
  margin-bottom: 1.5rem !important;
  letter-spacing: -0.02em;
  transition: all 0.3s ease;
  position: relative;
  padding-bottom: 0.75rem;
  min-height: 3.6rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #007bff, #6c757d);
  transition: width 0.4s ease;
  border-radius: 2px;
}

.upcoming-course-card:hover .course-title {
  color: #007bff !important;
  transform: translateY(-2px);
}

.upcoming-course-card:hover .course-title::after {
  width: 100%;
}

/* Enhanced Course Meta */
.course-meta {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 1rem !important;
  margin: 1.5rem 0 !important;
  font-size: 0.95rem !important;
  color: #6b7280 !important;
}

.course-meta span {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 10px 15px !important;
  background: #f8fafc !important;
  border-radius: 12px !important;
  font-weight: 500 !important;
  transition: all 0.3s ease;
  border: 1px solid #f3f4f6;
}

.course-meta span:hover {
  background: linear-gradient(135deg, #007bff, #6c757d) !important;
  color: white !important;
  transform: translateY(-2px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.course-meta i {
  color: #007bff !important;
  font-size: 1rem !important;
  transition: transform 0.3s ease;
}

.course-meta span:hover i {
  color: white !important;
  transform: scale(1.2);
}

/* Enhanced Action Button */
.course-content .btn-primary {
  background: linear-gradient(135deg, #007bff, #6c757d) !important;
  border: none !important;
  border-radius: 15px !important;
  font-weight: 600 !important;
  padding: 15px 25px !important;
  font-size: 1rem !important;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  margin-top: auto;
}

.course-content .btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.6s ease;
}

.course-content .btn-primary:hover::before {
  left: 100%;
}

.course-content .btn-primary:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
  background: linear-gradient(135deg, #0056b3, #6c757d) !important;
}

/* Enhanced Carousel */
.upcoming-courses-carousel {
  margin: 3rem 0;
  overflow: hidden;
  position: relative;
  min-height: 300px;
}

.carousel-container {
  position: relative;
  overflow: hidden;
  padding: 2rem 0;
  min-height: 250px;
}

.carousel-track {
  display: flex;
  gap: 2rem;
  animation: scroll 30s linear infinite;
  min-height: 200px;
}

.carousel-item {
  flex: 0 0 300px;
  min-width: 300px;
}

.course-carousel-card {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.4s ease;
  border: 1px solid #e5e7eb;
  min-height: 200px;
}

.course-carousel-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1);
  border-color: #007bff;
}

.course-carousel-image {
  position: relative;
  padding-top: 60%;
  overflow: hidden;
}

.course-carousel-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.course-carousel-card:hover .course-carousel-image img {
  transform: scale(1.1);
}

.course-category-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0, 123, 255, 0.9);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  backdrop-filter: blur(4px);
}

.course-category-badge i {
  margin-right: 4px;
}

.course-carousel-content {
  padding: 1.5rem;
}

.course-carousel-title {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
}

.course-carousel-title a {
  color: #1f2937;
  text-decoration: none;
  transition: color 0.3s ease;
}

.course-carousel-title a:hover {
  color: #007bff;
}

.course-carousel-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: #6b7280;
}

.course-duration {
  display: flex;
  align-items: center;
  gap: 4px;
}

.course-price {
  font-weight: 600;
  color: #059669;
  font-size: 1rem;
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Animation Classes */
.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

.slide-in-left {
  animation: slideInLeft 0.6s ease-out;
}

.slide-in-right {
  animation: slideInRight 0.6s ease-out;
}

.scale-in {
  animation: scaleIn 0.6s ease-out;
}

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

/* Hover Effects */
.course-card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.course-card-hover:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Loading States */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Search Results Styling */
.search-results-container {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.search-result-item {
  transition: all 0.3s ease;
  border-bottom: 1px solid #f3f4f6;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: #f8fafc;
  transform: translateX(5px);
}

.search-result-item a {
  color: inherit;
  text-decoration: none;
}

.search-result-item a:hover {
  color: #007bff;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .courses-section .section-title {
    font-size: 2.5rem !important;
  }
  
  .carousel-item {
    flex: 0 0 280px;
    min-width: 280px;
  }
}

@media (max-width: 768px) {
  .courses-section .section-title {
    font-size: 2rem !important;
  }
  
  .courses-section .section-subtitle {
    font-size: 1rem;
  }
  
  .category-filter {
    gap: 0.5rem;
  }
  
  .filter-btn {
    padding: 12px 20px !important;
    font-size: 0.9rem !important;
  }
  
  .course-title {
    font-size: 1.2rem !important;
    min-height: 3rem;
  }
  
  .course-meta {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }
  
  .carousel-item {
    flex: 0 0 250px;
    min-width: 250px;
  }
  
  .course-carousel-title h4 {
    font-size: 1rem;
  }
}

@media (max-width: 576px) {
  .courses-section .section-title {
    font-size: 1.75rem !important;
  }
  
  .filter-btn {
    padding: 10px 16px !important;
    font-size: 0.8rem !important;
  }
  
  .filter-btn span {
    display: none;
  }
  
  .course-content {
    padding: 1.5rem !important;
  }
  
  .course-title {
    font-size: 1.1rem !important;
  }
  
  .carousel-item {
    flex: 0 0 220px;
    min-width: 220px;
  }
}

/* Loading States */
.course-image.lazy {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.course-image.lazy.loaded {
  opacity: 1;
}

/* Accessibility */
.course-carousel-link:focus {
  outline: 3px solid #007bff;
  outline-offset: 2px;
}

.filter-btn:focus {
  outline: 3px solid #007bff;
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .upcoming-course-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
  
  .course-overlay {
    display: none !important;
  }
}

/* Dark Mode Support - Disabled for consistent light theme */ 