/* Documents page — uses site CSS variables from style.css */
.otk-docs-section {
    padding-bottom: 60px;
}

.otk-docs-block-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.02em;
    width: 100%;
}

.otk-docs-block-title i {
    color: var(--primary2);
}

.otk-docs-block-title--featured i {
    color: var(--primary);
}

.otk-doc-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 20px;
    background: #fff;
    border: 1px solid rgba(69, 114, 168, 0.12);
    border-left: 4px solid var(--primary);
    border-radius: 10px;
    padding: 20px 22px;
    margin-bottom: 14px;
    box-shadow: 0 2px 12px rgba(0, 37, 89, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.otk-doc-top {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    min-width: 0;
}

.otk-doc-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0, 37, 89, 0.1);
    border-left-color: var(--primary2);
}

.otk-doc-item--featured {
    border-left-color: var(--secondary);
    background: linear-gradient(135deg, #fff 0%, rgba(137, 183, 251, 0.08) 100%);
}

.otk-doc-item--featured:hover {
    border-left-color: var(--primary2);
}

.otk-doc-icon {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 12px;
    background: linear-gradient(145deg, var(--light) 0%, #fff 100%);
    border: 1px solid rgba(137, 183, 251, 0.35);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.otk-doc-icon i {
    font-size: 28px;
    color: #c0392b;
    line-height: 1;
}

.otk-doc-icon span {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--primary2);
    text-transform: uppercase;
}

.otk-doc-body {
    flex: 1;
    min-width: 200px;
}

.otk-doc-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--secondary);
    margin: 0 0 6px;
    line-height: 1.35;
}

.otk-doc-desc {
    font-size: 14px;
    color: var(--dark);
    opacity: 0.85;
    margin: 0;
    line-height: 1.55;
}

.otk-doc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex-shrink: 0;
}

.otk-doc-actions .btn {
    min-width: 118px;
    font-weight: 600;
    font-size: 13px;
    padding: 10px 18px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s ease;
}

.otk-doc-btn-outline {
    background: #fff !important;
    color: var(--primary2) !important;
    border: 2px solid var(--primary) !important;
}

.otk-doc-btn-outline:hover {
    background: var(--primary) !important;
    color: var(--dark) !important;
    border-color: var(--primary) !important;
}

.otk-docs-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid rgba(69, 114, 168, 0.2);
}

.otk-docs-pagination .btn.disabled {
    opacity: 0.45;
    pointer-events: none;
}

.otk-docs-empty {
    text-align: center;
    padding: 56px 24px;
    background: #fff;
    border: 1px dashed rgba(137, 183, 251, 0.5);
    border-radius: 8px;
}

.otk-docs-empty-icon {
    width: 88px;
    height: 88px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: var(--light);
    color: var(--primary2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}

.otk-docs-empty h4 {
    color: var(--secondary);
    font-weight: 700;
    margin-bottom: 8px;
}

.otk-docs-empty p {
    color: var(--dark);
    opacity: 0.75;
    margin: 0;
}

/* ===== Full-screen PDF viewer ===== */
html.otk-pdf-open,
body.otk-pdf-open {
    overflow: hidden !important;
    height: 100%;
}

body.otk-pdf-open {
    position: fixed;
    width: 100%;
    left: 0;
    right: 0;
}

.otk-pdf-viewer {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: stretch;
    justify-content: center;
    overscroll-behavior: none;
}

.otk-pdf-viewer.is-open {
    display: flex;
}

.otk-pdf-viewer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 37, 89, 0.55);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .otk-pdf-viewer__backdrop {
        background: rgba(0, 37, 89, 0.78);
    }
}

.otk-pdf-viewer__panel {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    max-width: 100%;
    background: transparent;
    animation: otkPdfIn 0.22s ease;
    touch-action: manipulation;
}

@keyframes otkPdfIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Slim header bar */
.otk-pdf-viewer__header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    padding: 6px 14px;
    background: rgba(0, 37, 89, 0.94);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(137, 183, 251, 0.35);
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.12);
}

.otk-pdf-viewer__title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.otk-pdf-viewer__pdf-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(137, 183, 251, 0.2);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.otk-pdf-viewer__pdf-icon i {
    color: #e74c3c;
}

.otk-pdf-viewer__title {
    margin: 0;
    font-size: clamp(13px, 2vw, 15px);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    letter-spacing: 0.01em;
}

.otk-pdf-viewer__header-btn {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
}

.otk-pdf-viewer__header-btn:hover {
    background: var(--primary);
    color: var(--secondary);
}

/* Scroll area — thin branded scrollbar */
.otk-pdf-viewer__scroll {
    flex: 1;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: rgba(0, 37, 89, 0.4);
    padding: 12px 10px 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
    overscroll-behavior: contain;
    touch-action: pan-y pinch-zoom;
}

.otk-pdf-viewer__scroll.is-zoomed {
    overflow-x: auto;
    touch-action: pan-x pan-y pinch-zoom;
}

.otk-pdf-viewer__scroll::-webkit-scrollbar {
    width: 3px;
}

.otk-pdf-viewer__scroll::-webkit-scrollbar-track {
    background: transparent;
}

.otk-pdf-viewer__scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.16);
    border-radius: 999px;
}

.otk-pdf-viewer__scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.32);
}

.otk-pdf-viewer__scroll::-webkit-scrollbar-thumb:active {
    background: rgba(137, 183, 251, 0.45);
}

.otk-pdf-viewer__loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 40vh;
    color: rgba(255, 255, 255, 0.9);
    gap: 12px;
}

.otk-pdf-viewer__loader i {
    font-size: 28px;
    color: var(--primary);
}

.otk-pdf-viewer__loader p {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    opacity: 0.85;
    letter-spacing: 0.02em;
}

.otk-pdf-viewer__pages {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.otk-pdf-viewer__page {
    width: auto;
    max-width: none;
    min-height: 100px;
    background: #fff;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.28);
    border-radius: 4px;
    overflow: hidden;
}

.otk-pdf-viewer__page-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    color: var(--primary2);
    font-size: 20px;
}

.otk-pdf-viewer__canvas {
    display: block;
    max-width: none;
}

/* Slim footer bar */
.otk-pdf-viewer__footer {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 40px;
    padding: 5px 14px;
    background: rgba(0, 37, 89, 0.94);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(137, 183, 251, 0.35);
    box-shadow: 0 -1px 8px rgba(0, 0, 0, 0.1);
}

.otk-pdf-viewer__zoom {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.otk-pdf-viewer__zoom-label {
    min-width: 44px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: rgba(189, 208, 232, 0.95);
    letter-spacing: 0.02em;
}

.otk-pdf-viewer__page-meta {
    font-size: 12px;
    color: rgba(189, 208, 232, 0.9);
    font-weight: 500;
    letter-spacing: 0.02em;
}

.otk-pdf-viewer__footer-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.otk-pdf-viewer__fab {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
    background: rgba(137, 183, 251, 0.2);
    color: var(--primary);
    box-shadow: none;
}

.otk-pdf-viewer__fab:hover {
    transform: none;
    background: var(--primary);
    color: var(--secondary);
}

.otk-pdf-viewer__fab--close {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
}

.otk-pdf-viewer__fab--close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

@media (max-width: 576px) {
    .otk-pdf-viewer__header {
        padding: 5px 10px;
        min-height: 40px;
    }

    .otk-pdf-viewer__pdf-icon {
        width: 26px;
        height: 26px;
        font-size: 13px;
    }

    .otk-pdf-viewer__header-btn {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }

    .otk-pdf-viewer__scroll {
        padding: 8px 6px 12px;
    }

    .otk-pdf-viewer__scroll::-webkit-scrollbar {
        width: 3px;
    }

    .otk-pdf-viewer__footer {
        padding: 4px 10px;
        min-height: 36px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .otk-pdf-viewer__page-meta {
        font-size: 11px;
        max-width: 100%;
        width: 100%;
        text-align: center;
        line-height: 1.25;
        order: 3;
    }

    .otk-pdf-viewer__zoom {
        order: 1;
    }

    .otk-pdf-viewer__footer-actions {
        order: 2;
    }

    .otk-pdf-viewer__fab {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }
}

@media (min-width: 992px) {
    .otk-pdf-viewer__panel {
        max-width: 100%;
    }
}

/* ===== Mobile — documents list ===== */
@media (max-width: 767px) {
    .otk-docs-section {
        padding-bottom: 36px;
    }

    .otk-docs-section .section-sub-title {
        font-size: 1.65rem;
        line-height: 1.25;
        margin-bottom: 28px;
    }

    .otk-docs-section .section-title {
        font-size: 0.8rem;
        letter-spacing: 0.06em;
    }

    .otk-docs-section .row.justify-content-center > [class*="col-"] {
        padding-left: 12px;
        padding-right: 12px;
    }

    .otk-docs-section .mb-5 {
        margin-bottom: 1.75rem !important;
    }

    .otk-docs-block-title {
        font-size: 13px;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        margin-bottom: 12px;
        padding-bottom: 8px;
        border-bottom-width: 1px;
    }

    .otk-docs-block-title i {
        font-size: 14px;
    }

    .otk-doc-item {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        padding: 14px 14px 12px;
        border-left-width: 3px;
        border-radius: 12px;
        margin-bottom: 12px;
    }

    .otk-doc-item:hover {
        transform: none;
    }

    .otk-doc-top {
        width: 100%;
        align-items: flex-start;
        gap: 12px;
    }

    .otk-doc-icon {
        width: 46px;
        height: 46px;
        border-radius: 10px;
        flex-shrink: 0;
    }

    .otk-doc-icon i {
        font-size: 20px;
    }

    .otk-doc-icon span {
        font-size: 8px;
    }

    .otk-doc-body {
        flex: 1;
        min-width: 0;
        padding-top: 2px;
    }

    .otk-doc-title {
        font-size: 15px;
        font-weight: 700;
        line-height: 1.35;
        word-break: break-word;
        margin-bottom: 4px;
    }

    .otk-doc-desc {
        font-size: 13px;
        line-height: 1.45;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .otk-doc-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .otk-doc-actions .btn {
        flex: none;
        width: 100%;
        min-width: 0;
        min-height: 44px;
        padding: 10px 10px;
        font-size: 12px;
        font-weight: 600;
        border-radius: 8px;
        gap: 6px;
    }

    .otk-doc-actions .btn i {
        font-size: 13px;
    }

    .otk-doc-btn-outline {
        border-width: 1.5px !important;
    }

    .otk-docs-pagination {
        flex-direction: row;
        gap: 10px;
        margin-top: 24px;
        padding-top: 18px;
    }

    .otk-docs-pagination .btn {
        flex: 1;
        width: auto;
        min-height: 44px;
        font-size: 13px;
        border-radius: 8px;
    }

    .otk-docs-empty {
        padding: 40px 20px;
        border-radius: 12px;
    }

    .otk-docs-empty-icon {
        width: 72px;
        height: 72px;
        font-size: 28px;
    }
}

@media (max-width: 380px) {
    .otk-doc-actions {
        grid-template-columns: 1fr;
    }

    .otk-doc-actions .btn {
        min-height: 42px;
    }
}
