/* --- استایل‌های اختصاصی صفحه تست‌ها --- */
.tests-page-container {
    display: flex;
    gap: 2rem;
    padding: 6rem 5% 4rem; /* padding-top بالا برای هدر */
    min-height: 100vh;
}

/* سایدبار فیلترها */
.sidebar {
    width: 300px;
    flex-shrink: 0;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.filter-section {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1.5rem;
}

.filter-section:last-child { border-bottom: none; }

.filter-title {
    font-weight: bold;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
}

.filter-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    align-items: center;
}

.close-filter {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
}

.filter-input, .filter-select {
    width: 100%;
    padding: 10px;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    font-family: 'Vazirmatn', sans-serif;
}

.filter-input:focus, .filter-select:focus {
    border-color: var(--accent);
    background: rgba(255,255,255,0.1);
    outline: none;
}

.filter-select option {
    background: #151621;
    color: white;
}

/* بخش اصلی (Grid) */
.main-content { flex: 1; }

.search-bar-container {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    padding: 1rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-bar-container input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-family: inherit;
    font-size: 1rem;
}

.search-bar-container input:focus {
    outline: none;
}

.result-count {
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.test-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* کارت تست */
.test-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 1.5rem;
    transition: 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
}

.test-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.test-type {
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 20px;
    position: absolute;
    top: 15px;
    left: 15px;
}
.type-individual { background: rgba(76, 201, 240, 0.2); color: var(--accent); }
.type-org { background: rgba(67, 97, 238, 0.2); color: var(--primary); }

.test-img {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #2a2b3d, #1a1b2e);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.test-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.test-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 10px 0;
    border-top: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding: 5px 0;
}

.test-price {
    font-weight: bold;
    color: var(--success);
    margin-top: auto;
    margin-bottom: 15px;
}

.test-card-link {
    margin-top: 15px;
    width: 100%;
    text-align: center;
    text-decoration: none;
}

/* صفحه بندی */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 2rem;
}

.page-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    cursor: pointer;
    transition: 0.3s;
    text-decoration: none;
}

.page-btn:hover, .page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.empty-state {
    grid-column: 1/-1;
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

/* دکمه موبایل برای باز کردن فیلتر */
.mobile-filter-btn {
    display: none;
    width: 100%;
    margin-bottom: 1rem;
    justify-content: center;
    gap: 10px;
}

/* ریسپانسیو */
@media (max-width: 992px) {
    .sidebar {
        display: none; /* پیش‌فرض مخفی در موبایل */
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        z-index: 2000;
        width: 80%;
        max-width: 300px;
        overflow-y: auto;
    }
    .sidebar.active {
        display: block;
        animation: slideIn 0.3s ease;
    }
    .mobile-filter-btn {
        display: flex;
    }
    .tests-page-container {
        flex-direction: column;
    }
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

