/*
 * Главная nemenova.com — компактная версия в общей канве сайта.
 * Подключать после main3.css.
 * Значения сетки, карточек, FAQ и CTA повторяют страницы
 * «Обо мне», «Услуги» и «Индивидуальная консультация».
 */

.nm-skip-link {
    position: fixed;
    z-index: 10000;
    top: 10px;
    left: 10px;
    padding: 10px 15px;
    color: #fff;
    background: #454545;
    border-radius: 6px;
    transform: translateY(-160%);
    transition: transform .18s ease;
}

.nm-skip-link:focus {
    color: #fff;
    transform: translateY(0);
}

.nm-home-page,
.nm-home-page *,
.nm-home-page *:before,
.nm-home-page *:after {
    box-sizing: border-box;
}

.nm-home-page {
    padding-top: 54px;
    padding-bottom: 58px;
    color: #555;
}

.nm-home-page a:focus-visible {
    outline: 2px solid rgba(244, 161, 21, .55);
    outline-offset: 3px;
}

/* Hero — размеры и типографика общей nm-системы. */
.nm-hero {
    margin-bottom: 72px;
}

.nm-home-hero {
    margin-bottom: 64px;
}

.nm-hero__label,
.nm-section__label,
.nm-service-card__label {
    margin-bottom: 12px;
    color: #d98b16;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .09em;
    line-height: 1.4;
    text-transform: uppercase;
}

.nm-hero h1 {
    max-width: 700px;
    margin: 0 0 20px;
    color: #333;
    font-size: 42px;
    line-height: 1.16;
}

.nm-hero__lead {
    max-width: 720px;
    margin: 0 0 24px;
    color: #555;
    font-size: 18px;
    line-height: 1.7;
}

.nm-hero__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.nm-hero__facts span {
    display: inline-block;
    padding: 8px 12px;
    color: #7b614e;
    background: #fff8ef;
    border: 1px solid rgba(244, 161, 21, .22);
    border-radius: 20px;
    font-size: 14px;
    line-height: 1.35;
}

.nm-hero__actions,
.nm-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.nm-hero__actions .theme_button,
.nm-cta .theme_button {
    margin: 0 !important;
}

.nm-home-page .border_button {
    color: #d87e00 !important;
    background: transparent !important;
    border: 1px solid rgba(244, 161, 21, .8) !important;
}

.nm-home-page .border_button:hover,
.nm-home-page .border_button:focus {
    color: #fff !important;
    background: #f4a115 !important;
    border-color: #f4a115 !important;
}

.nm-home-microcopy {
    max-width: 660px;
    margin: 12px 0 0;
    color: #888;
    font-size: 13px;
    line-height: 1.55;
}

.nm-home-hero__photo {
    position: relative;
    max-width: 390px;
    margin: 0 auto;
    padding: 18px 12px 0;
    background: #fffaf5;
    border: 1px solid rgba(244, 161, 21, .16);
    border-radius: 18px;
    box-shadow: 0 8px 26px rgba(0, 0, 0, .05);
}

.nm-home-hero__photo img {
    display: block;
    width: 100%;
    height: auto;
}

/* Секции и двухколоночная композиция. */
.nm-section {
    padding: 46px 0;
}

.nm-section--soft,
.nm-section--reviews {
    margin: 12px -15px;
    padding: 42px 32px;
    background: #fffaf5;
    border: 1px solid rgba(244, 161, 21, .16);
    border-radius: 18px;
}

.nm-section__title {
    margin: 0 0 14px;
    color: #333;
    font-size: 28px;
    line-height: 1.25;
}

.nm-section__intro {
    max-width: 310px;
    margin: 0;
    color: #777;
    font-size: 15px;
    line-height: 1.7;
}

.nm-section__intro.nm-section__intro--wide {
    max-width: 820px;
    margin-bottom: 20px;
}

.nm-text {
    color: #555;
    font-size: 17px;
    line-height: 1.75;
}

.nm-text p {
    margin: 0 0 18px;
}

.nm-text a,
.nm-text-link,
.nm-card-link,
.nm-method-card a,
.nm-home-credentials a {
    color: #d87e00;
    text-decoration: none;
}

.nm-text a:hover,
.nm-text-link:hover,
.nm-card-link:hover,
.nm-method-card a:hover,
.nm-home-credentials a:hover {
    color: #333;
    text-decoration: none;
}

.nm-text-link {
    display: inline-block;
    margin-top: 22px;
    font-size: 15px;
    font-weight: 600;
}

/* Темы — те же малые карточки, что на странице «Услуги». */
.nm-topic-grid {
    display: flex;
    flex-wrap: wrap;
}

.nm-topic-grid > [class*="col-"] {
    display: flex;
    margin-bottom: 20px;
}

.nm-topic-card {
    width: 100%;
    padding: 23px 22px 21px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 14px;
    box-shadow: 0 5px 18px rgba(0, 0, 0, .04);
}

.nm-topic-card h3 {
    margin: 0 0 10px;
    color: #333;
    font-size: 16px;
    line-height: 1.35;
}

.nm-topic-card p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.nm-card-link {
    display: inline-block;
    margin-top: 13px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
}

/* Карточки услуг — повтор действующей страницы /services/. */
.nm-service-cards {
    display: flex;
    flex-wrap: wrap;
}

.nm-service-cards > [class*="col-"] {
    display: flex;
    margin-bottom: 24px;
}

.nm-service-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 420px;
    padding: 34px 34px 32px;
    background: #fff;
    border: 1px solid rgba(244, 161, 21, .20);
    border-radius: 18px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .05);
}

.nm-home-service-cards .nm-service-card {
    min-height: 390px;
}

.nm-service-card__label {
    margin-bottom: 13px;
}

.nm-service-card h3 {
    margin: 0 0 15px;
    color: #333;
    font-size: 27px;
    line-height: 1.25;
}

.nm-service-card__lead {
    margin: 0 0 20px;
    color: #555;
    font-size: 16px;
    line-height: 1.7;
}

.nm-service-card__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}

.nm-service-card__facts span {
    display: inline-block;
    padding: 7px 11px;
    color: #7b614e;
    background: #fff8ef;
    border: 1px solid rgba(244, 161, 21, .22);
    border-radius: 18px;
    font-size: 13px;
    line-height: 1.35;
}

.nm-service-card__list {
    margin: 0 0 26px;
    padding: 0;
    list-style: none;
}

.nm-service-card__list li {
    position: relative;
    margin-bottom: 11px;
    padding-left: 20px;
    color: #555;
    font-size: 15px;
    line-height: 1.55;
}

.nm-service-card__list li:before,
.nm-home-credentials li:before {
    position: absolute;
    top: .72em;
    left: 0;
    width: 7px;
    height: 7px;
    content: "";
    background: #f4a115;
    border-radius: 50%;
}

.nm-service-card .theme_button {
    align-self: flex-start;
    margin-top: auto !important;
}

/* Информационные карточки и путь клиента. */
.nm-info-grid,
.nm-link-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.nm-home-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.nm-info-card,
.nm-link-card {
    display: block;
    padding: 22px 24px;
    color: #555;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .07);
    border-radius: 14px;
    box-shadow: 0 5px 18px rgba(0, 0, 0, .04);
    text-decoration: none;
}

.nm-info-card strong,
.nm-link-card strong {
    display: block;
    margin-bottom: 7px;
    color: #333;
    font-size: 16px;
    line-height: 1.4;
}

.nm-info-card > span:not(.nm-step-number),
.nm-link-card span {
    display: block;
    color: #777;
    font-size: 14px;
    line-height: 1.55;
}

.nm-link-card {
    transition: transform .2s ease, box-shadow .2s ease;
}

.nm-link-card:hover,
.nm-link-card:focus {
    color: #555;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .08);
}

.nm-step-number {
    display: inline-flex;
    width: 26px;
    height: 26px;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    color: #fff;
    background: #c9892a;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
}

.nm-method-card {
    margin-top: 18px;
    padding: 28px 30px;
    background: #fff8ef;
    border: 1px solid rgba(244, 161, 21, .22);
    border-radius: 16px;
}

.nm-method-card h3 {
    margin: 0 0 13px;
    color: #333;
    font-size: 22px;
    line-height: 1.35;
}

.nm-method-card p {
    margin: 0 0 13px;
    color: #5c5651;
    font-size: 15px;
    line-height: 1.7;
}

.nm-method-card__note {
    color: #746e68 !important;
    font-size: 14px !important;
}

.nm-method-card__links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    font-size: 14px;
    font-weight: 600;
}

/* Опыт и проверяемые признаки экспертности. */
.nm-side-card {
    padding: 32px 34px;
    background: #fffaf5;
    border: 1px solid rgba(244, 161, 21, .18);
    border-radius: 18px;
    box-shadow: 0 8px 26px rgba(0, 0, 0, .04);
}

.nm-side-card h3 {
    margin: 0 0 14px;
    color: #333;
    font-size: 22px;
    line-height: 1.3;
}

.nm-home-credentials ul {
    margin: 0 0 19px;
    padding: 0;
    list-style: none;
}

.nm-home-credentials li {
    position: relative;
    margin-bottom: 9px;
    padding-left: 19px;
    color: #666;
    font-size: 14px;
    line-height: 1.55;
}

.nm-home-credentials__links {
    display: grid;
    gap: 7px;
    font-size: 14px;
    font-weight: 600;
}

.nm-home-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    align-items: center;
    margin-top: 24px;
}

.nm-home-inline-actions .theme_button,
.nm-home-inline-actions .nm-text-link {
    margin: 0 !important;
}

/* Отзывы — точное повторение nm-карточек страницы консультации. */
.nm-reviews-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.nm-review-card {
    display: flex;
    flex-direction: column;
    min-height: 220px;
    padding: 23px 24px 20px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 14px;
    box-shadow: 0 5px 18px rgba(0, 0, 0, .04);
}

.nm-review-card blockquote {
    margin: 0;
    padding: 0;
    color: #505050;
    background: transparent;
    border: 0;
    font-family: inherit;
    font-size: 16px;
    font-style: normal;
    line-height: 1.7;
    text-align: left;
}

.nm-review-card blockquote:before {
    display: block;
    margin: -8px 0 2px;
    color: #f4a115;
    content: "“";
    font-family: Georgia, serif;
    font-size: 36px;
    line-height: 1;
}

.nm-review-card p {
    margin: 0;
}

.nm-review-card footer {
    margin-top: auto;
    padding-top: 18px;
}

.nm-review-card strong {
    display: block;
    color: #333;
    font-size: 14px;
    line-height: 1.4;
}

.nm-review-card footer span {
    display: block;
    margin-top: 3px;
    color: #91867d;
    font-size: 13px;
    line-height: 1.4;
}

.nm-review-sources {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.nm-review-sources a {
    padding: 7px 11px;
    color: #7b614e;
    background: #fff;
    border: 1px solid rgba(244, 161, 21, .22);
    border-radius: 18px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.nm-review-sources a:hover {
    color: #d87e00;
    text-decoration: none;
}

/* Материалы. */
.nm-home-subtitle {
    margin: 0 0 16px;
    color: #333;
    font-size: 18px;
    line-height: 1.35;
}

.nm-home-subtitle--latest {
    margin-top: 30px;
}

.nm-home-reading-grid .nm-link-card {
    padding: 18px 20px;
}

.nm-home-blog-grid {
    display: flex;
    flex-wrap: wrap;
    margin-top: 0;
}

.nm-home-blog-grid > [class*="col-"] {
    display: flex;
    margin-bottom: 18px;
}

.nm-home-blog-grid .vertical-item,
.nm-home-blog-grid article {
    width: 100%;
}

/* FAQ — тот же Bootstrap collapse, что на /services/personal. */
.nm-accordion {
    margin: 0;
}

.nm-accordion .panel,
.nm-accordion .panel-default {
    margin: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-top: 1px solid #e8e4df !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.nm-accordion .panel:last-child {
    border-bottom: 1px solid #e8e4df !important;
}

.nm-accordion .panel-heading {
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
}

.nm-accordion .panel-title {
    margin: 0 !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
}

.nm-accordion__toggle {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px 0 !important;
    color: #333 !important;
    text-decoration: none !important;
}

.nm-accordion__toggle:hover,
.nm-accordion__toggle:focus {
    color: #d87e00 !important;
    text-decoration: none !important;
}

.nm-accordion__toggle span {
    display: block;
    flex: 1 1 auto;
}

.nm-accordion__icon {
    flex: 0 0 auto;
    color: #f4a115;
    font-size: 18px;
    transition: transform .2s ease;
}

.nm-accordion__toggle:not(.collapsed) .nm-accordion__icon,
.nm-accordion__toggle[aria-expanded="true"] .nm-accordion__icon {
    transform: rotate(180deg);
}

.nm-accordion .panel-body {
    padding: 4px 0 24px 20px !important;
    color: #555;
    background: transparent !important;
    border: 0 !important;
    font-size: 16px;
    line-height: 1.7;
}

.nm-accordion .panel-body a {
    color: #d87e00;
}

/* Финальный CTA — тот же блок, что на страницах услуг. */
.nm-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin: 0 -15px;
    padding: 34px 38px;
    color: #fff;
    background: #454545;
    border-radius: 18px;
}

.nm-cta__content {
    max-width: 650px;
}

.nm-cta h2 {
    margin: 0 0 10px;
    color: #fff;
    font-size: 28px;
    line-height: 1.25;
}

.nm-cta p {
    margin: 0;
    color: rgba(255, 255, 255, .78);
    font-size: 16px;
    line-height: 1.65;
}

.nm-cta__actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.nm-home-page .nm-cta .border_button {
    color: #fff !important;
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, .55) !important;
}

.nm-home-page .nm-cta .border_button:hover,
.nm-home-page .nm-cta .border_button:focus {
    color: #333 !important;
    background: #fff !important;
    border-color: #fff !important;
}

@media (max-width: 991px) {
    .nm-hero h1 {
        font-size: 36px;
    }

    .nm-section__title {
        font-size: 25px;
    }

    .nm-home-steps {
        grid-template-columns: 1fr;
    }

    .nm-side-card {
        margin-top: 28px;
    }

    .nm-cta {
        align-items: flex-start;
        flex-direction: column;
    }

    .nm-cta__actions {
        justify-content: flex-start;
    }
}

@media (max-width: 767px) {
    .nm-home-page {
        padding-top: 34px;
        padding-bottom: 40px;
    }

    .nm-hero,
    .nm-home-hero {
        margin-bottom: 44px;
    }

    .nm-hero h1 {
        font-size: 32px;
    }

    .nm-hero__lead {
        font-size: 17px;
        line-height: 1.65;
    }

    .nm-hero__actions {
        display: block;
    }

    .nm-hero__actions .theme_button,
    .nm-cta .theme_button {
        display: block;
        width: 100%;
        margin-bottom: 10px !important;
        text-align: center;
    }

    .nm-home-hero__photo {
        max-width: 320px;
        margin-top: 28px;
    }

    .nm-section {
        padding: 34px 0;
    }

    .nm-section--soft,
    .nm-section--reviews {
        margin: 12px -15px 28px;
        padding: 32px 22px;
        border-right: 0;
        border-left: 0;
        border-radius: 0;
    }

    .nm-section__title {
        margin-bottom: 11px;
        font-size: 24px;
    }

    .nm-section__intro {
        max-width: none;
        margin-bottom: 24px;
    }

    .nm-topic-grid,
    .nm-service-cards,
    .nm-home-blog-grid {
        display: block;
    }

    .nm-topic-grid > [class*="col-"],
    .nm-service-cards > [class*="col-"],
    .nm-home-blog-grid > [class*="col-"] {
        display: block;
    }

    .nm-service-card,
    .nm-home-service-cards .nm-service-card {
        min-height: 0;
        padding: 28px 24px 26px;
    }

    .nm-service-card h3 {
        font-size: 24px;
    }

    .nm-service-card .theme_button {
        display: block;
        width: 100%;
        text-align: center;
    }

    .nm-info-grid,
    .nm-link-grid {
        grid-template-columns: 1fr;
    }

    .nm-method-card {
        padding: 24px 22px;
    }

    .nm-home-inline-actions {
        display: block;
    }

    .nm-home-inline-actions .theme_button {
        display: block;
        width: 100%;
        text-align: center;
    }

    .nm-reviews-grid {
        display: flex !important;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 16px;
        margin-right: -22px;
        margin-left: -22px;
        padding: 0 22px 14px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .nm-review-card {
        flex: 0 0 82%;
        max-width: 82%;
        min-height: 0;
        scroll-snap-align: start;
    }

    .nm-reviews-grid::-webkit-scrollbar {
        display: none;
    }

    .nm-accordion .panel-title,
    .nm-accordion .panel-heading .panel-title > a {
        font-size: 17px !important;
    }

    .nm-accordion__toggle {
        gap: 16px;
        padding: 17px 0 !important;
    }

    .nm-accordion .panel-body {
        padding-left: 0 !important;
        font-size: 15px;
    }

    .nm-cta {
        display: block;
        margin: 0;
        padding: 28px 23px;
        border-radius: 14px;
    }

    .nm-cta__actions {
        display: block;
        margin-top: 21px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nm-home-page *,
    .nm-home-page *:before,
    .nm-home-page *:after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
