/* Modern Dynamic Sidebar */
.mds-sidebar-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.mds-posts-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mds-post-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid #e5e5e5;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.mds-post-item::before {
    content: '';
    position: absolute;
    left: -20px;
    right: -20px;
    top: -5px;
    bottom: -5px;
    background: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.02) 20%, rgba(0,0,0,0.03) 50%, rgba(0,0,0,0.02) 80%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: 12px;
}

.mds-post-item:hover::before {
    opacity: 1;
}

.mds-post-item:first-child {
    padding-top: 0;
}

.mds-post-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.mds-post-item:hover {
    transform: translateX(-5px);
}

.mds-post-item:hover .mds-post-thumbnail {
    transform: scale(1.02);
    box-shadow: 0 12px 20px rgba(0,0,0,0.1);
}

.mds-post-item:hover .mds-post-thumbnail img {
    transform: scale(1.08);
}

.mds-post-thumbnail {
    width: 140px;
    height: 105px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f0f0f0;
    position: relative;
    transition: all 0.3s ease;
}

.mds-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.mds-post-content {
    flex: 1;
    min-width: 0;
    padding-top: 4px;
}

.mds-post-title {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    color: #1a1a1a;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    letter-spacing: -0.02em;
    transition: color 0.3s ease;
}

.mds-post-reading-time {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #666666;
    font-weight: 400;
    line-height: 1;
    transition: color 0.3s ease;
}

.mds-post-reading-time::before {
    content: '';
    width: 16px;
    height: 16px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23666666" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg>') no-repeat center;
    background-size: contain;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.mds-post-item:hover .mds-post-reading-time {
    color: var(--e-global-color-accent, #007cba);
}

.mds-post-item:hover .mds-post-reading-time::before {
    opacity: 1;
}

/* Mobile */
@media (max-width: 768px) {
    .mds-post-item {
        padding: 16px 0;
        gap: 12px;
    }
    
    .mds-post-thumbnail {
        width: 100px;
        height: 75px;
        border-radius: 6px;
    }
    
    .mds-post-content {
        padding-top: 2px;
    }
    
    .mds-post-title {
        font-size: 17px;
        margin-bottom: 8px;
        -webkit-line-clamp: 3;
    }
    
    .mds-post-reading-time {
        font-size: 13px;
    }
    
    .mds-post-reading-time::before {
        width: 14px;
        height: 14px;
    }
    
    .mds-post-item:hover {
        transform: translateX(-3px);
    }
}

/* Accent color integration */
.mds-post-item:hover .mds-post-title {
    color: var(--e-global-color-accent, #007cba);
}

/* RTL Support */
.rtl .mds-post-item {
    flex-direction: row-reverse;
}

.rtl .mds-post-item:hover {
    transform: translateX(5px);
}

@media (max-width: 768px) {
    .rtl .mds-post-item:hover {
        transform: translateX(3px);
    }
}

/* Smooth font rendering */
.mds-sidebar-wrapper * {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}