/* ============================================================
   VIDYARTHIASTRA — PAPERS PAGE
   Modern UI
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f6f8fc;
    color: #172554;
    max-width: 100%;
    overflow-x: hidden;
}


/* ============================================================
   CONTAINER
   ============================================================ */

.container {
    width: min(1120px, 92%);
    margin: auto;
    max-width: 100%;
    box-sizing: border-box;
}


/* ============================================================
   HEADER
   ============================================================ */

.site-header {
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}

.header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    text-decoration: none;
    font-size: 25px;
    font-weight: 800;
    color: #172554;
}

.logo span {
    color: #2563eb;
}

.nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav a {
    text-decoration: none;
    color: #475569;
    font-size: 15px;
    font-weight: 600;
    transition: 0.2s;
}

.nav a:hover {
    color: #2563eb;
}


/* ============================================================
   MAIN
   ============================================================ */

main {
    min-height: calc(100vh - 150px);
}


/* ============================================================
   PAGE HERO
   ============================================================ */

.papers-page {
    padding: 70px 0 90px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    color: #2563eb;
    text-decoration: none;

    font-size: 14px;
    font-weight: 700;

    margin-bottom: 30px;

    transition: 0.2s;
}

.back-link:hover {
    transform: translateX(-4px);
}


/* ============================================================
   LABEL
   ============================================================ */

.eyebrow {
    color: #2563eb;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 12px;
}


/* ============================================================
   TITLE
   ============================================================ */

.page-title {
    font-size: clamp(34px, 5vw, 52px);
    line-height: 1.1;
    font-weight: 800;
    color: #172554;
    margin-bottom: 12px;
}

.page-description {
    color: #64748b;
    font-size: 17px;
    margin-bottom: 45px;
}


/* ============================================================
   PAPERS HEADER
   ============================================================ */

.papers-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;

    margin-bottom: 22px;
}

.papers-header h2 {
    font-size: 27px;
    color: #172554;
}

.paper-count {
    color: #64748b;
    font-size: 14px;
}


/* ============================================================
   PAPERS GRID & LIST
   ============================================================ */

.papers-grid,
.paper-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}


/* ============================================================
   PAPER CARD
   ============================================================ */

.paper-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 22px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.05);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.paper-card:hover {
    transform: translateY(-3px);
    border-color: #bfdbfe;
    box-shadow:
        0 16px 36px rgba(37, 99, 235, 0.10);
}


/* ============================================================
   PAPER NUMBER & ICON
   ============================================================ */

.paper-number {
    color: #94a3b8;
    font-size: 14px;
    font-weight: 800;
    flex-shrink: 0;
    min-width: 24px;
}

.paper-icon {
    width: 52px;
    height: 52px;
    border-radius: 15px;
    background: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}


/* ============================================================
   PAPER INFORMATION
   ============================================================ */

.paper-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    flex: 1;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.paper-info h3,
.paper-details h3 {
    color: #172554;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
    word-break: break-word;
    overflow-wrap: break-word;
    min-width: 0;
    max-width: 100%;
}

.paper-details p {
    color: #64748b;
    font-size: 14px;
    margin: 0;
}


/* ============================================================
   PAPER META & STATS
   ============================================================ */

.paper-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 13px;
    color: #64748b;
    width: 100%;
    min-width: 0;
}

.paper-meta-item,
.paper-stat-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #475569;
    font-size: 12.5px;
    font-weight: 500;
    background: #f8fafc;
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid #f1f5f9;
    flex-shrink: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.paper-stat-item svg,
.paper-meta-item svg {
    color: #64748b;
    flex-shrink: 0;
}


/* ============================================================
   SHIFT BADGE
   ============================================================ */

.shift-badge {
    display: inline-flex;

    margin-top: 10px;

    padding: 5px 10px;

    border-radius: 999px;

    background: #eff6ff;
    color: #2563eb;

    font-size: 11px;
    font-weight: 800;

    text-transform: uppercase;
    letter-spacing: 0.5px;
}


/* ============================================================
   PDF ZOOM TOOLBAR
   ============================================================ */

.pdf-zoom-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #f1f5f9;
    padding: 3px 6px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.zoom-btn,
.zoom-level-btn,
.zoom-fit-btn {
    border: none;
    background: transparent;
    color: #1e293b;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 30px;
    box-sizing: border-box;
}

.zoom-btn:hover,
.zoom-level-btn:hover,
.zoom-fit-btn:hover {
    background: #ffffff;
    color: #2563eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.zoom-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: transparent !important;
    box-shadow: none !important;
}

.zoom-level-btn {
    min-width: 44px;
    font-size: 12px;
    color: #2563eb;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.zoom-fit-btn {
    font-size: 12px;
    padding: 4px 8px;
    background: #e2e8f0;
    color: #334155;
}


/* ============================================================
   BUTTONS
   ============================================================ */

.paper-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.paper-actions a {
    text-decoration: none;
}

.paper-actions .btn,
.paper-actions button,
.view-btn,
.download-btn {
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}


/* View */

.paper-actions .btn.primary,
.paper-actions .view-paper-btn,
.view-btn {
    background: #2563eb;
    color: white;
    border: 1px solid #2563eb;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.18);
}

.paper-actions .btn.primary:hover,
.paper-actions .view-paper-btn:hover,
.view-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}


/* Download */

.paper-actions .download-paper-btn,
.download-btn {
    background: white;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.paper-actions .download-paper-btn:hover,
.download-btn:hover {
    background: #eff6ff;
}


/* ============================================================
   EMPTY / LOADING
   ============================================================ */

.loading,
.empty {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 35px;
    text-align: center;
    color: #64748b;
}


/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
    border-top: 1px solid #e2e8f0;
    background: white;
    padding: 28px 0;
    text-align: center;
    color: #64748b;
    font-size: 13px;
}


/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

@media (max-width: 768px) {

    .container {
        width: 100%;
        padding-left: 16px;
        padding-right: 16px;
    }

    .papers-grid,
    .paper-list {
        display: flex;
        flex-direction: column;
        gap: 14px;
        width: 100%;
    }

    .paper-card {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        padding: 18px 16px;
        border-radius: 16px;
    }

    .paper-number {
        display: none;
    }

    .paper-icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        font-size: 20px;
    }

    .paper-info {
        width: 100%;
        min-width: 0;
        gap: 8px;
    }

    .paper-info h3 {
        font-size: 16px;
    }

    .paper-actions {
        width: 100%;
        display: flex;
        flex-direction: row;
        gap: 10px;
        margin-top: 2px;
    }

    .paper-actions .btn,
    .paper-actions button {
        flex: 1 1 0%;
        width: 100%;
        min-width: 0;
        min-height: 44px;
        font-size: 14px !important;
        padding: 10px 12px;
        border-radius: 10px;
        text-align: center;
        justify-content: center;
    }

}


@media (max-width: 600px) {

    .header-inner {
        min-height: 65px;
    }

    .logo {
        font-size: 21px;
    }

    .papers-page {
        padding: 35px 0 50px;
    }

    .page-description {
        font-size: 15px;
    }

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

}


@media (max-width: 360px) {

    .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .paper-card {
        padding: 14px 12px;
        gap: 12px;
    }

    .paper-actions {
        flex-direction: column;
        gap: 8px;
    }

    .paper-actions .btn,
    .paper-actions button {
        flex: none;
        width: 100%;
    }

}


