#services.dynamic-course-wrap {
  padding: 44px 20px 52px;
  color: #14324f;
}
#services .course-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 32px;
}
#services .course-section-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 12px;
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}
#services .course-section-kicker > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0f766e;
  box-shadow: 0 0 0 4px #e3f3ee;
}
#services .section-title {
  margin: 0;
  text-align: left;
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: 1.2;
}
#services .section-title::after { display: none; }
#services .course-section-intro {
  margin: 12px 0 0;
  color: #607486;
  font-size: 14px;
  line-height: 1.7;
  max-width: 550px;
}
#services .course-section-count {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  padding: 11px 15px;
  border: 1px solid #dce9e5;
  border-radius: 999px;
  background: #f3faf7;
  color: #0f625b;
  font-size: 12px;
  font-weight: 700;
}
#services .course-section-count > span { font-size: 18px; }
#services .course-grid {
  gap: 24px;
  overflow: visible;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 600px) and (max-width: 999px) {
  #services .course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (min-width: 1000px) {
  #services .course-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
#services .course-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 1px solid #e5eefb;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(145deg, #ffffff 65%, #f9fcff);
  box-shadow: 0 4px 18px rgba(67, 131, 189, .08);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
#services .course-card:hover {
  transform: translateY(-4px);
  border-color: #c9dfef;
  box-shadow: 0 14px 28px rgba(46, 101, 150, .12);
}
#services .card-image {
  position: relative;
  padding: 0;
  flex-shrink: 0;
  aspect-ratio: 16 / 7.5;
  border-radius: 0;
  overflow: hidden;
  background: #eef5f5;
}
#services .course-image-link { display: block; width: 100%; height: 100%; }
#services .card-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: none;
  object-fit: cover;
  transition: transform .4s ease;
}
#services .course-card:hover .card-image img { transform: scale(1.035); }
#services .course-discount-badge {
  padding: 5px 8px;
  border-radius: 7px;
  background: #ddf9e9;
  color: #17723d;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.3;
}
#services .card-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 12px 14px 14px;
}
#services .course-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 27px;
  margin-bottom: 7px;
}
#services .course-type { display: inline-flex; align-items: center; gap: 5px; max-width: 60%; color: #007b69; background: #e5f8f1; padding: 4px 8px; border-radius: 7px; font-size: 10px; font-weight: 700; line-height: 1.5; }
#services .course-icon { display: block; width: 18px; height: 18px; flex-shrink: 0; }
#services .course-type .course-icon { width: 15px; height: 15px; }
#services .rating {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #535c7a;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
#services .rating .stars { display: inline-flex; color: #ffac16; }
#services .rating .course-icon { width: 17px; height: 17px; }
#services .rating-unavailable { color: #66708b; font-weight: 500; }
#services .card-content h3 {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.3;
  color: #111a43;
  overflow-wrap: anywhere;
}
#services .card-content h3 a { color: inherit; text-decoration: none; }
#services .card-content h3 a:hover { color: #245aff; }
#services .course-description {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin: 0 0 11px;
  color: #62718a;
  font-size: 13px;
  line-height: 1.65;
}
#services .course-instructor { display: flex; align-items: center; gap: 8px; margin: -1px 0 9px; color: #737e9b; font-size: 11px; }
#services .course-instructor-role { border-left: 1px solid #d8dfea; padding-left: 9px; }
#services .course-price-row { margin-top: auto; padding: 2px 0 9px; }
#services .course-current-price { color: #007d67; font-size: 29px; font-weight: 800; letter-spacing: -.05em; }
#services .price {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  line-height: 1.2;
}
#services .price .before-price {
  margin: 0;
  color: #8490aa;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}
#services .course-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 7px;
  border: 0;
  padding: 0;
}
#services .course-card-actions > * { flex: 1; min-width: 0; }
#services .course-card-actions form { margin: 0; display: flex; }
#services .course-cta,
#services .safa-add-to-cart-form .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 41px;
  margin: 0;
  padding: 9px 6px;
  border: 1px solid #3064ff;
  border-radius: 8px;
  background: #ffffff;
  color: #245aff;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.3;
  transition: background .18s ease, border-color .18s ease;
}
#services .course-cta:hover { background: #edf3ff; border-color: #1748e5; color: #1748e5; }
#services .course-cta .course-icon { width: 19px; height: 19px; }
#services .safa-add-to-cart-form .btn { border-color: #008268; background: #008268; color: #ffffff; }
/* Preserve the cart icon when the existing AJAX handler replaces button text. */
#services .safa-add-to-cart-form .btn::before {
  content: '';
  display: block;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 3h3l3 13h11l3-10H6'/%3E%3Ccircle cx='10' cy='21' r='1'/%3E%3Ccircle cx='18' cy='21' r='1'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 3h3l3 13h11l3-10H6'/%3E%3Ccircle cx='10' cy='21' r='1'/%3E%3Ccircle cx='18' cy='21' r='1'/%3E%3C/svg%3E") center / contain no-repeat;
}
#services .safa-add-to-cart-form .btn:hover { background: #006e58; border-color: #006e58; }
#services .safa-add-to-cart-form .btn:disabled {
  background: #e6f7ee;
  border-color: #cbe9db;
  color: #24744f;
  opacity: 1;
}
#services :is(a, button):focus-visible { outline: 3px solid #326dff; outline-offset: 3px; }
@media (max-width: 599px) {
  #services.dynamic-course-wrap { padding: 38px 18px 48px; }
  #services .course-section-heading { align-items: flex-start; flex-direction: column; gap: 17px; margin-bottom: 25px; }
  #services .course-grid { gap: 20px; }
  #services .card-content { padding: 12px 13px 13px; }
  #services .card-content h3 { font-size: 19px; }
  #services .course-cta, #services .safa-add-to-cart-form .btn { min-height: 44px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  #services .course-card, #services .card-image img { transition: none; }
  #services .course-card:hover, #services .course-card:hover .card-image img { transform: none; }
}
