/* ===== SLGURU.LK past papers page (css/past-papers.css) ===== */

body {
    background-color: #f8fafc;
}

/* All text light (below 500); icons excluded so they still show */
.pp-hero-band *:not(i),
.pp-page *:not(i) {
    font-weight: 400 !important;
}

/* ---------- Hero band ---------- */
.pp-hero-band {
    background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
    color: #1e293b;
    border-bottom: 1px solid #fde68a;
    margin-top: 5.5rem;
    padding: 1.5rem 0 1.75rem;
}
.pp-breadcrumb {
    font-size: 0.78rem;
    color: #64748b;
    margin-bottom: 0.45rem;
}
.pp-breadcrumb a {
    color: #475569;
    text-decoration: none;
}
.pp-breadcrumb a:hover {
    color: #b45309;
}
.pp-hero-title {
    font-size: 1.75rem;
    line-height: 1.35;
    color: #1e293b;
    margin: 0 0 0.4rem 0;
}
.pp-hero-sub {
    font-size: 0.92rem;
    color: #64748b;
}

/* ---------- Notice ---------- */
.pp-notice {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 0.65rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.82rem;
    line-height: 1.6;
    color: #64748b;
}
.pp-notice > i {
    color: #d97706;
    margin-top: 0.2rem;
}
.pp-notice a {
    color: #b45309;
    text-decoration: underline;
}
.pp-notice-label {
    color: #1e293b;
}

/* ---------- Cards ---------- */
.pp-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.15rem 1.25rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.section-accent-label {
    font-size: 0.9rem;
    color: #1e293b;
    border-left: 3px solid #f59e0b;
    padding-left: 0.55rem;
    margin-bottom: 0.9rem;
}

/* ---------- Filter form ---------- */
.pp-label {
    display: block;
    font-size: 0.74rem;
    color: #64748b;
    margin-bottom: 0.25rem;
}
.pp-input {
    font-size: 0.9rem;
    color: #1e293b;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: #ffffff;
}
.pp-input:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}
.pp-search-wrap {
    position: relative;
}
.pp-search-wrap > i {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}
.pp-search-wrap .pp-input {
    padding-left: 2.4rem;
}
.pp-btn-search {
    width: 100%;
    background: #f59e0b;
    color: #1f2937;
    border: none;
    border-radius: 0.5rem;
    padding: 0.55rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
}
.pp-btn-search:hover {
    background: #d97706;
}
.pp-filter-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    border: none;
    padding: 0.1rem 0;
    margin-bottom: 0.2rem;
    font-size: 0.95rem;
    color: #1e293b;
}
.pp-filter-toggle i {
    color: #d97706;
}
@media (max-width: 767.98px) {
    #filterBox.show,
    #filterBox.collapsing {
        margin-top: 0.8rem;
    }
}

/* ---------- Active filter chips ---------- */
.pp-active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.82rem;
}
.pp-active-label {
    color: #64748b;
}
.pp-filter-chip {
    background: #fde68a;
    color: #78350f;
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.pp-filter-chip i {
    font-size: 0.68rem;
}
.pp-filter-chip:hover {
    background: #fcd34d;
    color: #78350f;
}
.pp-clear-all {
    color: #b45309;
    text-decoration: none;
}
.pp-clear-all:hover {
    text-decoration: underline;
}

/* ---------- Result bar + view toggle ---------- */
.pp-result-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.pp-result-info {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.4rem 0.9rem;
    font-size: 0.84rem;
    color: #64748b;
}
.pp-list-heading {
    font-size: 1.1rem;
    color: #1e293b;
    margin: 0;
}
.pp-view-toggle {
    display: inline-flex;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 0.15rem;
}
.pp-toggle-btn {
    background: transparent;
    border: none;
    color: #475569;
    font-size: 0.82rem;
    padding: 0.3rem 0.95rem;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.pp-toggle-btn:hover {
    color: #92400e;
}
.pp-toggle-btn.active {
    background: #fde68a;
    color: #78350f;
}

/* ---------- Paper card (grid) ---------- */
.paper-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.paper-card:hover {
    border-color: #fde68a;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
}
.paper-thumb-wrapper {
    display: block;
    position: relative;
    height: 200px;
    background: #f1f5f9;
    overflow: hidden;
}
.paper-thumb-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
}
.paper-subject-chip {
    position: absolute;
    left: 0.6rem;
    bottom: 0.6rem;
    max-width: calc(100% - 1.2rem);
    background: rgba(255, 255, 255, 0.94);
    color: #78350f;
    font-size: 0.74rem;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.15);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.paper-details {
    flex: 1;
    min-width: 0;
    padding: 0.9rem 1.1rem 0.4rem;
}
.paper-title {
    font-size: 1rem;
    line-height: 1.45;
    margin: 0 0 0.6rem 0;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.paper-title a {
    color: #1e293b;
    text-decoration: none;
}
.paper-title a:hover {
    color: #b45309;
}
.pp-tag {
    background: #ffffff;
    color: #475569;
    border: 1px solid #e2e8f0;
    font-size: 0.72rem;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.pp-tag-amber {
    background: #fde68a;
    border-color: #fde68a;
    color: #78350f;
}
.paper-meta {
    font-size: 0.76rem;
    color: #64748b;
}
.paper-action {
    padding: 0.5rem 1.1rem 1rem;
}
.pp-view-btn {
    display: block;
    text-align: center;
    font-size: 0.86rem;
    color: #92400e;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 999px;
    padding: 0.4rem 1rem;
    text-decoration: none;
    white-space: nowrap;
}
.pp-view-btn:hover,
.paper-card:hover .pp-view-btn {
    background: #fde68a;
    color: #78350f;
}

/* ---------- Ad tile ---------- */
.pp-ad-tile {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* ---------- List view ---------- */
.view-container.list-view .paper-item {
    width: 100% !important;
    flex: 0 0 100%;
    max-width: 100%;
}
.view-container.list-view .paper-card {
    flex-direction: row;
    align-items: center;
}
.view-container.list-view .paper-thumb-wrapper {
    width: 150px;
    min-width: 150px;
    height: 125px;
}
.view-container.list-view .paper-details {
    padding: 0.8rem 1.1rem;
}
.view-container.list-view .paper-action {
    padding: 0 1.1rem 0 0;
    min-width: 140px;
}
@media (max-width: 575.98px) {
    .view-container.list-view .paper-card {
        flex-direction: column;
        align-items: stretch;
    }
    .view-container.list-view .paper-thumb-wrapper {
        width: 100%;
        min-width: 0;
        height: 170px;
    }
    .view-container.list-view .paper-action {
        padding: 0.5rem 1.1rem 1rem;
    }
}

/* ---------- Pagination ---------- */
.pp-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1.75rem;
}
.pg-num,
.pg-btn {
    min-width: 2.4rem;
    height: 2.4rem;
    padding: 0 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #334155;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    font-size: 0.88rem;
    text-decoration: none;
}
a.pg-num:hover,
a.pg-btn:hover {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}
.pg-num.active {
    background: #fde68a;
    border-color: #f59e0b;
    color: #78350f;
}
.pg-dots {
    color: #94a3b8;
    padding: 0 0.2rem;
}

/* ---------- Empty state ---------- */
.pp-empty {
    text-align: center;
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: 0.75rem;
    padding: 2.5rem 1rem;
    color: #64748b;
}
.pp-empty > i {
    font-size: 2.4rem;
    color: #cbd5e1;
    margin-bottom: 0.6rem;
}
.pp-empty .pp-view-btn {
    display: inline-block;
}

@media (max-width: 575.98px) {
    .pp-hero-title {
        font-size: 1.4rem;
    }
}
