/* -------------------------------------------------------------------
 *  EXAM LIST PAGE - PREMIUM SAAS STYLE
 * ------------------------------------------------------------------- */

/* --- HEADER SECTION --- */
.page-header {
    background-color: var(--light);
    padding: 60px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 50px;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 10px;
}

/* --- MAIN LAYOUT --- */
.exam-list-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 40px;
    align-items: start;
}

/* --- SIDEBAR FILTERS --- */
.exam-sidebar {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 25px;
    position: sticky;
    top: 100px;
    height: fit-content;
    box-shadow: var(--shadow-sm);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--soft-bg);
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
}

.btn-reset {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: underline;
}
.btn-reset:hover { color: var(--primary); }

.sidebar-widget {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--soft-bg);
}
.sidebar-widget:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.widget-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Search Input */
.input-icon-wrap {
    position: relative;
}
.input-icon-wrap input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    transition: 0.3s;
    background: var(--light);
}
.input-icon-wrap input:focus {
    border-color: var(--primary);
    background: var(--white);
    outline: none;
}
.input-icon-wrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
}

/* Checkboxes & Radios */
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.custom-checkbox, .custom-radio {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--dark);
    user-select: none;
}
.custom-checkbox input, .custom-radio input { display: none; }

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 4px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.radio-mark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 50%;
    margin-right: 10px;
    position: relative;
}

.custom-checkbox input:checked ~ .checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
}
.custom-checkbox input:checked ~ .checkmark::after {
    content: '\2713';
    color: white;
    font-size: 12px;
    font-weight: 700;
}

.custom-radio input:checked ~ .radio-mark { border-color: var(--primary); }
.custom-radio input:checked ~ .radio-mark::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
}

.count {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--muted);
    background: var(--soft-bg);
    padding: 2px 8px;
    border-radius: 10px;
}

/* --- EMPTY STATE --- */
.empty-state-exam {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border: 1px dashed var(--border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.empty-icon-wrap {
    width: 80px;
    height: 80px;
    background: var(--soft-bg);
    color: var(--muted);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 24px;
}

.empty-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 8px;
}

.empty-desc {
    font-size: 0.95rem;
    color: var(--muted);
    max-width: 400px;
    margin-bottom: 24px;
    line-height: 1.6;
}

/* --- CONTENT AREA & CARDS --- */
.exam-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.result-text {
    color: var(--muted);
    font-size: 0.95rem;
}

.form-select {
    padding: 8px 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--dark);
    outline: none;
    cursor: pointer;
}

.exam-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 25px;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    height: 100%;
}
.exam-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 50px rgba(15,23,42,0.10);
    border-color: var(--primary);
}

.exam-banner-top {
    width: 100%;
    height: 160px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    opacity: 0.9;
}

.exam-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.badge-category {
    font-size: 11px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.price {
    font-weight: 800;
    font-size: 1.2rem;
}
.price.free {
    color: var(--dark);
    font-size: 1rem;
}

.exam-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
    line-height: 1.4;
}

.exam-desc {
    font-size: 0.95rem;
    color: var(--muted);
    margin-bottom: 20px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.exam-meta {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--muted);
    padding-bottom: 20px;
    border-bottom: 1px solid var(--soft-bg);
    margin-bottom: 20px;
}
.exam-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-exam-full {
    width: 100%;
    text-align: center;
    margin-top: auto;
    border-radius: 12px;
    padding: 12px;
    font-weight: 600;
}

/* -------------------------------------------------------------------
 *  PAGINATION (UPDATED LAYOUT)
 * ------------------------------------------------------------------- */

.exam-list-footer {
    width: 100%;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.pagination-container {
    margin-left: auto;
}

.saas-pagination-list {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark);
    background-color: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    cursor: pointer;
}

.pagination-link:not(.disabled):hover {
    border-color: var(--primary);
    color: var(--primary);
    background-color: var(--soft-bg);
    transform: translateY(-1px);
}

.page-item.active .pagination-link {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.page-item.disabled .pagination-link {
    background-color: var(--light);
    color: var(--muted);
    border-color: var(--border);
    cursor: not-allowed;
    opacity: 0.7;
}

/* --- RESPONSIVE MEDIA QUERIES --- */

@media (max-width: 992px) {
    .exam-list-layout { grid-template-columns: 1fr; }
    .exam-sidebar { display: none; }
    .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .exam-list-footer {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }
    
    .pagination-container {
        margin-left: 0;
        width: 100%;
        display: flex;
        justify-content: center;
    }
}