/* ===== متغیرها ===== */
:root {
    --primary-color: #4f46e5;
    --primary-gradient: linear-gradient(45deg, #4f46e5, #6366f1);
    --secondary-color: #0ea5e9;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --muted-color: #6b7280;
    --bg-light: #f9fafb;
    --shadow-sm: 0 3px 6px rgba(0,0,0,0.05);
    --shadow-md: 0 8px 18px rgba(0,0,0,0.12);
    --transition-fast: 0.3s ease;
}

body {
    font-family: 'Vazir', sans-serif;
    background-color: var(--bg-light);
    color: #111827;
    line-height: 1.6;
}

/* ===== هدر اصلی ===== */
header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
header p {
    font-size: 1.05rem;
    max-width: 750px;
    margin: auto;
    color: var(--muted-color);
}

/* ===== کارت‌ها ===== */
.card {
    border-radius: 14px;
    border: none;
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    animation: fadeInUp 0.6s ease;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

/* ===== کارت آگهی ad.php ===== */
.ad-card {
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border: none;
    margin-bottom: 30px;
}
.ad-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 20px;
}
.ad-content {
    line-height: 1.8;
    font-size: 1.05rem;
    white-space: pre-line;
}
.meta-item {
    margin-left: 15px;
    color: var(--muted-color);
}
.meta-item i {
    margin-left: 5px;
}

/* ===== فیلتر ===== */
.filter-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}
.filter-card label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--muted-color);
}
.filter-card select {
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
}
.filter-card select:hover {
    border-color: var(--primary-color);
}

/* ===== آمار ===== */
.stat-card {
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    background: #fff;
    position: relative;
    overflow: hidden;
}
.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.icon-circle {
    width: 48px;
    height: 48px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.25rem;
}

/* ===== آمار فشرده (موبایل) ===== */
.stats-compact {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    background: var(--bg-light);
    padding: 8px 12px;
    border-radius: 8px;
    scrollbar-width: thin;
}
.stats-compact::-webkit-scrollbar {
    height: 5px;
}
.stats-compact::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 8px;
}
.stats-compact .stat-item {
    display: inline-block;
    font-size: 0.85rem;
    margin-left: 15px;
    color: #374151;
}
.stats-compact .stat-item strong {
    font-weight: 700;
    color: var(--primary-color);
}

/* ===== گروه خونی ===== */
.blood-badge {
    font-size: 0.9rem;
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
}
.blood-A { background-color: #fee2e2; color: #b91c1c; }
.blood-B { background-color: #dcfce7; color: #166534; }
.blood-O { background-color: #dbeafe; color: #1e40af; }
.blood-AB { background-color: #ede9fe; color: #5b21b6; }

/* ===== دکمه‌ها ===== */
.btn-custom, .action-btn {
    border-radius: 50px;
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    background: var(--primary-gradient);
    color: white;
    transition: background var(--transition-fast), transform var(--transition-fast);
}
.btn-custom:hover, .action-btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(45deg, #4338ca, #4f46e5);
}
.btn-outline-primary {
    border-radius: 50px;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    transition: all 0.3s;
}
.btn-outline-primary:hover {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
}

/* ===== کارت آگهی مشابه ===== */
.similar-card {
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    text-decoration: none !important;
    height: 100%;
}
.similar-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}
.similar-card .card-body {
    padding: 1.5rem;
}
.similar-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    opacity: 0.8;
}

/* ===== صفحه‌بندی ===== */
.pagination .page-item .page-link {
    border-radius: 8px;
    padding: 0.5rem 0.8rem;
    font-weight: 600;
    color: var(--primary-color);
}
.pagination .page-item.active .page-link {
    background: var(--primary-gradient);
    border-color: transparent;
}

/* ===== انیمیشن ورود ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== واکنش‌گرایی ===== */
@media (max-width: 768px) {
    header h1 { font-size: 1.6rem; }
    .filter-card { padding: 1rem; }
    .action-btn { width: 100%; margin-bottom: 10px; }
}