/* =============================================================================
 * main.css — каркас лендинга «12 шагов к стране, в которой хочется жить»
 * Партия «Новые люди». Vanilla CSS, без Bootstrap. Owl Carousel для слайдеров.
 * Палитра и размеры — в :root, меняйте здесь.
 * ========================================================================== */

:root {
    --green:      #0ba8a2;   /* бирюзовый акцент заголовков (макет) */
    --green-dark: #0a938e;
    --pink:       #fd012b;   /* красный акцент (макет) */
    --blue:       #1b2a8c;   /* бренд «Новые люди» */
    --ink:        #16182b;   /* основной текст */
    --muted:      #5b6072;   /* второстепенный текст */
    --line:       #e3e6ef;   /* границы */
    --bg:         #ffffff;
    --bg-soft:    #f3f5fa;   /* фон приглушённых секций */
    --panel:      #daf0ee;   /* светло-бирюзовая панель блока «в чём проблема» / шапки карточек */
    --card:       #f0f1f3;   /* серый фон тела карточек предложений */

    --container:  880px;
    --container-wide: 1255px;
    --radius:     10px;
    --gap:        24px;

    --font: "New People", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}
.container--wide { max-width: var(--container-wide); }

/* ---------- Шапка ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(140%) blur(8px);
    border-bottom: 1px solid var(--line);
}
.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    gap: 16px;
}
.brand { display: inline-flex; flex-direction: column; line-height: 1.05; }
.brand__party { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.brand__name  { font-size: 20px; font-weight: 800; color: var(--blue); }
.brand--footer .brand__name { color: #fff; }
.brand--footer .brand__party { color: rgba(255,255,255,.7); }

.site-nav { display: flex; gap: 26px; }
.site-nav__link { font-weight: 600; font-size: 15px; color: var(--ink); transition: color .15s; }
.site-nav__link:hover { color: var(--green-dark); }

.burger { display: none; width: 42px; height: 42px; border: 0; background: transparent; cursor: pointer; padding: 9px; }
.burger span { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
.burger span + span { margin-top: 5px; }
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Секции ---------- */
.section { padding: 64px 0; }
.section--muted { background: var(--bg-soft); }

.section-title {
    font-size: clamp(26px, 3.4vw, 40px);
    font-weight: 800;
    margin: 0 0 40px;
    text-transform: uppercase;
    letter-spacing: .01em;
    color: var(--green);
    text-align: center;
}

.lead-title {
    font-size: clamp(26px, 3.4vw, 40px);
    font-weight: 800;
    line-height: 1.15;
    margin: 0 auto 32px;
    max-width: 24ch;
    text-transform: uppercase;
    color: var(--green);
    text-align: center;
}

/* Проза */
.prose { color: var(--ink); }
.prose p { margin: 0 0 16px; }
.prose__first { font-weight: 700; }
.prose--center { text-align: center; max-width: 62ch; margin: 0 auto; }
/* Текст в две колонки (на мобильном — одна) */
/* «В чём проблема» — одна колонка (в макете двухколоночного текста нет) */
.prose--2col { columns: 1; }
.prose--2col p { break-inside: avoid; }

/* ---------- Hero ---------- */
.hero {
    background: var(--green);
    color: #fff;
    padding: 88px 0 150px;
    position: relative;
    overflow: hidden;
}
.hero__inner { position: relative; z-index: 1; text-align: center; }
.hero__logo { display: block; margin: 0 auto 44px; width: clamp(200px, 34vw, 495px); height: auto; }
.hero__title { margin: 0; }
.hero__title img { display: block; margin: 0 auto; width: clamp(280px, 44vw, 640px); height: auto; }
.hero__subtitle { font-size: clamp(20px, 3.2vw, 34px); font-weight: 700; margin: 18px auto 0; max-width: 20ch; }
.hero__flags {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: min(78%, 1180px);
    pointer-events: none;
    z-index: 0;
}

/* ---------- Оглавление (сетка тем) ---------- */
.contents-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 56px;
    row-gap: 32px;
}
.topic-item {
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform .18s;
}
.topic-item:hover { transform: translateY(-2px); }
.topic-item:hover .topic-item__label { color: var(--green-dark); }
.topic-item__img {
    flex: 0 0 auto;
    width: 104px;
    height: 104px;
    border-radius: 16px;
    background: #d6dbe8 center/cover no-repeat;
}
.topic-item__label {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ink);
    transition: color .15s;
}

/* ---------- Шаг программы ---------- */
.step { padding: 56px 0; }

/* Шапка шага: картинка слева + заголовок и лид справа */
.step__head {
    display: flex;
    align-items: center;
    gap: 32px;
    margin-bottom: 32px;
}
.step__img {
    flex: 0 0 auto;
    width: clamp(240px, 30vw, 384px);
    align-self: stretch;
    min-height: 240px;
    border-radius: 20px;
    background: #d6dbe8 center/cover no-repeat;
}
.step__headtext { flex: 1 1 auto; }
.step__title {
    font-size: clamp(24px, 2.8vw, 38px);
    font-weight: 800;
    line-height: 1.12;
    margin: 0;
    color: var(--green);
    text-transform: uppercase;
}
.step__lead { font-size: 18px; font-style: italic; color: var(--ink); margin: 18px 0 0; }

/* «В чём проблема» — светло-бирюзовая панель */
.step__problem {
    background: var(--panel);
    border-radius: 20px;
    padding: 40px 48px;
    margin-bottom: 48px;
}
.step__label {
    display: block;
    font-weight: 800;
    font-size: clamp(18px, 2vw, 24px);
    margin: 0 0 20px;
    color: var(--ink);
}

/* Заголовок блока предложений (две строки: красная + бирюзовая) */
.step__offer-title {
    text-align: left;
    text-transform: uppercase;
    font-weight: 800;
    font-size: clamp(20px, 2.4vw, 30px);
    line-height: 1.25;
    margin: 0 0 36px;
}
.step__offer-title .accent-red  { color: var(--pink);  display: block; }
.step__offer-title .accent-teal { color: var(--green); display: block; }

/* Пилюли-теги групп предложений (одинаковые, светло-бирюзовые) */
.offer-group + .offer-group { margin-top: 40px; }
.offer-tag {
    display: inline-block;
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 14px;
    padding: 12px 26px;
    border-radius: var(--radius);
    background: var(--panel);
    color: var(--ink);
}
.offer-group__note { font-size: 20px; color: var(--ink); margin: 0 0 22px; }
/* Карточки предложений — owl-карусель (стрелки сверху справа, точки снизу).
   Пока owl не инициализировался (нет JS / медленная загрузка) — показываем
   карточки обычной сеткой, чтобы блок не выглядел пустым. */
.offer-grid:not(.owl-loaded) {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap);
}
.offer-carousel { position: relative; }
.offer-carousel .owl-stage { display: flex; }
.offer-carousel .owl-item { display: flex; }
.offer-carousel .owl-item .offer-card { width: 100%; }

/* стрелки навигации — вверху справа */
.offer-carousel .owl-nav { position: absolute; top: -58px; right: 2px; margin: 0; display: flex; gap: 8px; }
.offer-carousel .owl-nav button.owl-prev,
.offer-carousel .owl-nav button.owl-next {
    width: 46px; height: 38px; border-radius: 10px;
    background: #eef1f6; border: 1px solid var(--line);
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--green); transition: background .15s, color .15s;
}
.offer-carousel .owl-nav button.owl-prev:hover,
.offer-carousel .owl-nav button.owl-next:hover { background: var(--green); color: #fff; }
.offer-carousel .owl-nav .owl-arrow { font-size: 22px; line-height: 1; color: inherit; }
.offer-carousel .owl-nav button.disabled { opacity: .35; }
.offer-carousel .owl-nav button.disabled:hover { background: #eef1f6; color: var(--green); }

/* точки — по центру снизу */
.offer-carousel .owl-dots { text-align: center; margin-top: 22px; }
.offer-carousel .owl-dot { display: inline-block; }
.offer-carousel .owl-dot span {
    display: block; width: 9px; height: 9px; margin: 5px;
    border-radius: 999px; background: #cfd5e2; transition: background .15s, width .15s;
}
.offer-carousel .owl-dot.active span { width: 26px; background: var(--green); }

/* Карточка: бирюзовая шапка с заголовком + серое тело с текстом */
.offer-card {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--card);
    display: flex;
    flex-direction: column;
}
.offer-card__title {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    padding: 22px 24px;
    background: var(--panel);
    display: flex;
    align-items: center;
}
.offer-card__text {
    font-size: 15px;
    color: #2c2f3d;
    margin: 0;
    padding: 22px 24px 26px;
    flex: 1 1 auto;
}

/* Кнопка «Развернуть» для блока «В чём проблема» (видна только на мобильных) */
.step__more {
    display: none;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding: 10px 22px;
    border: 1px solid var(--green);
    border-radius: var(--radius);
    background: #fff;
    color: var(--green);
    font-family: inherit;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.step__more::after { content: "\25BE"; font-size: 12px; transition: transform .2s; }
.step__problem.is-open .step__more::after { transform: rotate(180deg); }
.step__more:hover { background: var(--green); color: #fff; }

/* ---------- CTA (Вместо заключения) — белая секция по макету ---------- */
.cta { background: #fff; color: var(--ink); text-align: center; }
.cta__title {
    font-size: clamp(26px, 3.4vw, 40px);
    font-weight: 800;
    line-height: 1.15;
    margin: 0 auto 32px;
    text-transform: uppercase;
    color: var(--green);
    text-align: center;
}
.cta__text { margin: 0 auto; max-width: 880px; text-align: center; }
.cta__text p { margin: 0 0 18px; }
/* последний абзац — выделенный призыв */
.cta__text p.cta__text--accent { font-weight: 700; font-size: clamp(19px, 2.2vw, 26px); line-height: 1.4; margin-top: 28px; }
.btn {
    display: inline-block;
    background: var(--green);
    color: #fff;
    font-weight: 700;
    padding: 14px 28px;
    border-radius: 999px;
    transition: background .15s, transform .15s;
}
.btn:hover { background: var(--green-dark); transform: translateY(-2px); }
.btn--pink { background: var(--pink); box-shadow: 0 10px 26px rgba(255,61,119,.35); }
.btn--pink:hover { background: #e42e66; }

/* ---------- Футер — баннер-повтор hero (макет) ---------- */
.site-footer { background: var(--green); color: #fff; padding: 44px 0 22px; position: relative; overflow: hidden; }
.site-footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: nowrap; }
.site-footer__logo { width: clamp(150px, 18vw, 300px); height: auto; flex: 0 0 auto; }
.site-footer__center { flex: 1 1 auto; text-align: center; }
.site-footer__12 { width: clamp(200px, 26vw, 430px); height: auto; margin: 0 auto; display: block; }
.site-footer__subtitle { font-size: clamp(15px, 1.8vw, 22px); font-weight: 700; margin: 10px 0 0; }
.site-footer__flags { width: clamp(160px, 22vw, 360px); height: auto; flex: 0 0 auto; }
.site-footer__copy { display: block; text-align: center; font-size: 13px; opacity: .72; margin-top: 20px; }

/* =============================================================================
 * МОБИЛЬНАЯ ВЕРСИЯ — более компактная раскладка
 * ========================================================================== */
@media (max-width: 991px) {
    .prose--2col { columns: 1; }
    .section { padding: 44px 0; }
    .step { padding: 40px 0; }

    .contents-grid { grid-template-columns: repeat(2, 1fr); column-gap: 32px; }
    .offer-grid:not(.owl-loaded) { grid-template-columns: 1fr; }

    .step__head { flex-direction: column; align-items: flex-start; gap: 20px; }
    .step__title { text-align: center; }
    .step__lead { text-align: center; }
    .step__img { width: 100%; min-height: 230px; aspect-ratio: 16 / 9; align-self: auto; background-position: top center; background-size: cover; }
    .step__problem { padding: 28px 22px; border-radius: 20px; position: relative; }

    /* Длинный блок «В чём проблема» сворачиваем до ~1 экрана + кнопка «Развернуть» */
    .step__problem.is-collapsible .prose--2col {
        max-height: 68vh;
        overflow: hidden;
        -webkit-mask-image: linear-gradient(#000 72%, transparent);
                mask-image: linear-gradient(#000 72%, transparent);
    }
    .step__problem.is-collapsible.is-open .prose--2col {
        max-height: none;
        -webkit-mask-image: none;
                mask-image: none;
    }
    .step__problem.is-collapsible .step__more { display: inline-flex; }

    /* Карусель на мобильных: карточки ~300px, следующая выглядывает, стрелок нет */
    .offer-wrap { margin-right: -16px; }
    .offer-carousel .owl-nav { display: none; }
    .offer-carousel .owl-stage { display: flex; }
    .offer-carousel .owl-item .offer-card { width: 300px; max-width: 78vw; height: 100%; }
}

@media (max-width: 600px) {
    .container { padding: 0 16px; }
    .hero { padding: 60px 0 66px; }
    .contents-grid { grid-template-columns: 1fr; }
    .topic-item__img { width: 84px; height: 84px; }
    .site-footer__inner { flex-direction: column; align-items: center; gap: 22px; }
    .site-footer__flags { width: min(70%, 320px); }
}
