.homepage-slider {
  float: none;
  display: grid;
  grid-template-columns: minmax(300px, 4fr) minmax(0, 900px) minmax(260px, 3fr);
  align-items: center;
  max-width: 1600px;
  margin: 0 auto;
  background: #4b4b4b;
  box-shadow: 0 0 0 100vmax #4b4b4b;
  clip-path: inset(0 -100vmax);
}

.homepage-slider section.slideshow {
  display: contents;
}

.homepage-slider .widget-carousel-container {
  display: contents;
}

.hg-slider {
  display: contents;
}

.hg-text-panel {
  --hg-font-scale: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 350px;
  padding: 25px 30px;
  color: #ffffff;
  overflow: hidden;
}

.hg-sub {
  margin-bottom: 14px;
  font-family: dinpro-bold, sans-serif;
  font-size: 17px;
  line-height: 1.15;
  text-transform: uppercase;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
}

.hg-title {
  margin: 0 0 14px;
  font-family: dinpro-bold, sans-serif;
  font-size: max(24px, calc(clamp(24px, 2.375vw, 38px) * var(--hg-font-scale)));
  line-height: 1.05;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
}

.hg-description {
  margin: 0 0 18px;
  font-size: 16px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
}

.hg-description strong,
.hg-description b {
  font-family: dinpro-bold, sans-serif;
  font-weight: normal;
}

.hg-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  max-width: 100%;
  padding: 12px 22px;
  overflow: hidden;
  background-color: #00873c;
  color: #ffffff;
  text-decoration: none;
  text-transform: uppercase;
  font-family: dinpro-bold, sans-serif;
  font-size: 16px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hg-btn:hover {
  color: #ffffff;
  text-decoration: none;
}

.hg-image-area {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 900px;
  aspect-ratio: 900 / 350;
  overflow: hidden;
}

.hg-masterslider {
  margin: 0 auto;
}

.hg-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(75, 75, 75, 0.6);
  cursor: pointer;
}

.hg-arrow-prev {
  left: 10px;
  background-image: url(/images/prev.svg);
  background-repeat: no-repeat;
  background-position: center;
}

.hg-arrow-next {
  right: 10px;
  background-image: url(/images/next.svg);
  background-repeat: no-repeat;
  background-position: center;
}

.hg-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hg-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

.hg-dot.active {
  background: #ffffff;
}

@media screen and (max-width: 1200px) {
  .homepage-slider {
    grid-template-columns: minmax(280px, 360px) 1fr;
  }

  .homepage-slider .slider-news {
    grid-column: 1 / -1;
  }

  .hg-title {
    font-size: max(22px, calc(clamp(22px, 2.4vw, 29px) * var(--hg-font-scale)));
  }
}

@media screen and (max-width: 1000px) {
  .homepage-slider {
    grid-template-columns: 1fr;
  }

  .hg-image-area {
    order: 1;
  }

  .hg-text-panel {
    order: 2;
    height: auto;
    padding: 18px 20px;
  }

  .homepage-slider .slider-news {
    order: 3;
  }

  .hg-sub,
  .hg-description,
  .hg-btn {
    display: none;
  }

  .hg-title {
    margin: 0;
    font-size: var(--hg-mobile-title-size, clamp(16px, 4vw, 28px));
    line-height: 32px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
    -webkit-hyphens: none;
    -ms-hyphens: none;
  }
}
