.documents-page-skin {
    --ink: #16233b;
    --muted: #5e6a78;
    --line: #dce6f2;
    --shadow-soft: 0 14px 34px rgba(29, 66, 110, .08);
    --primary: #2983dd;
    --primary-dark: #10589c;
    --secondary: #2983dd;
    --secondary-dark: #10589c;
    --soft: #eef3fb;
    --accent: #f6783a;
}

.page-hero.documents-page-skin {
    padding: 48px 0;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(135deg, #eaf3ff, #fff 72%);
}

.page-hero.documents-page-skin .crumb {
    color: var(--secondary-dark);
    font-size: 13px;
    font-weight: 800;
}

.page-hero.documents-page-skin h1 {
    margin: 10px 0 12px;
    color: var(--ink);
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.15;
}

.page-hero.documents-page-skin p {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    font-size: 15px;
}

.documentation-section.documents-page-skin {
    padding: 42px 0 64px;
}

/*================end awards===========================*/
/* ============================================================
   PUBLIC DOCUMENTATION PAGE
   Catalog cards, modal category tree, files and publications
   ============================================================ */

.documents-statistics {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.documents-statistics span {
    padding: 9px 14px;
    color: var(--ink);
    background: rgba(255, 255, 255, .82);
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 999px;
    font-size: 14px;
}

.documentation-section {
    background: #f7f9fd;
}

/* Main category cards */

.docs-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.documents-direct-list {
    padding: 24px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
}

.documents-tree-leaf {
    padding: 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.documents-tree-leaf-title {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 10px;
}

.documents-tree-leaf-title .documents-tree-title {
    flex: 1;
}

.doc-card {
    display: flex;
    min-width: 0;
    min-height: 390px;
    flex-direction: column;
    padding: 26px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
    transition:
        transform .25s ease,
        border-color .25s ease,
        box-shadow .25s ease;
}

.doc-card:hover {
    transform: translateY(-4px);
    border-color: rgba(41, 131, 221, .4);
    box-shadow: 0 20px 46px rgba(28, 57, 69, .12);
}

.doc-card-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.doc-card-title-row h2 {
    min-width: 0;
    margin: 0;
    color: var(--ink);
    font-size: 21px;
    line-height: 1.3;
}

.doc-card-count {
    display: inline-flex;
    height: 34px;
    flex: 0 0 auto;
    align-items: center;
    gap: 4px;
    padding: 0 11px;
    color: #fff;
    background: var(--secondary);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 900;
}

.doc-card-count small {
    font-size: 10px;
    font-weight: 700;
    opacity: .8;
}

.doc-card-description {
    min-height: 44px;
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.doc-card-preview {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 22px;
}

.doc-preview-caption {
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.doc-preview-row {
    display: flex;
    min-height: 42px;
    align-items: center;
    gap: 9px;
    padding: 9px 11px;
    background: #f8fbfb;
    border: 1px solid #e7f0f1;
    border-radius: 12px;
}

.doc-preview-triangle {
    width: 0;
    height: 0;
    flex: 0 0 auto;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 7px solid var(--secondary);
}

.doc-preview-title {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.doc-preview-number {
    display: grid;
    min-width: 26px;
    height: 26px;
    place-items: center;
    color: var(--secondary-dark);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 800;
}

.doc-card-empty {
    display: grid;
    min-height: 100px;
    padding: 18px;
    place-items: center;
    color: var(--muted);
    background: #f8fbfb;
    border: 1px dashed var(--line);
    border-radius: 14px;
    text-align: center;
}

.doc-card-open {
    display: flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: auto;
    padding: 0 18px;
    color: #fff;
    background: var(--primary);
    border: 0;
    border-radius: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: background .2s ease;
}

.doc-card-open:hover {
    background: var(--primary-dark);
}

/* Large modal */

.documents-dialog {
    width: min(1380px, calc(100% - 20px));
    height: 94vh;
    max-width: none;
    max-height: 94vh;
    padding: 0;
    overflow: hidden;
    background: #fff;
    border: 0;
    border-radius: 20px;
    box-shadow: 0 30px 90px rgba(11, 35, 45, .3);
}

.documents-dialog::backdrop {
    background: rgba(13, 31, 42, .68);
    backdrop-filter: blur(5px);
}

.documents-dialog-panel {
    display: flex;
    height: 94vh;
    max-height: 94vh;
    flex-direction: column;
}

.documents-dialog-header {
    display: flex;
    min-height: 68px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 13px 20px;
    color: #fff;
    background: linear-gradient(
        135deg,
        var(--secondary),
        var(--secondary-dark)
    );
}

.documents-dialog-title {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 14px;
}

.documents-dialog-title h2 {
    overflow: hidden;
    margin: 0;
    color: #fff;
    font-size: 22px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.documents-dialog-title > span {
    flex: 0 0 auto;
    padding: 6px 10px;
    color: #fff;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.documents-dialog-close {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    place-items: center;
    color: #fff;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 50%;
    font-size: 25px;
    cursor: pointer;
}

.documents-dialog-toolbar {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 18px;
    background: #f6fbfb;
    border-bottom: 1px solid var(--line);
}

.documents-dialog-search {
    display: flex;
    width: min(420px, 100%);
    min-height: 40px;
    align-items: center;
    gap: 9px;
    padding: 0 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 11px;
}

.documents-dialog-search svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    fill: none;
    stroke: var(--secondary);
    stroke-width: 2;
}

.documents-dialog-search input {
    width: 100%;
    padding: 0;
    color: var(--ink);
    background: transparent;
    border: 0;
    outline: 0;
    font-size: 14px;
}

.documents-dialog-actions {
    display: flex;
    gap: 7px;
}

.documents-dialog-toolbar button {
    padding: 8px 13px;
    color: var(--secondary-dark);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.documents-dialog-body {
    min-height: 0;
    flex: 1 1 auto;
    padding: 12px 18px 20px;
    overflow-y: auto;
}

/* Recursive category tree */

.documents-tree {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.documents-tree-node {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.documents-tree-node > summary {
    display: flex;
    min-height: 46px;
    align-items: center;
    gap: 11px;
    padding: 7px 11px;
    list-style: none;
    cursor: pointer;
    transition: background .2s ease;
}

.documents-tree-node > summary::-webkit-details-marker {
    display: none;
}

.documents-tree-node > summary:hover {
    background: var(--soft);
}

.documents-tree-node[open] > summary {
    background: var(--soft);
    border-bottom: 1px solid var(--line);
}

.documents-tree-triangle {
    width: 0;
    height: 0;
    flex: 0 0 auto;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 8px solid var(--secondary);
    transition: transform .2s ease;
}

.documents-tree-node[open] > summary .documents-tree-triangle {
    transform: rotate(90deg);
}

.documents-tree-triangle.is-disabled {
    opacity: .25;
}

.documents-tree-folder {
    display: grid;
    width: 29px;
    height: 29px;
    flex: 0 0 auto;
    place-items: center;
    color: var(--accent);
    background: rgba(255, 155, 32, .1);
    border-radius: 9px;
}

.documents-tree-folder svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linejoin: round;
}

.documents-tree-title {
    min-width: 0;
    flex: 1;
    color: var(--ink);
    font-size: 14px;
    font-weight: 800;
}

.documents-tree-count {
    display: grid;
    min-width: 27px;
    height: 27px;
    padding: 0 8px;
    place-items: center;
    color: var(--secondary-dark);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.documents-tree-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 7px 8px 8px 22px;
    background: #fbfdfd;
}

.documents-tree-empty-category {
    display: flex;
    min-height: 46px;
    align-items: center;
    gap: 11px;
    padding: 7px 11px;
    color: var(--muted);
    background: #fafcfc;
    border: 1px dashed var(--line);
    border-radius: 14px;
}

/* File rows */

.documents-file-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.documents-material {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.documents-material-main {
    display: flex;
    min-height: 48px;
    align-items: center;
    gap: 10px;
    padding: 6px 9px;
}

.document-format {
    display: inline-grid;
    min-width: 58px;
    min-height: 27px;
    flex: 0 0 auto;
    padding: 4px 7px;
    place-items: center;
    border-radius: 7px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .03em;
}

.format-pdf {
    color: #c73535;
    background: #fff0f0;
}

.format-word {
    color: #245dad;
    background: #edf4ff;
}

.format-excel {
    color: #187849;
    background: #eaf8f0;
}

.format-powerpoint {
    color: #c45325;
    background: #fff1e9;
}

.format-video {
    color: #fff;
    background: #e04444;
}

.format-post {
    color: #a85a00;
    background: #fff1da;
}

.format-image {
    color: #7753b5;
    background: #f3edff;
}

.format-link {
    color: var(--secondary-dark);
    background: var(--soft);
}

.format-archive,
.format-file {
    color: #5e6a78;
    background: #eef1f3;
}

.documents-material-info {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 3px;
}

.documents-material-info strong {
    overflow: hidden;
    color: var(--ink);
    font-size: 13px;
    line-height: 1.35;
    text-overflow: ellipsis;
}

.documents-material-info span {
    color: var(--muted);
    font-size: 12px;
}

.documents-storage-warning,
.documents-size-warning {
    margin-top: 7px;
    padding: 8px 10px;
    border: 1px solid #f1c56b;
    border-radius: 8px;
    color: #6e4b00;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
    background: #fff7df;
}

.documents-size-warning {
    border-color: #efa38f;
    color: #823825;
    background: #fff0ec;
}

.documents-material-action a,
.documents-material-action button {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    gap: 7px;
    padding: 0 12px;
    color: var(--secondary-dark);
    background: var(--soft);
    border: 1px solid #cfeaec;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.documents-material-unavailable {
    color: var(--muted);
    font-size: 12px;
}

/* Publication list */

.documents-post-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.documents-post-list-item {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.documents-post-list-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px;
}

.documents-post-thumbnail {
    width: 130px;
    height: 82px;
    flex: 0 0 auto;
    overflow: hidden;
    background: #edf3f4;
    border-radius: 11px;
}

.documents-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.documents-video-placeholder,
.documents-post-placeholder {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #fff;
    background: var(--secondary);
    font-size: 12px;
    font-weight: 800;
}

.documents-video-placeholder {
    background: #e14848;
}

.documents-video-placeholder span {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    background: rgba(255, 255, 255, .2);
    border-radius: 50%;
}

.documents-post-summary {
    min-width: 0;
    flex: 1;
}

.documents-post-meta,
.documents-post-full-meta {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 11px;
}

.documents-post-meta span,
.documents-post-full-meta span {
    color: var(--accent);
    font-weight: 900;
    text-transform: uppercase;
}

.documents-post-summary h3 {
    margin: 0 0 6px;
    color: var(--ink);
    font-size: 16px;
    line-height: 1.35;
}

.documents-post-summary p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.documents-post-open {
    display: inline-flex;
    min-height: 38px;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
    padding: 0 13px;
    color: var(--secondary-dark);
    background: var(--soft);
    border: 1px solid #cfeaec;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

/* Full publication and rich content */

.documents-post-preview {
    padding: 12px;
    background: #f6fafb;
    border-top: 1px solid var(--line);
}

.documents-post-preview[hidden],
.documents-material[hidden],
.documents-tree-node[hidden] {
    display: none !important;
}

.documents-post-full {
    overflow: hidden;
    background: #fff;
    border-radius: 15px;
}

.documents-post-full-image {
    display: block;
    width: 100%;
    max-height: 620px;
    object-fit: contain;
    background: #eef2f2;
}

.documents-post-full-body {
    padding: 20px;
}

.documents-post-full-body h2 {
    margin: 0 0 17px;
    color: var(--ink);
    font-size: clamp(20px, 3vw, 30px);
    line-height: 1.3;
}

.documents-post-empty {
    color: var(--muted);
}

.documents-video {
    position: relative;
    width: 100%;
    margin-bottom: 18px;
    overflow: hidden;
    background: #101418;
    border-radius: 15px;
    aspect-ratio: 16 / 9;
}

.documents-video iframe,
.documents-video video {
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: contain;
}

.documents-post-content {
    width: min(100%, 1050px);
    margin: 0 auto;
    color: var(--ink);
    font-size: 15px;
    line-height: 1.75;
}

.documents-post-content > :last-child {
    margin-bottom: 0;
}

.documents-post-content img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto !important;
    max-height: 720px;
    margin: 18px auto;
    object-fit: contain;
    background: #eef2f2;
    border-radius: 14px;
}

.documents-post-content figure {
    max-width: 100%;
    margin: 20px auto;
}

.documents-post-content figure img {
    margin: 0 auto;
}

.documents-post-content figcaption {
    margin-top: 7px;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.documents-post-content iframe {
    display: block;
    width: min(100%, 960px) !important;
    height: auto !important;
    margin: 20px auto;
    background: #101418;
    border: 0;
    border-radius: 15px;
    aspect-ratio: 16 / 9;
}

.documents-post-content video {
    display: block;
    width: min(100%, 960px) !important;
    max-height: 75vh;
    margin: 20px auto;
    background: #101418;
    border-radius: 15px;
}

.documents-post-content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
}

.documents-post-content a {
    color: var(--secondary-dark);
    text-decoration: underline;
}

.documents-source-link {
    display: inline-flex;
    gap: 7px;
    margin-top: 16px;
    color: var(--secondary-dark);
    font-weight: 800;
}

/* Empty states */

.documents-tree-empty,
.documents-empty {
    padding: 35px;
    color: var(--muted);
    background: #fff;
    border: 1px dashed var(--line);
    border-radius: 20px;
    text-align: center;
}

/* Responsive */

@media (max-width: 1000px) {
    .docs-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .documents-post-list-head {
        align-items: stretch;
        flex-direction: column;
    }

    .documents-post-thumbnail {
        width: 100%;
        height: 180px;
    }

    .documents-post-open {
        justify-content: center;
    }

    .documents-post-full-body {
        padding: 15px;
    }
}

@media (max-width: 650px) {
    .docs-grid {
        grid-template-columns: 1fr;
    }

    .doc-card {
        min-height: 0;
        padding: 21px;
    }

    .documents-dialog {
        width: calc(100% - 16px);
        max-height: 94vh;
        border-radius: 18px;
    }

    .documents-dialog-panel {
        max-height: 94vh;
    }

    .documents-dialog-header,
    .documents-dialog-body {
        padding-left: 17px;
        padding-right: 17px;
    }

    .documents-dialog-toolbar {
        align-items: stretch;
        flex-direction: column;
        padding-right: 17px;
        padding-left: 17px;
    }

    .documents-dialog-search,
    .documents-dialog-actions {
        width: 100%;
    }

    .documents-dialog-actions button {
        flex: 1;
    }

    .documents-dialog-title {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .documents-dialog-title h2 {
        font-size: 18px;
        white-space: normal;
    }

    .documents-tree-content {
        padding-left: 12px;
    }

    .documents-material-main {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .documents-material-info {
        width: calc(100% - 76px);
    }

    .documents-material-action {
        width: 100%;
        padding-left: 71px;
    }

    .documents-post-preview {
        padding: 12px;
    }
}






.documents-material-title {
    display: inline;
    width: fit-content;
    max-width: 100%;
    padding: 0;
    overflow: hidden;
    color: var(--ink);
    background: transparent;
    border: 0;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
    text-align: left;
    text-decoration: none;
    text-overflow: ellipsis;
    cursor: pointer;
}

button.documents-material-title:hover,
a.documents-material-title:hover {
    color: var(--secondary-dark);
    /*text-decoration: underline;*/
}

.line-document {
    width: 0;
    height: 4px;
    margin-top: 8px;
    border-radius: 3px;
    background-color: var(--secondary-dark);
    transition: width 0.4s ease;
}

.documents-material-main:has(.documents-material-title:hover) .line-document,
.documents-material-main:has(.documents-material-action a:hover) .line-document,
.documents-material-main:has(.documents-material-action button:hover) .line-document {
    width: 20%;
}


.documents-file-preview {
    padding: 12px;
    background: #f2f6fb;
    border-top: 1px solid var(--line);
}

.documents-file-preview[hidden] {
    display: none !important;
}

.documents-file-viewer {
    width: 100%;
    height: min(72vh, 820px);
    overflow: hidden;
    background: #e9eff0;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.documents-file-viewer iframe {
    display: block;
    width: 100%;
    height: 100%;
    background: #fff;
    border: 0;
}

.documents-file-preview-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 10px 4px 0;
    color: var(--muted);
    font-size: 12px;
}

.documents-file-preview-footer a {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
    color: var(--secondary-dark);
    font-weight: 800;
    text-decoration: none;
}

@media (max-width: 650px) {
    .documents-file-viewer {
        height: 65vh;
    }

    .documents-file-preview {
        padding: 7px;
    }

    .documents-file-preview-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}






/* Блокировка страницы */

html.documents-page-locked {
    overflow: hidden;
}

body.documents-page-locked {
    position: fixed;
    width: 100%;
    overflow: hidden;
}

/* Внутри панели размещается полноэкранный слой */

.documents-dialog-panel {
    position: relative;
}

.documents-dialog.is-document-view {
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    border-radius: 0;
}

.documents-dialog.is-document-view .documents-dialog-panel {
    height: 100dvh;
    max-height: none;
}

/* Полноэкранный просмотр */

.document-viewer-layer {
    position: absolute;
    z-index: 50;
    inset: 0;
    display: flex;
    min-width: 0;
    min-height: 0;
    flex-direction: column;
    background: #20272c;
}

.document-viewer-layer[hidden] {
    display: none !important;
}

.document-viewer-header {
    display: flex;
    min-height: 62px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 9px 16px;
    color: #fff;
    background: #162027;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.document-viewer-heading {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 11px;
}

.document-viewer-heading h2 {
    overflow: hidden;
    margin: 0;
    color: #fff;
    font-size: 17px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-viewer-format {
    flex: 0 0 auto;
    padding: 6px 9px;
    color: #fff;
    background: var(--primary);
    border-radius: 7px;
    font-size: 10px;
    font-weight: 900;
}

.document-viewer-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
}

.document-viewer-original,
.document-viewer-close {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    gap: 7px;
    padding: 0 13px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}
.document-viewer-original {
    display: none !important;
}

.document-viewer-original {
    color: #fff;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
}

.document-viewer-close {
    color: #fff;
    background: var(--primary);
    border: 1px solid var(--primary);
}

.document-viewer-close:hover {
    background: var(--primary-dark);
}

.document-viewer-body {
    position: relative;
    min-height: 0;
    flex: 1 1 auto;
    overflow: hidden;
    background: #30383e;
}

.document-viewer-body iframe {
    display: block;
    width: 100%;
    height: 100%;
    background: #fff;
    border: 0;
}

.document-viewer-loading {
    position: absolute;
    z-index: 2;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #fff;
    background: #30383e;
    font-size: 14px;
    font-weight: 700;
}

.document-viewer-loading[hidden] {
    display: none !important;
}

.document-viewer-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(255, 255, 255, .22);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: documentViewerSpin .8s linear infinite;
}

@keyframes documentViewerSpin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 700px) {
    .document-viewer-header {
        min-height: 58px;
        gap: 8px;
        padding: 7px 9px;
    }

    .document-viewer-heading {
        flex: 1;
    }

    .document-viewer-heading h2 {
        font-size: 14px;
    }



    .document-viewer-close {
        width: 42px;
        padding: 0;
        justify-content: center;
        font-size: 0;
    }

    .document-viewer-close span {
        font-size: 20px;
    }
}


/*============end page documents=================================================*/

/* Галерея изображений внутри категории */
.documents-image-gallery {
    margin: 0 0 22px;
}

.documents-image-grid {
    display: grid;
    gap: 14px;
}

.documents-image-gallery--full .documents-image-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.documents-image-gallery--compact .documents-image-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.documents-image-card {
    display: grid;
    width: 100%;
    min-width: 0;
    gap: 8px;
    padding: 0;
    color: var(--ink);
    background: transparent;
    border: 0;
    text-align: left;
    cursor: zoom-in;
}

.documents-image-card[hidden] {
    display: none;
}

.documents-image-frame {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 9px 22px rgba(22, 35, 59, .08);
}

.documents-image-gallery--full .documents-image-frame {
    aspect-ratio: 16 / 11;
    border-radius: 18px;
}

.documents-image-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.documents-image-card:hover .documents-image-frame img,
.documents-image-card:focus-visible .documents-image-frame img {
    transform: scale(1.045);
}

.documents-image-zoom {
    position: absolute;
    right: 9px;
    bottom: 9px;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: var(--secondary-dark);
    background: rgba(255, 255, 255, .93);
    border-radius: 50%;
    box-shadow: 0 7px 18px rgba(22, 35, 59, .15);
}

.documents-image-zoom svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 1.8;
}

.documents-image-title {
    display: block;
    overflow: hidden;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.35;
    overflow-wrap: anywhere;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.documents-image-gallery-actions {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.documents-image-gallery-toggle {
    min-height: 42px;
    padding: 10px 20px;
    color: var(--secondary-dark);
    background: #fff;
    border: 1px solid var(--secondary);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}

.documents-image-gallery-toggle:hover,
.documents-image-gallery-toggle:focus-visible {
    color: #fff;
    background: var(--secondary);
    transform: translateY(-1px);
}

html.documents-gallery-open {
    overflow: hidden;
}

.documents-gallery-lightbox {
    position: fixed;
    z-index: 10000;
    inset: 0;
    display: grid;
    width: 100vw;
    max-width: none;
    height: 100vh;
    max-height: none;
    grid-template-columns: 70px minmax(0, 1fr) 70px;
    align-items: center;
    gap: 16px;
    padding: 28px;
    background: rgba(8, 16, 28, .94);
    border: 0;
    backdrop-filter: blur(14px);
}

.documents-gallery-lightbox:not([open]) {
    display: none;
}

.documents-gallery-lightbox::backdrop {
    background: rgba(8, 16, 28, .75);
}

.documents-gallery-stage {
    display: grid;
    width: 100%;
    min-width: 0;
    height: min(86vh, 920px);
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 13px;
    margin: 0;
}

.documents-gallery-stage img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: contain;
}

.documents-gallery-stage figcaption {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: #fff;
    font-size: 13px;
    text-align: center;
}

[data-gallery-full-title] {
    overflow-wrap: anywhere;
    max-width: min(70vw, 760px);
    font-weight: 750;
    line-height: 1.4;
}

.documents-gallery-stage figcaption a {
    color: #8ee9ee;
    font-weight: 750;
}

.documents-gallery-arrow,
.documents-gallery-close {
    color: #fff;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .22);
    cursor: pointer;
}

.documents-gallery-arrow {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    font-size: 42px;
    line-height: 1;
}

.documents-gallery-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    font-size: 27px;
}

.documents-gallery-arrow:hover,
.documents-gallery-close:hover {
    background: #2983dd;
}

@media (max-width: 900px) {
    .documents-image-gallery--full .documents-image-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .documents-image-gallery--compact .documents-image-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .documents-gallery-lightbox {
        grid-template-columns: 52px minmax(0, 1fr) 52px;
        gap: 7px;
        padding: 20px 10px;
    }

    .documents-gallery-arrow {
        width: 46px;
        height: 46px;
        font-size: 34px;
    }
}

@media (max-width: 620px) {
    .documents-image-gallery--full .documents-image-grid,
    .documents-image-gallery--compact .documents-image-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .documents-gallery-lightbox {
        grid-template-columns: 42px minmax(0, 1fr) 42px;
    }

    .documents-gallery-arrow {
        width: 38px;
        height: 38px;
        font-size: 29px;
    }

    .documents-gallery-stage {
        height: 78vh;
    }

    .documents-gallery-stage figcaption {
        flex-wrap: wrap;
        gap: 7px 12px;
    }
}

