/*
 * Giovamos — slider pagina Acasă
 * Markup-ul este generat de features/home/home-slider.php.
 */

.gio-home-slider {
  position: relative;
  /* Latime completa a ecranului, peste containerul temei; inaltimea urmeaza
     proportia imaginilor (1600 x 650), deci imaginea se vede intreaga. */
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  aspect-ratio: 1600 / 650;
  overflow: hidden;
  color: #fff;
  background: #0a202c;
  isolation: isolate;
}

/* 100vw include bara de scroll: fara asta apare scroll orizontal. */
body:has(.gio-home-slider) { overflow-x: clip; }

.gio-home-slider__track,
.gio-home-slider__slide,
.gio-home-slider__link {
  position: absolute;
  inset: 0;
}

.gio-home-slider__slide {
  visibility: hidden;
  opacity: 0;
  transition: opacity .65s ease, visibility .65s ease;
}

.gio-home-slider__slide.is-active {
  z-index: 1;
  visibility: visible;
  opacity: 1;
}

.gio-home-slider__link {
  display: block;
  overflow: hidden;
  color: #fff !important;
  text-decoration: none !important;
}

.gio-home-slider__link img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  display: block;
  margin: 0 !important;
  object-fit: cover !important;
  transition: transform .8s ease;
}

.gio-home-slider__image--top { object-position: center top !important; }
.gio-home-slider__image--middle { object-position: center center !important; }
.gio-home-slider__image--bottom { object-position: center bottom !important; }

.gio-home-slider__link:hover img { transform: scale(1.025); }

.gio-home-slider__shade {
  position: absolute;
  inset: 0;
  display: block;
  background:
    linear-gradient(90deg, rgba(5, 22, 31, .72) 0%, rgba(5, 22, 31, .45) 40%, rgba(5, 22, 31, .05) 76%),
    linear-gradient(0deg, rgba(5, 22, 31, .3), transparent 48%);
}

.gio-home-slider__content {
  position: absolute;
  z-index: 1;
  bottom: clamp(70px, 8vw, 102px);
  left: clamp(26px, 5.5vw, 76px);
  width: min(610px, calc(100% - 52px));
  display: flex;
  align-items: flex-start;
  flex-direction: column;
}

.gio-home-slider__content small {
  margin-bottom: 16px;
  color: #1e73be;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.gio-home-slider__content strong {
  max-width: 600px;
  color: #fff;
  font-family: var(--wd-title-font, "Mulish", Arial, sans-serif);
  font-size: clamp(34px, 4.7vw, 66px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -.02em;
}

.gio-home-slider__text {
  max-width: 540px;
  margin-top: 18px;
  color: rgba(255, 255, 255, .76);
  font-size: clamp(14px, 1.25vw, 17px);
  line-height: 1.55;
}

.gio-home-slider__cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 25px;
  padding-bottom: 7px;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .55);
  font-size: 13px;
  font-weight: 750;
}

.gio-home-slider__cta svg,
.gio-home-slider__arrow svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gio-home-slider__arrow svg {
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
}

.gio-home-slider__navigation {
  position: absolute;
  z-index: 3;
  right: clamp(18px, 3vw, 34px);
  bottom: clamp(18px, 3vw, 30px);
  display: flex;
  gap: 8px;
}

.gio-home-slider__arrow {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #fff;
  background: rgba(10, 32, 44, .65);
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 50%;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: color .25s ease, background .25s ease, transform .25s ease;
}

.gio-home-slider__arrow:hover {
  color: #0a202c;
  background: #fff;
  transform: translateY(-2px);
}

.gio-home-slider__play-icon { display: none; }
.gio-home-slider__toggle.is-paused .gio-home-slider__pause-icon { display: none; }
.gio-home-slider__toggle.is-paused .gio-home-slider__play-icon { display: block; }
.gio-home-slider__arrow[hidden] { display: none !important; }

.gio-home-slider__dots {
  position: absolute;
  z-index: 3;
  bottom: clamp(24px, 3vw, 36px);
  left: clamp(22px, 5.5vw, 76px);
  display: flex;
  align-items: center;
  gap: 7px;
}

.gio-home-slider__dots button {
  width: 34px;
  height: 20px;
  display: grid;
  place-items: center;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.gio-home-slider__dots button span {
  width: 100%;
  height: 3px;
  display: block;
  background: rgba(255, 255, 255, .38);
  border-radius: 99px;
  transition: background .25s ease, transform .25s ease;
}

.gio-home-slider__dots button[aria-current="true"] span {
  background: #1e73be;
  transform: scaleY(1.5);
}

.gio-home-slider__link:focus-visible,
.gio-home-slider button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: -5px;
}

.gio-home-slider .screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 600px) {

  .gio-home-slider__shade {
    background: linear-gradient(0deg, rgba(5, 22, 31, .82) 0%, rgba(5, 22, 31, .32) 65%, rgba(5, 22, 31, 0) 100%);
  }

  .gio-home-slider__content {
    right: 22px;
    bottom: 84px;
    left: 22px;
    width: auto;
  }

  /* Mobil: doar imaginea, fara text, umbra sau butoane de navigare. */
  .gio-home-slider__content,
  .gio-home-slider__shade,
  .gio-home-slider__navigation { display: none !important; }

  /* Slide doar imagine (ex. Black Friday): pe mobil se vede intreg, nu decupat. */
  .gio-home-slider__slide--image .gio-home-slider__link img { object-fit: contain !important; }

  /* Doar slide-uri imagine: inaltimea urmeaza imaginea, fara fundal albastru in jur. */
  .gio-home-slider:not(:has(.gio-home-slider__slide:not(.gio-home-slider__slide--image))) {
    height: auto;
    background: transparent;
  }

  .gio-home-slider:not(:has(.gio-home-slider__slide:not(.gio-home-slider__slide--image))) :is(.gio-home-slider__track, .is-active, .is-active .gio-home-slider__link) {
    position: relative;
  }

  .gio-home-slider:not(:has(.gio-home-slider__slide:not(.gio-home-slider__slide--image))) .gio-home-slider__link img {
    position: static;
    display: block;
    width: 100%;
    height: auto;
  }

  .gio-home-slider__content small { margin-bottom: 11px; }
  .gio-home-slider__content strong { font-size: clamp(31px, 10vw, 43px); }

  .gio-home-slider__text {
    margin-top: 12px;
    font-size: 14px;
  }

  .gio-home-slider__cta { margin-top: 18px; }

  .gio-home-slider__dots {
    bottom: 28px;
    left: 17px;
  }

  .gio-home-slider__navigation {
    right: 16px;
    bottom: 16px;
  }

  .gio-home-slider__arrow {
    width: 48px;
    height: 48px;
  }

  .gio-home-slider__arrow svg {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gio-home-slider__slide,
  .gio-home-slider__link img,
  .gio-home-slider__arrow,
  .gio-home-slider__dots button span {
    transition: none;
  }

  .gio-home-slider__link:hover img,
  .gio-home-slider__arrow:hover {
    transform: none;
  }
}
