/* ============================================================
   content-blocks.css — блоки контента для страниц и услуг
   (карточки, колонки, шаги, неисправности, FAQ, CTA)
   Работает поверх старой темы, не переопределяет её глобально.
   Цвет бренда берётся из переменной --brand (задаётся в header.php
   из настройки color в БД), с запасным значением.
   ============================================================ */

.cb {
    --cb-brand: var(--brand, #1e3a8a);
    font-size: 15px;
    line-height: 1.65;
    color: #333;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.cb > *:first-child { margin-top: 0; }
.cb > *:last-child { margin-bottom: 0; }

.cb p { margin: 0 0 14px; }

.cb .cb-lead {
    font-size: 17px;
    line-height: 1.6;
    color: #1f2937;
    margin-bottom: 24px;
}

.cb-muted { color: #6b7280; font-size: 14px; }
.cb-center { text-align: center; }

/* Заголовки секций */
.cb-h2,
.cb h2 {
    font-size: 24px;
    line-height: 1.25;
    font-weight: 700;
    color: #1f2937;
    margin: 36px 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
    position: relative;
}
.cb-h2::after,
.cb h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 64px;
    height: 2px;
    background: var(--cb-brand);
}

.cb h3 { font-size: 18px; font-weight: 700; color: #1f2937; margin: 22px 0 10px; }
.cb > *:first-child.cb-h2, .cb > h2:first-child { margin-top: 0; }

/* Лид-плашка */
.cb-intro {
    background: #f8fafc;
    border-left: 4px solid var(--cb-brand);
    padding: 20px 22px;
    border-radius: 4px;
    margin-bottom: 26px;
}

/* Карточки в сетке */
.cb-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 18px 0 26px;
}
.cb-card {
    flex: 1 1 260px;
    min-width: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, .05);
    transition: box-shadow .2s ease, transform .2s ease;
}
.cb-card:hover {
    box-shadow: 0 10px 24px rgba(15, 23, 42, .10);
    transform: translateY(-2px);
}
.cb-card h3,
.cb-card h4 { margin-top: 0; }
.cb-card h3 { color: var(--cb-brand); font-size: 17px; }
.cb-card p:last-child,
.cb-card ul:last-child { margin-bottom: 0; }

/* Две колонки */
.cb-cols {
    display: flex;
    flex-wrap: wrap;
    gap: 26px;
    margin: 18px 0 26px;
}
.cb-col { flex: 1 1 300px; min-width: 0; }
.cb-col h3 { margin-top: 0; }

/* Нумерованные шаги */
.cb-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin: 20px 0 26px;
    text-align: center;
}
.cb-step { flex: 1 1 180px; min-width: 0; padding: 8px; }
.cb-step .cb-step__n {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--cb-brand);
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
}
.cb-step strong { display: block; font-size: 15px; margin-bottom: 4px; }
.cb-step p { font-size: 13px; color: #6b7280; margin: 0; }

/* Неисправности / акценты слева */
.cb-faults { display: flex; flex-wrap: wrap; gap: 20px; margin: 18px 0 26px; }
.cb-fault {
    flex: 1 1 260px;
    min-width: 0;
    background: #fff;
    border: 1px solid #eef1f4;
    border-left: 4px solid var(--cb-brand);
    border-radius: 4px;
    padding: 16px 18px;
}
.cb-fault h3,
.cb-fault h4 { margin-top: 0; font-size: 16px; }
.cb-fault ul { margin-bottom: 0; }

/* Списки */
.cb ul, .cb ol { margin: 0 0 16px; padding-left: 22px; }
.cb li { margin-bottom: 6px; }
.cb-check { list-style: none; padding-left: 0; }
.cb-check > li { position: relative; padding-left: 26px; }
.cb-check > li::before {
    content: "\2714";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--cb-brand);
    font-weight: 700;
}

/* FAQ */
.cb-faq { margin: 18px 0 26px; }
.cb-faq details {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 10px;
}
.cb-faq summary {
    font-weight: 700;
    color: #1f2937;
    cursor: pointer;
    outline: none;
    list-style: none;
    position: relative;
    padding-right: 26px;
}
.cb-faq summary::-webkit-details-marker { display: none; }
.cb-faq summary::after {
    content: "+";
    position: absolute;
    right: 0;
    top: 0;
    font-size: 20px;
    line-height: 1;
    color: var(--cb-brand);
    transition: transform .2s ease;
}
.cb-faq details[open] summary::after { transform: rotate(45deg); }
.cb-faq details > *:not(summary) { margin-top: 10px; font-size: 14px; color: #4b5563; }
.cb-faq details > *:last-child { margin-bottom: 0; }

/* Таблицы */
.cb-table-wrap { width: 100%; overflow-x: auto; margin: 16px 0 26px; }
.cb table,
.cb table.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #fff;
}
.cb table th,
.cb table td {
    border: 1px solid #e5e7eb;
    padding: 9px 12px;
    text-align: left;
    vertical-align: top;
}
.cb table thead th { background: #f3f4f6; font-weight: 700; }
.cb table tbody tr:nth-child(even) { background: #fafbfc; }

/* CTA-полоса */
.cb-cta {
    background: var(--cb-brand);
    color: #fff;
    border-radius: 8px;
    padding: 28px 26px;
    text-align: center;
    margin: 30px 0 6px;
}
.cb-cta p { color: #fff; margin: 0 0 8px; }
.cb-cta .cb-cta__lead { font-size: 15px; opacity: .92; max-width: 720px; margin: 6px auto 18px; }
.cb-btn {
    display: inline-block;
    background: #fff;
    color: var(--cb-brand) !important;
    font-weight: 700;
    padding: 12px 28px;
    border-radius: 6px;
    text-decoration: none !important;
    transition: transform .15s ease, box-shadow .15s ease;
}
.cb-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, .18); }

/* Заметка */
.cb-note {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 6px;
    padding: 14px 16px;
    font-size: 14px;
    color: #78350f;
    margin: 16px 0 22px;
}

/* Бренды */
.cb-brands {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0 24px;
    padding: 0;
    list-style: none;
}
.cb-brands li {
    flex: 0 0 auto;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    color: #374151;
}

/* Маркированные и нумерованные списки-блоки */
.cb ul.cb-list,
.cb ol.cb-list {
    list-style: none;
    padding-left: 0;
    margin: 0 0 18px;
}
.cb-list > li { position: relative; padding-left: 22px; }
.cb-list > li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: .62em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cb-brand);
}
.cb-list--num { counter-reset: cbnum; }
.cb-list--num > li { counter-increment: cbnum; }
.cb-list--num > li::before {
    content: counter(cbnum);
    width: auto;
    height: auto;
    left: 0;
    top: 0;
    border-radius: 0;
    background: none;
    color: var(--cb-brand);
    font-weight: 700;
}

/* Мелкий текст / сноски */
.cb-small {
    font-size: 13px;
    color: #6b7280;
    margin: 10px 0 18px;
}

/* Таймлайн (история компании) */
.cb-timeline {
    position: relative;
    margin: 18px 0 26px;
    padding-left: 26px;
    border-left: 2px solid #e5e7eb;
}
.cb-timeline__item {
    position: relative;
    padding: 0 0 18px 6px;
}
.cb-timeline__item:last-child { padding-bottom: 0; }
.cb-timeline__item::before {
    content: "";
    position: absolute;
    left: -35px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--cb-brand);
    border: 3px solid #fff;
}
.cb-timeline__item strong {
    display: block;
    font-size: 15px;
    color: #1f2937;
    margin-bottom: 2px;
}

/* Адаптив */
@media (max-width: 767px) {
    .cb { font-size: 14px; }
    .cb-h2, .cb h2 { font-size: 20px; }
    .cb-lead { font-size: 15px; }
    .cb-card, .cb-col, .cb-fault, .cb-step { flex: 1 1 100%; }
    .cb-cta { padding: 22px 18px; }
}

/* ============================================================
   Страница проверки статуса ремонта (status.php)
   ============================================================ */

.status-section {
    padding-top: 36px;
    padding-bottom: 56px;
}

.status-wrap {
    --cb-brand: var(--brand, #1e3a8a);
}

.status-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    margin-top: 24px;
}

.status-main {
    min-width: 0;
}

.status-form {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: clamp(16px, 3vw, 24px);
}

.status-form__label {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
}

.status-form__row {
    display: flex;
    gap: 10px;
}

.status-form__input {
    flex: 1 1 auto;
    min-width: 0;
    height: 52px;
    padding: 0 16px;
    border: 1px solid #cfd6e4;
    border-radius: 10px;
    background: #fff;
    color: #111827;
    font-size: 16px;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.status-form__input:focus {
    border-color: var(--cb-brand);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, .12);
}

.status-form__btn {
    flex: 0 0 auto;
    height: 52px;
    padding: 0 26px;
    border: 0;
    border-radius: 10px;
    background: var(--cb-brand);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: filter .18s ease, transform .18s ease;
}

.status-form__btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.status-form .status-form__hint {
    margin: 10px 0 0;
    color: #6b7280;
    font-size: 13px;
}

.status-result {
    margin-top: 22px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}

.status-result__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    background: #f1f5f9;
    border-bottom: 1px solid #e5e7eb;
}

.status-result__caption {
    font-size: 14px;
    color: #64748b;
}

.status-result__num {
    font-size: 18px;
    color: #111827;
    white-space: nowrap;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    margin: 0;
    background: #e5e7eb;
}

.status-grid__item {
    margin: 0;
    padding: 16px 20px;
    background: #fff;
}

.status-grid__item dt {
    margin-bottom: 6px;
    font-size: 13px;
    line-height: 1.3;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: #6b7280;
}

.status-grid__item dd {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    word-break: break-word;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: #e8eefc;
    color: var(--cb-brand);
    font-size: 14px;
    font-weight: 700;
}

.status-alert {
    margin-top: 22px;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 15px;
    line-height: 1.5;
}

.status-alert--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.status-updated {
    margin: 22px 0 0;
    font-size: 14px;
    color: #6b7280;
}

.status-aside {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.status-aside__card {
    padding: 18px 20px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
}

.status-aside__card h3 {
    margin: 0 0 10px;
    font-size: 17px;
    line-height: 1.3;
    color: #1f2937;
}

.status-aside__card p {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.55;
}

.status-aside__card--accent {
    background: #f8fafc;
    border-color: #dbe3f0;
}

.status-help-list {
    margin: 0;
    padding-left: 18px;
    font-size: 14px;
    line-height: 1.55;
}

.status-help-list li {
    margin-bottom: 8px;
}

.status-help-list li:last-child {
    margin-bottom: 0;
}

.status-call {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 46px;
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--cb-brand);
    color: #fff !important;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none !important;
    transition: filter .18s ease;
}

.status-call:hover {
    filter: brightness(1.08);
}

@media (max-width: 991px) {
    .status-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 767px) {
    .status-section {
        padding-top: 20px;
        padding-bottom: 36px;
    }

    .status-grid {
        grid-template-columns: 1fr;
    }

    .status-result__head {
        padding: 14px 16px;
    }

    .status-grid__item {
        padding: 14px 16px;
    }
}

@media (max-width: 575px) {
    .status-form__row {
        flex-direction: column;
    }

    .status-form__btn {
        width: 100%;
    }
}
