.services-wrapper {
  width: 100%;
}

.our-services {
  width: 100%;
  margin-top: 40px;
}

.services-desktop {
  display: block;
}

.services-mobile {
  display: none;
}

.our-services .container-fluid {
  width: 100%;
  max-width: 80rem; /* 1280px */
  padding: 0 100px;
  margin: 0 auto;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: hidden;
}

.services-header {
  width: 100%;
  padding: 0;
  margin: 0 auto 40px;
}

.services-title-row {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: nowrap;
}

.services-icon {
  width: 21px;
  height: 22px;
  display: block;
  flex-shrink: 0;
}

.services-subtitle {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-style: normal;
  font-size: 16px;
  line-height: 120%;
  color: var(--color-dark-blue);
  margin: 0;
  white-space: nowrap;
  flex-shrink: 0;
}

.services-line {
  flex: 1;
  height: 1px;
  border: 1px solid #91a2b8;
  min-width: 20px;
}

.services-main-title {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-style: normal;
  font-size: 30px;
  line-height: 120%;
  color: var(--color-dark-blue);
  margin: 0;
  text-align: right;
}

.services-grid {
  width: 100%;
  padding: 0;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  justify-content: space-between;
}

.service-card {
  width: 260px;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  color: inherit;
  border-radius: 5px;
  overflow: visible;
  box-sizing: border-box;
}

.service-image-wrapper {
  width: 260px;
  height: 191px;
  margin-bottom: 15px;
  position: relative;
}

.service-number-mobile {
  display: none;
}

.service-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.service-title-row {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  width: 100%;
  box-sizing: border-box;
}

.service-number {
  width: 30px;
  height: 30px;
  background: #e60012;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-style: normal;
  font-size: 14px;
  line-height: 120%;
  color: #ffffff;
  flex-shrink: 0;
  border-radius: 5px;
}

.service-title-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.service-title {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-style: normal;
  font-size: 12px;
  line-height: 120%;
  color: #152333;
  margin: 0;
  text-transform: uppercase;
  min-height: 45px;
}

.service-link-text {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-style: normal;
  font-size: 12px;
  line-height: 120%;
  color: var(--color-primary);
  text-transform: none;
  display: inline-block;
  text-decoration: underline;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration-color: var(--color-primary);
}

.service-link-text:hover {
  opacity: 0.7;
  text-decoration-thickness: 2px;
}

.service-line {
  width: 100%;
  height: 1px;
  border: 1px solid #91a2b8;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.service-description {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-style: normal;
  font-size: 12px;
  line-height: 120%;
  color: #152333;
  margin: 0 0 30px 0;
  flex: 1;
}

/* Планшет (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .our-services .container-fluid {
    width: 95%;
    max-width: 95%;
    padding: 0 1.5rem; /* 24px */
    overflow-y: hidden;
  }
}

@media (max-width: 768px) {
  .our-services {
    margin-top: 25px;
  }

  .our-services .container-fluid {
    width: 100%;
    padding: 0 0.625rem; /* 10px */
    margin: 0;
    overflow-y: hidden;
  }

  .services-desktop {
    display: none;
  }

  .services-mobile {
    display: block;
  }

  .services-header {
    width: 100%;
    padding: 0;
    margin-bottom: 30px;
  }

  .services-title-row {
    display: block;
  }

  .services-icon,
  .services-subtitle,
  .services-line {
    display: none;
  }

  .services-main-title {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-style: normal;
    font-size: 20px;
    line-height: 120%;
    text-align: left;
    margin: 0;
  }

  .services-grid {
    width: 100%;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
    box-sizing: border-box;
  }

  .service-card {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
  }

  .service-card {
    position: relative;
  }

  .service-image-wrapper {
    width: 100%;
    max-width: 175px;
    height: 130px;
    position: relative;
    margin-bottom: 15px;
    box-sizing: border-box;
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 95% 100%, 0 100%);
  }

  .service-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .service-number {
    display: none;
  }

  .service-number-mobile {
    display: flex;
    position: absolute;
    bottom: 3px;
    left: 3px;
    width: 30px;
    height: 30px;
    background: #e60012;
    align-items: center;
    justify-content: center;
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    font-style: normal;
    font-size: 14px;
    line-height: 120%;
    color: #ffffff;
    border-radius: 5px;
    box-shadow: 0 0 0 3px #fff;
    z-index: 2;
    margin: 0;
  }

  .service-title-row {
    display: flex;
    flex-direction: column;
    position: static;
    width: 100%;
    box-sizing: border-box;
  }

  .service-title-wrapper {
    display: block;
    width: 100%;
    margin-left: 0;
    box-sizing: border-box;
  }

  .service-title {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-style: normal;
    font-size: 10px;
    line-height: 120%;
    color: #152333;
    text-transform: uppercase;
    min-height: auto;
    width: 100%;
    box-sizing: border-box;
  }

  .service-line {
    width: 100%;
    height: 1px;
    border: 1px solid #91a2b8;
    margin: 10px 0 5px 0;
    box-sizing: border-box;
  }

  .service-description {
    width: 100%;
    max-width: 175px;
    font-family: "Montserrat", sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 8.5px;
    line-height: 120%;
    margin-top: 0;
    box-sizing: border-box;
  }
}
