/* =========================================================================
   Cleaning Good — обновлённый дизайн: первый экран, полоса доверия,
   нижняя панель связи на телефоне. Подключается после app.css.
   Все классы с префиксом cg-, чтобы не пересекаться со стилями темы.
   ========================================================================= */

:root {
    --cg-bg: #fbfcfd;
    --cg-surface: #fff;
    --cg-surface-2: #f3f7f8;
    --cg-fresh: #eaf5f3;
    --cg-ink: #1b2c37;
    --cg-ink-soft: #4a626e;
    --cg-slate: #213542;
    --cg-accent: #ffd23f;
    --cg-accent-hover: #ffc61f;
    --cg-accent-soft: #ffe278;
    --cg-line: #e4ebee;
    --cg-teal: #159b86;
    --cg-shadow-card: 0 24px 60px -22px rgba(33, 53, 66, .35);
    --cg-shadow-soft: 0 10px 30px -16px rgba(33, 53, 66, .3);
}

/* ---------- Кнопки ---------- */

.cg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 17px 26px;
    border: 0;
    border-radius: 12px;
    font-family: Montserrat, sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .18s ease, background-color .18s ease;
}
.cg-btn:hover,
.cg-btn:focus {
    text-decoration: none;
}
.cg-btn:focus-visible {
    outline: 3px solid rgba(21, 155, 134, .45);
    outline-offset: 2px;
}
.cg-btn--primary {
    background: var(--cg-accent);
    color: var(--cg-ink);
    box-shadow: 0 10px 24px -10px rgba(255, 178, 32, .75);
}
.cg-btn--primary:hover,
.cg-btn--primary:focus {
    background: var(--cg-accent-hover);
    color: var(--cg-ink);
    transform: translateY(-2px);
}
.cg-btn--ghost {
    background: transparent;
    color: var(--cg-ink);
    font-weight: 600;
    box-shadow: inset 0 0 0 1.5px var(--cg-line);
}
.cg-btn--ghost:hover,
.cg-btn--ghost:focus {
    color: var(--cg-ink);
    box-shadow: inset 0 0 0 1.5px var(--cg-slate);
    transform: translateY(-2px);
}
.cg-num {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* ---------- Первый экран ---------- */

.cg-hero {
    position: relative;
    overflow: hidden;
    padding: 56px 0 44px;
    background: var(--cg-bg);
    color: var(--cg-ink);
}
.cg-hero::before,
.cg-hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
.cg-hero::before {
    top: -170px;
    right: -190px;
    width: 660px;
    height: 660px;
    background: radial-gradient(circle at 35% 35%, rgba(255, 226, 120, .55), rgba(255, 226, 120, 0) 62%);
}
.cg-hero::after {
    bottom: -150px;
    left: -170px;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(21, 155, 134, .13), rgba(21, 155, 134, 0) 65%);
}
.cg-hero > .container {
    position: relative;
    z-index: 1;
}
.cg-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
    gap: 52px;
    align-items: center;
}

.cg-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--cg-fresh);
    color: var(--cg-teal);
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.cg-hero__title {
    margin: 20px 0 0;
    font-size: clamp(30px, 4.1vw, 50px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -.02em;
    color: var(--cg-ink);
    text-wrap: balance;
}
/* Жёлтый маркер под частью заголовка, корректно переносится на новую строку */
.cg-hero__mark {
    padding: 0 .12em;
    background: linear-gradient(transparent 60%, var(--cg-accent-soft) 60%, var(--cg-accent-soft) 94%, transparent 94%);
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}
.cg-hero__lead {
    max-width: 47ch;
    margin: 18px 0 0;
    font-size: clamp(16px, 1.3vw, 18.5px);
    line-height: 1.6;
    color: var(--cg-ink-soft);
}

.cg-trust {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 22px;
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
}
.cg-trust__item {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 15px;
    font-weight: 600;
    color: var(--cg-ink);
}
.cg-trust__item + .cg-trust__item {
    padding-left: 22px;
    border-left: 1px solid var(--cg-line);
}
.cg-stars {
    display: inline-flex;
    gap: 1px;
}

.cg-hero__benefits {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 22px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}
.cg-hero__benefits li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 15px;
    line-height: 1.45;
    color: var(--cg-ink);
}
.cg-check {
    flex: none;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    border-radius: 6px;
    background: var(--cg-fresh);
}

.cg-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

/* ---------- Карточка с формой ---------- */

.cg-hero__card {
    position: relative;
    padding: 32px 28px 22px;
    border: 1px solid var(--cg-line);
    border-radius: 20px;
    background: var(--cg-surface);
    box-shadow: var(--cg-shadow-card);
}
.cg-hero__badge {
    position: absolute;
    top: -17px;
    right: 22px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--cg-slate);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: var(--cg-shadow-soft);
}
.cg-hero__badge b {
    color: var(--cg-accent-soft);
    font-weight: 700;
}
.cg-hero__secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 14px 0 0;
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--cg-ink-soft);
    text-align: center;
}

/* Форма simpleOrderForm внутри карточки. На других страницах форма не меняется. */
.cg-hero .mail-form {
    padding: 0;
    border-radius: 0;
    background: none;
}
.cg-hero .mail-form__title {
    margin: 0;
    font-size: 23px;
    line-height: 1.25;
    letter-spacing: -.01em;
    text-align: left;
    color: var(--cg-ink);
}
.cg-hero .mail-form__subtitle {
    margin: 8px 0 20px;
    font-size: 14.5px;
    line-height: 1.5;
    letter-spacing: 0;
    text-align: left;
    color: var(--cg-ink-soft);
}
.cg-hero .mail-form .mail-form__item {
    margin-bottom: 12px;
}
.cg-hero .mail-form input[type="text"],
.cg-hero .mail-form input[type="tel"] {
    height: 54px;
    padding: 0 16px;
    border: 1.5px solid var(--cg-line);
    border-radius: 12px;
    background: var(--cg-surface-2);
    font-size: 16px; /* 16px — iOS не зумит страницу при фокусе */
    color: var(--cg-ink);
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.cg-hero .mail-form input[type="text"]:focus,
.cg-hero .mail-form input[type="tel"]:focus {
    border-color: var(--cg-accent);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255, 210, 63, .25);
    outline: none;
}
.cg-hero .mail-form input::placeholder {
    font-size: 16px;
    color: #8fa3ad;
}
.cg-hero .mail-form input::-webkit-input-placeholder {
    font-size: 16px;
    color: #8fa3ad;
}
.cg-hero .mail-form input::-moz-placeholder {
    font-size: 16px;
    color: #8fa3ad;
}
.cg-hero .mail-form .button {
    width: 100%;
    padding: 18px 20px;
    border-radius: 12px;
    background: var(--cg-accent);
    color: var(--cg-ink);
    font-size: 16.5px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 10px 24px -10px rgba(255, 178, 32, .75);
    transition: background-color .18s ease, transform .12s ease;
}
.cg-hero .mail-form .button:hover,
.cg-hero .mail-form .button:focus {
    background: var(--cg-accent-hover);
    color: var(--cg-ink);
    transform: translateY(-1px);
}
.cg-hero .mail-form .checkbox-wrapper {
    align-items: flex-start;
    margin: 12px 0 0;
}
.cg-hero .mail-form .checkbox-wrapper input[type="checkbox"] {
    flex: none;
    width: 18px;
    height: 18px;
    margin: 1px 10px 0 0;
}
.cg-hero .mail-form .checkbox-wrapper .title {
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--cg-ink-soft);
}

/* ---------- Полоса доверия ---------- */

.cg-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px 24px;
    margin: 32px 0 0;
    padding: 18px 26px;
    border-radius: 18px;
    background: var(--cg-slate);
    color: #c9d6dd;
    list-style: none;
}
.cg-strip__item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13.5px;
    line-height: 1.35;
}
.cg-strip__item b {
    display: block;
    font-size: 14.5px;
    font-weight: 700;
    color: #fff;
}
.cg-strip__ic {
    flex: none;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 226, 120, .14);
}

/* ---------- Нижняя панель связи (только телефон) ---------- */

.cg-mbar {
    display: none;
}

/* ---------- Адаптив ---------- */

@media (max-width: 1199.98px) {
    .cg-hero__grid {
        gap: 36px;
    }
}

@media (max-width: 991.98px) {
    .cg-hero {
        padding: 40px 0 36px;
    }
    .cg-hero__grid {
        grid-template-columns: 1fr;
        gap: 44px;
    }
    .cg-hero__card {
        width: 100%;
        max-width: 560px;
    }
    .cg-strip {
        justify-content: flex-start;
    }
    .cg-strip__item {
        flex: 1 1 40%;
    }
}

@media (max-width: 767.98px) {
    .cg-mbar {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1000; /* ниже модальных окон Bootstrap (1040+) */
        display: flex;
        gap: 8px;
        padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, .97);
        box-shadow: 0 -6px 20px -8px rgba(33, 53, 66, .35);
    }
    .cg-mbar__btn {
        flex: 1 1 0;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        height: 48px;
        padding: 0 10px;
        border: 0;
        border-radius: 12px;
        font-family: Montserrat, sans-serif;
        font-size: 15px;
        font-weight: 700;
        text-decoration: none;
        cursor: pointer;
    }
    .cg-mbar__btn:hover,
    .cg-mbar__btn:focus {
        text-decoration: none;
    }
    .cg-mbar__btn--call,
    .cg-mbar__btn--call:hover,
    .cg-mbar__btn--call:focus {
        background: var(--cg-slate);
        color: #fff;
    }
    .cg-mbar__btn--order,
    .cg-mbar__btn--order:hover,
    .cg-mbar__btn--order:focus {
        background: var(--cg-accent);
        color: var(--cg-ink);
    }
    /* Место под панель, чтобы она не закрывала низ страницы */
    body {
        padding-bottom: calc(64px + env(safe-area-inset-bottom));
    }
    #to_top {
        bottom: calc(76px + env(safe-area-inset-bottom));
    }
}

@media (max-width: 575.98px) {
    .cg-hero {
        padding: 26px 0 28px;
    }
    .cg-hero__eyebrow {
        font-size: 11px;
        letter-spacing: .07em;
    }
    .cg-trust__item + .cg-trust__item {
        padding-left: 0;
        border-left: 0;
    }
    .cg-hero__benefits {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .cg-hero__actions .cg-btn {
        flex: 1 1 100%;
    }
    .cg-hero__card {
        padding: 30px 18px 20px;
        border-radius: 18px;
    }
    .cg-hero__badge {
        right: 16px;
    }
    .cg-strip {
        gap: 14px;
        padding: 18px;
    }
    .cg-strip__item {
        flex: 1 1 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cg-btn,
    .cg-hero .mail-form .button,
    .cg-hero .mail-form input {
        transition: none;
    }
}
