/* ============================================================
   Section / Module Heading
   ============================================================ */
.dato-featured-slider.sp-module {
  position: relative;
}

.dato-featured-slider .sp-module-title {
  font-size: 30px;
  font-weight: 700;
  color: #212121;
  margin-bottom: 30px;
  line-height: 1.2;
  /* Keep clear of the absolutely positioned nav arrows on the right */
  padding-right: 110px;
}

/* Title underline accent — a thin colored line below the heading */
.dato-featured-slider .sp-module-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: #2759b5;
  margin-top: 12px;
}

/* ============================================================
   Slider Container — wraps the <ul> so arrows can be positioned
   ============================================================ */
.dato-slider-wrapper {
  position: relative;
  overflow: hidden;
  /* Small inset so the cards' 1px border/shadow is not clipped by
     overflow:hidden (sub-pixel rounding cropped the bottom border). */
  padding: 2px 2px 6px;
  margin: -2px -2px -6px;
}

.dato-slider-wrapper .mod-articles-items {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  list-style: none;
  padding: 0;
  margin: 0;
  transition: transform 0.4s ease;
  will-change: transform;
}

/* Remove the static grid classes so carousel takes over */
.dato-slider-wrapper .mod-articles-items.grid-cols-3 {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 0 !important;
  --bs-gutter-x: 0 !important;
}

/* ============================================================
   Individual Slide / Card
   ============================================================ */
.dato-slider-wrapper .mod-articles-items > li {
  flex: 0 0 calc(33.333% - 20px);
  max-width: calc(33.333% - 20px);
  margin-right: 30px;
  box-sizing: border-box;
  display: flex;
}

.dato-slider-wrapper .mod-articles-item {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  width: 100%;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s ease;
}

.dato-slider-wrapper .mod-articles-item:hover {
  border-color: #2759b5;
}

/* — Card inner content — */
.dato-slider-wrapper .mod-articles-item-content {
  padding: 20px 25px 28px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 220px;
  color: #252525;
}

/* ============================================================
   Title
   ============================================================ */
.dato-slider-wrapper .mod-articles-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 10px;
  order: 2;
}

.dato-slider-wrapper .mod-articles-title a.mod-articles-link {
  color: #212121;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dato-slider-wrapper .mod-articles-title a.mod-articles-link:hover {
  color: #2759b5;
}

/* ============================================================
   Date
   ============================================================ */
.dato-slider-wrapper .mod-articles-date {
  font-size: 12px;
  color: #888;
  margin-bottom: 10px;
  order: 1;
}

.dato-slider-wrapper .mod-articles-date .icon-calendar {
  margin-right: 5px;
  font-size: 12px;
}

.dato-slider-wrapper .mod-articles-item-content dl.list-unstyled {
  margin: 0 0 10px;
  order: 1;
}

.dato-slider-wrapper .mod-articles-item-content dl.list-unstyled dt {
  display: none;  /* hide the "Details" visually-hidden already does this */
}

/* ============================================================
   Intro text (first <p>)
   ============================================================ */
.dato-slider-wrapper .mod-articles-item-content > p {
  font-size: 14px;
  line-height: 1.55;
  color: #666;
  margin: 0 0 14px;
  order: 3;
  flex-grow: 1;

  /* Truncate to ~3 lines */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   "Read more" link — rendered by the template override (JS fallback)
   ============================================================ */
.dato-slider-wrapper .dato-readmore {
  display: inline-block;
  align-self: flex-start;
  order: 4;
  background: #2759b5;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 25px;
  border-radius: 30px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.25s ease;
  margin-top: auto;
}

.dato-slider-wrapper .dato-readmore:hover {
  background: #1a3f7a;
  color: #fff;
  text-decoration: none;
}

/* ============================================================
   Navigation Arrows
   Positioned inside the module, vertically centred on the module
   title's text line (30px font x 1.2 line-height = 36px).
   ============================================================ */
.dato-slider-nav {
  position: absolute;
  top: 4rem;
  right: 15px;
  display: flex;
  gap: 8px;
  z-index: 10;
}

.dato-slider-nav button {
  width: 38px;
  height: 38px;
  border: none;
  background: #2759b5;
  color: #fff;
  font-size: 18px;
  line-height: 38px;
  text-align: center;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.25s ease, opacity 0.25s ease;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dato-slider-nav button:hover {
  background: #1a3f7a;
}

.dato-slider-nav button:disabled {
  background: #b0b0b0;
  cursor: not-allowed;
  opacity: 0.55;
}

/* Arrow SVG icons inline */
.dato-slider-nav button svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 992px) {
  .dato-slider-wrapper .mod-articles-items > li {
    flex: 0 0 calc(50% - 15px);
    max-width: calc(50% - 15px);
    margin-right: 30px;
  }
}

@media (max-width: 768px) {
  .dato-slider-wrapper .mod-articles-items > li {
    flex: 0 0 100%;
    max-width: 100%;
    margin-right: 0;
  }

  /* Smaller title (22px x 1.2 = 26.4px line) — nudge arrows to match */
  .dato-slider-nav {
    top: 4rem;
    right: 15px;
  }

  .dato-slider-nav button {
    width: 34px;
    height: 34px;
  }

  .dato-featured-slider .sp-module-title {
    font-size: 22px;
  }
}
