#section-8 {
  display: flex;
  flex-direction: row;
  padding: 28px;
}

.sec8-con {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.sec8-text-con {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.sec8-text-con h2 {
  color: var(--teritary-col);
  padding: 5px;
}

.sec8-text-con p {
  padding: 5px;
  font-size: small;
}

.stilt-amenities-con {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  padding: 2.5px;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  gap: 12px;
  overflow: visible;
}

.stilt-amenities {
  display: flex;
  flex-direction: column;
  height: 100px;
  width: 150px;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: x-small;
  border-radius: 8px;
  gap: 5px;
}

.stilt-amenities img {
  height: 75px;
  width: 75px;
  padding: 10px;
  background: var(--secondary-col);
  border-radius: 8px;
}

.stilt-amenities span {
  width: 100%;
}

@media (max-width: 1200px) {
  #section-8,
  .sec8-con {
    flex-direction: column;
    padding: 18px;
  }
  .stilt-amenities-con {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap; /* keep on one line to enable horizontal scroll */
    gap: 12px;
    padding: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scroll-padding: 16px;
    box-sizing: border-box;
  }

  .stilt-amenities-con::before,
  .stilt-amenities-con::after {
    content: "";
    flex: 0 0 12px; /* side padding so first/last center */
  }

  .stilt-amenities {
    flex: 0 0 40%; /* ~2.5 cards across on larger tablets/near-desktop */
    min-width: 220px;
    max-width: 42%;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    box-sizing: border-box;
    margin: 0;
    padding: 10px;
    height: auto;
  }

  .stilt-amenities img {
    height: 60px;
    width: 60px;
    object-fit: contain;
  }

  /* light scrollbar */
  .stilt-amenities-con::-webkit-scrollbar {
    height: 8px;
  }
  .stilt-amenities-con::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.12);
    border-radius: 999px;
  }
}

@media (max-width: 900px) {
  #section-8,
  .sec8-con {
    flex-direction: column;
    padding: 18px;
  }
  .stilt-amenities-con {
    gap: 12px;
    padding: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .stilt-amenities {
    flex: 0 0 20%; /* two cards visible */
    min-width: 100px;
    max-width: 20%;
    scroll-snap-align: center;
  }

  .stilt-amenities img {
    height: 60px;
    width: 60px;
  }
}

@media (max-width: 520px) {
  .stilt-amenities-con {
    gap: 12px;
    padding: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .stilt-amenities {
    flex: 0 0 20%; /* single-card focus on phones */
    min-width: 80px;
    max-width: 20%;
    scroll-snap-align: center;
    padding: 10px;
  }

  .stilt-amenities img {
    height: 50px;
    width: 50px;
  }
}

@media (max-width: 375px) {
  .stilt-amenities {
    flex: 0 0 82%;
    min-width: 150px;
  }
  .stilt-amenities img {
    height: 44px;
    width: 44px;
  }
}
