/* ============================================
   Services Page Styles
   ============================================ */

/* Services Hero Section */
.services-hero {
  position: relative;
  background: linear-gradient(rgba(39, 115, 228, 0.9), rgba(39, 115, 228, 0.9)),
    url('/local/templates/main/assets/img/services-hero.png') center/cover no-repeat;
  padding: var(--spacing-3xl) var(--section-side-padding);
  display: flex;
  align-items: stretch;
}

.services-hero__container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 0;
}

.services-hero__content {
  display: flex;
  flex-direction: column;
  gap: 60px;
  width: 539px;
}

.services-hero__title {
  font-family: var(--font-family);
  font-weight: var(--font-weight-regular);
  font-size: 48px;
  line-height: 1.16em;
  color: var(--color-background);
  margin: 0;
}

/* Services List Section */
.services-list {
  background: var(--color-background);
  padding: var(--spacing-4xl) var(--section-side-padding);
}

.services-list__container {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-lg);
}

/* Service Card */
.services-list__card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl);
  width: calc(33.333% - 16px);
  min-height: 358px;
  padding: var(--spacing-xl);
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: 8px 64px 8px 64px;
  transition: all var(--transition-normal);
  overflow: hidden;
}

.services-list__card:hover {
  box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.08);
}

.services-list__card:hover .services-list__button {
  background: #2773E4;
  color: var(--color-background);
}

.services-list__card:hover .services-list__button-icon {
  stroke: var(--color-background);
}

.services-list__card--featured {
  border: none;
  box-shadow: 0px 8px 24px rgba(0, 0, 0, 0.1);
  border-radius: 8px 64px 8px 8px;
}

.services-list__icon {
  position: absolute;
  top: 180px;
  right: var(--spacing-xl);
  width: 160px;
  height: 160px;
}

.services-list__content {
  display: flex;
  flex-direction: row;
  gap: var(--spacing-3xl);
  width: 100%;
}

.services-list__text {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
  flex: 1;
}

.services-list__title {
  font-family: var(--font-family);
  font-weight: var(--font-weight-semibold);
  font-size: 24px;
  line-height: 1.193em;
  color: var(--color-text-secondary);
  margin: 0;
}

.services-list__description {
  font-family: var(--font-family);
  font-weight: var(--font-weight-semibold);
  font-size: 16px;
  line-height: 1.193em;
  color: var(--color-text-muted);
  margin: 0;
}

.services-list__button {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  align-self: flex-start;
  justify-self: flex-start;
  gap: 10px;
  padding: var(--spacing-sm);
  border: none;
  border-radius: var(--radius-special);
  font-family: var(--font-family);
  font-weight: var(--font-weight-semibold);
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition-normal);
  width: fit-content;
}

.services-list__button--gray,
.services-list__button--blue {
  background: var(--color-button-text);
  color: var(--color-text-secondary);
}

.services-list__button-icon {
  stroke: black;
  width: 20px;
  height: 20px;
}

/* ============================================
   ADAPTIVE — services-list
   ============================================ */

/* ---------- 1280px — 2 карточки в ряд ---------- */
@media (max-width: 1280px) {
  .services-list {
    padding: 60px 40px;
  }

  .services-list__card {
    width: calc(50% - 12px);
  }
}

/* ---------- 1024px ---------- */
@media (max-width: 1024px) {
  .services-list {
    padding: 48px 24px;
  }

  .services-list__card {
    width: calc(50% - 12px);
    min-height: 280px;
    padding: 24px;
  }

  .services-list__icon {
    width: 120px;
    height: 120px;
    top: auto;
    bottom: 16px;
    right: 16px;
  }

  .services-list__title {
    font-size: 20px;
  }

  .services-list__description {
    font-size: 14px;
  }
}

/* ---------- 768px — 1 карточка, горизонтальный layout ---------- */
@media (max-width: 768px) {
  .services-list {
    padding: 40px 16px;
  }

  .services-list__container {
    gap: 12px;
  }

  /* Карточка: иконка сверху, текст снизу, стрелка справа */
  .services-list__card {
    width: 100% !important;
    min-height: 272px;
    padding: 16px;
    flex-direction: column !important;
    align-items: flex-start;
    gap: 12px;
    border-radius: 8px 32px 8px 32px;
  }

  .services-list__card--featured {
    border-radius: 8px 32px 8px 8px;
  }

  /* Иконка — статичная, вверху */
  .services-list__icon {
    position: static !important;
    width: 72px !important;
    height: 72px !important;
    flex-shrink: 0;
    opacity: 1;
    top: auto;
    right: auto;
    transform: none !important;
  }

  /* Контент: текст слева, стрелка справа */
  .services-list__content {
    flex: 1;
    flex-direction: row !important;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    min-width: 0;
  }

  .services-list__text {
    flex: 1;
    gap: 6px;
    min-width: 0;
  }

  .services-list__title {
    font-size: 16px;
    line-height: 1.3;
  }

  .services-list__description {
    font-size: 13px;
    line-height: 1.4;
  }

  /* Стрелка справа */
  .services-list__button {
    flex-shrink: 0;
    align-self: flex-start;
    padding: 10px;
  }

  .services-list__card:hover {
    transform: none;
  }
}

/* ============================================
   Service Steps Component
   ============================================ */

.service-tabs {
  /* Tabs live inside .service-details-main (sidebar layout),
     so don't override section padding/background from wrapper. */
  background: #F1F5F9;
  padding: 0;
  margin: 0;
}

.service-tabs__container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.service-tabs__nav {
  display: flex;
  gap: 36px;
  align-items: flex-end;
  border-bottom: 1px solid #dbe3ee;
  padding-top: 14px;
}

.service-tabs__tab {
  appearance: none;
  background: transparent;
  border: none;
  padding: 12px 0 14px;
  cursor: pointer;
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.2;
  color: #90A4AE;
  position: relative;
}

.service-tabs__tab.is-active {
  color: #263238;
}

.service-tabs__tab.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: #2773E4;
}

.service-tabs__panes {
  padding: 24px 0 0;
}

.service-tabs__pane[hidden] {
  display: none;
}

.service-tabs__pane {
  max-width: 1200px;
}

.service-tabs__content {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Normalize component outer spacing inside tabs */
.service-tabs__content .text-block {
  width: 100%;
  max-width: none;
  margin: 0;
}

.service-tabs__content .content-table {
  width: 100%;
  max-width: none;
  margin: 0;
}

.service-tabs__pane :where(h1, h2, h3) {
  color: #263238;
}

.service-tabs__pane :where(h2) {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 16px;
}

.service-tabs__pane :where(p, li) {
  font-size: 14px;
  line-height: 1.6;
  color: #546E7A;
}

/* ============================================
   Unified content styles for services only
   (scoped to service details layout)
   ============================================ */

.service-details-wrapper .custom-header__title {
  font-size: 48px;
  font-weight: 600;
  color: #263238;
}

@media (max-width: 768px) {
  .service-details-wrapper .custom-header__title {
    font-size: 32px;
  }
}

.service-details-wrapper .text-block {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.service-details-wrapper .text-block__content {
  font-size: 18px;
  line-height: 1.8;
  color: #263238;
}

.service-details-wrapper .text-block__content ul,
.service-details-wrapper .text-block__content ol {
  padding-left: 30px;
}

.service-details-wrapper .text-block__content li {
  margin-bottom: 15px;
}

.service-details-wrapper .text-block__content strong {
  color: #2773E4;
  font-weight: 600;
}

@media (max-width: 768px) {
  .service-details-wrapper .text-block__content {
    font-size: 16px;
    line-height: 1.7;
  }
}

.service-steps {
    background: #F1F5F9;
    padding: 80px var(--section-side-padding);
    margin-left: calc(var(--section-side-padding) * -1);
    margin-right: calc(var(--section-side-padding) * -1);
}

.service-steps__container {
    width: 100%;
    max-width: 860px;
    margin-left: 0;
    margin-right: 0;
}

.service-steps__header {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 48px;
}

.service-steps__title {
    font-family: 'Gilroy', sans-serif;
    font-weight: 700;
    font-size: 36px;
    line-height: 1.2;
    color: #263238;
    margin: 0;
}

.service-steps__underline {
    width: 127px;
    height: 6px;
    background: #15E691;
    border-radius: 3px;
}

.service-steps__list {
    display: flex;
    flex-direction: column;
}

.service-steps__item {
    display: flex;
    gap: 24px;
}

.service-steps__marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    align-self: stretch;
}

.service-steps__number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #2773E4;
    color: #fff;
    font-family: 'Gilroy', sans-serif;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.service-steps__line {
    width: 2px;
    flex: 1;
    min-height: 32px;
    background: #2773E4;
    margin: 4px 0;
}

.service-steps__body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 32px;
}

.service-steps__item:last-child .service-steps__body {
    padding-bottom: 0;
}

.service-steps__item-title {
    font-family: 'Gilroy', sans-serif;
    font-weight: 600;
    font-size: 20px;
    line-height: 1.3;
    color: #263238;
    margin: 0;
    padding-top: 8px;
}

.service-steps__item-text {
    font-family: 'Gilroy', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.6;
    color: #546E7A;
    margin: 0;
}
