:root {
  --accent: #a5121a;
  --accent-hover: #a5121a;
  --underline-thick: 0.15em;
  --underline-radius: 0.075em;
  --underline-duration: 0.22s;
}

/* Десктопная версия (адаптивная 1300px-900px) */
.services-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 20px 20px;
    box-sizing: border-box;
  }

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

  .services-heading {
    font-family: 'Helvetica', Arial, sans-serif;
    font-size: 24px;
    font-weight: 300;
    letter-spacing: 1px;
    color: #a5121a;
    margin: 0;
    line-height: 1.2;
  }

  .services-heading span {
    font-weight: 700;
    letter-spacing: 1.2px;
  }

.service-list {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  position: relative;
  padding: 0 clamp(15px, 2vw, 20px);
}

.service-row {
  display: flex;
  align-items: flex-start;
  transition: box-shadow 0.3s;
  position: relative;
  gap: clamp(30px, 6vw, 80px);
  padding: 0;
}

.service-divider {
  height: 1px;
  background: var(--accent);
  width: 100%;
  margin: 0 auto;
  max-width: calc(1300px - clamp(30px, 4vw, 40px));
}

.service-info {
  width: clamp(400px, 45vw, 540px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.service-title {
  font-size: clamp(18px, 2vw, 23px);
  font-weight: 700;
  color: #ccc;
  margin: 0;
  letter-spacing: clamp(0.3px, 0.05vw, 0.5px);
  line-height: 1.2;
  padding: clamp(6px, 1vw, 12px) 0 0 0;
}

.service-desc {
  font-size: clamp(15px, 1.7vw, 19px);
  color: #ccc;
  margin: 0;
  max-width: clamp(350px, 40vw, 500px);
  line-height: 1.55;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition:
    opacity 0.45s cubic-bezier(.87,.13,.32,1.15),
    max-height 0.45s cubic-bezier(.87,.13,.32,1.15);
  pointer-events: none;
  position: relative;
}

.service-row:hover .service-desc,
.service-row:focus-within .service-desc {
  opacity: 1;
  max-height: clamp(120px, 20vw, 200px);
  margin-top: clamp(12px, 2vw, 24px);
  pointer-events: auto;
}

/* Стили для кнопки Learn More с анимацией */
.learn-more {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45em;
  font-family: inherit;
  font-weight: 700;
  font-size: clamp(16px, 1.8vw, 20px);
  color: var(--accent);
  text-decoration: none;
  line-height: 1.1;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0;
  max-height: 0;
  pointer-events: none;
  transition:
    opacity 0.32s cubic-bezier(.6,0,.39,1),
    max-height 0.32s cubic-bezier(.6,0,.39,1),
    margin-top 0.18s cubic-bezier(.6,0,.39,1);
}

.service-row:hover .learn-more,
.service-row:focus-within .learn-more {
  opacity: 1;
  max-height: clamp(35px, 5vw, 50px);
  pointer-events: auto;
  margin-top: clamp(0.7em, 1.1vw, 1.1em);
}

.learn-more__text {
  position: relative;
  display: inline-block;
  padding-bottom: clamp(0.25em, 0.35vw, 0.35em);
}

.learn-more__text::after {
  content: "";
  display: block;
  width: 100%;
  height: var(--underline-thick);
  border-radius: var(--underline-radius);
  background: currentColor;
  position: absolute;
  left: 0;
  bottom: 0;
  transform: scaleX(0);
  transform-origin: left;
  opacity: 1;
  transition:
    transform var(--underline-duration) cubic-bezier(.45,.05,.55,.95);
  will-change: transform;
}

.learn-more:hover .learn-more__text::after,
.learn-more:focus-visible .learn-more__text::after {
  transform: scaleX(1);
}

.learn-more__arrow {
  display: inline-flex;
  align-items: baseline;
  font-size: 1em;
  line-height: 1;
  transition: transform 0.10s cubic-bezier(.45,.05,.55,.95);
  margin-left: 0.1em;
}

.learn-more:hover .learn-more__arrow,
.learn-more:focus-visible .learn-more__arrow {
  transform: translateX(clamp(0.08em, 0.13vw, 0.13em));
}

.service-image-mask {
  width: clamp(450px, 50vw, 640px);
  height: clamp(40px, 4vw, 56px);
  overflow: hidden;
  transition: height 0.45s cubic-bezier(.87,.13,.32,1.15);
  background: #191919;
  position: relative;
  box-shadow: 0 2px 20px rgba(0,0,0,0.11);
  flex-shrink: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  box-sizing: border-box;
}

.service-row:hover .service-image-mask,
.service-row:focus-within .service-image-mask {
  height: clamp(150px, 15vw, 206px);
}

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

/* Мобильная версия (до 900px) */
@media (max-width: 900px) {
  
  .service-list {
    gap: 0;
    padding: 18px 0;
  }
  
  .service-row {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 0 20px;
    margin-bottom: 20px;
  }

  .service-divider {
    margin: 0 20px 20px 20px;
    width: calc(100% - 40px);
    max-width: 100%;
  }

  .service-divider:last-child {
    margin-bottom: 0;
  }

  .service-row:nth-child(1),
  .service-row:nth-child(3),
  .service-row:nth-child(5) {
    margin-bottom: 40px;
  }

  .service-image-mask {
    order: 1;
    width: 100%;
    margin: 0 0 20px 0;
    min-height: 160px !important;
    padding: 0;
    background: transparent !important;
    border-radius: 8px;
    overflow: hidden;
  }

  .service-info {
    width: 100%;
    padding: 0;
    order: 2;
  }

  .service-title {
    font-size: 18px;
    padding: 0;
    margin-bottom: 8px;
  }

  .service-desc {
    font-size: 15px;
    max-width: 100%;
    margin: 8px 0 12px 0 !important;
    line-height: 1.5;
    opacity: 1 !important;
    max-height: none !important;
    pointer-events: auto !important;
  }

  .learn-more {
    font-size: 16px;
    margin: 0 !important;
    align-self: flex-start;
    opacity: 1 !important;
    max-height: none !important;
    pointer-events: auto !important;
  }

  .learn-more__text {
    padding-bottom: 0.23em;
  }

  .learn-more__text::after {
    height: 0.11em;
  }
}