/* Courses Carousel - astra-child/assets/css/courses-carousel.css */

.dcs-wrap {
  position: relative;
  background: #fff;
  border-radius: 24px;
  padding: 28px 28px 22px;
  box-shadow: 0 10px 40px rgba(99, 102, 241, 0.12);
  border: 1px solid #eceefd;
  max-width: 1200px;
  margin: 30px auto;
  box-sizing: border-box;
}
.dcs-wrap * {
  box-sizing: border-box;
}
.dcs-heading {
  font-size: 22px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 18px;
  line-height: 1.3;
}
.dcs-viewport {
  position: relative;
}

.dcs-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px 2px 10px;
}
.dcs-track::-webkit-scrollbar {
  display: none;
}

.dcs-card {
  flex: 0 0 calc((100% - 48px) / 4);
  scroll-snap-align: start;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 18px rgba(17, 24, 39, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}
.dcs-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.14);
}

.dcs-img {
  display: block;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #f1f2f7;
}
.dcs-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  margin: 0;
}

.dcs-body {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dcs-tag {
    align-self: flex-start;
    background: #59ba48;
    color: #ffffff;
    border: 1px solid #ffffff;
    border-radius: 999px;
    padding: 3px 12px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    text-decoration: none !important;
}
.dcs-title {
  margin: 0;
  font-size: 18px !important;
  line-height: 1.3;
  font-weight: 700;
}
.dcs-title a {
  color: #111827;
  text-decoration: none !important;
}
.dcs-title a:hover {
  color: #4f46e5;
}
.dcs-excerpt {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #6b7280;
}

/* Course ka button */
.dcs-cta {
  align-self: flex-start;
  margin-top: auto;
  display: inline-block;
  background: #4f46e5;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  padding: 11px 20px;
  border-radius: 999px;
  text-decoration: none;
  transition:
    background 0.2s,
    transform 0.2s;
}
.dcs-cta:hover {
  background: #2b2f8f;
  color: #fff;
  transform: translateY(-1px);
}
.dcs-body .dcs-excerpt {
  margin-bottom: 6px;
}
.dcs-body {
  flex: 1;
}

/* Arrows */
.dcs-btn {
  position: absolute;
  top: 38%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: #2b2f8f;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  padding: 0;
  transition: transform 0.2s;
}
.dcs-btn:hover {
  transform: translateY(-50%) scale(1.08);
  background: #fff;
}
.dcs-btn svg {
  width: 20px;
  height: 20px;
}
.dcs-prev {
  left: -22px;
}
.dcs-next {
  right: -22px;
}

/* Dots */
.dcs-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}
.dcs-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #d9dcfb;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.25s;
}
.dcs-dot.active {
  background: #2b2f8f;
  transform: scale(1.25);
}

/* Tablet */
@media (max-width: 1024px) {
  .dcs-card {
    flex-basis: calc((100% - 16px) / 2);
  }
}

/* Mobile */
@media (max-width: 600px) {
  .dcs-wrap {
    padding: 20px 14px 16px;
    border-radius: 18px;
  }
  .dcs-card {
    flex-basis: 82%;
  }
  .dcs-prev {
    left: -8px;
  }
  .dcs-next {
    right: -8px;
  }
  .dcs-btn {
    width: 38px;
    height: 38px;
  }
}
