/* ============================================================
   style.css - استایل‌های کامل قالب 2026
   ============================================================ */

/* ===== BASE ===== */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #7c3aed;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --radius: 16px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.10);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Hamishe', 'IRANSans', 'Tahoma', sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* ===== CONTAINER ===== */
.site-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}
@media (max-width: 640px) {
    .site-container { padding: 0 16px; }
}

/* ===== CARDS ===== */
.card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    transition: var(--transition);
}
.card:hover {
    box-shadow: var(--shadow-hover);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
}
.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}
.btn-outline {
    background: transparent;
    color: var(--gray-700);
    border: 2px solid var(--gray-200);
}
.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ===== POST GRID ===== */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}
.post-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-decoration: none;
}
.post-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}
.post-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.post-card .content {
    padding: 16px 20px;
}
.post-card .content h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
}
.post-card .content p {
    font-size: 14px;
    color: var(--gray-500);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-card .content .meta {
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 8px;
    display: flex;
    gap: 12px;
}
@media (max-width: 640px) {
    .post-grid { grid-template-columns: 1fr; }
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    font-size: 14px;
    color: var(--gray-500);
    padding: 12px 0;
}
.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { color: var(--gray-300); }

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 24px 0;
}
.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}
.pagination a {
    background: white;
    color: var(--gray-700);
    box-shadow: var(--shadow);
}
.pagination a:hover {
    background: var(--primary);
    color: white;
}
.pagination .current {
    background: var(--primary);
    color: white;
}
.pagination .dots {
    color: var(--gray-400);
    background: none;
    box-shadow: none;
}

/* ===== UTILITY ===== */
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.mt-8 { margin-top: 32px; }
.mb-8 { margin-bottom: 32px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-in {
    animation: fadeInUp 0.5s ease forwards;
}

/* ===== LOADING SKELETON ===== */
.skeleton {
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== PRINT STYLES ===== */
@media print {
    .site-header, .site-footer, .article-sidebar, .share-section, .rating-section {
        display: none !important;
    }
    .article-main { box-shadow: none; padding: 0; }
    body { background: white; }
}