.tool-subject-page {
    color: #0f172a;
}

.tool-subject-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
    transition: all .22s ease;
}

.tool-subject-card:hover {
    transform: translateY(-3px);
    border-color: rgba(25, 135, 84, .38);
    box-shadow: 0 18px 38px rgba(15, 23, 42, .10);
}

.tool-subject-thumb-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #f8fafc;
    text-decoration: none;
}

.tool-subject-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}

.tool-subject-card:hover .tool-subject-thumb {
    transform: scale(1.04);
}

.tool-subject-thumb-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, rgba(15, 23, 42, .04), rgba(15, 23, 42, .22));
    pointer-events: none;
}

.tool-subject-access-badge {
    position: absolute;
    right: 12px;
    top: 12px;
    z-index: 2;
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .16);
}

.tool-subject-status-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    color: #dc2626;
    font-size: 12px;
    font-weight: 850;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .14);
    backdrop-filter: blur(6px);
}

.tool-subject-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px 16px 14px;
}

.tool-subject-title {
    margin: 0;
    font-size: 16px;
    font-weight: 850;
    line-height: 1.42;
}

.tool-subject-title a {
    display: -webkit-box;
    color: #0f172a;
    text-decoration: none;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tool-subject-title a:hover {
    color: #198754;
    text-decoration: none;
}

.tool-subject-desc {
    margin: 9px 0 0;
    color: #64748b;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.55;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tool-subject-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #eef2f7;
}

.tool-subject-views {
    display: inline-flex;
    align-items: center;
    color: #64748b;
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
}

.tool-subject-views i {
    color: #198754;
}

.tool-subject-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 10px;
    border-radius: 999px;
    background: #f0fdf4;
    color: #15803d;
    font-size: 12.5px;
    font-weight: 850;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: all .18s ease;
}

.tool-subject-action:hover {
    background: #198754;
    color: #fff;
    text-decoration: none;
}

.tool-subject-empty {
    padding: 40px 22px;
    border: 1px dashed #93c5fd;
    border-radius: 20px;
    background:
        radial-gradient(circle at top right, rgba(25, 135, 84, .10), transparent 34%),
        linear-gradient(135deg, #ffffff, #eff6ff);
    text-align: center;
}

.tool-subject-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin-bottom: 14px;
    border-radius: 999px;
    background: #dbeafe;
    color: #2563eb;
    font-size: 24px;
}

.tool-subject-empty h5 {
    margin-bottom: 8px;
    color: #0f172a;
    font-weight: 850;
}

.tool-subject-empty p {
    max-width: 520px;
    margin: 0 auto 18px;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.6;
}

.tool-subject-loading {
    display: inline-flex;
    gap: 10px;
}

.tool-subject-pagination {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

.tool-subject-pagination .pagination {
    margin-bottom: 0;
}

/* .badge.bg-free {
    background: #dcfce7;
    color: #15803d;
}

.badge.bg-basic {
    background: #e0f2fe;
    color: #0369a1;
}

.badge.bg-premium {
    background: #1e293b;
}

.badge.bg-purple {
    background: #7c3aed;
} */

@media (max-width: 575.98px) {
    .tool-subject-card {
        border-radius: 18px;
    }

    .tool-subject-body {
        padding: 15px;
    }

    .tool-subject-title {
        font-size: 15.5px;
    }

    .tool-subject-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .tool-subject-action {
        width: 100%;
        min-height: 36px;
    }
}
/* Pagination */
/* =========================================================
   KTMT CUSTOM PAGINATION
========================================================= */

.tool-subject-pagination,
.ktmt-pagination-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 24px;
}

.ktmt-pagination-info {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 9px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #fff;
    color: #64748b;
    font-size: 14px;
    font-weight: 650;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .05);
}

.ktmt-pagination-info strong {
    color: #0f766e;
    font-weight: 850;
}

.ktmt-pagination {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}

.ktmt-pagination .page-item {
    margin: 0;
}

.ktmt-pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 11px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #334155;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    box-shadow: none;
    transition: all .18s ease;
}

.ktmt-pagination .page-link:hover {
    background: #ecfdf5;
    color: #198754;
}

.ktmt-pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #198754, #0f766e);
    color: #fff;
    box-shadow: 0 8px 18px rgba(25, 135, 84, .28);
}

.ktmt-pagination .page-item.disabled .page-link {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
    opacity: .8;
}

.ktmt-page-dots {
    min-width: 28px !important;
    padding: 0 6px !important;
}

@media (max-width: 575.98px) {
    .tool-subject-pagination,
    .ktmt-pagination-wrap {
        flex-direction: column;
        gap: 10px;
    }

    .ktmt-pagination-info {
        width: 100%;
        justify-content: center;
        border-radius: 16px;
        font-size: 13px;
    }

    .ktmt-pagination {
        max-width: 100%;
        overflow-x: auto;
        border-radius: 16px;
    }

    .ktmt-pagination .page-link {
        min-width: 32px;
        height: 32px;
        font-size: 13px;
    }
}
