/* Section */
.training-section {
  background: linear-gradient(180deg, #ffffff 0%, #f4f9fb 100%);
  padding: 20px 20px;
}

/* Container */
.container {
  max-width: 1150px;
  margin: auto;
}

/* Updated section-header to add line and layout */
.section-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px; /* spacing before grid */
  position: relative;
  padding-left: 30px; /* space for vertical line */
  flex-wrap: wrap; 
}

/* Vertical line via a pseudo-element to avoid extra markup */
.section-header::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 6px;
  height: 60px;
  background: linear-gradient(180deg, #e44213, #e26949);
  border-radius: 3px;
  box-shadow: 0 0 15px rgba(0, 163, 211, 0.4);
}

/* Header text styling */
.section-header h2 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #000;
  margin: 0;
  white-space: normal;
}

/* Highlighted span in h2 */
.section-header h2 span {
  color: #e44213;
  font-weight: 900;
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 28px;
}

/* Card */
.card {
  position: relative;
  display: block;
  border-radius: 18px;
  overflow: hidden;
  height: 190px;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  transition: all 0.35s ease;
}

/* Image */
.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

/* Overlay (Cleaner + Premium) */
/* .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.75),
    rgba(0, 0, 0, 0.15)
  );
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 18px;
} */

.overlay {
  position: absolute;
  inset: 0; /* covers the whole card */
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.35) 40%, /* bottom darker for readability */
    rgba(0, 0, 0, 0.0) 100%  /* top transparent */
  );
  display: flex;
  justify-content: space-between;
  align-items: flex-end; /* text at bottom */
  padding: 0 18px 18px 18px; /* bottom padding for text */
  border-radius: 18px;
}

/* Optional glass effect at bottom only */
.overlay::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 60px; /* height of glass panel */
  background: rgba(0, 0, 0, 0.25); /* semi-transparent black */
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 18px;
  z-index: 0; /* behind text */
}

/* Text and arrow */
.overlay h3 {
  position: relative;
  z-index: 1; /* ensure text sits above glass panel */
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.arrow {
  font-size: 14px;
  transition: transform 0.3s ease;
}

.card:hover .arrow {
  transform: translateX(5px);
}

/* Hover Effects */
.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.18);
}

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

.card:hover .arrow {
  opacity: 1;
  transform: translateX(0);
}

.cta {
  margin-top: 70px;
  text-align: left;
}

.cta .cta-button {
  background: #e44213;
  color: #000;
  padding: 16px 32px;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 25px rgba(0,163,211,0.3);
  transition: all 0.3s ease;
}

.cta .cta-button:hover {
  background: #e26949;
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(140,195,19,0.35);
}

.cta .cta-button i {
  transition: transform 0.3s ease;
}

.cta .cta-button:hover i {
  transform: translateX(5px);
}

@media (max-width: 768px) {
  .section-header {
    padding-left: 20px; /* reduce left space for line */
  }

  .section-header::before {
    height: 50px; /* shorter line for mobile */
  }

  .section-header h2 {
    font-size: 32px; /* smaller font */
  }
}

@media (max-width: 480px) {
  .section-header h2 {
    font-size: 24px; /* very small screens */
  }
}