/**
 * Slider de portada - Progesa Informática S.L.
 *
 * Carousel with CSS scroll-snap; front.js only adds autoplay, arrows and dots.
 */
.pgsi-hs {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #eee;
}
.pgsi-hs__track {
  display: flex;
  align-items: flex-start;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.pgsi-hs__track::-webkit-scrollbar {
  display: none;
}
.pgsi-hs--single .pgsi-hs__track {
  overflow-x: hidden;
}
.pgsi-hs__slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.pgsi-hs__link {
  position: relative;
  display: block;
  color: inherit;
  text-decoration: none;
}
.pgsi-hs__link:hover,
.pgsi-hs__link:focus {
  text-decoration: none;
}
.pgsi-hs picture {
  display: block;
}
.pgsi-hs__img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
}

/* Full screen mode: the slider fills the viewport (or its container, if that has a fixed lower height)
   and the image is cropped to cover it */
.pgsi-hs--screen {
  height: 100vh;
  max-height: 100%;
}
.pgsi-hs--screen .pgsi-hs__track,
.pgsi-hs--screen .pgsi-hs__slide,
.pgsi-hs--screen .pgsi-hs__link,
.pgsi-hs--screen picture {
  height: 100%;
}
.pgsi-hs--screen .pgsi-hs__img {
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.pgsi-hs--screen .pgsi-hs__slide::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .3) 0%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, .45) 100%);
}

/* Caption over the image */
.pgsi-hs__caption {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 0 6vw 12vh;
  text-align: center;
  color: #fff;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .35);
}
.pgsi-hs--ratio .pgsi-hs__caption {
  padding-bottom: 8%;
  background: linear-gradient(to top, rgba(0, 0, 0, .45) 0%, rgba(0, 0, 0, 0) 55%);
}
.pgsi-hs__title {
  display: block;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: clamp(26px, 4.5vw, 64px);
  line-height: 1.05;
}
.pgsi-hs__text {
  display: block;
  max-width: 46em;
  margin-top: 12px;
  font-size: clamp(14px, 1.4vw, 19px);
  line-height: 1.4;
}
.pgsi-hs__button {
  display: inline-block;
  margin-top: 24px;
  padding: 12px 36px;
  border: 1.5px solid #fff;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .18em;
  text-shadow: none;
  transition: background .25s ease, color .25s ease;
}
.pgsi-hs__link:hover .pgsi-hs__button {
  background: #fff;
  color: #1a1a1a;
}

/* Controls */
.pgsi-hs__arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .35);
  cursor: pointer;
  transition: background .2s ease;
}
.pgsi-hs__arrow:hover,
.pgsi-hs__arrow:focus-visible {
  background: rgba(0, 0, 0, .6);
}
.pgsi-hs__arrow::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
}
.pgsi-hs__arrow--prev {
  left: clamp(12px, 3vw, 48px);
}
.pgsi-hs__arrow--prev::before {
  transform: translate(-30%, -50%) rotate(-135deg);
}
.pgsi-hs__arrow--next {
  right: clamp(12px, 3vw, 48px);
}
.pgsi-hs__arrow--next::before {
  transform: translate(-70%, -50%) rotate(45deg);
}
.pgsi-hs__dots {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 4px;
}
/* Full screen heros usually have a scroll-down button at the bottom centre */
.pgsi-hs--screen .pgsi-hs__dots {
  left: auto;
  right: clamp(12px, 3vw, 48px);
  bottom: 16px;
}
.pgsi-hs__dot {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.pgsi-hs__dot::before {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  margin: 7px;
  border: 1px solid #fff;
  border-radius: 50%;
  background: rgba(255, 255, 255, .35);
  box-shadow: 0 0 3px rgba(0, 0, 0, .4);
}
.pgsi-hs__dot[aria-selected="true"]::before {
  background: #fff;
}
.pgsi-hs--single .pgsi-hs__arrow,
.pgsi-hs--single .pgsi-hs__dots {
  display: none;
}
@media (max-width: 767px) {
  .pgsi-hs__arrow {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pgsi-hs__track {
    scroll-behavior: auto;
  }
}
