/* Страница «Услуги» — вёрстка по Figma (узлы 325:7568 / 325:7543 / 325:7593) */

/* ---- Баннер (тот же компонент, что на «Гарантиях»/«Ипотеке») ---- */

.services-banner-block {
    margin-bottom: 60px;
}

.services-banner {
    width: 100%;
    display: flex;
    gap: 16px;
    height: 270px;
}

.services-banner__info {
    flex: 1;
    min-width: 0;
    display: flex;
    gap: 18px;
    align-items: stretch;
    overflow: hidden;
    border-radius: 4px;
    background: var(--Surface-White, #FFFFFF);
    padding-right: 16px;
}

.services-banner__illustration {
    flex-shrink: 0;
    width: 349px;
    height: 270px;
    object-fit: cover;
    display: block;
}

.services-banner__text {
    flex: 1;
    min-width: 0;
    padding: 30px 0;
    display: flex;
    flex-direction: column;
    gap: 17px;
}

.services-banner__title {
    margin: 0;
    font-size: 22px;
    font-weight: 500;
    line-height: 24px;
    color: var(--Text-Primary, #1E2433);
}

.services-banner__desc {
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 18px;
    color: var(--Text-Primary, #1E2433);
}

.services-banner__promo {
    position: relative;
    flex: 0 0 446.67px;
    border-radius: 4px;
    overflow: hidden;
    background: var(--Brand-Secondary, #454452);
}

.services-banner__house-icon {
    position: absolute;
    width: 252px;
    height: 252px;
    left: calc(50% + 166.33px - 126px);
    top: calc(50% - 9px - 126px);
}

.services-banner__arrow {
    position: absolute;
    left: 172px;
    top: 66px;
    width: 101px;
    height: 97px;
}

.services-banner__promo-title {
    position: absolute;
    left: 20px;
    top: 46px;
    transform: translateY(-50%);
    width: 338px;
    margin: 0;
    font-size: 22px;
    font-weight: 500;
    line-height: 1.2;
    color: #FFFFFF;
}

.services-banner__promo-sub {
    position: absolute;
    left: 20px;
    top: 91px;
    transform: translateY(-50%);
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
    color: #FFFFFF;
    white-space: nowrap;
}

.btn.services-banner__promo-btn {
    position: absolute;
    left: 20px;
    top: 198px;
    width: 406px;
}

/* ---- Вкладки услуг ---- */

/* до CTA-блока с архитектором по макету 80px; его собственный верхний паддинг — 16px */
.services-block {
    margin-bottom: 64px;
}

/* Заголовки вкладок — колонка слева, раскрытая статья — справа на всю высоту сетки.
   .service-item через display: contents отдаёт обе части в общий грид, поэтому та же
   разметка на мобильных складывается в аккордеон. */
.services-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: 274px minmax(0, 1fr);
    grid-template-rows: repeat(6, max-content) 1fr;
}

.service-item {
    display: contents;
}

.service-tab {
    grid-column: 1;
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 20px;
    border-radius: 6px 0 0 6px;
    cursor: pointer;
    text-align: left;
}

.service-item.is-active .service-tab {
    background: var(--Surface-White, #FFF);
}

.service-tab__icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: block;
}

/* Неактивная иконка — серая: фильтр из цветной (Default-вариант в Figma = #ABABB1) */
.service-item:not(.is-active) .service-tab__icon {
    filter: brightness(0) invert(0.67);
}

.service-tab__label {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 18px;
    text-transform: uppercase;
    color: var(--Text-Primary, #1E2433);
}

.service-article {
    grid-column: 2;
    grid-row: 1 / -1;
    display: none;
    min-width: 0;
    background: var(--Surface-White, #FFF);
    border-radius: 0 6px 6px 10px;
    padding: 20px 30px;
}

.service-item.is-active .service-article {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
}

/* Когда активен не первый таб, статья выступает над ним — левый верхний угол виден */
.service-item:not(:first-child).is-active .service-article {
    border-top-left-radius: 6px;
}

.service-article__title {
    margin: 0;
    width: 100%;
    font-size: var(--font-section-title, 30px);
    font-weight: 500;
    line-height: 38px;
    color: var(--Black, #1E2529);
}

.service-article__body {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.service-article__cover {
    width: 100%;
    height: 303px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.service-article__sections {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 40px;
    color: var(--Black, #1E2529);
}

.article-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
}

.article-section > * {
    width: 100%;
}

.article-section h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    line-height: 22px;
}

.article-section p {
    margin: 0;
    font-size: 16px;
    font-weight: 400;
    line-height: normal;
}

.article-section ul {
    margin: 0;
    padding-left: 24px;
    list-style: disc; /* глобальный reset убирает маркеры */
    font-size: 16px;
    font-weight: 400;
    line-height: normal;
}

.article-section li strong {
    font-weight: 500;
}

.article-pair {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* p внутри .article-pair наследует стили .article-section p, term переопределяет размер */
.article-section .article-pair__term {
    font-size: 18px;
    font-weight: 500;
    line-height: 22px;
}

/* ---- Плашка ключевого факта ---- */

/* Цена, «бесплатно», гарантия — то, ради чего человек и читает раздел.
   Полупрозрачная подложка из палитры сайта плюс золотая полоса слева. */
.article-highlight {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-self: flex-start;
    max-width: 100%;
    padding: 16px 22px;
    border-radius: 4px;
    /* Полупрозрачная подложка (правка Насти): плашка не спорит с белой
       карточкой, но остаётся читаемой — текст на ней тёмный, а не белый. */
    background: rgba(51, 51, 58, 0.08);
    border-left: 3px solid var(--Brand-Primary, #D5A944);
}

.article-section .article-highlight__value {
    font-size: 20px;
    font-weight: 600;
    line-height: 24px;
    color: var(--Brand-Primary-dark, #8C6817);
}

.article-section .article-highlight__note {
    font-size: 15px;
    line-height: 20px;
    color: var(--Gray-400, #565563);
}

/* ---- Переключение CTA (архитектор ↔ форма с домом) ---- */

.services-cta.is-hidden {
    display: none;
}

/* ---- Laptop (Figma-фрейм 990) ---- */

@media (max-width: 1279px) {
    .services-banner-block {
        margin-bottom: 40px;
    }

    .services-banner__illustration {
        display: none;
    }

    .services-banner__info {
        padding: 0 30px;
        min-width: 280px;
    }

    .services-banner__promo {
        flex-shrink: 1;
        min-width: 400px;
    }

    .services-block {
        margin-bottom: 60px;
    }
}

/* ---- Mobile (Figma-фрейм 360) ---- */

@media (max-width: 768px) {
    .services-banner-block {
        display: none;
    }

    .services-block {
        margin-bottom: 60px;
    }

    /* Аккордеон: каждый пункт — белая карточка, активный раскрывает статью под шапкой */
    .services-tabs {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .service-item {
        display: flex;
        flex-direction: column;
        background: var(--Surface-White, #FFF);
        border-radius: 6px;
        overflow: hidden;
    }

    .service-tab {
        padding: 10px 20px;
        border: 1px solid transparent;
        border-radius: 6px;
    }

    .service-item.is-active .service-tab {
        border-color: var(--Brand-Primary, #D5A944);
    }

    .service-item.is-active .service-article {
        padding: 14px 20px 20px;
        gap: 10px;
        border-radius: 0;
    }

    /* На мобильном роль заголовка играет шапка аккордеона, обложка в макете не показывается */
    .service-article__title,
    .service-article__cover {
        display: none;
    }

    .service-article__sections {
        gap: 20px;
    }

    .article-section {
        gap: 10px;
    }

    .article-section h3 {
        font-size: 16px;
        line-height: 1.22;
    }

    .article-section p,
    .article-section ul {
        font-size: 14px;
        line-height: 18px;
    }

    .article-section .article-highlight__value {
        font-size: 18px;
        line-height: 22px;
    }

    .article-highlight {
        padding: 14px 18px;
    }

    .article-section .article-pair__term {
        font-size: 16px;
        line-height: 1.22;
    }
}
