.nml-faq {
    padding: 80px 0;
    background: var(--color-bg);
}

.nml-faq .nml-badge{
    margin-bottom: 20px;
}

/* ── Layout ── */
.nml-faq__inner {
    display: grid;
    grid-template-columns: 1fr 1.8fr;
    gap: 64px;
    align-items: start;
}

/* ── Aside (left) ── */
.nml-faq__aside {
    position: sticky;
    top: 32px;
    display: flex;
    flex-direction: column;
}

.nml-faq__heading {
    margin: 0 0 16px 0;
    font-size: 48px;
    line-height: 56px;
    font-weight: 700;
    color: var(--color-text-primary);
}

/* Wrap a word in <span> to give it the accent colour. */
.nml-faq__heading span { color: var(--color-accent); }

.nml-faq__subhead {
    margin: 0;
    font-size: 18px;
    line-height: 26px;
    font-weight: 500;
    color: var(--color-text-secondary);
}

/* ── Accordion list ── */
.nml-faq__list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nml-faq__item {
    border: 1px solid var(--color-line);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0px 1px 2px 0px #4C83F333;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.nml-faq__item:hover{
    box-shadow: 0px 2px 4px 0px #4C83F33D;
}

.nml-faq__question {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 24px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    font-size: 18px;
    font-weight: 700;
    line-height: 26px;
    color: var(--color-text-primary);
}


/* icon toggle — крестик доворачивается в минус за те же 400ms */
.nml-faq__icon {
    position: relative;
    flex-shrink: 0;
    display: flex;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
}

.nml-faq__icon svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transition: opacity 400ms cubic-bezier(0, 0, 0.58, 1),
                transform 400ms cubic-bezier(0, 0, 0.58, 1);
}

.nml-faq__icon-plus  { opacity: 1; transform: translate(-50%, -50%) rotate(0deg); }
.nml-faq__icon-minus { opacity: 0; transform: translate(-50%, -50%) rotate(-90deg); }

.nml-faq__item.is-open .nml-faq__icon svg {
    transition: opacity 400ms cubic-bezier(0.42, 0, 1, 1),
                transform 400ms cubic-bezier(0.42, 0, 1, 1);
}

.nml-faq__item.is-open .nml-faq__icon-plus  { opacity: 0; transform: translate(-50%, -50%) rotate(90deg); }
.nml-faq__item.is-open .nml-faq__icon-minus { opacity: 1; transform: translate(-50%, -50%) rotate(0deg); }

/* answer — плавное раскрытие (Figma: 400ms, открытие ease-in / закрытие ease-out) */
.nml-faq__answer {
    display: grid;
    grid-template-rows: 0fr;
    margin: 0 24px;
    /* базовое состояние = закрытие → ease-out */
    transition: grid-template-rows 400ms cubic-bezier(0, 0, 0.58, 1);
}

.nml-faq__item.is-open .nml-faq__answer {
    grid-template-rows: 1fr;
    /* открытие → ease-in */
    transition: grid-template-rows 400ms cubic-bezier(0.42, 0, 1, 1);
}

/* только обрезает контент — без своих отступов и рамок,
   иначе они не дадут строке схлопнуться в 0 */
.nml-faq__answer-clip {
    overflow: hidden;
    min-height: 0;
    /* убираем ссылки внутри из таб-порядка, но только после анимации */
    visibility: hidden;
    transition: visibility 0s linear 400ms;
}

.nml-faq__item.is-open .nml-faq__answer-clip {
    visibility: visible;
    transition: visibility 0s;
}

.nml-faq__answer-body {
    padding: 16px 0;
    border-top: 1px solid var(--color-line);
}

.nml-faq__answer p {
    margin: 0;
    font-size: 16px;
    line-height: 24px;
    font-weight: 500;
    color: var(--color-text-secondary);
}

/* ── CTA card ── */
.nml-faq__cta {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    border: 1px solid var(--color-primary);
    box-shadow: 0px 1px 2px 0px #4C83F333;
    background: linear-gradient(90deg, rgba(206, 216, 248, 0) 0%, rgba(23, 47, 111, 1) 100%);
}

.nml-faq__cta-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
}

.nml-faq__cta-content svg { flex-shrink: 0; margin-top: 2px; }

.nml-faq__cta-title {
    margin: 0;
    font-size: 18px;
    line-height: 26px;
    font-weight: 700;
    color: var(--color-text-primary);
    display: flex;
    gap: 8px;
}

.nml-faq__cta-sub {
    margin: 2px 0 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    color: var(--color-text-secondary);
}

.nml-faq__cta-btn {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 10px 24px;
    font-size: 14px;
    line-height: 20px;
}

.nml-faq__cta-btn:hover{
    background: #040F2D80;
}

/* ── Motion ── */
@media (prefers-reduced-motion: reduce) {
    .nml-faq__answer,
    .nml-faq__item.is-open .nml-faq__answer,
    .nml-faq__icon svg,
    .nml-faq__item.is-open .nml-faq__icon svg {
        transition-duration: 0s;
    }
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .nml-faq__inner {
        grid-template-columns: 1fr 1.4fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .nml-faq {
        padding: 40px 0;
    }

    .nml-faq__inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .nml-faq .nml-badge {
        margin-bottom: 16px;
    }

    .nml-faq__aside {
        position: static;
    }

    .nml-faq__heading {
        font-size: 32px;
        line-height: 40px;
        margin: 0 0 12px 0;
    }

    .nml-faq__subhead {
        font-size: 14px;
        line-height: 20px;
    }

    .nml-faq__question {
        padding: 16px 16px 12px;
        font-size: 16px;
        line-height: 24px;
    }

    .nml-faq__answer {
        margin: 0 16px;
    }

    .nml-faq__answer-body {
        padding: 12px 0 16px;
    }

    .nml-faq__answer p {
        font-size: 14px;
        line-height: 20px;
    }

    .nml-faq__cta {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 16px;
    }

    .nml-faq__cta-btn {
        width: 100%;
        justify-content: center;
    }

    .nml-faq__cta-title {
        font-size: 16px;
        line-height: 24px;
    }

    .nml-faq__cta-title svg{
        width: 18px;
        height: 18px;
    }
}
