:root {
    --library-text: #20242b;
    --library-muted: #777d86;
    --library-light: #f7f7f9;
    --library-border: #e9e9ee;
    --library-soft: rgba(55, 70, 135, 0.07);
}

.library-hero {
    position: relative;
    overflow: hidden;
    padding: 70px 0 0;
}

.library-hero::before {
    content: "";
    position: absolute;
    width: 480px;
    height: 480px;
    right: -220px;
    top: -220px;
    border: 1px solid rgba(55, 70, 135, 0.08);
    border-radius: 50%;
}

.library-hero-content {
    position: relative;
    z-index: 2;
}

.library-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    color: var(--main-color);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .3px;
}

.library-eyebrow::before {
    content: "";
    width: 32px;
    height: 2px;
    background: var(--main-color);
}

.library-hero-title {
    max-width: 650px;
    margin: 0 0 25px;
    color: var(--library-text);
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    font-weight: 900;
    line-height: 1.25;
    letter-spacing: -1px;
}

.library-hero-title span {
    position: relative;
    color: var(--main-color);
}

.library-hero-description {
    max-width: 620px;
    margin: 0 0 30px;
    color: #000;
    font-size: 17px;
    line-height: 2;
}

.library-hero-meta {
    display: flex;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
}

.library-meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--library-text);
    font-size: 13px;
    font-weight: 700;
}

.library-meta-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--library-soft);
    color: var(--main-color);
}

.library-visual {
    position: relative;
    min-height: 430px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.library-visual-bg {
    position: absolute;
    width: 370px;
    height: 370px;
    border-radius: 50%;
    background: rgba(55, 70, 135, 0.055);
}

.library-visual-ring {
    position: absolute;
    width: 420px;
    height: 420px;
    border: 1px solid rgba(55, 70, 135, 0.12);
    border-radius: 50%;
}

.library-visual img {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 430px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 25px 35px rgba(0, 0, 0, .10));
}

.library-floating-card {
    position: absolute;
    z-index: 3;
    bottom: 30px;
    left: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 18px;
    background: rgba(255, 255, 255, .94);
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: 14px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .10);
    backdrop-filter: blur(10px);
}

.library-floating-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--main-color);
    color: #fff;
}

.library-floating-text strong {
    display: block;
    color: var(--library-text);
    font-size: 13px;
    font-weight: 800;
}

.library-floating-text span {
    display: block;
    margin-top: 2px;
    color: var(--library-muted);
    font-size: 11px;
}

.library-section-top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 45px;
}

.library-section-heading {
    max-width: 650px;
}

.library-section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--main-color);
    font-size: 12px;
    font-weight: 800;
}

.library-section-label i {
    font-size: 9px;
}

.library-section-title {
    margin: 0 0 10px;
    color: var(--library-text);
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    font-weight: 900;
}

.library-section-description {
    margin: 0;
    color: #000;
    font-size: 14px;
    line-height: 1.9;
}

.library-count {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 17px;
    border: 1px solid var(--library-border);
    border-radius: 12px;
    background: #fff;
    white-space: nowrap;
}

.library-count-icon {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: var(--library-soft);
    color: var(--main-color);
}

.library-count strong {
    display: block;
    color: var(--library-text);
    font-size: 15px;
    font-weight: 800;
}

.library-count span {
    display: block;
    margin-top: 1px;
    color: var(--library-muted);
    font-size: 11px;
}

.document-card {
    position: relative;
    height: 100%;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--library-border);
    border-radius: 16px;
    transition:
        transform .35s ease,
        box-shadow .35s ease,
        border-color .35s ease;
}

.document-card:hover {
    transform: translateY(-8px);
    border-color: rgba(55, 70, 135, .20);
    box-shadow: 0 25px 55px rgba(30, 35, 60, .11);
}

.document-preview {
    position: relative;
    padding: 14px;
    background: #f5f5f7;
}

.document-preview-inner {
    position: relative;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5e5e8;
    border-radius: 9px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .07);
}

.document-preview img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .5s ease;
}

.document-card:hover .document-preview img {
    transform: scale(1.04);
}

.document-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(31, 36, 52, .48);
    opacity: 0;
    transition: opacity .3s ease;
}

.document-card:hover .document-overlay {
    opacity: 1;
}

.document-view-btn {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    color: var(--main-color);
    font-size: 17px;
    transform: translateY(10px);
    transition: transform .3s ease;
}

.document-card:hover .document-view-btn {
    transform: translateY(0);
}

.document-badge {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .94);
    color: var(--main-color);
    font-size: 10px;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}

.document-content {
    padding: 20px 19px 18px;
}

.document-type {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 9px;
    color: var(--main-color);
    font-size: 11px;
    font-weight: 800;
}

.document-title {
    height: 54px;
    overflow: hidden;
    margin: 0 0 18px;
    color: var(--library-text);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.8;
}

.document-title a {
    color: inherit;
    text-decoration: none;
    transition: color .2s ease;
}

.document-title a:hover {
    color: var(--main-color);
}

.document-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #eeeeef;
}

.document-file-info a {
    color: #000;
    font-size: 12px;
}


.document-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 13px;
    border-radius: 8px;
    background: var(--main-color);
    color: #fff !important;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none !important;
    transition: all .25s ease;
}

.document-download:hover {
    background: var(--main-hover-color);
    transform: translateY(-1px);
}

.library-empty {
    padding: 90px 25px;
    text-align: center;
    border: 1px dashed #dcdde3;
    border-radius: 18px;
    background: #fafafd;
}

.library-empty-icon {
    width: 75px;
    height: 75px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    border-radius: 20px;
    background: var(--library-soft);
    color: var(--main-color);
    font-size: 27px;
}

.library-empty h3 {
    margin: 0 0 8px;
    color: var(--library-text);
    font-size: 20px;
    font-weight: 800;
}

.library-empty p {
    margin: 0;
    color: var(--library-muted);
    font-size: 13px;
}

.library-pagination {
    margin-top: 55px;
}

.library-pagination .pagination {
    margin: 0;
}

@media (max-width: 991px) {

    .library-hero {
        padding: 60px 0 0;
    }

    .library-visual {
        min-height: 350px;
        margin-bottom: 35px;
    }

    .library-visual img {
        max-width: 340px;
    }

    .library-visual-bg {
        width: 300px;
        height: 300px;
    }

    .library-visual-ring {
        width: 340px;
        height: 340px;
    }

    .library-floating-card {
        left: 10%;
    }
}

@media (max-width: 767px) {

    .library-hero {
        padding: 45px 0 0;
    }

    .library-hero-title {
        font-size: 2rem;
        letter-spacing: -.5px;
    }

    .library-hero-description {
        font-size: 14px;
        line-height: 1.9;
    }

    .library-hero-meta {
        gap: 12px;
    }

    .library-meta-item {
        font-size: 11px;
    }

    .library-meta-icon {
        width: 33px;
        height: 33px;
    }

    .library-visual {
        min-height: 290px;
    }

    .library-visual img {
        max-width: 270px;
    }

    .library-visual-bg {
        width: 230px;
        height: 230px;
    }

    .library-visual-ring {
        width: 270px;
        height: 270px;
    }

    .library-floating-card {
        bottom: 0;
        left: 5%;
        padding: 10px 13px;
    }

    .library-floating-icon {
        width: 34px;
        height: 34px;
    }

    .library-floating-text strong {
        font-size: 11px;
    }

    .library-floating-text span {
        font-size: 9px;
    }

    .library-documents {
        padding: 55px 0 70px;
    }

    .library-section-top {
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 30px;
        gap: 18px;
    }

    .library-section-title {
        font-size: 1.7rem;
    }

    .library-count {
        width: 100%;
    }

    .document-preview {
        padding: 9px;
    }

    .document-content {
        padding: 15px 12px 13px;
    }

    .document-type {
        font-size: 9px;
    }

    .document-title {
        height: 48px;
        margin-bottom: 13px;
        font-size: 12px;
        line-height: 1.7;
    }

    .document-footer {
        padding-top: 12px;
    }

    .document-file-info {
        display: none;
    }

    .document-download {
        width: 100%;
        padding: 8px 10px;
        font-size: 10px;
    }

    .document-badge {
        top: 17px;
        right: 17px;
        padding: 5px 7px;
        font-size: 8px;
    }
}

/* ==========================================================================
               Modern Legal Document Page Styling
               ========================================================================== */

.doc-details-section {
    background-color: #f8fafc;
}

.doc-layout-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    align-items: start;
}

/* Main Content Column */
.doc-main-col {
    order: 1;
}

.doc-article-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 36px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.04);
}

.doc-text-content {
    font-size: 1.05rem;
    line-height: 2.2;
    color: #334155;
    text-align: justify;
}

.doc-text-content p {
    margin-bottom: 24px;
}

.doc-text-content h2,
.doc-text-content h3 {
    color: #0f172a;
    font-weight: 800;
    margin-top: 32px;
    margin-bottom: 16px;
}

.doc-empty-state {
    text-align: center;
    padding: 60px 24px;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    color: #64748b;
}

.doc-empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #94a3b8;
}

.doc-empty-state p {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

/* Sidebar & Metadata Card */
.doc-sidebar-col {
    order: 2;
    position: sticky;
    top: 120px;
    z-index: 5;
}

.legal-meta-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
}

.legal-meta-card-title {
    font-size: 17px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f1f5f9;
}

.legal-meta-card-title i {
    color: var(--main-color, #374687);
    font-size: 20px;
}

.legal-meta-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.legal-meta-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding-bottom: 14px;
    border-bottom: 1px dashed #e2e8f0;
}

.legal-meta-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.legal-meta-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 10px;
    background: #f1f5f9;
    color: var(--main-color, #374687);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: all 0.25s ease;
}

.legal-meta-item:hover .legal-meta-icon {
    background: var(--main-color, #374687);
    color: #ffffff;
}

.legal-meta-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.legal-meta-label {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
}

.legal-meta-value {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}

.legal-badge-status {
    display: inline-block;
    width: fit-content;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    background: #e0e7ff;
    color: var(--main-color, #374687);
}

/* Download Action Button */
.doc-actions-bar {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.btn-doc-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 18px;
    background: var(--main-color, #374687);
    color: #ffffff !important;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none !important;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(55, 70, 135, 0.2);
}

.btn-doc-download:hover {
    background: var(--main-hover-color, #2b376d);
    box-shadow: 0 8px 20px rgba(55, 70, 135, 0.35);
    transform: translateY(-2px);
}

/* Print Media Styles */
@media print {

    .doc-header-wrapper,
    .doc-sidebar-col,
    .related-section {
        display: none !important;
    }

    .doc-layout-grid {
        grid-template-columns: 1fr;
    }

    .doc-article-card {
        border: none;
        box-shadow: none;
        padding: 0;
    }
}

/* Responsive Breakpoints */
@media (max-width: 991px) {
    .doc-layout-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .doc-sidebar-col {
        order: 1;
        position: relative;
        top: 0;
    }

    .doc-main-col {
        order: 2;
    }

    .doc-article-card {
        padding: 24px 20px;
    }
}