/* Previous Papers Section Styles */
.previous-papers-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    background: linear-gradient(to bottom, #f8fafc 0%, #ffffff 100%);
}

/* Header Styles */
.papers-header {
    text-align: center;
    margin-bottom: 50px;
}

.papers-main-title {
    font-size: 48px;
    font-weight: 700;
    color: #059669;
    margin-bottom: 16px;
    line-height: 1.2;
}

.papers-subtitle {
    font-size: 18px;
    color: #64748b;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Tabs Styles */
.papers-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 40px;
    padding: 0 20px;
}

.paper-tab {
    padding: 12px 28px;
    border: none;
    background: #ffffff;
    color: #475569;
    font-size: 15px;
    font-weight: 500;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.paper-tab:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.paper-tab.active {
    background: #059669;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

/* Grid Layout */
.papers-grid {
    margin-top: 30px;
}

.papers-grid-inner {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

/* Pagination Styles */
.papers-pagination {
    margin-top: 50px;
    display: flex;
    justify-content: center;
}

.papers-pagination ul {
    display: flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.papers-pagination li {
    margin: 0;
}

.papers-pagination a,
.papers-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    background: #ffffff;
    color: #475569;
    border: 2px solid #e2e8f0;
}

.papers-pagination a:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.papers-pagination .current {
    background: #059669;
    color: #ffffff;
    border-color: #059669;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.papers-pagination .prev,
.papers-pagination .next {
    gap: 6px;
}

.papers-pagination svg {
    width: 20px;
    height: 20px;
}

.papers-pagination .dots {
    border: none;
    background: transparent;
    cursor: default;
    color: #94a3b8;
}

.papers-pagination .dots:hover {
    background: transparent;
    transform: none;
    box-shadow: none;
}

/* Paper Card */
.paper-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid #e2e8f0;
}

.paper-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* Card Header */
.paper-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.paper-icon {
    width: 44px;
    height: 44px;
    background: #e0f2fe;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0284c7;
}

.paper-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background-color: #883EEC; /* Default color */
}

/* Category-based badge colors */
.paper-card.cat-ssc .paper-badge {
    background-color: #1d4ed8;
}

.paper-card.cat-railway .paper-badge {
    background-color: #15803d;
}

.paper-card.cat-upsc .paper-badge {
    background-color: #7e22ce;
}

.paper-card.cat-state-pcs .paper-badge {
    background-color: #c2410c;
}

.paper-card.cat-dsssb .paper-badge {
    background-color: #0f766e;
}

.paper-card.cat-all-state-exams .paper-badge {
    background-color: #4338ca;
}

/* Card Title */
.paper-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 16px 0;
    line-height: 1.4;
    min-height: 50px;
}

/* Meta Information */
.paper-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.paper-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #64748b;
}

.paper-meta-item svg {
    flex-shrink: 0;
    color: #94a3b8;
}

/* Card Footer */
.paper-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.paper-file-size {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
    padding: 4px 10px;
    background: #f1f5f9;
    border-radius: 6px;
}

/* Action Buttons */
.paper-actions {
    display: flex;
    gap: 10px;
}

.paper-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.paper-btn svg {
    width: 16px;
    height: 16px;
}

.paper-btn-view {
    background: transparent;
    color: #475569;
    border: 2px solid #e2e8f0;
}

.paper-btn-view:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.paper-btn-download {
    background: #059669;
    color: #ffffff;
}

.paper-btn-download:hover {
    background: #047857;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

/* No Papers Message */
.no-papers {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: #64748b;
}

/* Loading State */
.papers-grid.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .previous-papers-section {
        padding: 40px 15px;
    }
    
    .papers-main-title {
        font-size: 32px;
    }
    
    .papers-subtitle {
        font-size: 16px;
    }
    
    .papers-grid-inner {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .papers-tabs {
        gap: 8px;
    }
    
    .paper-tab {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .paper-card {
        padding: 20px;
    }
    
    .paper-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .paper-btn {
        width: 100%;
        justify-content: center;
    }
    
    .papers-pagination ul {
        gap: 6px;
    }
    
    .papers-pagination a,
    .papers-pagination span {
        min-width: 38px;
        height: 38px;
        padding: 0 10px;
        font-size: 14px;
    }
    
    .papers-pagination .prev span,
    .papers-pagination .next span {
        display: none;
    }
}

@media (max-width: 480px) {
    .papers-main-title {
        font-size: 28px;
    }
    
    .paper-title {
        font-size: 16px;
        min-height: auto;
    }
    
    .paper-meta-item {
        font-size: 13px;
    }
    
    .papers-pagination a,
    .papers-pagination span {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }
}