/* =========================================================
   PromBez — каталог нормативных документов
   /documents/documents.css
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #f5f7fa;
    color: #20242a;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;
    line-height: 1.6;
}


/* =========================================================
   ОСНОВНОЙ КОНТЕЙНЕР
   ========================================================= */

.documents-page {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 16px 60px;
}


/* =========================================================
   ХЛЕБНЫЕ КРОШКИ
   ========================================================= */

.documents-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;

    margin-bottom: 20px;

    font-size: 14px;
    color: #6b7280;
}

.documents-breadcrumbs a {
    color: #2563eb;
    text-decoration: none;
}

.documents-breadcrumbs a:hover {
    text-decoration: underline;
}


/* =========================================================
   ШАПКА КАТАЛОГА
   ========================================================= */

.documents-header {
    margin-bottom: 20px;
    padding: 30px;

    background: #ffffff;
    border-radius: 14px;

    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.05);
}

.documents-label {
    display: inline-block;

    margin-bottom: 10px;
    padding: 5px 10px;

    border-radius: 6px;

    background: #eef2ff;
    color: #3730a3;

    font-size: 13px;
    font-weight: 600;
}

.documents-header h1 {
    margin: 0 0 14px;

    font-size: 30px;
    line-height: 1.25;
}

.documents-intro {
    max-width: 820px;

    margin: 0;

    color: #5f6670;

    font-size: 16px;
    line-height: 1.65;
}


/* =========================================================
   ПОИСК
   ========================================================= */

.documents-search-section {
    margin-bottom: 24px;
    padding: 22px 24px;

    background: #ffffff;
    border-radius: 14px;

    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.05);
}

.documents-search-label {
    display: block;

    margin-bottom: 9px;

    color: #20242a;

    font-size: 15px;
    font-weight: 600;
}

.documents-search {
    position: relative;

    width: 100%;
}

.documents-search-input {
    display: block;

    width: 100%;
    min-height: 48px;

    padding: 11px 48px 11px 15px;

    border: 1px solid #d5dae0;
    border-radius: 9px;

    outline: none;

    background: #ffffff;
    color: #20242a;

    font-family: inherit;
    font-size: 15px;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.documents-search-input::placeholder {
    color: #8a9199;
}

.documents-search-input:focus {
    border-color: #2563eb;

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.12);
}

.documents-search-clear {
    position: absolute;

    top: 50%;
    right: 8px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;

    transform: translateY(-50%);

    border: 0;
    border-radius: 50%;

    background: transparent;
    color: #6b7280;

    font-family: inherit;
    font-size: 24px;
    line-height: 1;

    cursor: pointer;
}

.documents-search-clear:hover {
    background: #f1f3f5;
    color: #20242a;
}

.documents-search-result {
    min-height: 22px;

    margin-top: 8px;

    color: #6b7280;

    font-size: 13px;
}


/* =========================================================
   КАТЕГОРИЯ
   ========================================================= */

.documents-category {
    margin-bottom: 24px;
}

.documents-category-title {
    margin: 0 0 14px;

    font-size: 22px;
    line-height: 1.35;
}


/* =========================================================
   СЕТКА ДОКУМЕНТОВ
   ========================================================= */

.documents-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 18px;
}


/* =========================================================
   КАРТОЧКА ДОКУМЕНТА
   ========================================================= */

/* Единый размер карточек во всех категориях каталога */
.documents-grid {
    align-items: stretch;
}

.documents-grid > .document-card {
    height: 100%;
}

.document-card {
    display: flex;
    flex-direction: column;

    min-width: 0;
    min-height: 100%;

    padding: 22px;

    background: #ffffff;

    border: 1px solid #e5e7eb;
    border-radius: 14px;

    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.04);

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        border-color 0.15s ease;
}

.document-card:hover {
    transform: translateY(-2px);

    border-color: #d5dbe2;

    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.08);
}

.document-card-label {
    align-self: flex-start;

    margin-bottom: 10px;
    padding: 4px 9px;

    border-radius: 5px;

    background: #eef2ff;
    color: #3730a3;

    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
}

.document-card-title {
    margin: 0 0 8px;

    color: #20242a;

    font-size: 21px;
    line-height: 1.3;
}

.document-card-name {
    margin: 0 0 15px;

    color: #3f4650;

    font-size: 15px;
    line-height: 1.5;
}

.document-card-meta {
    margin-top: auto;
    padding-top: 14px;

    color: #6b7280;

    border-top: 1px solid #edf0f2;

    font-size: 13px;
    line-height: 1.45;
}

.document-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    margin-top: 17px;
}

.document-card-status {
    display: inline-flex;
    align-items: center;
    width: fit-content;

    padding: 5px 9px;

    border-radius: 6px;

    font-size: 12px;
    line-height: 1.35;
    font-weight: 600;
}

/* Актуальный документ */

.document-card-status.is-current {
    color: #166534;
    background: #dcfce7;
    border: 1px solid #bbf7d0;
}

/* Документ утратил силу */

.document-card-status.is-expired {
    color: #991b1b;
    background: #fee2e2;
    border: 1px solid #fecaca;
}

.document-card-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    min-height: 38px;

    padding: 7px 13px;

    border-radius: 8px;

    background: #2563eb;
    color: #ffffff;

    font-size: 13px;
    font-weight: 600;

    text-decoration: none;

    white-space: nowrap;

    transition:
        background 0.15s ease,
        transform 0.15s ease;
}

.document-card-button:hover {
    background: #1d4ed8;
}

.document-card-button:active {
    transform: translateY(1px);
}


/* =========================================================
   ПУСТОЙ РАЗДЕЛ
   ========================================================= */

.documents-empty {
    padding: 24px;

    background: #ffffff;

    border: 1px dashed #d5dae0;
    border-radius: 12px;

    color: #6b7280;

    text-align: center;
}

.documents-empty strong {
    display: block;

    margin-bottom: 6px;

    color: #3f4650;

    font-size: 15px;
}

.documents-empty p {
    max-width: 650px;

    margin: 0 auto;

    font-size: 14px;
}


/* =========================================================
   ИНФОРМАЦИОННЫЙ БЛОК
   ========================================================= */

.documents-info {
    margin-top: 30px;
    padding: 24px 26px;

    background: #ffffff;

    border-radius: 14px;

    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.05);
}

.documents-info h2 {
    margin: 0 0 12px;

    font-size: 21px;
    line-height: 1.35;
}

.documents-info p {
    margin: 0 0 10px;

    color: #5f6670;

    font-size: 14px;
    line-height: 1.65;
}

.documents-info p:last-child {
    margin-bottom: 0;
}


/* =========================================================
   СОСТОЯНИЕ ПОИСКА
   ========================================================= */

.document-card.is-hidden {
    display: none;
}

.documents-category.is-hidden {
    display: none;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 800px) {

    .documents-page {
        padding:
            18px
            14px
            45px;
    }

    .documents-header {
        padding: 24px 20px;
    }

    .documents-header h1 {
        font-size: 27px;
    }

    .documents-intro {
        font-size: 15px;
    }

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

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .documents-page {
        padding:
            14px
            12px
            40px;
    }

    .documents-breadcrumbs {
        margin-bottom: 15px;

        font-size: 13px;
    }

    .documents-header {
        padding: 21px 18px;

        border-radius: 12px;
    }

    .documents-label {
        font-size: 12px;
    }

    .documents-header h1 {
        margin-bottom: 12px;

        font-size: 24px;
    }

    .documents-intro {
        font-size: 14px;
    }

    .documents-search-section {
        padding: 18px;

        border-radius: 12px;
    }

    .documents-search-input {
        min-height: 46px;

        font-size: 14px;
    }

    .documents-category-title {
        font-size: 20px;
    }

    .document-card {
        padding: 19px;

        border-radius: 12px;
    }

    .document-card-title {
        font-size: 20px;
    }

    .document-card-name {
        font-size: 14px;
    }

    .document-card-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .document-card-button {
        width: 100%;
    }

    .documents-info {
        margin-top: 24px;
        padding: 20px;

        border-radius: 12px;
    }

    .documents-info h2 {
        font-size: 19px;
    }

}


/* =========================================================
   PREFERS REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    .document-card,
    .document-card-button,
    .documents-search-input {
        transition: none;
    }

}
/* SEO-контент и внутренняя перелинковка каталога */
.documents-seo-copy,.documents-bottom-nav{margin-top:24px;padding:24px;border:1px solid #e3eaf2;border-radius:14px;background:#fff;color:#20242a;line-height:1.7}
.documents-seo-copy h2,.documents-bottom-nav h2{margin:0 0 12px;color:#1f4d78;font-size:22px}
.documents-seo-copy p,.documents-bottom-nav p{margin:0 0 12px}
.documents-bottom-nav-links{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}
.documents-bottom-nav-links a{display:inline-flex;align-items:center;min-height:42px;padding:10px 14px;border:1px solid #dbe6f0;border-radius:10px;background:#f7faff;color:#2563eb;font-weight:600;text-decoration:none}
.documents-bottom-nav-links a:hover{text-decoration:underline}
@media(max-width:600px){.documents-seo-copy,.documents-bottom-nav{padding:18px;border-radius:12px}.documents-seo-copy h2,.documents-bottom-nav h2{font-size:19px}.documents-bottom-nav-links{display:grid;grid-template-columns:1fr}.documents-bottom-nav-links a{width:100%;box-sizing:border-box;overflow-wrap:anywhere}}

.documents-test-areas{margin-top:24px;padding:24px;border:1px solid #e3eaf2;border-radius:14px;background:#fff;color:#20242a;line-height:1.6}.documents-test-areas h2{margin:0 0 12px;color:#1f4d78;font-size:22px}.documents-test-areas p{margin:0 0 14px}.documents-test-areas-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 24px;margin:0;padding:0;list-style:none}.documents-test-areas-list a{display:block;padding:8px 10px;border-radius:8px;color:#2563eb;text-decoration:none;overflow-wrap:anywhere}.documents-test-areas-list a:hover{background:#f7faff;text-decoration:underline}.documents-test-areas-list strong{color:#1f4d78}@media(max-width:600px){.documents-test-areas{padding:18px;border-radius:12px}.documents-test-areas h2{font-size:19px}.documents-test-areas-list{grid-template-columns:1fr;gap:4px}}
