/* Services page — scoped styles (prefix: services-page__) */

.services-page {
  position: relative;
  overflow: hidden;
  padding-top: 0;
  padding-bottom: 0;
}

.services-page__banner {
  position: relative;
  height: var(--inner-page-banner-height);
  min-height: var(--inner-page-banner-min-height);
  overflow: hidden;
  z-index: 0;
}

.services-page__banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  filter: saturate(0.98) contrast(1.02) brightness(0.88);
  transform: scale(1.05);
  transform-origin: center top;
}

.services-page__banner-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      820px 320px at 15% 20%,
      rgba(51, 78, 94, 0.22),
      transparent 60%
    ),
    radial-gradient(
      900px 420px at 85% 30%,
      rgba(152, 131, 131, 0.2),
      transparent 56%
    ),
    linear-gradient(
      180deg,
      rgba(51, 78, 94, 0.38) 0%,
      rgba(51, 78, 94, 0.2) 48%,
      rgba(255, 255, 255, 0.96) 100%
    );
}

.services-page__banner-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: calc(126px + clamp(20px, 3.5vh, 56px)) 18px 26px;
  text-align: center;
  color: #fff;
  z-index: 1;
}

.services-page__banner-title {
  margin: 0;
  font-family: var(--font);
  color: rgba(255, 255, 255, 0.96);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  font-size: clamp(26px, 2.8vw + 14px, 46px);
  text-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
  max-width: 24ch;
}

.services-page__banner-subtitle {
  margin: 0;
  max-width: 52ch;
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    sans-serif;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.7;
  text-shadow: 0 10px 34px rgba(0, 0, 0, 0.14);
  font-size: clamp(15px, 0.6vw + 13px, 18px);
}

.services-page__banner-content .services-page__eyebrow {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.88);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

/* Секція послуг: глибокий бірюзовий #006054, фото «під тинтом», 60/40, список + рейка */
.services-page__showcase {
  position: relative;
  margin: 0;
  padding: 0;
}

.services-page__showcase-bg {
  position: relative;
  overflow: hidden;
  min-height: clamp(520px, 78vh, 820px);
  /* Якщо фото ще не завантажилось */
  background-color: #006054;
}

.services-page__showcase-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.services-page__showcase-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  transform: scale(1.04);
  filter: grayscale(0.35) brightness(0.72) contrast(1.06);
}

.services-page__showcase-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  /* Домінантний морський зелений поверх фото */
  background:
    linear-gradient(
      100deg,
      rgba(0, 96, 84, 0.94) 0%,
      rgba(0, 82, 74, 0.88) 38%,
      rgba(0, 70, 68, 0.82) 100%
    );
}

.services-page__showcase-shell {
  position: relative;
  z-index: 2;
  min-height: clamp(520px, 78vh, 820px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(48px, 8vw, 96px) 0 clamp(88px, 11vw, 120px);
}

.services-page__showcase-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
  width: 100%;
  min-height: min(58vh, 560px);
}

.services-page__showcase-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.services-page__showcase-title {
  margin: 0 0 clamp(18px, 2.8vw, 26px);
  max-width: 22ch;
  font-family: var(--font-heading);
  font-size: clamp(28px, 2.6vw + 12px, 46px);
  font-weight: 800;
  letter-spacing: -0.038em;
  line-height: 1.06;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.2);
}

.services-page__showcase-lead {
  margin: 0;
  max-width: 46ch;
  font-size: clamp(14px, 0.65vw + 13px, 17px);
  line-height: 1.72;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
}

.services-page__showcase-aside {
  justify-self: end;
  width: 100%;
  max-width: 400px;
}

.services-page__showcase-nav {
  display: flex;
  align-items: stretch;
  gap: clamp(18px, 3vw, 28px);
  justify-content: flex-end;
}

.services-page__showcase-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.services-page__showcase-item {
  display: block;
  padding: 10px 0;
  font-size: clamp(15px, 0.9vw + 12px, 19px);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.38);
  text-decoration: none;
  text-align: right;
  line-height: 1.25;
  transition:
    color 0.2s ease,
    font-weight 0.2s ease;
  border-bottom: 1px solid transparent;
}

.services-page__showcase-item:hover,
.services-page__showcase-item:focus-visible {
  color: rgba(255, 255, 255, 0.88);
  outline: none;
}

.services-page__showcase-item.is-active {
  font-weight: 800;
  color: #fff;
}

.services-page__showcase-item:focus-visible {
  border-bottom-color: rgba(255, 255, 255, 0.3);
}

.services-page__showcase-rail {
  position: relative;
  flex-shrink: 0;
  width: 24px;
  align-self: stretch;
  min-height: 140px;
}

.services-page__showcase-rail-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  margin-left: 0;
  background: rgba(255, 255, 255, 0.55);
}

.services-page__showcase-rail-thumb {
  position: absolute;
  left: 50%;
  top: 0;
  width: 5px;
  height: 26px;
  margin-left: -2.5px;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.22);
  transform: translateY(0);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .services-page__showcase-rail-thumb {
    transition: none;
  }
}

.services-page__showcase-scroll {
  position: absolute;
  left: 50%;
  bottom: clamp(24px, 5vw, 40px);
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(255, 255, 255, 0.55);
  pointer-events: none;
}

.services-page__showcase-scroll-icon {
  width: 30px;
  height: auto;
  display: block;
  opacity: 1;
}

@media (max-width: 960px) {
  .services-page__showcase-grid {
    grid-template-columns: 1fr;
    min-height: 0;
    align-items: start;
    gap: clamp(28px, 5vw, 40px);
  }

  .services-page__showcase-aside {
    justify-self: stretch;
    max-width: none;
  }

  .services-page__showcase-list {
    align-items: flex-start;
  }

  .services-page__showcase-item {
    text-align: left;
  }

  .services-page__showcase-nav {
    justify-content: flex-start;
  }
}

.services-page__body {
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(
      ellipse 78% 52% at 100% 8%,
      var(--bg-spot-mint) 0%,
      transparent 58%
    ),
    radial-gradient(
      ellipse 65% 48% at 0% 92%,
      var(--bg-spot-warm) 0%,
      transparent 55%
    ),
    linear-gradient(180deg, #f7fbfc 0%, var(--bg) 55%, #f4f7f9 100%);
  padding: 56px 0 0;
}

.services-page__inner {
  position: relative;
  z-index: 1;
  padding: 56px 0 88px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.services-page__intro {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.services-page__intro-eyebrow {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--shirt-tone);
}

.services-page__intro-title {
  margin: 0;
  font-size: clamp(24px, 1.8vw + 14px, 34px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.services-page__intro-lead {
  margin: 0;
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted);
}

.services-page__services-grid {
  margin-top: 10px;
}

/* Service cards are styled globally in css/style.css */

/* Keep Services page grid as 3 columns (like design request) */
.services-page .services__grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Center last row on Services page (match column count) */
@media (min-width: 1025px) {
  /* 3 columns */
  .services-page .services__grid > :nth-last-child(2):nth-child(3n + 1) {
    grid-column: 2;
  }

  .services-page .services__grid > :last-child:nth-child(3n + 1) {
    grid-column: 2;
  }
}

@media (max-width: 1024px) {
  .services-page .services__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* 2 columns: center single last item */
  .services-page .services__grid > :last-child:nth-child(2n + 1) {
    grid-column: 1 / -1;
    justify-self: center;
    width: min(520px, 100%);
  }
}

@media (max-width: 640px) {
  .services-page .services__grid {
    grid-template-columns: 1fr;
  }
}

/* Services cards (static look like About hover state) */
.services-page .service-card {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  min-height: clamp(220px, 28vw, 320px);
  display: block;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(
    180deg,
    rgba(248, 250, 252, 0.98) 0%,
    rgba(241, 245, 249, 0.96) 100%
  );
  border: 1px solid rgba(51, 78, 94, 0.12);
  box-shadow: 0 16px 40px rgba(51, 78, 94, 0.06);
}

.services-page .service-card:focus-visible {
  outline: 2px solid rgba(17, 166, 184, 0.55);
  outline-offset: 3px;
}

.services-page .service-card__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.07);
  filter: blur(2px) saturate(1.04) contrast(1.03);
}

.services-page .service-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(
    180deg,
    rgba(241, 245, 249, 0.38) 0%,
    rgba(100, 116, 139, 0.32) 34%,
    rgba(30, 41, 59, 0.48) 52%,
    rgba(30, 41, 59, 0.58) 100%
  );
}

.services-page .service-card__inner {
  position: relative;
  z-index: 1;
  inset: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(18px, 2.5vw, 24px);
}

.services-page .service-card__title {
  margin: 0;
  align-self: center;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--brand);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.22);
  text-align: center;
  max-width: min(46ch, 100%);
  display: inline-block;
  line-height: 1.2;
  white-space: normal;
  overflow: visible;
  max-height: none;
  min-height: 0;
}

.services-page .service-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: flex-end;
  margin-top: auto;
  justify-content: center;
}

.services-page .service-card__tag {
  display: inline-flex;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  color: var(--brand);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.services-page .service-card__tag:nth-child(even) {
  background: rgba(255, 255, 255, 0.38);
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

@media (prefers-reduced-motion: no-preference) {
  .services-page .service-card,
  .services-page .service-card__bg {
    transition:
      transform 0.4s ease,
      box-shadow 0.4s ease;
  }

  .services-page .service-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 26px 70px rgba(15, 23, 42, 0.12);
  }
}

/* Акцент переходу: сітка послуг → блок цінностей */
.services-page__section-bridge {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin: clamp(8px, 2.5vw, 20px) 0 0;
  padding: clamp(28px, 5vw, 44px) 0 clamp(4px, 1vw, 8px);
  text-align: center;
}

.services-page__section-bridge-eyebrow {
  margin: 0;
  position: relative;
  z-index: 1;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-2);
}

.services-page__section-bridge-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -42%);
  width: min(96%, 640px);
  height: clamp(72px, 14vw, 100px);
  background: radial-gradient(
    ellipse 75% 65% at 50% 40%,
    rgba(17, 166, 184, 0.14) 0%,
    rgba(92, 129, 149, 0.06) 42%,
    transparent 70%
  );
  pointer-events: none;
}

.services-page__section-bridge-rail {
  position: relative;
  z-index: 1;
  width: min(100%, 480px);
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(51, 78, 94, 0.12) 12%,
    rgba(17, 166, 184, 0.45) 45%,
    rgba(152, 131, 131, 0.4) 78%,
    transparent 100%
  );
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
}

.services-page__section-bridge-accent {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(236, 248, 250, 0.98) 100%
  );
  border: 2px solid rgba(17, 166, 184, 0.55);
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.9),
    0 8px 22px rgba(51, 78, 94, 0.12);
}

.services-page__values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.5vw, 26px);
}

.services-page__value {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 0;
  padding: clamp(22px, 3vw, 30px) clamp(20px, 2.5vw, 26px);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background:
    radial-gradient(
      125% 90% at 100% 0%,
      rgba(17, 166, 184, 0.11) 0%,
      transparent 52%
    ),
    radial-gradient(
      95% 75% at 0% 100%,
      rgba(152, 131, 131, 0.07) 0%,
      transparent 55%
    ),
    linear-gradient(
      168deg,
      rgba(255, 255, 255, 0.98) 0%,
      rgba(248, 251, 252, 0.96) 45%,
      rgba(241, 246, 249, 0.98) 100%
    );
  border: 1px solid rgba(51, 78, 94, 0.1);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.88) inset,
    0 2px 1px rgba(51, 78, 94, 0.03),
    0 20px 48px -18px rgba(51, 78, 94, 0.12);
  transition:
    transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.28s ease,
    border-color 0.28s ease;
}

.services-page__value::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 14px 14px 0 0;
  z-index: 1;
  pointer-events: none;
}

.services-page__value:nth-child(1)::before {
  background: linear-gradient(
    90deg,
    rgba(17, 166, 184, 0.85) 0%,
    rgba(51, 78, 94, 0.75) 100%
  );
}

.services-page__value:nth-child(2)::before {
  background: linear-gradient(
    90deg,
    var(--brand) 0%,
    var(--brand-2) 55%,
    rgba(152, 131, 131, 0.65) 100%
  );
}

.services-page__value:nth-child(3)::before {
  background: linear-gradient(
    90deg,
    rgba(152, 131, 131, 0.75) 0%,
    rgba(17, 166, 184, 0.55) 100%
  );
}

@media (prefers-reduced-motion: no-preference) {
  .services-page__value:hover {
    transform: translateY(-4px);
    border-color: rgba(152, 131, 131, 0.28);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.92) inset,
      0 12px 28px -8px rgba(51, 78, 94, 0.08),
      0 32px 56px -16px rgba(51, 78, 94, 0.14),
      0 0 36px -10px rgba(152, 131, 131, 0.15);
  }
}

@media (prefers-reduced-motion: reduce) {
  .services-page__value {
    transition: none;
  }
}

.services-page__value-icon {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--brand);
  background: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(236, 244, 248, 0.94) 100%
  );
  border: 1px solid rgba(51, 78, 94, 0.12);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 10px 24px rgba(51, 78, 94, 0.08);
}

.services-page__value-icon svg {
  width: 26px;
  height: 26px;
}

.services-page__value:nth-child(1) .services-page__value-icon {
  color: rgb(11, 95, 108);
}

.services-page__value:nth-child(2) .services-page__value-icon {
  color: var(--brand);
}

.services-page__value:nth-child(3) .services-page__value-icon {
  color: rgb(11, 95, 108);
}

.services-page__value-title {
  margin: 0;
  font-size: clamp(15px, 0.5vw + 14px, 17px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--brand-deep);
}

.services-page__value-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
}

.services-page__cta {
  margin: 0;
  padding: 22px 24px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(
      560px 220px at 82% 0%,
      rgba(120, 224, 238, 0.2) 0%,
      transparent 62%
    ),
    radial-gradient(
      720px 320px at 18% 8%,
      rgba(17, 166, 184, 0.18) 0%,
      transparent 55%
    ),
    radial-gradient(
      880px 360px at 14% 0%,
      rgba(152, 131, 131, 0.16) 0%,
      transparent 56%
    ),
    linear-gradient(
      165deg,
      rgb(8, 42, 58) 0%,
      rgb(11, 74, 95) 28%,
      rgb(22, 95, 108) 52%,
      rgb(18, 78, 90) 78%,
      rgb(10, 38, 48) 100%
    );
  color: rgba(255, 255, 255, 0.96);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

.services-page__cta-text {
  margin: 0;
  font-size: clamp(17px, 1.2vw + 14px, 21px);
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.35;
  max-width: 44ch;
}

.services-page__cta .button--primary {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--brand);
  box-shadow: none;
}

.services-page__cta .button--primary:hover {
  background: #fff;
  color: var(--brand);
}

@media (max-width: 1024px) {
  .services-page__values {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .services-page__inner {
    padding: 40px 0 64px;
    gap: 40px;
  }

  .services-page__cta {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .services-page__cta-text {
    max-width: none;
  }

  .services-page__cta .button--primary {
    width: 100%;
    justify-content: center;
  }
}
