/* =========================================================
   CODEWORD — STUDY MATERIALS / PDF LIBRARY
   Modern responsive styling. PHP/HTML remains unchanged.
   ========================================================= */

:root {
    --cw-navy: #1b3058;
    --cw-navy-dark: #142544;
    --cw-blue: #315b96;
    --cw-orange: #f28c28;
    --cw-text: #26364f;
    --cw-muted: #64748b;
    --cw-border: #e3e9f2;
    --cw-soft: #f5f8fc;
    --cw-white: #ffffff;
    --cw-green: #218838;
    --cw-red: #d6334c;
    --cw-shadow: 0 12px 34px rgba(27, 48, 88, .09);
    --cw-radius: 18px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    font-family: "Poppins", sans-serif;
    color: var(--cw-text);
    background: #f7f9fd;
    line-height: 1.65;
}







.pdfpage::after {
    width: 280px;
    height: 280px;
    bottom: -190px;
    left: -65px;
}

.pdfpage h1 {
    max-width: 1000px;
    margin: 0 auto 20px;
    color: #fff;
    font-size: clamp(30px, 4.2vw, 52px);
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -.8px;
    text-wrap: balance;
}

.pdfpage h6 {
    max-width: 850px;
    margin: 0 auto;
    color: rgba(255,255,255,.86);
    font-size: clamp(14px, 1.45vw, 17px);
    font-weight: 400;
    line-height: 1.9;
}

.pdf-library-wrapper {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: clamp(28px, 4vw, 48px) 20px 70px;
    box-sizing: border-box;
}

.pdf-library-wrapper > h1 {
    position: relative;
    margin: 0 0 28px;
    color: var(--cw-navy);
    text-align: center;
    font-size: clamp(27px, 3vw, 36px);
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -.6px;
}

.pdf-library-wrapper > h1::after {
    content: "";
    display: block;
    width: 74px;
    height: 4px;
    margin: 14px auto 0;
    border-radius: 20px;
    background: linear-gradient(90deg, var(--cw-orange), #ffc46d);
}

.teacher-search-btn {
    margin: 22px 0 30px !important;
    text-align: center;
}

.teacher-search-btn a {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 46px;
    padding: 12px 24px !important;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 12px !important;
    background: linear-gradient(135deg, var(--cw-navy), #2c4d80) !important;
    color: #fff !important;
    text-decoration: none !important;
    font-family: "Poppins", sans-serif;
    font-size: 14px !important;
    font-weight: 700 !important;
    box-shadow: 0 9px 22px rgba(27,48,88,.18);
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}

.teacher-search-btn a:hover {
    background: linear-gradient(135deg, var(--cw-navy-dark), var(--cw-navy)) !important;
    transform: translateY(-3px);
    box-shadow: 0 13px 28px rgba(27,48,88,.24);
}

/* Search panel */
.search-box {
    width: 100%;
    max-width: 960px;
    margin: 0 auto 34px;
    padding: clamp(18px, 2.8vw, 28px);
    border: 1px solid rgba(218,227,240,.9);
    border-radius: 20px;
    background: rgba(255,255,255,.96);
    box-shadow: var(--cw-shadow);
}

.search-box form {
    display: flex;
    align-items: end;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.search-field {
    display: flex;
    flex: 1 1 230px;
    flex-direction: column;
    min-width: 0;
    gap: 7px;
}

.search-field label {
    margin: 0;
    color: var(--cw-navy);
    font-size: 13px;
    font-weight: 700;
}

.search-box select,
.search-box input,
.search-box textarea {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 11px 14px;
    border: 1px solid #d9e2ef;
    border-radius: 11px;
    outline: none;
    background-color: #fff;
    color: var(--cw-text);
    font: 500 14px "Poppins", sans-serif;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.search-box select:focus,
.search-box input:focus,
.search-box textarea:focus {
    border-color: var(--cw-blue);
    box-shadow: 0 0 0 4px rgba(49,91,150,.11);
}

.search-box select:disabled {
    cursor: not-allowed;
    background: #f1f4f8;
    color: #8b96a8;
}

.pdf-reset-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 11px 20px;
    border: 1px solid #dce4ef;
    border-radius: 11px;
    background: #f3f6fb;
    color: var(--cw-navy) !important;
    text-decoration: none !important;
    white-space: nowrap;
    font: 700 14px "Poppins", sans-serif;
    transition: all .22s ease;
}

.pdf-reset-button:hover {
    border-color: var(--cw-navy);
    background: var(--cw-navy);
    color: #fff !important;
    transform: translateY(-2px);
}

.search-box button,
#pdfSearchForm button {
    min-height: 48px;
    padding: 11px 22px;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--cw-navy), #2d4f83);
    color: #fff;
    font: 700 14px "Poppins", sans-serif;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.search-box button:hover,
#pdfSearchForm button:hover {
    background: linear-gradient(135deg, var(--cw-navy-dark), var(--cw-navy));
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(27,48,88,.2);
}

/* Back links in the library */
.pdf-library-wrapper a[href*="pdf.php"] {
    text-decoration: none;
}

.pdf-library-wrapper > div[style*="text-align:center"] a {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 43px;
    padding: 10px 21px !important;
    border-radius: 11px !important;
    color: #fff !important;
    text-decoration: none !important;
    font: 700 14px "Poppins", sans-serif;
    box-shadow: 0 7px 18px rgba(33,136,56,.15);
    transition: transform .2s ease, box-shadow .2s ease;
}

.pdf-library-wrapper > div[style*="text-align:center"] a:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(27,48,88,.18);
}

/* Document cards grid */
.pdf-results {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 24px;
    width: 100%;
}

.pdf-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100%;
    padding: 25px;
    overflow: hidden;
    border: 1px solid var(--cw-border);
    border-radius: var(--cw-radius);
    background: var(--cw-white);
    box-shadow: 0 6px 22px rgba(27,48,88,.055);
    transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}

.pdf-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--cw-navy), #4d78b5 65%, var(--cw-orange));
}

.pdf-card:hover {
    transform: translateY(-6px);
    border-color: #cbd8e9;
    box-shadow: 0 18px 40px rgba(27,48,88,.13);
}

.pdf-card h1 {
    margin: 5px 0 14px;
    color: var(--cw-navy);
    font: 700 clamp(19px, 1.7vw, 23px)/1.4 "Poppins", sans-serif;
    overflow-wrap: anywhere;
}

.pdf-card h1 strong {
    color: var(--cw-navy);
    font-weight: 800;
}

.pdf-card h5 {
    margin: 0 0 15px;
    color: #40516a;
    font: 500 15px/1.65 "Poppins", sans-serif;
    overflow-wrap: anywhere;
}

.pdf-card h5 strong {
    color: var(--cw-navy);
    font-weight: 700;
}

.pdf-card > p {
    margin: 0 0 15px;
    padding: 12px 14px;
    border: 1px solid #e8edf5;
    border-radius: 11px;
    background: linear-gradient(135deg, #f8faff, #f3f6fb);
    color: var(--cw-muted);
    font: 500 12px/1.9 "Poppins", sans-serif;
    overflow-wrap: anywhere;
}

.pdf-card > p strong {
    color: #34445c;
    font-weight: 700;
}

/* Keywords */
.pdf-card-keywords {
    margin: 12px 0;
    padding: 14px;
    border: 1px solid #e3eaf5;
    border-radius: 12px;
    background: #f7f9fd;
}

.pdf-meta-label {
    display: block;
    margin: 0 0 9px;
    color: var(--cw-navy);
    font: 700 13px "Poppins", sans-serif;
}

.pdf-meta-label i {
    margin-right: 5px;
    color: var(--cw-orange);
}

.pdf-keyword-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.pdf-keyword-tag {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 6px 10px;
    border: 1px solid #d5e2f5;
    border-radius: 30px;
    background: #eaf1fc;
    color: var(--cw-navy);
    font: 600 11px/1.4 "Poppins", sans-serif;
    overflow-wrap: anywhere;
}

.pdf-no-data {
    color: #8792a3 !important;
    font-size: 12px !important;
    font-style: italic;
}

/* Description */
.pdf-card-description {
    margin: 10px 0 16px;
    padding: 14px;
    border: 1px solid #e4eaf3;
    border-left: 4px solid var(--cw-orange);
    border-radius: 11px;
    background: #fff;
}

.pdf-card-description p {
    margin: 6px 0 0;
    color: #5a687d;
    font-size: 13px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

/* Card actions */
.pdf-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: auto;
    padding-top: 18px;
}

.view-link,
.download-link,
.login-view-link,
.login-download-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 41px;
    padding: 10px 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    text-decoration: none !important;
    font: 700 12px "Poppins", sans-serif;
    white-space: nowrap;
    cursor: pointer;
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.view-link,
.login-view-link {
    background: var(--cw-navy);
    color: #fff !important;
    box-shadow: 0 5px 12px rgba(27,48,88,.12);
}

.view-link:hover,
.login-view-link:hover {
    background: var(--cw-navy-dark);
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 17px rgba(27,48,88,.2);
}

.download-link,
.login-download-link {
    border-color: #dce5f0;
    background: #f3f6fb;
    color: var(--cw-navy) !important;
}

.download-link:hover,
.login-download-link:hover {
    border-color: #c5d3e6;
    background: #e8eef8;
    color: var(--cw-navy-dark) !important;
    transform: translateY(-2px);
}

/* Like system */
.pdf-like-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pdf-like-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 41px;
    padding: 9px 14px;
    border: 1px solid #d8e2ef;
    border-radius: 10px;
    outline: none;
    background: #fff;
    color: var(--cw-navy);
    font: 700 12px "Poppins", sans-serif;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: all .22s ease;
}

.student-like-btn {
    border-color: #b8cbea;
    background: #eef5ff;
    color: var(--cw-navy);
    box-shadow: 0 4px 12px rgba(27,48,88,.08);
}

.student-like-btn:not(.liked) .like-icon {
    animation: cwHeartBeat 1.8s ease-in-out infinite;
}

.pdf-like-btn .like-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 19px;
    height: 19px;
    font-size: 19px;
    line-height: 1;
    transition: transform .2s ease;
}

.pdf-like-btn .like-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    font-size: 12px;
    font-weight: 800;
}

.student-like-btn:hover,
.pdf-like-btn:hover {
    border-color: #85a5d5;
    background: #e1edff;
    color: var(--cw-navy-dark);
    transform: translateY(-2px);
    box-shadow: 0 7px 17px rgba(27,48,88,.13);
}

.pdf-like-btn.liked {
    animation: none !important;
    border-color: #efabb6;
    background: #fff0f3;
    color: var(--cw-red);
    box-shadow: 0 4px 12px rgba(214,51,76,.1);
}

.pdf-like-btn.liked:hover {
    border-color: #df7f8d;
    background: #ffe2e7;
    color: #c72d45;
}

.pdf-like-btn.liked .like-icon {
    color: var(--cw-red);
    transform: scale(1.12);
    animation: none !important;
}

.pdf-like-btn:active {
    transform: scale(.97);
}

.pdf-like-btn.loading {
    pointer-events: none;
    opacity: .6;
    cursor: wait;
    animation: none !important;
}

.pdf-total-likes {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 41px;
    padding: 9px 13px;
    border: 1px solid #e3e8ef;
    border-radius: 10px;
    background: #f7f9fc;
    color: var(--cw-navy);
    font: 700 12px "Poppins", sans-serif;
    white-space: nowrap;
}

.pdf-total-likes .total-like-icon {
    color: var(--cw-red);
    font-size: 17px;
    line-height: 1;
}

.pdf-total-likes .total-like-count {
    color: var(--cw-navy);
    font-size: 13px;
    font-weight: 800;
}

.pdf-actions .pdf-like-wrapper {
    margin-left: 0;
}

@keyframes cwHeartBeat {
    0%, 100% { transform: scale(1); }
    18%, 42% { transform: scale(1.18); }
    30%, 55% { transform: scale(1); }
}

/* Statistics */
.pdf-stats {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.pdf-stat {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid #e7edf4;
    border-radius: 30px;
    background: #f6f8fb;
    font: 600 11px "Poppins", sans-serif;
    white-space: nowrap;
    transition: background .2s ease, transform .2s ease;
}

.pdf-stat strong {
    font-size: 12px;
    font-weight: 800;
}

.pdf-stat:hover {
    transform: translateY(-1px);
    background: #edf2f8;
}

.view-stat { color: #247a3b; }
.download-stat { color: #17649f; }

.pdf-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 5px;
    padding: 4px 9px;
    border: 1px solid #e2e8f0;
    border-radius: 30px;
    background: #f1f5f9;
    color: var(--cw-navy);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

/* Popup */
.popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(12, 24, 45, .58);
    backdrop-filter: blur(5px);
}

.popup-overlay.show,
.popup-overlay.active {
    display: flex;
}

.popup-box {
    width: min(100%, 420px);
    padding: 30px 26px;
    border: 1px solid rgba(255,255,255,.6);
    border-radius: 20px;
    background: #fff;
    text-align: center;
    box-shadow: 0 24px 70px rgba(0,0,0,.22);
    animation: cwPopupIn .25s ease-out;
}

.popup-box p {
    margin: 0 0 22px;
    color: var(--cw-text);
    font: 600 15px/1.7 "Poppins", sans-serif;
}

.popup-box button {
    min-width: 100px;
    padding: 11px 24px;
    border: 0;
    border-radius: 10px;
    background: var(--cw-navy);
    color: #fff;
    font: 700 14px "Poppins", sans-serif;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}

.popup-box button:hover {
    background: var(--cw-navy-dark);
    transform: translateY(-1px);
}

@keyframes cwPopupIn {
    from { opacity: 0; transform: translateY(12px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* General empty states and accessible focus */
.pdf-results:empty {
    display: none;
}

.pdf-library-wrapper a:focus-visible,
.pdf-library-wrapper button:focus-visible,
.pdf-library-wrapper select:focus-visible {
    outline: 3px solid rgba(242,140,40,.55);
    outline-offset: 3px;
}

.pdf-card img {
    max-width: 100%;
    height: auto;
}

/* Teacher-wise search components: broad styling without changing markup */
.teacher-search-container,
.teacher-pdf-search,
.teacher-search-wrapper,
.teacher-pdf-results {
    width: 100%;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.teacher-search-container,
.teacher-pdf-search,
.teacher-search-wrapper {
    padding: 22px;
    border: 1px solid var(--cw-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--cw-shadow);
}

.teacher-search-container input,
.teacher-search-container select,
.teacher-pdf-search input,
.teacher-pdf-search select,
.teacher-search-wrapper input,
.teacher-search-wrapper select {
    max-width: 100%;
    min-height: 45px;
    padding: 10px 13px;
    border: 1px solid #d9e2ef;
    border-radius: 10px;
    background: #fff;
    color: var(--cw-text);
    font: 500 14px "Poppins", sans-serif;
}

.teacher-search-container button,
.teacher-pdf-search button,
.teacher-search-wrapper button {
    min-height: 43px;
    padding: 10px 18px;
    border: 0;
    border-radius: 10px;
    background: var(--cw-navy);
    color: #fff;
    font: 700 13px "Poppins", sans-serif;
    cursor: pointer;
    transition: all .2s ease;
}

.teacher-search-container button:hover,
.teacher-pdf-search button:hover,
.teacher-search-wrapper button:hover {
    background: var(--cw-navy-dark);
    transform: translateY(-1px);
}

/* Tablet */
@media (max-width: 1100px) {
    .pdf-results {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }

    .pdf-library-wrapper {
        padding-left: 18px;
        padding-right: 18px;
    }

    .pdf-card {
        padding: 22px;
    }
}

/* Mobile */
@media (max-width: 700px) {
    .pdf-results {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .pdf-library-wrapper {
        padding: 28px 13px 45px;
    }

    .pdf-library-wrapper > h1 {
        margin-bottom: 22px;
        font-size: 27px;
    }

    .search-box {
        padding: 17px;
        border-radius: 15px;
    }

    .search-box form {
        align-items: stretch;
        flex-direction: column;
    }

    .search-field {
        flex: 1 1 auto;
        width: 100%;
    }

    .search-box select,
    .search-box input,
    .search-box button,
    .pdf-reset-button {
        width: 100%;
        min-width: 0;
    }

    .pdf-card {
        padding: 20px;
        border-radius: 16px;
    }

    .pdf-card h1 {
        font-size: 21px;
    }

    .pdf-actions {
        align-items: flex-start;
        gap: 8px;
    }

    .pdf-actions > a,
    .pdf-actions .pdf-like-wrapper,
    .pdf-actions .pdf-like-btn,
    .pdf-actions .pdf-total-likes {
        max-width: 100%;
    }

    .pdf-stats {
        margin-top: 13px;
    }

    .pdfpage {
        padding: 62px 0;
    }

    .pdfpage h6 {
        padding: 0 8px;
    }
}

@media (max-width: 420px) {
    .pdf-library-wrapper {
        padding-right: 10px;
        padding-left: 10px;
    }

    .pdf-card {
        padding: 17px;
    }

    .pdf-actions {
        gap: 7px;
    }

    .view-link,
    .download-link,
    .login-view-link,
    .login-download-link,
    .pdf-like-btn,
    .pdf-total-likes {
        min-height: 39px;
        padding: 9px 11px;
        font-size: 11px;
    }

    .pdf-stat {
        padding: 6px 9px;
        font-size: 10px;
    }

    .pdf-keyword-tag {
        font-size: 10px;
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}

/* =========================================================
   FINAL LAYOUT FIX — NAVIGATION BUTTONS ON ONE LINE
   Keeps PHP/HTML unchanged. The heading remains centered.
   ========================================================= */

.pdf-library-wrapper {
    position: relative !important;
}

/* Search by Teacher button */
.pdf-library-wrapper > .teacher-search-btn {
    position: absolute !important;
    top: 35px !important;
    right: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    width: auto !important;
    min-height: 47px;
    margin: 0 !important;
    padding: 0 !important;
    text-align: right !important;
    z-index: 10;
}

.pdf-library-wrapper > .teacher-search-btn > a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 46px !important;
    margin: 0 !important;
    padding: 11px 18px !important;
    border-radius: 10px !important;
    background: #1b3058 !important;
    color: #fff !important;
    font: 700 13px/1.3 "Poppins", sans-serif !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    box-shadow: 0 6px 16px rgba(27, 48, 88, .16);
    transition: background .22s ease, transform .22s ease, box-shadow .22s ease;
}

.pdf-library-wrapper > .teacher-search-btn > a:hover {
    background: #142544 !important;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 9px 20px rgba(27, 48, 88, .2);
}

/* Back to All PDFs wrapper (only when it is a direct child) */
.pdf-library-wrapper > div:has(> a[href="pdf.php#documentsLibrary"]) {
    position: absolute !important;
    top: 35px !important;
    right: 220px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: right !important;
    z-index: 10;
}

.pdf-library-wrapper > div:has(> a[href="pdf.php#documentsLibrary"]) > a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 46px !important;
    margin: 0 !important;
    padding: 11px 18px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: #28a745 !important;
    color: #fff !important;
    font: 700 13px/1.3 "Poppins", sans-serif !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    box-shadow: 0 6px 16px rgba(40, 167, 69, .17);
    transition: background .22s ease, transform .22s ease, box-shadow .22s ease;
}

.pdf-library-wrapper > div:has(> a[href="pdf.php#documentsLibrary"]) > a:hover {
    background: #218838 !important;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 9px 20px rgba(40, 167, 69, .22);
}

/* Leave enough room above the search panel; do not move the heading */
.pdf-library-wrapper > h1 {
    margin-top: 0;
}

/* On smaller screens, place buttons in a neat centered row below heading */
@media (max-width: 700px) {
    .pdf-library-wrapper > .teacher-search-btn,
    .pdf-library-wrapper > div:has(> a[href="pdf.php#documentsLibrary"]) {
        position: static !important;
        display: flex !important;
        justify-content: center !important;
        width: 100% !important;
        margin: 10px 0 !important;
        padding: 0 !important;
        text-align: center !important;
    }

    .pdf-library-wrapper > .teacher-search-btn > a,
    .pdf-library-wrapper > div:has(> a[href="pdf.php#documentsLibrary"]) > a {
        max-width: 100%;
        white-space: normal !important;
        text-align: center;
    }

    .pdf-library-wrapper > h1 {
        margin-bottom: 22px;
    }
}

