#template-page {
    --section-gap: 64px;
}

#template-page .body {
    padding: 50px 0 100px 0;
}

#template-page .page-title {
    margin-bottom: 25px;
}

#template-page .breadcrumbs {
    margin-bottom: 25px;
}

.tpl-title {
    margin-bottom: var(--section-gap);
}

.tpl-title .page-description {
    text-align: justify;
    color: #282828;
    font-size: 16px;
}

.tpl-block {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.tpl-hero {
    margin-bottom: var(--section-gap);
}

/* Контейнер всегда содержит <img>, и картинка всегда в потоке —
   она задаёт высоту блока под свою натуральную высоту (без обрезки).
   Текст (если есть) ложится поверх абсолютным оверлеем с затемнением. */
.tpl-hero__container {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    display: block;
}
.tpl-hero__image {
    display: block;
    width: 100%;
    height: auto;
    position: relative;
    z-index: 0;
}
.tpl-hero__content {
    position: absolute;
    inset: 0;
    z-index: 2;
    max-width: 560px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 24px;
    padding: 60px 60px 36px;
    pointer-events: none;
}
.tpl-hero__content > * {
    pointer-events: auto;
}
.tpl-hero__container--overlay .tpl-hero__content {
    justify-content: flex-end;
}
.tpl-hero__title {
    color: #fff;
    font-size: 38px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.55), 0 0 2px rgba(0, 0, 0, 0.45);
}
.tpl-hero__text {
    color: #fff;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 160%;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.55), 0 0 2px rgba(0, 0, 0, 0.45);
}

/* =========================================================
   БЛОК 2 — Краткие характеристики (3 карточки)
   ========================================================= */

.tpl-facts {
    margin-bottom: var(--section-gap);
}

.tpl-facts__grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.tpl-facts__card {
    width: 100%;
    border-radius: 10px;
    background: #fff;
    box-shadow: -1px 4px 8px 0 rgba(40, 40, 40, 0.05);
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 25px;
}
.tpl-facts__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tpl-facts__text {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.tpl-facts__text span {
    color: #282828;
    font-size: 20px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
    letter-spacing: 0.2px;
}
.tpl-facts__text p {
    color: #282828;
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
}
.tpl-facts__som {
    text-decoration: underline;
}

/* =========================================================
   БЛОК 3 — Что понадобится для подключения (серая полоса)
   ========================================================= */
.tpl-needs {
    background: #f0f0f0;
    padding: 70px 0;
    margin-bottom: var(--section-gap);
}
.tpl-needs .default-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 50px;
}
.tpl-needs__grid {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 30px;
}
.tpl-needs__card {
    width: 100%;
    border-radius: 10px;
    background: #fff;
    box-shadow: -1px 4px 8px 0 rgba(40, 40, 40, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.tpl-needs__card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #282828;
    color: #fff;
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    padding: 18px 24px;
}
.tpl-needs__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #bf1a1f;
    flex-shrink: 0;
}
.tpl-needs__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 24px;
}
.tpl-needs__list li {
    position: relative;
    padding-left: 28px;
    color: #282828;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 147.023%; /* 20.583px */
}
.tpl-needs__list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3 8.5L6.5 12L13 4' stroke='%23BF1A1F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

/* =========================================================
   БЛОК 4 — Как подключиться (текст + ссылки)
   ========================================================= */

.tpl-text {
    margin-bottom: var(--section-gap);
}

.tpl-text .default-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 30px;
}
.tpl-text__subtitle {
    color: #282828;
    font-size: 24px;
    font-style: normal;
    font-weight: 600;
    line-height: 140%;
}
.tpl-text__body {
    color: #282828;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 167.523%; /* 26.804px */
    text-align: justify;
}
.tpl-text__links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}
.tpl-text__link {
    color: #bf1a1f;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}
.tpl-text__link:hover {
    text-decoration: underline;
}

/* =========================================================
   БЛОК 5 — Пошаговая инструкция (переключатель + шаги)
   ========================================================= */
.tpl-steps {
    margin-bottom: var(--section-gap);
}

.tpl-steps .default-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 40px;
}
.tpl-steps__tabs {
    display: inline-flex;
    padding: 6px;
    border-radius: 100px;
    background: #f0f0f0;
    gap: 6px;
}
.tpl-steps__tab {
    cursor: pointer;
    background: transparent;
    border-radius: 100px;
    color: #282828;
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    padding: 12px 24px;
    white-space: nowrap;
}
.tpl-steps__tab.active {
    background: #282828;
    color: #fff;
    font-weight: 600;
}
.tpl-steps__list {
    --tpl-step-size: 36px;
    position: relative;
    list-style: none;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
/* Соединительная линия между кружками */
.tpl-steps__list::before {
    content: '';
    position: absolute;
    left: calc(var(--tpl-step-size) / 2);
    top: calc(var(--tpl-step-size) / 2);
    bottom: calc(var(--tpl-step-size) / 2);
    width: 1.5px;
    background: #bf1a1f;
    transform: translateX(-50%);
    z-index: 0;
}

/* Панели вкладок: показываем только активную */
.tpl-steps__panel {
    display: none;
}
.tpl-steps__panel.active {
    display: flex;
}

.tpl-steps__item {
    display: flex;
    align-items: center;
    gap: 24px;
}
.tpl-steps__num {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    width: var(--tpl-step-size);
    height: var(--tpl-step-size);
    border-radius: 50%;
    border: 1.5px solid #bf1a1f;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #282828;
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
}
.tpl-steps__num--done {
    background: #bf1a1f;
    border-color: #bf1a1f;
}
.tpl-steps__text {
    color: #282828;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}
.tpl-steps__text b {
    font-weight: 700;
}

/* =========================================================
   БЛОК — Часто задаваемые вопросы (FAQ-аккордеон)
   ========================================================= */
.tpl-faq {
    margin-bottom: var(--section-gap);
}

.tpl-faq__inner {
    width: 100%;
    /* max-width: 800px; */
    /* margin: 0 auto; */
}
.tpl-faq__title {
    color: #282828;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
}
.tpl-faq__subtitle {
    color: #6e6e6e;
    font-size: 16px;
    margin-top: 10px;
    margin-bottom: 34px;
    max-width: 560px;
}
.tpl-faq__item {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    margin-bottom: 12px;
    transition:
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}
.tpl-faq__item:last-child {
    margin-bottom: 0;
}
.tpl-faq__item:not(.tpl-faq__item--open):hover {
    box-shadow: 0 4px 12px rgba(191, 26, 31, 0.1);
}
.tpl-faq__item--open {
    box-shadow: inset 3px 0 0 #bf1a1f;
}
.tpl-faq__heading {
    margin: 0;
}
.tpl-faq__question {
    width: 100%;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    text-align: left;
}
.tpl-faq__q-text {
    color: #282828;
    font-size: 16px;
    font-weight: 600;
    line-height: normal;
    transition: color 0.2s ease;
}
.tpl-faq__question:hover .tpl-faq__q-text,
.tpl-faq__item--open .tpl-faq__q-text {
    color: #bf1a1f;
}
.tpl-faq__icon {
    position: relative;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(191, 26, 31, 0.08);
    flex-shrink: 0;
}
.tpl-faq__icon::before,
.tpl-faq__icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 2px;
    border-radius: 2px;
    background: #bf1a1f;
    transform: translate(-50%, -50%);
    transition:
        transform 0.3s ease,
        opacity 0.3s ease;
}
.tpl-faq__icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
}
.tpl-faq__item--open .tpl-faq__icon::after {
    transform: translate(-50%, -50%) rotate(0);
    opacity: 0;
}
.tpl-faq__answer {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease;
}
.tpl-faq__item--open .tpl-faq__answer {
    grid-template-rows: 1fr;
}
.tpl-faq__answer-inner {
    overflow: hidden;
}
.tpl-faq__answer-inner p {
    padding: 0 24px 20px;
    color: #444;
    font-size: 14px;
    line-height: 1.7;
}
.tpl-faq__cta-wrap {
    width: 100%;
    margin-top: 30px;
    text-align: center;
}
.tpl-faq__cta {
    display: inline-block;
    background: transparent;
    border: 1px solid #bf1a1f;
    color: #bf1a1f;
    border-radius: 10px;
    padding: 18px 40px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition:
        background 0.2s ease,
        color 0.2s ease;
}
.tpl-faq__cta:hover {
    background: #bf1a1f;
    color: #fff;
}

/* =========================================================
   БЛОК 6 — Видео
   ========================================================= */
.tpl-video .default-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 40px;
}
.tpl-video__frame {
    width: 100%;
    height: 460px;
    border-radius: 10px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-color: #282828;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.tpl-video__frame::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(40, 40, 40, 0.2);
}
.tpl-video__play {
    position: relative;
    z-index: 1;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding-left: 6px;
}
.tpl-video__play:hover {
    background: rgba(191, 26, 31, 0.85);
    border-color: #bf1a1f;
}

/* =========================================================
   БЛОК 7 — Галерея изображений
   ========================================================= */
.tpl-gallery {
    margin-bottom: var(--section-gap);
}
.tpl-gallery .default-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 40px;
}
.tpl-gallery__grid {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}
.tpl-gallery__item {
    width: calc((100% - 60px) / 3);
    border-radius: 10px;
    overflow: hidden;
}
.tpl-gallery__item img {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

/* =========================================================
   Мобильная версия (брейкпоинт проекта — 730px)
   ========================================================= */
@media screen and (max-width: 730px) {
    #template-page .body {
        gap: 60px;
    }

    /* Баннер */
    .tpl-hero__container--overlay {
        min-height: unset;
    }
    .tpl-hero__content {
        max-width: unset;
        padding: 30px 20px;
        gap: 18px;
    }
    .tpl-hero__title {
        font-size: 24px;
    }
    .tpl-hero__text {
        font-size: 14px;
    }

    /* Характеристики */
    .tpl-facts__grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .tpl-facts__card {
        padding: 20px;
        gap: 20px;
    }
    .tpl-facts__icon svg {
        width: 40px;
        height: 40px;
    }
    .tpl-facts__text span {
        font-size: 16px;
    }

    /* Что понадобится */
    .tpl-needs {
        padding: 40px 0;
    }
    .tpl-needs .default-wrapper {
        gap: 36px;
    }
    .tpl-needs__grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Как подключиться */
    .tpl-text .default-wrapper {
        gap: 20px;
    }
    .tpl-text__subtitle {
        font-size: 18px;
    }
    .tpl-text__body {
        font-size: 14px;
    }
    .tpl-text__link {
        font-size: 14px;
    }

    /* Пошаговая инструкция */
    .tpl-steps .default-wrapper {
        gap: 30px;
    }
    .tpl-steps__tabs {
        width: 100%;
        justify-content: center;
    }
    .tpl-steps__tab {
        flex: 1;
        text-align: center;
        padding: 12px 10px;
        font-size: 12px;
    }
    .tpl-steps__list {
        --tpl-step-size: 30px;
        gap: 10px;
    }
    .tpl-steps__item {
        gap: 16px;
        align-items: center;
    }
    .tpl-steps__num {
        font-size: 14px;
    }
    .tpl-steps__text {
        font-size: 14px;
        line-height: 140%;
    }

    /* FAQ */
    .tpl-faq__title {
        font-size: 24px;
    }
    .tpl-faq__question {
        padding: 18px 18px;
    }
    .tpl-faq__answer-inner p {
        padding: 0 18px 18px;
    }
    .tpl-faq__cta {
        width: 100%;
    }

    /* Видео */
    .tpl-video .default-wrapper {
        gap: 30px;
    }
    .tpl-video__frame {
        height: 220px;
    }
    .tpl-video__play {
        width: 64px;
        height: 64px;
    }
    .tpl-video__play svg {
        width: 22px;
        height: 25px;
    }

    /* Галерея — слайдер */
    .tpl-gallery .default-wrapper {
        gap: 24px;
    }
    .tpl-gallery__grid {
        display: block;
    }
    .tpl-gallery__item {
        width: 100%;
    }
    .tpl-gallery__grid .slick-slide {
        margin: 0 8px;
    }
}
