/* تنظیمات کانتینر کلی فید */
.feed-container {
    padding-bottom: 60px;
    overflow: hidden; /* جلوگیری از اسکرول صفحه */
}

/* هر بخش دسته‌بندی */
.category-section {
    margin-bottom: 60px;
    position: relative;
    /* خط جداکننده محو */
    border-bottom: 1px solid rgba(0,0,0,0.03);
    padding-bottom: 40px;
}
.category-section:last-child { border: none; margin-bottom: 0; }

/* 1. هدر هر بخش (Section Header) */
.cat-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 25px; padding: 0 10px;
}

.cat-title-box {
    display: flex; align-items: center; gap: 12px;
}

/* آیکون دسته‌بندی (داینامیک) */
.cat-icon-box {
    width: 40px; height: 40px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(77, 150, 255, 0.1);
    color: var(--primary);
}

.cat-title {
    font-size: 1.6rem; font-weight: 900; margin: 0;
    color: var(--text-dark);
}

/* دکمه "مشاهده همه" */
.see-all-btn {
    text-decoration: none; color: var(--text-light);
    font-size: 0.9rem; font-weight: bold;
    display: flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 50px;
    background: rgba(255,255,255,0.5);
    border: 1px solid rgba(0,0,0,0.05);
    transition: 0.3s;
}
.see-all-btn:hover {
    background: white; color: var(--primary);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.arrow-icon { transition: 0.3s; }
.see-all-btn:hover .arrow-icon { transform: translateX(-5px); }


/* 2. کانتینر اسلایدر (The Scroll Container) */
.slider-container {
    position: relative;
    /* این پدینگ‌ها برای اینه که سایه کارت‌ها بریده نشه */
    padding: 10px 5px 30px; 
    margin: 0 -5px; /* جبران پدینگ */
}

.slider-track {
    display: flex;
    gap: 25px;
    overflow-x: auto;
    /* اسکرول نرم و آزاد (بدون اسنپ) */
    scroll-behavior: smooth;
    padding-bottom: 10px; /* جا برای اسکرول بار مخفی */
    scrollbar-width: none; /* فایرفاکس */
    -webkit-overflow-scrolling: touch; /* نرمی در iOS */
}
.slider-track::-webkit-scrollbar { display: none; } /* کروم */


/* 3. کارت مقاله (Cinematic Card) */
.article-card {
    flex: 0 0 300px; /* عرض ثابت */
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    text-decoration: none; color: inherit;
    display: flex; flex-direction: column;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(77, 150, 255, 0.15);
    border-color: white; z-index: 5;
}

/* تصویر مقاله */
.card-image-box {
    width: 100%; height: 180px; position: relative; overflow: hidden;
}
.card-img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.6s ease;
}
.article-card:hover .card-img { transform: scale(1.1); }

/* بج نوع مقاله (گوشه بالا) */
.type-badge {
    position: absolute; top: 12px; right: 12px;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(5px);
    color: white; padding: 4px 8px; border-radius: 8px;
    font-size: 0.7rem; font-weight: bold;
    display: flex; align-items: center; gap: 4px;
}

/* محتوای کارت */
.card-content {
    padding: 20px; flex: 1; display: flex; flex-direction: column;
}

/* متادیتا (زمان و تاریخ) */
.card-meta-row {
    display: flex; justify-content: space-between;
    font-size: 0.75rem; color: #94a3b8; font-weight: 500;
    margin-bottom: 8px;
}

.card-title-h3 {
    font-size: 1.1rem; font-weight: 800; margin: 0 0 10px 0;
    line-height: 1.5; color: var(--text-dark);
    /* محدود کردن به 2 خط */
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.article-card:hover .card-title-h3 { color: var(--primary); }

/* خلاصه متن با افکت Fade Out */
.card-desc {
    font-size: 0.9rem; color: #64748b; line-height: 1.6;
    margin: 0; position: relative;
    height: 3em; /* ارتفاع حدود 2 خط */
    overflow: hidden;
}
.card-desc::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 50%;
    background: linear-gradient(to top, rgba(255,255,255,0.9), transparent);
}


/* 4. کارت "مشاهده همه" (The 'See All' Card) */
.see-all-card {
    flex: 0 0 200px; /* باریک‌تر */
    background: linear-gradient(135deg, #4D96FF, #6C5CE7);
    color: white;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center; text-align: center;
    padding: 20px; border: none;
}
.see-all-card:hover { transform: scale(1.02); }

.more-circle {
    width: 60px; height: 60px; background: rgba(255,255,255,0.2);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; margin-bottom: 15px;
    border: 1px solid rgba(255,255,255,0.3);
    transition: 0.3s;
}
.see-all-card:hover .more-circle { background: white; color: var(--primary); transform: rotate(45deg); }


/* 5. دکمه‌های ناوبری (Squircle) */
.nav-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 45px; height: 45px;
    background: white; border: 1px solid #e2e8f0;
    border-radius: 14px; /* Squircle */
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 10;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: 0.3s;
    opacity: 0; visibility: hidden; /* مخفی تا زمان هاور */
}
.category-section:hover .nav-btn { opacity: 1; visibility: visible; }

.nav-btn:hover {
    background: var(--primary); color: white; border-color: var(--primary);
    transform: translateY(-50%) scale(1.1);
}
.nav-prev { left: -20px; }
.nav-next { right: -20px; }


/* ریسپانسیو موبایل */
@media (max-width: 768px) {
    .nav-btn { display: none !important; } /* دکمه‌ها در موبایل نباشن */
    .article-card { flex: 0 0 260px; } /* کارت‌ها کمی کوچکتر */
    .cat-title { font-size: 1.3rem; }
    .slider-container { margin: 0 -20px; padding: 10px 20px 30px; } /* تمام عرض صفحه */
    .nav-prev { left: 10px; } /* اگر خواستی باشه */
    .nav-next { right: 10px; }
}