/* Course Wrap */
.course-wrap {
  position: relative;
  padding: 40px 0; /* Add padding for better spacing */
  touch-action: manipulation; /* Improve touch responsiveness */
}

/* Course Container Grid */
.course-container {
  display: grid;
  gap: 20px; /* Space between cards */
  grid-template-columns: repeat(4, 1fr); /* Desktop: 4 cards per row */
  justify-content: center;
}

/* Tablets (768px - 1024px): 2 cards per row */
@media (max-width: 1199px) {
  .course-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile (<768px): 1 card per row */
@media (max-width: 768px) {
  .course-container {
    grid-template-columns: repeat(1, 1fr);
  }
}

/* Course Card Base Styles */
.course-card {
  width: 100%;
  max-width: 100%;
  opacity: 0; /* Initially hidden */
  transform: translateY(50px); /* Start below */
  transition: opacity 0.6s ease, transform 0.6s ease; /* Smooth transitions */
  touch-action: manipulation; /* Improve touch responsiveness */
}

.course-card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Styling the Course Card */
.course-card.style2 {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), 
              box-shadow 0.4s ease-out;
}

/* Hover Effects (Desktop Only) */
@media (hover: hover) and (pointer: fine) {
  .course-card.style2:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
    animation: pulse 1s infinite alternate;
  }
}

/* Pulse Animation */
@keyframes pulse {
  0% { box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); }
  50% { box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); }
  100% { box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); }
}

/* Touch-Friendly Active State (Mobile) */
.course-card.style2:active {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

/* Course Image Styling */
.course-card .course-img img {
  width: 100%;
  border-bottom: 1px solid #e0e0e0;
  display: block;
}

/* Course Info Styling */
.course-card .course-info {
  padding: 20px;
  text-align: center;
}

.course-card .course-info h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}

.course-card .course-info p {
  font-size: 14px;
  color: #6c757d;
  line-height: 1.6;
}

/* Section Title Styling */
.section-title {
  margin-bottom: 40px;
}

.section-title span {
  font-size: 16px;
  color: #007bff;
  font-weight: 500;
  display: block;
  margin-bottom: 10px;
}

.section-title h2 {
  font-size: 32px;
  font-weight: 700;
  color: #333333;
}