/* Servis blok — LADA-style (iki sütun + 2x3 grid) */

.service-block {
  --svc-font: "Montserrat", "Segoe UI", sans-serif;
  --svc-accent: #e37639;
  --svc-text: #4c5865;
  --svc-border: #e0e4e8;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background: #fff;
  font-family: var(--svc-font);
}

.service-block__inner {
  display: grid;
  grid-template-columns: minmax(0, 46%) minmax(0, 54%);
  max-width: 100%;
  min-height: clamp(480px, 52vw, 640px);
}

.service-block__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(40px, 5vw, 72px) clamp(32px, 4vw, 64px);
}

.service-block__title {
  margin: 0 0 clamp(16px, 2vw, 24px);
  font-size: clamp(1.75rem, 3.2vw, 2.75rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: var(--lada-track-normal, 0);
  text-transform: uppercase;
  color: #3d4f5f;
}

.service-block__title-line {
  display: block;
  overflow: hidden;
}

.service-block__title-word {
  display: inline-block;
  transform: translate3d(0, 110%, 0);
  opacity: 0;
  filter: blur(6px);
  transition:
    transform 1s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.9s ease;
}

.service-block.is-inview .service-block__title-word {
  transform: translate3d(0, 0, 0);
  opacity: 1;
  filter: blur(0);
}

.service-block.is-outview .service-block__title-word {
  transform: translate3d(0, 70%, 0);
  opacity: 0;
  transition-duration: 0.5s;
}

.service-block.is-inview .service-block__title-line:nth-child(1) .service-block__title-word:nth-child(1) {
  transition-delay: 0.06s;
}
.service-block.is-inview .service-block__title-line:nth-child(1) .service-block__title-word:nth-child(2) {
  transition-delay: 0.14s;
}
.service-block.is-inview .service-block__title-line:nth-child(2) .service-block__title-word:nth-child(1) {
  transition-delay: 0.22s;
}
.service-block.is-inview .service-block__title-line:nth-child(2) .service-block__title-word:nth-child(2) {
  transition-delay: 0.3s;
}

.service-block__subtitle {
  margin: 0 0 clamp(28px, 3.5vw, 40px);
  max-width: 520px;
  font-size: clamp(0.875rem, 1.2vw, 1rem);
  font-weight: 400;
  line-height: 1.55;
  color: var(--svc-text);
  opacity: 0;
  transform: translate3d(0, 20px, 0);
  transition:
    opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.35s,
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.35s;
}

.service-block.is-inview .service-block__subtitle {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.service-block__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--svc-border);
}

.service-block__cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 1.5vw, 18px);
  min-height: clamp(120px, 14vw, 160px);
  padding: clamp(20px, 2.5vw, 28px) clamp(16px, 2vw, 24px);
  text-decoration: none;
  color: var(--svc-text);
  border-right: 1px solid var(--svc-border);
  border-bottom: 1px solid var(--svc-border);
  background: #fff;
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.75s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.25s ease,
    color 0.25s ease;
}

.service-block__cell:nth-child(2n) {
  border-right: none;
}

.service-block__cell:nth-last-child(-n + 2) {
  border-bottom: none;
}

.service-block.is-inview .service-block__cell {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.service-block.is-inview .service-block__cell:nth-child(1) { transition-delay: 0.2s; }
.service-block.is-inview .service-block__cell:nth-child(2) { transition-delay: 0.28s; }
.service-block.is-inview .service-block__cell:nth-child(3) { transition-delay: 0.36s; }
.service-block.is-inview .service-block__cell:nth-child(4) { transition-delay: 0.44s; }
.service-block.is-inview .service-block__cell:nth-child(5) { transition-delay: 0.52s; }
.service-block.is-inview .service-block__cell:nth-child(6) { transition-delay: 0.6s; }

.service-block__cell:hover {
  background: #f7f8f9;
  color: #2a3540;
}

.service-block__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.service-block__icon img,
.service-block__icon svg {
  width: 40px;
  height: 40px;
  display: block;
}

.service-block__cell:hover .service-block__icon {
  transform: scale(1.08) translateY(-2px);
}

.service-block__label {
  font-size: clamp(0.6875rem, 1vw, 0.8125rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: var(--lada-track-normal, 0);
  text-align: center;
  text-transform: uppercase;
}

.service-block__media {
  position: relative;
  overflow: hidden;
  min-height: clamp(320px, 40vw, 640px);
}

.service-block__image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  object-position: center;
  transform: scale(1.06);
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.service-block.is-inview .service-block__image {
  transform: scale(1);
}

.service-block__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.15) 0%, transparent 35%);
  pointer-events: none;
}

@media (max-width: 1024px) {
  .service-block__inner {
    grid-template-columns: 1fr;
  }

  .service-block__content {
    order: 1;
  }

  .service-block__media {
    order: 0;
    min-height: clamp(280px, 50vw, 420px);
  }
}

@media (max-width: 520px) {
  .service-block__media {
    min-height: 260px;
  }

  .service-block__image {
    object-position: center top;
  }

  .service-block__content {
    padding: 34px 18px 42px;
  }

  .service-block__title {
    margin-bottom: 14px;
    font-size: clamp(1.8rem, 10vw, 2.45rem);
    line-height: 1.05;
    letter-spacing: 0.045em;
  }

  .service-block__subtitle {
    margin-bottom: 24px;
    font-size: 0.92rem;
    line-height: 1.65;
  }

  .service-block__grid {
    grid-template-columns: 1fr;
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 18px 48px rgba(20, 30, 40, 0.08);
  }

  .service-block__cell {
    min-height: 96px;
    align-items: center;
    flex-direction: row;
    justify-content: flex-start;
    gap: 16px;
    padding: 18px 20px;
    border-right: none;
  }

  .service-block__cell:not(:last-child) {
    border-bottom: 1px solid var(--svc-border);
  }

  .service-block__icon {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
  }

  .service-block__icon img,
  .service-block__icon svg {
    width: 34px;
    height: 34px;
  }

  .service-block__label {
    text-align: left;
    font-size: 0.78rem;
    letter-spacing: 0.045em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .service-block__title-word,
  .service-block__subtitle,
  .service-block__cell,
  .service-block__image,
  .service-block__icon {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
    filter: none !important;
  }
}
