/* =============================================
   SERVICE TILES SLIDER MODULE
   ============================================= */

.service-tiles {
  position: relative;
}

.service-tiles__track {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0.5rem 0 1rem;
}

.service-tiles__track::-webkit-scrollbar {
  display: none;
}

/* Single tile */
.tile {
  flex: 0 0 calc(20% - 1rem);
  min-width: 200px;
  scroll-snap-align: start;
  background: var(--bg-primary);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  padding: 2rem 1.5rem;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  border: 2px solid transparent;
}

.tile:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--copper);
  color: inherit;
}

.tile__icon {
  width: 56px;
  height: 56px;
  background: var(--green-pale);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
}

.tile:hover .tile__icon {
  background: var(--green-dark);
}

.tile__icon svg {
  width: 26px;
  height: 26px;
  stroke: var(--green-dark);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke var(--transition-base);
}

.tile:hover .tile__icon svg {
  stroke: #fff;
}

.tile__title {
  font-size: var(--font-size-base);
  font-weight: 700;
  color: var(--green-dark);
}

.tile__desc {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: 1.5;
  flex-grow: 1;
}

.tile__arrow {
  color: var(--copper);
  font-size: var(--font-size-sm);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  opacity: 0;
  transform: translateY(4px);
  transition: all var(--transition-base);
}

.tile:hover .tile__arrow {
  opacity: 1;
  transform: translateY(0);
}

/* Slider Navigation Arrows */
.service-tiles__nav {
  display: none;
}

.service-tiles__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-primary);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
}

.service-tiles__btn:hover {
  box-shadow: var(--shadow-lg);
  background: var(--green-dark);
}

.service-tiles__btn:hover svg {
  stroke: #fff;
}

.service-tiles__btn svg {
  width: 18px;
  height: 18px;
  stroke: var(--green-dark);
  fill: none;
  stroke-width: 2.5;
}

.service-tiles__btn--prev {
  left: -16px;
}

.service-tiles__btn--next {
  right: -16px;
}

/* === DESKTOP: Alle 5 sichtbar, keine Slider-Nav === */
@media (min-width: 1200px) {
  .service-tiles__track {
    overflow: visible;
    scroll-snap-type: none;
  }

  .tile {
    flex: 1 1 0;
    min-width: 0;
  }

  .service-tiles__nav {
    display: none !important;
  }
}

/* === TABLET: 3 sichtbar, Slider === */
@media (min-width: 768px) and (max-width: 1199px) {
  .tile {
    flex: 0 0 calc(33.333% - 1rem);
  }

  .service-tiles__nav {
    display: block;
  }
}

/* === MOBILE: 2 sichtbar, Slider === */
@media (max-width: 767px) {
  .tile {
    flex: 0 0 calc(50% - 0.625rem);
    padding: 1.5rem 1rem;
  }

  .service-tiles__nav {
    display: block;
  }

  .service-tiles__btn {
    width: 36px;
    height: 36px;
  }

  .service-tiles__btn--prev {
    left: -8px;
  }

  .service-tiles__btn--next {
    right: -8px;
  }

  .tile__desc {
    font-size: var(--font-size-xs);
  }

  .tile__arrow {
    opacity: 1;
    transform: translateY(0);
  }
}
