/* 

1. Add your custom Css styles below
2. Place the this code in your template: 

 <link href="css/custom.css" rel="stylesheet">

*/

/* --------------------------------------------------------------------------
   Подсказка «это галерея / слайдер» — только на мобильных
   Точки карусели + счётчик фото в правом верхнем углу
   -------------------------------------------------------------------------- */

.gallery-slider-hint {
  display: none;
}

@media (max-width: 767.98px) {
  /* Подсказка живёт внутри фото — не выходит за его край */
  [data-lightbox="gallery"] > .grid-item:first-child .grid-image {
    position: relative;
    overflow: hidden;
  }

  .gallery-slider-hint {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    overflow: hidden;
  }

  /* Мягкая нижняя подложка под точки — не перекрывает фото */
  .gallery-slider-hint__fade {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 28%;
    background: linear-gradient(
      to top,
      rgba(20, 24, 28, 0.38) 0%,
      rgba(20, 24, 28, 0.12) 45%,
      transparent 100%
    );
  }

  /* Классические точки карусели */
  .gallery-slider-hint__dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .gallery-slider-hint__dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: background-color 200ms ease, transform 200ms ease;
  }

  .gallery-slider-hint__dot.is-active {
    background: rgba(255, 255, 255, 0.95);
    transform: scale(1.15);
  }

  /* Счётчик фото — правый верхний угол */
  .gallery-slider-hint__count {
    position: absolute;
    top: 10px;
    right: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(20, 24, 28, 0.55);
    color: #fff;
    font-family: "Roboto", sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.02em;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }

  .gallery-slider-hint__count svg {
    display: block;
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    opacity: 0.95;
  }

  .gallery-slider-hint__count-num {
    font-variant-numeric: tabular-nums;
  }

  /* Мягкий пульс активной точки */
  .gallery-slider-hint--animate .gallery-slider-hint__dot.is-active {
    animation: gallery-dot-nudge 1.8s ease-in-out 0.6s 2;
  }
}

@keyframes gallery-dot-nudge {
  0%,
  100% {
    transform: scale(1.15);
    opacity: 1;
  }
  50% {
    transform: scale(1.45);
    opacity: 0.85;
  }
}

@media (max-width: 767.98px) and (prefers-reduced-motion: reduce) {
  .gallery-slider-hint--animate .gallery-slider-hint__dot.is-active {
    animation: none;
  }
}
