/* Training Section Redesign */

/* Main container */
.training-section {
  position: relative;
  overflow: hidden;
  background-image: 
    radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 25%),
    radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 25%);
}

.training-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(180deg, rgba(243, 244, 246, 0.8) 0%, rgba(243, 244, 246, 0) 100%);
  z-index: 1;
}

.training-section .relative.z-10 {
  z-index: 2;
}

/* Training modules container */
.training-modules-container {
  position: relative;
  margin: 0 -20px;
  padding: 20px;
}

/* Horizontal scrolling container */
.training-modules-scroll-container {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 20px 10px 40px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.training-modules-scroll-container::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* Training card */
.training-card {
  flex: 0 0 300px;
  position: relative;
  border-radius: 16px;
  background-color: white;
  box-shadow: 
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
  transform: translateY(0);
}

.training-card:hover {
  transform: translateY(-12px);
  box-shadow: 
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.training-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Training cover */
.training-cover {
  position: relative;
  height: 220px;
  overflow: hidden;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

.training-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.training-card:hover .training-cover img {
  transform: scale(1.08);
}

.training-cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, 
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.2) 100%);
  z-index: 1;
}

/* Training badge */
.training-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  background-color: rgba(59, 130, 246, 0.9);
  color: white;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transform: translateY(0);
  transition: transform 0.3s ease;
}

.training-card:hover .training-badge {
  transform: translateY(-3px);
}

/* Training content */
.training-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.training-content h3 {
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 8px;
  line-height: 1.3;
}

.training-content p {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 16px;
  line-height: 1.5;
}

/* Training metadata */
.training-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 12px;
  color: #6b7280;
}

.training-meta span {
  display: flex;
  align-items: center;
}

.training-meta i {
  margin-right: 4px;
  color: #3b82f6;
}

/* Training actions */
.training-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.training-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
}

.training-btn i {
  margin-right: 6px;
  font-size: 14px;
}

.training-btn.view {
  background-color: #f3f4f6;
  color: #4b5563;
  border: 1px solid #e5e7eb;
}

.training-btn.download {
  background-color: #3b82f6;
  color: white;
  border: none;
}

.training-btn:hover {
  transform: translateY(-2px);
}

.training-btn.view:hover {
  background-color: #e5e7eb;
}

.training-btn.download:hover {
  background-color: #2563eb;
}

/* Navigation arrows */
.training-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: white;
  color: #4b5563;
  border: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.training-nav-arrow:hover {
  background-color: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.training-nav-arrow.prev {
  left: 10px;
}

.training-nav-arrow.next {
  right: 10px;
}

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

.training-card {
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
}

.training-card:nth-child(1) { animation-delay: 0.1s; }
.training-card:nth-child(2) { animation-delay: 0.2s; }
.training-card:nth-child(3) { animation-delay: 0.3s; }
.training-card:nth-child(4) { animation-delay: 0.4s; }

/* Responsive adjustments */
@media (max-width: 768px) {
  .training-modules-container {
    margin: 0 -15px;
    padding: 15px;
  }
  
  .training-modules-scroll-container {
    padding: 15px 5px 30px;
    gap: 16px;
  }
  
  .training-card {
    flex-basis: 260px;
  }
  
  .training-cover {
    height: 180px;
  }
  
  .training-content {
    padding: 15px;
  }
  
  .training-content h3 {
    font-size: 16px;
  }
  
  .training-content p {
    font-size: 13px;
    margin-bottom: 12px;
  }
  
  .training-meta {
    margin-bottom: 12px;
  }
  
  .training-btn {
    padding: 8px;
    font-size: 13px;
  }
  
  .training-nav-arrow {
    width: 35px;
    height: 35px;
  }
  
  .training-nav-arrow.prev {
    left: 5px;
  }
  
  .training-nav-arrow.next {
    right: 5px;
  }
}

/* Disable hover effects on touch devices */
@media (hover: none) {
  .training-card:hover {
    transform: translateY(0);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  }
  .training-card:hover .training-cover img {
    transform: scale(1);
  }
  .training-btn:hover {
    transform: translateY(0);
  }
} 