/* Seamless Services — scoped components; site and Elementor containers own page layout. */
.sap-wrap.sap-services-wrap,
.sap-wrap.sap-service-single,
.sap-wrap.sap-service-gallery-wrap {
  --sap-accent: #ed1515;
  --sap-text: #111111;
  --sap-surface: #ffffff;
  --sap-overlay: #111111;
  --sap-columns: 2;
  --sap-tablet-columns: 2;
  --sap-mobile-columns: 1;
  --sap-gap: 20px;
  --sap-radius: 10px;
  --sap-ratio: 2 / 1;
  --sas-wide-ratio: 4 / 1;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  color: var(--sap-text);
  background: var(--sap-surface);
  font-family: inherit;
  isolation: isolate;
}

:where(.sap-services-wrap, .sap-services-grid, .sap-service-card),
:where(.sap-services-wrap, .sap-services-grid, .sap-service-card) *,
:where(.sap-services-wrap, .sap-services-grid, .sap-service-card) *::before,
:where(.sap-services-wrap, .sap-services-grid, .sap-service-card) *::after {
  box-sizing: border-box;
}

.sap-services-wrap .sap-services-grid {
  display: grid;
  grid-template-columns: repeat(var(--sap-columns, 2), minmax(0, 1fr));
  gap: var(--sap-gap, 20px);
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sap-services-wrap .sap-service-card {
  position: relative;
  min-width: 0;
  aspect-ratio: var(--sap-ratio, 2 / 1);
  overflow: hidden;
  border-radius: var(--sap-radius, 10px);
  background: #393939;
  isolation: isolate;
}

.sap-services-wrap .sap-service-card--wide {
  grid-column: 1 / -1;
  aspect-ratio: var(--sas-wide-ratio, 4 / 1);
}

.sap-services-wrap .sap-service-card-image {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  aspect-ratio: auto;
  overflow: hidden;
  border-radius: inherit;
  color: inherit;
  text-decoration: none;
}

.sap-services-wrap .sap-service-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  margin: 0;
  object-fit: cover;
  transition: transform .4s ease;
}

/* The full-tile image link remains clickable underneath this permanent tint. */
.sap-services-wrap .sap-service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: var(--sap-overlay, #111111);
  opacity: .48;
  pointer-events: none;
}

.sap-services-wrap .sap-service-card-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: clamp(14px, 2.4vw, 32px);
  color: #ffffff;
  background: none;
  text-align: center;
  opacity: 1;
  transform: none;
  pointer-events: none;
}

/* Works with an overlay inside the image anchor or alongside it; no nested links needed. */
.sap-services-wrap .sap-service-card-overlay a {
  pointer-events: auto;
}

.sap-services-wrap .sap-service-card :is(.sap-service-card-title, .sap-card-title),
.sap-services-wrap .sap-service-card-overlay h3 {
  display: -webkit-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  color: #ffffff;
  font-family: inherit;
  font-size: clamp(1.125rem, 2.3vw, 2rem);
  font-weight: 800;
  line-height: 1.18;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .65);
  overflow-wrap: anywhere;
  hyphens: auto;
}

.sap-services-wrap .sap-service-card :is(.sap-service-card-title, .sap-card-title) a,
.sap-services-wrap .sap-service-card-overlay h3 a {
  color: inherit;
  font: inherit;
  text-decoration: none;
  text-transform: inherit;
}

.sap-services-wrap .sap-service-card :is(.sap-service-card-summary, .sap-card-summary),
.sap-services-wrap .sap-service-card-overlay > p {
  display: -webkit-box;
  max-width: min(58ch, 100%);
  min-width: 0;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: #ffffff;
  font-family: inherit;
  font-size: .9375rem;
  line-height: 1.5;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .65);
  overflow-wrap: anywhere;
}

.sap-services-wrap .sap-service-card :is(.sap-service-card-summary, .sap-card-summary) p {
  margin: 0;
}

.sap-services-wrap .sap-service-card :is(.sap-service-card-link, .sap-card-link) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
  min-height: 36px;
  max-width: 100%;
  margin: 0;
  padding: 2px 0;
  border-bottom: 2px solid var(--sap-accent, #ed1515);
  color: var(--sap-accent, #ed1515);
  font-family: inherit;
  font-size: .8125rem;
  font-weight: 800;
  letter-spacing: .055em;
  line-height: 1.4;
  text-decoration: none;
  text-transform: uppercase;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .6);
  overflow-wrap: anywhere;
  opacity: 0;
  transition: opacity .2s ease, color .2s ease, border-color .2s ease;
  pointer-events: auto;
}

.sap-services-wrap .sap-service-card:hover :is(.sap-service-card-link, .sap-card-link),
.sap-services-wrap .sap-service-card:focus-within :is(.sap-service-card-link, .sap-card-link) {
  opacity: 1;
}

.sap-services-wrap .sap-service-card :is(.sap-service-card-link, .sap-card-link):hover {
  color: #ffffff;
  border-bottom-color: #ffffff;
}

.sap-services-wrap :is(a, button, select):focus-visible {
  outline: 3px solid var(--sap-accent, #ed1515);
  outline-offset: 4px;
}

.sap-services-wrap .sap-service-card:focus-within {
  outline: 3px solid var(--sap-accent, #ed1515);
  outline-offset: 3px;
}

.sap-services-wrap .sap-service-card-image:focus-visible {
  outline-offset: -5px;
}

.sap-services-wrap .sap-service-card-image :is(.sap-no-image, .sap-service-no-image, .sap-service-card-placeholder) {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 16px;
  color: #ffffff;
  background: #393939;
  font-family: inherit;
  font-size: .875rem;
  line-height: 1.4;
  text-align: center;
  overflow-wrap: anywhere;
}

/* Service details reuse the project's .sap-single, .sap-gallery and pagination components. */
:is(.sap-services-wrap, .sap-service-single) :is(.sap-service-cta, .sas-cta) {
  margin-block: 24px;
}

:is(.sap-services-wrap, .sap-service-single) :is(a, button).sap-service-cta,
:is(.sap-services-wrap, .sap-service-single) :is(a, button).sas-cta,
:is(.sap-services-wrap, .sap-service-single) :is(.sap-service-cta, .sas-cta) :is(a, button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  max-width: 100%;
  padding: 12px 24px;
  border: 2px solid var(--sap-accent, #ed1515);
  border-radius: var(--sap-radius, 10px);
  color: #ffffff;
  background: var(--sap-accent, #ed1515);
  font-family: inherit;
  font-size: .875rem;
  font-weight: 800;
  letter-spacing: .045em;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: filter .2s ease;
}

:is(.sap-services-wrap, .sap-service-single) :is(a, button).sap-service-cta:hover,
:is(.sap-services-wrap, .sap-service-single) :is(a, button).sas-cta:hover,
:is(.sap-services-wrap, .sap-service-single) :is(.sap-service-cta, .sas-cta) :is(a, button):hover {
  color: #ffffff;
  filter: brightness(.88);
}

.sap-services-wrap :is(.sap-service-related-projects, .sap-related-projects, .sas-related-projects) {
  min-width: 0;
  margin-top: clamp(28px, 4vw, 48px);
}

.sap-service-editor-note {
  max-width: 100%;
  margin: 0;
  padding: 16px;
  border: 1px dashed #b8b8b8;
  border-radius: 8px;
  color: #333333;
  background: #ffffff;
  font-family: inherit;
  font-size: .9375rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

@media (hover: hover) and (pointer: fine) {
  .sap-services-wrap .sap-service-card:hover .sap-service-card-image img,
  .sap-services-wrap .sap-service-card:focus-within .sap-service-card-image img {
    transform: scale(1.035);
  }
}

@media (max-width: 1024px) {
  .sap-services-wrap .sap-services-grid {
    grid-template-columns: repeat(var(--sap-tablet-columns, 2), minmax(0, 1fr));
  }
  .sap-services-wrap .sap-service-card-overlay {
    gap: 6px;
    padding: 16px;
  }
}

@media (hover: none), (pointer: coarse) {
  .sap-services-wrap .sap-service-card :is(.sap-service-card-link, .sap-card-link) {
    opacity: 1;
  }
}

@media (max-width: 600px) {
  .sap-services-wrap .sap-services-grid {
    grid-template-columns: repeat(var(--sap-mobile-columns, 1), minmax(0, 1fr));
  }
  .sap-services-wrap .sap-service-card--wide {
    aspect-ratio: 2 / 1;
  }
  .sap-services-wrap .sap-service-card-overlay {
    gap: 6px;
    padding: 12px;
  }
  .sap-services-wrap .sap-service-card :is(.sap-service-card-title, .sap-card-title),
  .sap-services-wrap .sap-service-card-overlay h3 {
    font-size: clamp(1rem, 4vw, 1.5rem);
    line-height: 1.15;
  }
  .sap-services-wrap .sap-service-card :is(.sap-service-card-summary, .sap-card-summary),
  .sap-services-wrap .sap-service-card-overlay > p {
    display: none;
  }
  .sap-services-wrap .sap-service-card :is(.sap-service-card-link, .sap-card-link) {
    min-height: 32px;
    font-size: .75rem;
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sap-services-wrap .sap-service-card,
  .sap-services-wrap .sap-service-card-image img,
  .sap-services-wrap .sap-service-card-overlay,
  .sap-services-wrap .sap-service-card :is(.sap-service-card-link, .sap-card-link),
  :is(.sap-services-wrap, .sap-service-single) :is(a, button).sap-service-cta,
  :is(.sap-services-wrap, .sap-service-single) :is(a, button).sas-cta,
  :is(.sap-services-wrap, .sap-service-single) :is(.sap-service-cta, .sas-cta) :is(a, button) {
    animation: none;
    transition: none;
  }
  .sap-services-wrap .sap-service-card:hover .sap-service-card-image img,
  .sap-services-wrap .sap-service-card:focus-within .sap-service-card-image img {
    transform: none;
  }
}
