/* Service Block — Figma node 1092:3303 */

.serviceBlock {
  background: #fff;
  padding: 34px var(--templateTheme-section-padding-x);
  box-sizing: border-box;
}

.serviceBlock__container {
  max-width: var(--templateTheme-content-max);
  margin: 0 auto;
}

.serviceBlock__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.serviceBlock__item {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.serviceBlock__card-link {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  color: inherit;
  text-decoration: none;
}

.serviceBlock__card-link:focus-visible {
  outline: none;
}

.serviceBlock__card-link:focus-visible .serviceBlock__media {
  box-shadow: 0 0 0 2px #000;
}

.serviceBlock__media-wrap {
  width: 100%;
  overflow: hidden;
}

.serviceBlock__media {
  position: relative;
  width: 100%;
  height: 417px;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.serviceBlock__image {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 627 416' preserveAspectRatio='none'%3E%3Cpath d='M0 18.9954C0 8.50452 8.50455 0 18.9954 0H607.854C618.345 0 626.849 8.50455 626.849 18.9954V249.157C626.849 259.648 618.345 268.152 607.854 268.152H399.537C389.046 268.152 380.542 276.657 380.542 287.148V397.005C380.542 407.495 372.037 416 361.546 416H18.9954C8.50452 416 0 407.495 0 397.005V18.9954Z' fill='white'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  -webkit-mask-position: center;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 627 416' preserveAspectRatio='none'%3E%3Cpath d='M0 18.9954C0 8.50452 8.50455 0 18.9954 0H607.854C618.345 0 626.849 8.50455 626.849 18.9954V249.157C626.849 259.648 618.345 268.152 607.854 268.152H399.537C389.046 268.152 380.542 276.657 380.542 287.148V397.005C380.542 407.495 372.037 416 361.546 416H18.9954C8.50452 416 0 407.495 0 397.005V18.9954Z' fill='white'/%3E%3C/svg%3E");
  mask-repeat: no-repeat;
  mask-size: 100% 100%;
  mask-position: center;
}

.serviceBlock__overlay {
  position: absolute;
  top: 279px;
  left: calc(100% - 236px);
  width: 235px;
  height: 137px;
  border-radius: 10px;
  overflow: hidden;
  background:
    radial-gradient(
      162.21% 77.79% at 84.55% 33.84%,
      rgba(255, 255, 255, 0.84) 0%,
      rgba(198, 205, 210, 0.84) 100%
    ),
    rgba(220, 233, 244, 0.2);
  backdrop-filter: blur(5.065448760986328px);
  -webkit-backdrop-filter: blur(5.065448760986328px);
  box-sizing: border-box;
  z-index: 2;
}

.serviceBlock__overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-top: 1px solid rgba(255, 255, 255, 0.7);
  border-left: 1px solid rgba(255, 255, 255, 0.7);
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  border-bottom-left-radius: 10px;
  pointer-events: none;
}

.serviceBlock__overlay-inner {
  position: absolute;
  top: 12.66px;
  left: 12.66px;
  z-index: 2;
}

.serviceBlock__overlay-title {
  margin: 0;
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 28px;
  color: #222;
  white-space: nowrap;
}

.serviceBlock__overlay-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.serviceBlock__overlay-list-item {
  margin: 0;
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 28px;
  color: #222;
  white-space: nowrap;
}

.serviceBlock__overlay-title:hover,
.serviceBlock__overlay-list-item:hover {
  font-weight: 600;
}

.serviceBlock__overlay-art {
  position: absolute;
  top: -40px;
  right: -27.096px;
  z-index: 1;
  width: 90.096px;
  height: 146.443px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(180deg);
  transform-origin: center;
  pointer-events: none;
}

.serviceBlock__overlay-art svg {
  display: block;
  width: 100%;
  height: 100%;
}

.serviceBlock__content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 10px 10px;
}

.serviceBlock__title {
  margin: 0;
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    sans-serif;
  font-size: 42px;
  font-weight: 400;
  line-height: normal;
  letter-spacing: -0.42px;
  color: #000;
}

.serviceBlock__text {
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 30px;
  color: rgba(0, 0, 0, 0.7);
}

.serviceBlock__text p {
  margin: 0;
}

.serviceBlock--empty-preview {
  min-height: 120px;
  padding: 24px;
  border: 1px dashed #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  text-align: center;
}

@media (min-width: 1800px) {
  .serviceBlock__grid {
    gap: 32px;
  }

  .serviceBlock__media {
    height: 470px;
  }

  .serviceBlock__overlay {
    top: 318px;
    left: calc(100% - 280px);
    width: 280px;
    height: 150px;
  }

  .serviceBlock__title {
    font-size: 46px;
  }

  .serviceBlock__text {
    font-size: 20px;
    line-height: 1.6;
  }
}

/* —— Tablet + mobile: single column, rectangular image, overlay as a card (no in-photo positioning) —— */
@media (max-width: 1024px) {
  .serviceBlock {
    padding: 28px 40px 40px;
  }

  .serviceBlock__grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .serviceBlock__title {
    font-size: clamp(1.75rem, 4.5vw, 2.5rem);
    letter-spacing: -0.02em;
  }

  .serviceBlock__text {
    line-height: 1.6;
  }

  .serviceBlock__media-wrap {
    overflow: visible;
  }

  .serviceBlock__media {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: auto;
    min-height: 0;
    background: transparent;
  }

  .serviceBlock__image {
    position: relative;
    top: auto;
    left: auto;
    z-index: 0;
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    -webkit-mask-image: none;
    mask-image: none;
    border-radius: 12px;
  }

  .serviceBlock__overlay {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    z-index: 1;
    width: 100%;
    max-width: none;
    height: auto;
    min-height: 0;
    overflow: visible;
    border-radius: 12px;
  }

  .serviceBlock__overlay::before {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.5);
  }

  .serviceBlock__overlay-art {
    display: none;
  }

  .serviceBlock__overlay-inner {
    position: static;
    top: auto;
    left: auto;
    width: 100%;
    max-width: none;
    padding: 16px 18px 20px;
    box-sizing: border-box;
  }

  .serviceBlock__overlay-title,
  .serviceBlock__overlay-list-item {
    white-space: normal;
  }
}

@media (max-width: 768px) {
  .serviceBlock {
    padding: 24px 20px 32px;
  }

  .serviceBlock__grid {
    gap: 28px;
  }

  .serviceBlock__image {
    aspect-ratio: 3 / 2;
  }

  .serviceBlock__content {
    padding: 0 0 4px;
  }

  .serviceBlock__title {
    font-size: clamp(1.5rem, 5.5vw, 2rem);
  }

  .serviceBlock__text {
    font-size: 17px;
    line-height: 1.55;
  }

  .serviceBlock__overlay-inner {
    padding: 14px 16px 18px;
  }
}
