/* استایل‌های بخش نوشته‌های اخیر */
.recent-posts-section {
    background: transparent;
    padding: 64px 20px;
    position: relative;
    overflow: hidden;
}

.recent-posts-container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* هدر بخش */
.recent-posts-header {
    padding: 40px 48px;
    text-align: center;
    margin-bottom: 48px;
}

.recent-posts-title {
    font-size: 42px;
    font-weight: 900;
    color: #B8A788;
    margin-bottom: 16px;
    letter-spacing: -0.6px;
    text-shadow: 0 4px 20px rgba(184, 167, 136, 0.4);
    animation: titleGlow 3s ease-in-out infinite;
}

.recent-posts-subtitle {
    font-size: 16px;
    line-height: 1.8;
    color: #E6E7E8;
    margin: 0;
    opacity: 0.9;
}

/* کاروسل پست‌ها */
.recent-posts-carousel-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 16px 0 32px 0;
    margin-bottom: 40px;
    mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
}

.recent-posts-carousel-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(184, 167, 136, 0.4) transparent;
    padding: 8px 30px;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    will-change: scroll-position;
}

.recent-posts-carousel-track:active {
    cursor: grabbing;
}

.recent-posts-carousel-track.dragging {
    scroll-behavior: auto;
}

.recent-posts-carousel-track::-webkit-scrollbar {
    height: 8px;
}

.recent-posts-carousel-track::-webkit-scrollbar-track {
    background: rgba(184, 167, 136, 0.1);
    border-radius: 10px;
    margin: 0 20px;
}

.recent-posts-carousel-track::-webkit-scrollbar-thumb {
    background: rgba(184, 167, 136, 0.4);
    border-radius: 10px;
    transition: background 0.3s ease;
}

.recent-posts-carousel-track::-webkit-scrollbar-thumb:hover {
    background: rgba(184, 167, 136, 0.6);
}

/* کارت پست */
.post-card {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    width: 320px;
    min-width: 320px;
    max-width: 320px;
    scroll-snap-align: start;
}

.recent-posts-carousel-track {
    scroll-snap-type: x mandatory;
}

.post-card:hover {
    box-shadow: 
        0 24px 70px rgba(184, 167, 136, 0.6),
        0 0 0 0.6px rgba(184, 167, 136, 0.6),
        inset 0 0.6px 2px rgba(230, 231, 232, 0.4);
}

.post-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

/* تصویر پست */
.post-image-wrapper {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
    background: rgba(26, 42, 57, 0.3);
    border-radius: 20px 20px 0 0;
    margin-bottom: -10px;
    z-index: 2;
}

.post-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.post-card:hover .post-image {
    transform: scale(1.1);
}

.post-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(26, 42, 57, 0.3) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.post-card:hover .post-image-overlay {
    opacity: 1;
}

.post-category-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 3;
    padding: 6px 14px;
    background: rgba(26, 42, 57, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 2px solid rgba(184, 167, 136, 0.4);
    box-shadow: 0 2px 8px rgba(184, 167, 136, 0.4);
}

.post-category-badge span {
    font-size: 12px;
    font-weight: 600;
    color: #B8A788;
}

/* محتوای پست */
.post-content {
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: transparent;
    position: relative;
    margin-top: -10px;
    padding-top: 26px;
    border-radius: 0 0 20px 20px;
    z-index: 1;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: rgba(230, 231, 232, 0.7);
    font-size: 11px;
}

.post-date-icon {
    width: 16px;
    height: 16px;
    color: #B8A788;
}

.post-date {
    font-weight: 500;
}

.post-title {
    font-size: 18px;
    font-weight: 700;
    color: #B8A788;
    margin: 0 0 10px 0;
    line-height: 1.4;
    text-align: right;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.post-card:hover .post-title {
    color: #E6E7E8;
}

.post-excerpt {
    font-size: 13px;
    line-height: 1.6;
    color: #E6E7E8;
    margin: 0 0 16px 0;
    text-align: right;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    opacity: 0.85;
    flex: 1;
}

.post-read-more {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #B8A788;
    font-size: 14px;
    font-weight: 600;
    margin-top: auto;
    transition: all 0.3s ease;
}

.post-card:hover .post-read-more {
    color: #E6E7E8;
    gap: 12px;
}

.read-more-icon {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.post-card:hover .read-more-icon {
    transform: translateX(-4px);
}

/* دکمه مشاهده همه */
.recent-posts-footer {
    text-align: center;
    margin-top: 32px;
}

.view-all-posts-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: linear-gradient(135deg, rgba(184, 167, 136, 0.3) 0%, rgba(184, 167, 136, 0.2) 100%);
    border: 2px solid rgba(184, 167, 136, 0.5);
    border-radius: 16px;
    color: #B8A788;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 14px rgba(184, 167, 136, 0.4);
}

.view-all-posts-btn:hover {
    background: linear-gradient(135deg, rgba(184, 167, 136, 0.4) 0%, rgba(184, 167, 136, 0.3) 100%);
    border-color: rgba(184, 167, 136, 0.7);
    color: #E6E7E8;
    box-shadow: 0 6px 20px rgba(184, 167, 136, 0.6);
    gap: 16px;
}

.view-all-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.view-all-posts-btn:hover .view-all-icon {
    transform: translateX(-4px);
}

/* ریسپانسیو */
@media (max-width: 1024px) {
    .post-card {
        width: 320px;
        min-width: 320px;
        max-width: 320px;
    }
    
    .recent-posts-carousel-track {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .recent-posts-section {
        padding: 48px 14px;
    }
    
    .recent-posts-header {
        padding: 32px 24px;
        margin-bottom: 32px;
    }
    
    .recent-posts-title {
        font-size: 28px;
        margin-bottom: 12px;
    }
    
    .recent-posts-subtitle {
        font-size: 14px;
    }
    
    .recent-posts-carousel-wrapper {
        margin-bottom: 32px;
        padding: 14px 0;
    }
    
    .recent-posts-carousel-track {
        gap: 16px;
        padding: 8px 14px;
    }
    
    .post-card {
        width: 300px;
        min-width: 300px;
        max-width: 300px;
    }
    
    .post-image-wrapper {
        height: 200px;
    }
    
    .post-content {
        padding: 20px;
        padding-top: 28px;
    }
    
    .post-title {
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    .post-excerpt {
        font-size: 12px;
        margin-bottom: 16px;
    }
    
    .view-all-posts-btn {
        padding: 14px 28px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .recent-posts-section {
        padding: 32px 12px;
    }
    
    .recent-posts-header {
        padding: 24px 20px;
        margin-bottom: 24px;
    }
    
    .recent-posts-title {
        font-size: 24px;
    }
    
    .recent-posts-subtitle {
        font-size: 12px;
    }
    
    .recent-posts-carousel-wrapper {
        margin-bottom: 24px;
        padding: 12px 0;
    }
    
    .recent-posts-carousel-track {
        gap: 14px;
        padding: 6px 12px;
    }
    
    .post-card {
        width: 280px;
        min-width: 280px;
        max-width: 280px;
    }
    
    .post-image-wrapper {
        height: 180px;
    }
    
    .post-content {
        padding: 16px;
        padding-top: 24px;
    }
    
    .post-meta {
        font-size: 12px;
        margin-bottom: 12px;
    }
    
    .post-title {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    .post-excerpt {
        font-size: 12px;
        margin-bottom: 12px;
    }
    
    .post-read-more {
        font-size: 12px;
    }
    
    .view-all-posts-btn {
        padding: 12px 24px;
        font-size: 12px;
    }
}

