:root {
  --item-width: 18vw;
  --gap:       24px;
  --visible:   4;
}

.scroll-section {
    padding-bottom: 30px;
}

.gallery-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1vw;
    max-width: 100%;
}

.gallery-wrapper {
    position: relative;
    width: calc(
    var(--visible) * var(--item-width)
    + (var(--visible) - 1) * var(--gap)
  );
    overflow: hidden;
}

.other_services {
    font-size: 35px;
    font-weight: 700;
    margin: 60px 0 40px 7.5%;
}

.scroll-container {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: var(--gap);
    scroll-snap-type: x mandatory;
    scroll-padding-left: 0;
}

.scroll_item {
    flex: 0 0 var(--item-width);
    min-width: 170px;
    position: relative;
    scroll-snap-align: start;
}

.scroll_item::before {
    content: '';
    display: block;
    padding-top: 80%;
}

.scroll_item-box {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.scroll_link {
    display: block;
    position: relative;
    height: 100%;
    border-radius: 15px;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    overflow: hidden;
}

.scroll_link::before {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));
    opacity: 1;
    transition: opacity 0.1s;
}

.scroll_link:hover::before {
    opacity: 0;
}

.scroll_link span {
    display: block;
    position: absolute;
    width: 100%;
    left: 0;
    bottom: 0;
    padding: clamp(12px, 1.5vw, 20px);
    font-size: clamp(24px, 2.2vw, 32px);
    font-weight: 700;
    line-height: 1.25;
    color: #fff;
    transition-duration: 0.3s;
    text-transform: uppercase;
}

.scroll-container::-webkit-scrollbar {
    display: none;
}

.nav-button {
  background: black;
  border: none;
  color: white;
  font-size: 50px;
  padding: 10px 15px;
  cursor: pointer;
  user-select: none;
}

.nav-button:hover {
  background: rgba(0, 0, 0, 0.8);
}


@media (max-width: 1200px) {
  :root { --visible: 3;
   --item-width: 25vw;}

}
@media (max-width: 900px) {
  :root { --visible: 2;
   --item-width: 40vw;}
}

@media (max-width: 768px) {
  .nav-button {
    font-size: 30px;
    padding: 8px 12px;
  }
}

@media (max-width: 600px) {
  :root { --visible: 1;
   --item-width: 70vw;}
}