/* Home customer services — mobile-first, adapted from template services.css */

.customer-services {
  --service-reveal-time: 850ms;
  --service-start-scale: 1.04;
  --service-text-offset: 10px;
  padding: 0 20px 56px;
  background: none;
  color: #1c1c1c;
  scroll-margin-top: 100px;
}


.services-slider {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.services-slider::-webkit-scrollbar {
  display: none;
}

.services-page {
  flex: 0 0 100%;
  min-width: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.service-card {
  position: relative;
  display: block;
  height: 240px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #e7e7e3;
  color: #fff;
  text-decoration: none;
  isolation: isolate;
}

.service-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.12) 48%, transparent 75%);
  opacity: 0.8;
  pointer-events: none;
  transition: opacity 450ms ease;
}

.service-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 450ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.service-ikonic {
  background: radial-gradient(ellipse at 80% 60%, #fa2545, #ad001e 60%, #58000c);
}

.service-ikonic img {
  object-fit: cover;
  padding: 0;
}

.service-card h3 {
  position: absolute;
  z-index: 2;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0;
  padding: 16px 40px 16px 16px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  text-transform: uppercase;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.2);
}

.service-card h3 small {
  display: block;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 400;
  text-transform: none;
}

.service-card h3 small svg {
  display: inline-block;
  vertical-align: -1px;
  margin-left: 4px;
}

.service-hover-arrow {
  position: absolute;
  right: 14px;
  bottom: 16px;
  z-index: 3;
  opacity: 1;
  pointer-events: none;
}

.service-card:focus-visible {
  outline: 3px solid #319b42;
  outline-offset: 4px;
}

.services-controls {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

.services-count {
  margin-right: 8px;
  color: #6c696a;
  font-size: 12px;
}

.services-controls button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #231f20;
  border-radius: 50%;
  background: #fff;
  color: #1c1c1c;
  cursor: pointer;
  transition: opacity 0.25s;
}

.services-controls button:hover {
  opacity: 0.6;
}

.services-controls button:disabled {
  opacity: 0.25;
  cursor: default;
}

.services-controls button:focus-visible {
  outline: 2px solid #319b42;
  outline-offset: 4px;
}

@media (min-width: 576px) {
  .services-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 240px 180px 240px;
    height: auto;
  }

  .services-page > .service-position-1 {
    grid-column: 1 / 3;
    grid-row: 1;
  }

  .services-page > .service-position-2 {
    grid-column: 1;
    grid-row: 2;
  }

  .services-page > .service-position-3 {
    grid-column: 2;
    grid-row: 2;
  }

  .services-page > .service-position-4 {
    grid-column: 1 / 3;
    grid-row: 3;
  }

  .service-card {
    height: auto;
  }
}

@media (min-width: 768px) {
  .customer-services {
    --service-reveal-time: 700ms;
    --service-start-scale: 1.06;
    padding: 12px 40px 72px;
  }

  .services-grid {
    grid-template-rows: 260px 180px 280px;
    gap: 14px;
  }

  .service-card h3 {
    padding: 18px 48px 18px 18px;
    font-size: clamp(14px, 1.35vw, 22px);
  }

  .service-hover-arrow {
    right: 18px;
    bottom: 20px;
    opacity: 0;
    transform: translate(-4px, 4px);
    transition: opacity 350ms ease, transform 450ms ease;
  }
}

@media (min-width: 992px) {
  .customer-services {
    padding: 12px 56px 88px;
  }

  .services-slider {
    gap: 24px;
  }

  .services-grid {
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    height: clamp(360px, 32vw, 560px);
  }

  .services-page > .service-position-1 {
    grid-column: 1;
    grid-row: 1 / 3;
  }

  .services-page > .service-position-2 {
    grid-column: 2;
    grid-row: 1;
  }

  .services-page > .service-position-3 {
    grid-column: 2;
    grid-row: 2;
  }

  .services-page > .service-position-4 {
    grid-column: 3;
    grid-row: 1 / 3;
  }
}

@media (hover: hover) and (min-width: 768px) {
  .service-card:hover::after {
    opacity: 1;
  }

  .service-card:hover img {
    transform: scale(1.04);
  }

  .service-card:hover .service-hover-arrow {
    opacity: 1;
    transform: translate(0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .service-card::after,
  .service-card img,
  .service-hover-arrow {
    transition: none;
  }

  .service-card:hover img {
    transform: none;
  }
}
