/*
 * The blue panel on the front page with four yellow service cards. Each
 * card's photo is cut to its own shape by a mask from the media library.
 */
.yb-services-panel {
  margin: 0 10px;
  padding: 100px 0 60px;
  border-radius: var(--yb-radius-panel);
  background: var(--yb-color-primary);
  color: var(--yb-color-surface);
}

.yb-services-panel h2 {
  color: var(--yb-color-surface);
}

.yb-service-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 52px 0 0;
  padding: 0;
  list-style: none;
}

.yb-service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 60px;
  height: 100%;
  min-height: 409px;
  overflow: hidden;
  border-radius: var(--yb-radius-panel);
  background: var(--yb-color-accent);
  color: var(--yb-color-primary);
}

/* The pale outline of the same shape around the photo. */
.yb-service-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 230px;
  height: 230px;
  background: rgba(255, 255, 255, 0.25);
  -webkit-mask: var(--yb-card-mask) left top / contain no-repeat;
  mask: var(--yb-card-mask) left top / contain no-repeat;
}

.yb-service-card__image {
  position: relative;
  width: 189px;
  height: 189px;
  object-fit: cover;
  -webkit-mask: var(--yb-card-mask) center / contain no-repeat;
  mask: var(--yb-card-mask) center / contain no-repeat;
}

.yb-service-card--1 { --yb-card-mask: url("/wp-content/uploads/2025/02/mask-sevice-1-1.svg"); }
.yb-service-card--2 { --yb-card-mask: url("/wp-content/uploads/2025/02/mask-sevice-2.2.svg"); }
.yb-service-card--3 { --yb-card-mask: url("/wp-content/uploads/2025/02/mask-sevice-3.2.svg"); }
.yb-service-card--4 { --yb-card-mask: url("/wp-content/uploads/2025/03/mask-sevice-4.2.svg"); }

.yb-service-card__title {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 21px 21px;
  font-size: 17px;
  font-weight: var(--yb-weight-medium);
  line-height: 1.2;
}

/* Arrow badge: ::after is the pale circle, ::before the arrow on top of it. */
.yb-service-card__title::after {
  content: "";
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--yb-color-surface);
}

.yb-service-card__title::before {
  content: "";
  position: absolute;
  top: 0;
  right: 21px;
  z-index: 1;
  width: 52px;
  height: calc(100% - 21px);
  background: var(--yb-color-primary);
  -webkit-mask: url("../../icons/arrow-up-right.svg") center / 18px no-repeat;
  mask: url("../../icons/arrow-up-right.svg") center / 18px no-repeat;
}

.yb-service-card:hover .yb-service-card__title::after {
  background: var(--yb-color-white);
}

@media (max-width: 1024px) {
  .yb-services-panel {
    padding: 80px 0 40px;
  }

  .yb-service-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .yb-service-card {
    min-height: 456px;
  }
}

@media (max-width: 767px) {
  .yb-service-cards {
    grid-template-columns: 1fr;
  }

  .yb-service-card {
    min-height: 409px;
  }

}
